[Issue 14123] New: cannot compare typeid(object.Object) at compile time

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Wed Feb 4 03:50:32 PST 2015


https://issues.dlang.org/show_bug.cgi?id=14123

          Issue ID: 14123
           Summary: cannot compare typeid(object.Object) at compile time
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Keywords: CTFE
          Severity: enhancement
          Priority: P1
         Component: DMD
          Assignee: nobody at puremagic.com
          Reporter: nilsbossung at googlemail.com
            Blocks: 7151

---
cat > test.d << code
static assert({
    auto o = new Object;
    return typeid(o) is typeid(o); /* line 3 */
}());
code
dmd -c test.d
---
test.d(3): Error: cannot compare typeid(object.Object) at compile time
test.d(4):        called from here: (*() => **o is **o)()
test.d(1):        while evaluating: static assert((*() => **o is **o)())
---

--


More information about the Digitalmars-d-bugs mailing list