Skip to content

Instantly share code, notes, and snippets.

@yannick
Created June 4, 2016 16:36
Show Gist options
  • Select an option

  • Save yannick/91cb24d1aa19dec67fe37df7b793a683 to your computer and use it in GitHub Desktop.

Select an option

Save yannick/91cb24d1aa19dec67fe37df7b793a683 to your computer and use it in GitHub Desktop.
module main;
//import foo;
import std.stdio;
class Foo
{
@property bool isFail() { return x; }
bool x = true;
}
class Bar
{
Foo f;
this()
{
f = new Foo();
}
void failMe(out string some)
in { assert(f.isFail ); }
body
{
writeln("hello");
}
}
void main()
{
Bar b;
b = new Bar();
auto x = "Asd";
b.failMe(x);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment