mirror of
https://github.com/dlang/dmd.git
synced 2025-04-26 13:10:12 +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
21 lines
292 B
D
21 lines
292 B
D
// PERMUTE_ARGS: -inline
|
|
/*
|
|
TEST_OUTPUT:
|
|
---
|
|
fail_compilation/fail46.d(19): Error: calling non-static function `bug` requires an instance of type `MyStruct`
|
|
---
|
|
*/
|
|
|
|
struct MyStruct
|
|
{
|
|
int bug()
|
|
{
|
|
return 3;
|
|
}
|
|
}
|
|
|
|
int main()
|
|
{
|
|
assert(MyStruct.bug() == 3);
|
|
return 0;
|
|
}
|