mirror of
https://github.com/dlang/dmd.git
synced 2025-04-26 21:21:48 +03:00

* Improve "need `this`" error for function calls * Improve "need `this`" error for member variables * Improve "need this" error for address of variable * Remove dead error
23 lines
417 B
D
23 lines
417 B
D
/*
|
|
TEST_OUTPUT:
|
|
---
|
|
fail_compilation/fail301.d(11): Error: accessing non-static variable `guard` requires an instance of `bug3305b`
|
|
fail_compilation/fail301.d(22): Error: template instance `fail301.bug3305!0` error instantiating
|
|
---
|
|
*/
|
|
|
|
struct bug3305(alias X = 0)
|
|
{
|
|
auto guard = bug3305b!(0).guard;
|
|
}
|
|
|
|
struct bug3305b(alias X = 0)
|
|
{
|
|
bug3305!(X) goo;
|
|
auto guard = 0;
|
|
}
|
|
|
|
void test()
|
|
{
|
|
bug3305!(0) a;
|
|
}
|