September 09, 2019 [Issue 2189] bad alias declaration not reported as semantic error | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=2189 RazvanN <razvan.nitu1305@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |razvan.nitu1305@gmail.com Resolution|--- |INVALID --- Comment #1 from RazvanN <razvan.nitu1305@gmail.com> --- This bug report is invalid. `test.c` is a valid identifier and taking an alias to it is fine. For example: class test1 { alias test.c d; void foo() { int a = d.offsetof; } } If you use it like this: class test1 { alias test.c d; void foo() { int a = d; } } The you get the correct error: "need this for c of type int". Closing as invalid. -- |
Copyright © 1999-2021 by the D Language Foundation