[Issue 3643] New: Compiler error on obtaining typeid of a property

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Dec 23 18:44:48 PST 2009


http://d.puremagic.com/issues/show_bug.cgi?id=3643

           Summary: Compiler error on obtaining typeid of a property
           Product: D
           Version: 2.036
          Platform: x86
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: pjdeets2 at gmail.com


--- Comment #0 from Phil Deets <pjdeets2 at gmail.com> 2009-12-23 18:44:45 PST ---
See comments in the code below. I don't think this code should get an error.

import std.stdio;

class A {
  @property int f() { return 2; }
}

int main() {
  A a = new A;
  writeln(typeid(a.f())); // works
  writeln(typeid(a.f));   // Error: no type for typeid(f)
  return 0;
}

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list