Summary: Bogus diagnostic when member function call doesn't
                    match constancy
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: major
          Priority: P2
         Component: DMD

--- Comment #0 from Dmitry Olshansky <> 2012-08-15 
10:56:08 PDT ---
It's an old and annoying bug. Could be a duplicate but I failed to find any.


struct SimpleCaseEntry
    ubyte bucket;// n - number in bucket
    @property ubyte size()
        return bucket & 0x3F;
    @property auto isLower()
        return bucket & 0x40;
    @property auto isUpper()
        return bucket & 0x80;
    this(ubyte size, bool lower, bool upper)
        bucket = size;
            bucket |= 0x40;
            bucket |= 0x80;


void main()
    const SimpleCaseEntry e = SimpleCaseEntry(8, true, false);

With dmd 2.060:

D:\D\m.d(30): Error: function m.SimpleCaseEntry.isUpper () is not callable
using argument types()
D:\D\m.d(31): Error: function m.SimpleCaseEntry.isLower () is not callable
using argument types ()

Not a single word mentioning CONST or QUALIFIERS. While I'm more or less used
to wrong error message it would blow away newibie's mind and thus marked as

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to