mirror of
https://github.com/dlang/dmd.git
synced 2025-04-26 05:00:16 +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
13 lines
271 B
D
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;
|
|
}
|