Last active
August 29, 2015 14:11
-
-
Save nanase/28364343e14f8a59009a 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
| /* [Lury] */ | |
| @public static | |
| <BuiltIn> | |
| class Assert: | |
| ### ** Caution ** | |
| ### On this class, _DO NOT USE_ assert and enforce function in each functions. | |
| @public static | |
| <DebugOnly> | |
| <Intrinsic> | |
| def assert(condition, | |
| lazy message = nil : String, | |
| lazy exception = nil : Exception, | |
| file = reflect(file) : String, | |
| line = reflect(line) : Integer): | |
| pass | |
| <Intrinsic> | |
| def enforce(value, | |
| lazy message = nil : String, | |
| lazy exception = nil : Exception, | |
| file = reflect(file) : String, | |
| line = reflect(line) : Integer) -> value: | |
| pass |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment