summaryrefslogtreecommitdiff
path: root/test/files/run
diff options
context:
space:
mode:
authorLukas Rytz <lukas.rytz@epfl.ch>2012-08-16 10:22:25 +0200
committerLukas Rytz <lukas.rytz@epfl.ch>2012-08-16 14:24:14 +0200
commitffa9b1afc9168e699cfa568a94f84e40b5cc62b7 (patch)
tree389408cc60c0eacee6059b0e4178ccdd61ce1e12 /test/files/run
parent3ccaa1026e7e74d99fe39c9608e28c48b422e2c9 (diff)
parente05122cdb38c5c6bd4900247f371fa23b46f9c22 (diff)
downloadscala-ffa9b1afc9168e699cfa568a94f84e40b5cc62b7.tar.gz
scala-ffa9b1afc9168e699cfa568a94f84e40b5cc62b7.tar.bz2
scala-ffa9b1afc9168e699cfa568a94f84e40b5cc62b7.zip
Merge remote-tracking branch 'upstream/2.10.x' into merge-210
Required a few changes of `HIDDEN` -> `ARTIFACT` and `isHidden` -> `isArtifact` Conflicts: src/reflect/scala/reflect/internal/Flags.scala
Diffstat (limited to 'test/files/run')
-rw-r--r--test/files/run/t2886.check4
-rw-r--r--test/files/run/t5940.scala41
-rw-r--r--test/files/run/t6028.check20
3 files changed, 53 insertions, 12 deletions
diff --git a/test/files/run/t2886.check b/test/files/run/t2886.check
index b093815562..cb0db8a6dc 100644
--- a/test/files/run/t2886.check
+++ b/test/files/run/t2886.check
@@ -1,5 +1,5 @@
((x: String) => {
- <hidden> val x$1 = x;
- <hidden> val x$2 = x;
+ <artifact> val x$1 = x;
+ <artifact> val x$2 = x;
Test.this.test(x$2, x$1)
})
diff --git a/test/files/run/t5940.scala b/test/files/run/t5940.scala
new file mode 100644
index 0000000000..147ff38256
--- /dev/null
+++ b/test/files/run/t5940.scala
@@ -0,0 +1,41 @@
+import scala.tools.partest._
+
+object Test extends DirectTest {
+ def code = ???
+
+ def macros_1 = """
+ import scala.reflect.macros.Context
+
+ object Impls {
+ def impl(c: Context) = c.literalUnit
+ }
+
+ object Macros {
+ //import Impls._
+ def impl(c: Context) = c.literalUnit
+ def foo = macro impl
+ }
+ """
+ def compileMacros() = {
+ val classpath = List(sys.props("partest.lib"), sys.props("partest.reflect")) mkString sys.props("path.separator")
+ compileString(newCompiler("-language:experimental.macros", "-cp", classpath, "-d", testOutput.path))(macros_1)
+ }
+
+ def test_2 = """
+ object Test extends App {
+ println(Macros.foo)
+ }
+ """
+ def compileTest() = {
+ val classpath = List(sys.props("partest.lib"), testOutput.path) mkString sys.props("path.separator")
+ compileString(newCompiler("-cp", classpath, "-d", testOutput.path))(test_2)
+ }
+
+ def show(): Unit = {
+ log("Compiling Macros_1...")
+ if (compileMacros()) {
+ log("Compiling Test_2...")
+ if (compileTest()) log("Success!") else log("Failed...")
+ }
+ }
+} \ No newline at end of file
diff --git a/test/files/run/t6028.check b/test/files/run/t6028.check
index c10bd76500..42921ae2f5 100644
--- a/test/files/run/t6028.check
+++ b/test/files/run/t6028.check
@@ -31,14 +31,14 @@ package <empty> {
};
final def apply(): Int = $anonfun$foo$1.this.apply$mcI$sp();
<specialized> def apply$mcI$sp(): Int = $anonfun$foo$1.this.$outer.T$$classParam.+($anonfun$foo$1.this.$outer.field()).+($anonfun$foo$1.this.methodParam$1).+($anonfun$foo$1.this.methodLocal$1);
- <synthetic> <paramaccessor> <hidden> private[this] val $outer: T = _;
- <synthetic> <stable> <hidden> def T$$anonfun$$$outer(): T = $anonfun$foo$1.this.$outer;
- final <bridge> <hidden> def apply(): Object = scala.Int.box($anonfun$foo$1.this.apply());
+ <synthetic> <paramaccessor> <artifact> private[this] val $outer: T = _;
+ <synthetic> <stable> <artifact> def T$$anonfun$$$outer(): T = $anonfun$foo$1.this.$outer;
+ final <bridge> <artifact> def apply(): Object = scala.Int.box($anonfun$foo$1.this.apply());
<synthetic> <paramaccessor> private[this] val methodParam$1: Int = _;
<synthetic> <paramaccessor> private[this] val methodLocal$1: Int = _
};
abstract trait MethodLocalTrait$1 extends Object {
- <synthetic> <stable> <hidden> def T$MethodLocalTrait$$$outer(): T
+ <synthetic> <stable> <artifact> def T$MethodLocalTrait$$$outer(): T
};
object MethodLocalObject$2 extends Object with T#MethodLocalTrait$1 {
def <init>($outer: T, barParam$1: Int): T#MethodLocalObject$2.type = {
@@ -46,9 +46,9 @@ package <empty> {
MethodLocalObject$2.this.$asInstanceOf[T#MethodLocalTrait$1$class]()./*MethodLocalTrait$1$class*/$init$(barParam$1);
()
};
- <synthetic> <paramaccessor> <hidden> private[this] val $outer: T = _;
- <synthetic> <stable> <hidden> def T$MethodLocalObject$$$outer(): T = MethodLocalObject$2.this.$outer;
- <synthetic> <stable> <hidden> def T$MethodLocalTrait$$$outer(): T = MethodLocalObject$2.this.$outer
+ <synthetic> <paramaccessor> <artifact> private[this] val $outer: T = _;
+ <synthetic> <stable> <artifact> def T$MethodLocalObject$$$outer(): T = MethodLocalObject$2.this.$outer;
+ <synthetic> <stable> <artifact> def T$MethodLocalTrait$$$outer(): T = MethodLocalObject$2.this.$outer
};
final <stable> private[this] def MethodLocalObject$1(barParam$1: Int, MethodLocalObject$module$1: runtime.VolatileObjectRef): T#MethodLocalObject$2.type = {
MethodLocalObject$module$1.elem = new T#MethodLocalObject$2.type(T.this, barParam$1);
@@ -69,9 +69,9 @@ package <empty> {
<specialized> def apply$mcV$sp(): Unit = try {
$anonfun$tryy$1.this.tryyLocal$1.elem = $anonfun$tryy$1.this.tryyParam$1
} finally ();
- <synthetic> <paramaccessor> <hidden> private[this] val $outer: T = _;
- <synthetic> <stable> <hidden> def T$$anonfun$$$outer(): T = $anonfun$tryy$1.this.$outer;
- final <bridge> <hidden> def apply(): Object = {
+ <synthetic> <paramaccessor> <artifact> private[this] val $outer: T = _;
+ <synthetic> <stable> <artifact> def T$$anonfun$$$outer(): T = $anonfun$tryy$1.this.$outer;
+ final <bridge> <artifact> def apply(): Object = {
$anonfun$tryy$1.this.apply();
scala.runtime.BoxedUnit.UNIT
};