Created
June 4, 2016 16:36
-
-
Save yannick/91cb24d1aa19dec67fe37df7b793a683 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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