digitalmars.D.bugs - [Issue 19270] New: is expression fails with function types
- d-bugmail puremagic.com (26/26) Sep 27 2018 https://issues.dlang.org/show_bug.cgi?id=19270
https://issues.dlang.org/show_bug.cgi?id=19270 Issue ID: 19270 Summary: is expression fails with function types Product: D Version: D2 Hardware: x86_64 OS: Linux Status: NEW Severity: normal Priority: P1 Component: dmd Assignee: nobody puremagic.com Reporter: atila.neves gmail.com The second static assert below fails and shouldn't since it's basically the same thing as the first one: ------- int foo(short, double) { return 42; } static assert(is(typeof(foo) == typeof(*(int function(short, double)).init))); static assert(is(typeof(foo) == typeof(*(int function(A0, double)).init)), A0); ------- Note that this works as expected: ------- static assert(is(typeof(&foo) == int function(A0, double), A0)); ------- --
Sep 27 2018