mirror of
https://github.com/dlang/dmd.git
synced 2025-04-26 05:00:16 +03:00
23 lines
408 B
D
23 lines
408 B
D
/*
|
|
TEST_OUTPUT:
|
|
---
|
|
fail_compilation/fail195.d(22): Error: struct `Foo` does not overload ()
|
|
---
|
|
*/
|
|
|
|
// https://issues.dlang.org/show_bug.cgi?id=1384
|
|
// Compiler segfaults when using struct variable like a function with no opCall member.
|
|
struct Foo
|
|
{
|
|
union
|
|
{
|
|
int a;
|
|
int b;
|
|
}
|
|
}
|
|
|
|
void bla()
|
|
{
|
|
Foo next;
|
|
next(); // Error: structliteral has no effect in expression (Foo(0))
|
|
}
|