[Issue 19270] New: is expression fails with function types
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Thu Sep 27 13:54:40 UTC 2018
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 at puremagic.com
Reporter: atila.neves at 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));
-------
--
More information about the Digitalmars-d-bugs
mailing list