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

          Issue ID: 17641
           Summary: TypeInfo for two identical delegates (or functions)
                    are not equal to each other
           Product: D
           Version: D2
          Hardware: All
                OS: Windows
            Status: NEW
          Severity: major
          Priority: P1
         Component: druntime
          Assignee: [email protected]
          Reporter: [email protected]

Example:

auto d1 = delegate void(uint a) {};
auto d2 = delegate void(uint a) {};

assert(typeid(d1) is typeid(d2)); // OK

But in another case:

auto d1 = delegate void(uint a) { writeln(a); };
auto d2 = delegate void(uint a) {};

assert(typeid(d1) is typeid(d2)); // FAILED! Although type hasn't been
changed...

Also, the string representation of typeid(d1) is "void delegate()", although
there must be a "void delegate(uint)".

--

Reply via email to