mirror of
https://github.com/dlang/dmd.git
synced 2025-04-26 05:00:16 +03:00
21 lines
417 B
D
21 lines
417 B
D
/*
|
|
TEST_OUTPUT:
|
|
---
|
|
fail_compilation/fail212.d(10): Error: function `fail212.baz` without `this` cannot be `const`
|
|
fail_compilation/fail212.d(10): did you mean to use `const(int)` as the return type?
|
|
fail_compilation/fail212.d(18): Error: function `fail212.S.bar` without `this` cannot be `const`
|
|
---
|
|
*/
|
|
|
|
const int baz();
|
|
|
|
struct S
|
|
{
|
|
void foo() const
|
|
{
|
|
}
|
|
|
|
static void bar() const
|
|
{
|
|
}
|
|
}
|