Skip to content

Instantly share code, notes, and snippets.

@run-dlang
Created March 14, 2021 09:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save run-dlang/b8eb31340c90c128a12b31a7c7e18804 to your computer and use it in GitHub Desktop.
Save run-dlang/b8eb31340c90c128a12b31a7c7e18804 to your computer and use it in GitHub Desktop.
Code shared from run.dlang.io. Run with '-unittest'
struct Foo
{
@system ~this() {}
}
@safe:
struct Bar
{
Foo f;
~this() @trusted {}
}
@safe:
void main()
{
Bar b;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment