summaryrefslogtreecommitdiff
path: root/test/disabled/run
diff options
context:
space:
mode:
Diffstat (limited to 'test/disabled/run')
-rw-r--r--test/disabled/run/coder2/Coder2.scala2
-rw-r--r--test/disabled/run/indylambda-specialization.scala15
2 files changed, 16 insertions, 1 deletions
diff --git a/test/disabled/run/coder2/Coder2.scala b/test/disabled/run/coder2/Coder2.scala
index 43b2e9bcb8..c1ec70b842 100644
--- a/test/disabled/run/coder2/Coder2.scala
+++ b/test/disabled/run/coder2/Coder2.scala
@@ -10,7 +10,7 @@ class SeqCoder(words: List[String]) {
'2' -> "ABC", '3' -> "DEF", '4' -> "GHI", '5' -> "JKL",
'6' -> "MNO", '7' -> "PQRS", '8' -> "TUV", '9' -> "WXYZ")
- /** Invert the mnemnonics map to give a map from chars 'A' ... 'Z' to '2' ... '9' */
+ /** Invert the mnemonics map to give a map from chars 'A' ... 'Z' to '2' ... '9' */
private val charCode: Map[Char, Char] =
for ((digit, letters) <- m; letter <- letters) yield letter -> digit
diff --git a/test/disabled/run/indylambda-specialization.scala b/test/disabled/run/indylambda-specialization.scala
new file mode 100644
index 0000000000..2c66073e90
--- /dev/null
+++ b/test/disabled/run/indylambda-specialization.scala
@@ -0,0 +1,15 @@
+object Test {
+ def assertApply(expected: Boolean) = {
+ val frames = Thread.currentThread.getStackTrace.takeWhile(_.getMethodName != "main")
+ val usesObjectApply = frames.exists(_.getMethodName == "apply")
+ assert(expected == usesObjectApply, frames.mkString("\n"))
+ }
+ def assertSpecialized() = assertApply(false)
+ def assertUnspecialized() = assertApply(true)
+ def main(args: Array[String]): Unit = {
+ ((i: String) => {assertUnspecialized(); i}).apply("")
+ (() => {assertSpecialized(); 0}).apply()
+ ((i: Int) => {assertSpecialized(); i}).apply(0)
+ ((i: Int, j: Int) => {assertSpecialized(); i + j}).apply(0, 0)
+ }
+}