dmd/compiler/test/fail_compilation/fail50.d
Dennis c4e84f226e
Improve "need this" error (#15430)
* 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
2023-07-20 12:41:02 +03:00

13 lines
271 B
D

/*
TEST_OUTPUT:
---
fail_compilation/fail50.d(12): Error: taking the address of non-static variable `a` requires an instance of `Marko`
fail_compilation/fail50.d(12): Error: variable `a` cannot be read at compile time
---
*/
struct Marko
{
int a;
int* m = &a;
}