[LLVMbugs] [Bug 2714] New: [sema] obj-c properties are not searched for messages to id

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Sat Aug 23 03:34:36 PDT 2008


           Summary: [sema] obj-c properties are not searched for messages to
           Product: clang
           Version: unspecified
          Platform: Macintosh
        OS/Version: MacOS X
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Semantic Analyzer
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: daniel at zuster.org
                CC: llvmbugs at cs.uiuc.edu, snaroff at apple.com

clang rejects the following code which it should accept:
@interface A
@property int amount;

void foo(id x) {
  float balance;

  balance += [x amount];
ddunbar at ddunbar2:CodeGenObjC$ gcc -fsyntax-only misc2.m
ddunbar at ddunbar2:CodeGenObjC$ ccc -fsyntax-only misc2.m
misc2.m:8:14: warning: method '-amount' not found (return type defaults to
  balance += [x amount];
misc2.m:8:11: error: invalid operands to binary expression ('float' and 'id')
  balance += [x amount];
  ~~~~~~~ ^  ~~~~~~~~~~
2 diagnostics generated.
ddunbar at ddunbar2:CodeGenObjC$

Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

More information about the llvm-bugs mailing list