mirror of
https://github.com/dlang/dmd.git
synced 2025-04-26 21:21:48 +03:00
16 lines
313 B
D
16 lines
313 B
D
/*
|
|
TEST_OUTPUT:
|
|
---
|
|
fail_compilation/diag7050a.d(15): Error: `@safe` function `diag7050a.foo` cannot call `@system` constructor `diag7050a.Foo.this`
|
|
fail_compilation/diag7050a.d(11): `diag7050a.Foo.this` is declared here
|
|
---
|
|
*/
|
|
|
|
struct Foo
|
|
{
|
|
this (int a) {}
|
|
}
|
|
@safe void foo()
|
|
{
|
|
auto f = Foo(3);
|
|
}
|