diff options
Diffstat (limited to 'test/files')
-rw-r--r-- | test/files/neg/migration28.check | 5 | ||||
-rw-r--r-- | test/files/run/t5239.check | 2 | ||||
-rw-r--r-- | test/files/run/t5266_1.check | 2 | ||||
-rw-r--r-- | test/files/run/t5266_1.scala | 16 | ||||
-rw-r--r-- | test/files/run/t5266_2.check | 2 | ||||
-rw-r--r-- | test/files/run/t5266_2.scala | 17 |
6 files changed, 40 insertions, 4 deletions
diff --git a/test/files/neg/migration28.check b/test/files/neg/migration28.check index 97146e88f7..d7dfacf3db 100644 --- a/test/files/neg/migration28.check +++ b/test/files/neg/migration28.check @@ -1,6 +1,5 @@ -migration28.scala:4: error: method scanRight in trait TraversableLike has changed semantics: -This scanRight definition has changed in 2.9. -The previous behavior can be reproduced with scanRight.reverse. +migration28.scala:4: error: method scanRight in trait TraversableLike has changed semantics in version 2.9.0: +The behavior of `scanRight` has changed. The previous behavior can be reproduced with scanRight.reverse. List(1,2,3,4,5).scanRight(0)(_+_) ^ one error found diff --git a/test/files/run/t5239.check b/test/files/run/t5239.check index db5778f95b..40fe6a76e7 100644 --- a/test/files/run/t5239.check +++ b/test/files/run/t5239.check @@ -6,7 +6,7 @@ package <empty> { __wrapper$1.super.this(); () }; - <static> def wrapper(): Int = 2 + def wrapper(): Int = 2 } } diff --git a/test/files/run/t5266_1.check b/test/files/run/t5266_1.check new file mode 100644 index 0000000000..3feac16a0b --- /dev/null +++ b/test/files/run/t5266_1.check @@ -0,0 +1,2 @@ +2 +evaluated = null
\ No newline at end of file diff --git a/test/files/run/t5266_1.scala b/test/files/run/t5266_1.scala new file mode 100644 index 0000000000..18e288e685 --- /dev/null +++ b/test/files/run/t5266_1.scala @@ -0,0 +1,16 @@ +import scala.tools.nsc.reporters._ +import scala.tools.nsc.Settings +import reflect.runtime.Mirror.ToolBox + +object Test extends App { + val code = scala.reflect.Code.lift{ + def x = 2 + println(x) + }; + + val reporter = new ConsoleReporter(new Settings) + val toolbox = new ToolBox(reporter) + val ttree = toolbox.typeCheck(code.tree) + val evaluated = toolbox.runExpr(ttree) + println("evaluated = " + evaluated) +}
\ No newline at end of file diff --git a/test/files/run/t5266_2.check b/test/files/run/t5266_2.check new file mode 100644 index 0000000000..3feac16a0b --- /dev/null +++ b/test/files/run/t5266_2.check @@ -0,0 +1,2 @@ +2 +evaluated = null
\ No newline at end of file diff --git a/test/files/run/t5266_2.scala b/test/files/run/t5266_2.scala new file mode 100644 index 0000000000..eb319583f8 --- /dev/null +++ b/test/files/run/t5266_2.scala @@ -0,0 +1,17 @@ +import scala.tools.nsc.reporters._ +import scala.tools.nsc.Settings +import reflect.runtime.Mirror.ToolBox + +object Test extends App { + val code = scala.reflect.Code.lift{ + def x = 2 + def y = x + println(y) + }; + + val reporter = new ConsoleReporter(new Settings) + val toolbox = new ToolBox(reporter) + val ttree = toolbox.typeCheck(code.tree) + val evaluated = toolbox.runExpr(ttree) + println("evaluated = " + evaluated) +} |