mirror of
https://github.com/dlang/dmd.git
synced 2025-04-26 13:10:12 +03:00
25 lines
324 B
D
25 lines
324 B
D
// https://issues.dlang.org/show_bug.cgi?id=23861
|
|
|
|
/*
|
|
TEST_OUTPUT:
|
|
---
|
|
fail_compilation/fail23861.d(24): Error: cannot implicitly convert expression `3` of type `int` to `Foo`
|
|
---
|
|
*/
|
|
|
|
Foo global;
|
|
|
|
struct Foo
|
|
{
|
|
ref Foo get()
|
|
{
|
|
return global;
|
|
}
|
|
alias get this;
|
|
}
|
|
|
|
void main()
|
|
{
|
|
Foo g;
|
|
g = 3;
|
|
}
|