mirror of
https://github.com/dlang/dmd.git
synced 2025-04-26 21:21:48 +03:00
19 lines
359 B
D
19 lines
359 B
D
/*
|
|
TEST_OUTPUT:
|
|
---
|
|
fail_compilation/diag6707.d(17): Error: mutable method `diag6707.Foo.value` is not callable using a `const` object
|
|
fail_compilation/diag6707.d(13): Consider adding `const` or `inout` here
|
|
---
|
|
*/
|
|
|
|
module diag6707;
|
|
|
|
struct Foo
|
|
{
|
|
@property bool value() { return true; }
|
|
|
|
void test() const
|
|
{
|
|
auto x = value;
|
|
}
|
|
}
|