[LLVMbugs] [Bug 15451] New: Classes can not conform to protocols

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Tue Mar 5 14:50:13 PST 2013


http://llvm.org/bugs/show_bug.cgi?id=15451

            Bug ID: 15451
           Summary: Classes can not conform to protocols
           Product: clang
           Version: unspecified
          Hardware: Macintosh
                OS: MacOS X
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Static Analyzer
          Assignee: kremenek at apple.com
          Reporter: jacob.r.jennings at gmail.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

>From the document, "The Objective-C Programming Language" which can be found in
xcode organizer -> documentation -> search for it, it says:

"Protocols can’t be used to type class objects. Only instances can be
statically typed to a protocol, just as only instances can be statically typed
to a class. (However, at runtime, both classes and instances respond to a
conformsToProtocol: message.)"

Neither xcode nor clang offer any hints to this fact when attempting to write
something like:

- (void)doSomethingWithClass:(Class<MyProtocol>)class

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20130305/2fce50ab/attachment.html>


More information about the llvm-bugs mailing list