diff options
-rw-r--r-- | src/compiler/scala/tools/nsc/Global.scala | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/compiler/scala/tools/nsc/Global.scala b/src/compiler/scala/tools/nsc/Global.scala index 20b8265071..8746a7fd8d 100644 --- a/src/compiler/scala/tools/nsc/Global.scala +++ b/src/compiler/scala/tools/nsc/Global.scala @@ -228,6 +228,7 @@ class Global(var currentSettings: Settings, var reporter: Reporter) // of assert and require (but for now I've reproduced them here, // because there are a million to fix.) @inline final def assert(assertion: Boolean, message: => Any) { + // calling Predef.assert would send a freshly allocated closure wrapping the one received as argument. if (!assertion) throw new java.lang.AssertionError("assertion failed: "+ supplementErrorMessage("" + message)) } @@ -235,6 +236,7 @@ class Global(var currentSettings: Settings, var reporter: Reporter) assert(assertion, "") } @inline final def require(requirement: Boolean, message: => Any) { + // calling Predef.require would send a freshly allocated closure wrapping the one received as argument. if (!requirement) throw new IllegalArgumentException("requirement failed: "+ supplementErrorMessage("" + message)) } |