summaryrefslogtreecommitdiff
path: root/test/files/run
diff options
context:
space:
mode:
authorAdriaan Moors <adriaan.moors@typesafe.com>2013-02-07 14:18:37 -0800
committerAdriaan Moors <adriaan.moors@typesafe.com>2013-02-07 14:18:37 -0800
commit33608ffb282e3b844b28143d9f3588e57c20c7aa (patch)
treedeff36c8e4253461a56d86d1ca5f93a02c657f40 /test/files/run
parentdb02585dafdc509de289177826df2eed8eb38326 (diff)
parent1f838edb02f6e5ced6641504a96cca3ec4c1fa7a (diff)
downloadscala-33608ffb282e3b844b28143d9f3588e57c20c7aa.tar.gz
scala-33608ffb282e3b844b28143d9f3588e57c20c7aa.tar.bz2
scala-33608ffb282e3b844b28143d9f3588e57c20c7aa.zip
Merge pull request #2068 from scalamacros/ticket/7064
[nomaster] SI-7064 Reflection: forward compat for 2.10.1
Diffstat (limited to 'test/files/run')
-rw-r--r--test/files/run/analyzerPlugins.check35
-rw-r--r--test/files/run/t5064.check6
-rw-r--r--test/files/run/t5603.check4
-rw-r--r--test/files/run/t6288.check12
-rw-r--r--test/files/run/t6288b-jump-position.check6
-rw-r--r--test/files/run/t7064-old-style-supercalls.check1
-rw-r--r--test/files/run/t7064-old-style-supercalls.scala48
7 files changed, 80 insertions, 32 deletions
diff --git a/test/files/run/analyzerPlugins.check b/test/files/run/analyzerPlugins.check
index 8856fef5b3..7d8d181306 100644
--- a/test/files/run/analyzerPlugins.check
+++ b/test/files/run/analyzerPlugins.check
@@ -22,12 +22,12 @@ pluginsPt(?, Trees$Annotated) [7]
pluginsPt(?, Trees$Apply) [8]
pluginsPt(?, Trees$ApplyImplicitView) [2]
pluginsPt(?, Trees$Assign) [7]
-pluginsPt(?, Trees$Block) [4]
+pluginsPt(?, Trees$Block) [7]
pluginsPt(?, Trees$ClassDef) [2]
pluginsPt(?, Trees$DefDef) [14]
-pluginsPt(?, Trees$Ident) [51]
+pluginsPt(?, Trees$Ident) [49]
pluginsPt(?, Trees$If) [2]
-pluginsPt(?, Trees$Literal) [16]
+pluginsPt(?, Trees$Literal) [20]
pluginsPt(?, Trees$New) [5]
pluginsPt(?, Trees$PackageDef) [1]
pluginsPt(?, Trees$Return) [1]
@@ -37,9 +37,9 @@ pluginsPt(?, Trees$This) [20]
pluginsPt(?, Trees$TypeApply) [3]
pluginsPt(?, Trees$TypeBoundsTree) [2]
pluginsPt(?, Trees$TypeDef) [1]
-pluginsPt(?, Trees$TypeTree) [38]
+pluginsPt(?, Trees$TypeTree) [37]
pluginsPt(?, Trees$Typed) [1]
-pluginsPt(?, Trees$ValDef) [21]
+pluginsPt(?, Trees$ValDef) [23]
pluginsPt(Any, Trees$Literal) [2]
pluginsPt(Any, Trees$Typed) [1]
pluginsPt(Array[Any], Trees$ArrayValue) [1]
@@ -53,7 +53,7 @@ pluginsPt(Int @testAnn, Trees$Literal) [1]
pluginsPt(Int, Trees$Apply) [1]
pluginsPt(Int, Trees$Ident) [2]
pluginsPt(Int, Trees$If) [1]
-pluginsPt(Int, Trees$Literal) [5]
+pluginsPt(Int, Trees$Literal) [6]
pluginsPt(Int, Trees$Select) [3]
pluginsPt(List, Trees$Apply) [1]
pluginsPt(List[Any], Trees$Select) [1]
@@ -82,8 +82,8 @@ pluginsTypeSig(value lub1, Trees$ValDef) [2]
pluginsTypeSig(value lub2, Trees$ValDef) [2]
pluginsTypeSig(value param, Trees$ValDef) [2]
pluginsTypeSig(value str, Trees$ValDef) [1]
-pluginsTypeSig(value x, Trees$ValDef) [4]
-pluginsTypeSig(value y, Trees$ValDef) [4]
+pluginsTypeSig(value x, Trees$ValDef) [5]
+pluginsTypeSig(value y, Trees$ValDef) [5]
pluginsTypeSig(variable count, Trees$ValDef) [3]
pluginsTypeSigAccessor(value annotField) [1]
pluginsTypeSigAccessor(value inferField) [1]
@@ -110,7 +110,7 @@ pluginsTyped(<notype>, Trees$ClassDef) [2]
pluginsTyped(<notype>, Trees$DefDef) [14]
pluginsTyped(<notype>, Trees$PackageDef) [1]
pluginsTyped(<notype>, Trees$TypeDef) [1]
-pluginsTyped(<notype>, Trees$ValDef) [21]
+pluginsTyped(<notype>, Trees$ValDef) [23]
pluginsTyped(<root>, Trees$Ident) [1]
pluginsTyped(=> Boolean @testAnn, Trees$Select) [1]
pluginsTyped(=> Double, Trees$Select) [4]
@@ -124,7 +124,7 @@ pluginsTyped(A, Trees$TypeTree) [4]
pluginsTyped(A.super.type, Trees$Super) [1]
pluginsTyped(A.this.type, Trees$This) [11]
pluginsTyped(Any, Trees$TypeTree) [1]
-pluginsTyped(AnyRef, Trees$Select) [4]
+pluginsTyped(AnyRef, Trees$Select) [2]
pluginsTyped(Array[Any], Trees$ArrayValue) [1]
pluginsTyped(Boolean @testAnn, Trees$Select) [1]
pluginsTyped(Boolean @testAnn, Trees$TypeTree) [4]
@@ -137,12 +137,12 @@ pluginsTyped(Int @testAnn, Trees$TypeTree) [2]
pluginsTyped(Int @testAnn, Trees$Typed) [2]
pluginsTyped(Int(0), Trees$Literal) [3]
pluginsTyped(Int(1) @testAnn, Trees$Typed) [1]
-pluginsTyped(Int(1), Trees$Literal) [8]
+pluginsTyped(Int(1), Trees$Literal) [9]
pluginsTyped(Int(2), Trees$Literal) [1]
pluginsTyped(Int, Trees$Apply) [1]
pluginsTyped(Int, Trees$Ident) [2]
pluginsTyped(Int, Trees$If) [2]
-pluginsTyped(Int, Trees$Select) [15]
+pluginsTyped(Int, Trees$Select) [17]
pluginsTyped(Int, Trees$TypeTree) [13]
pluginsTyped(List, Trees$Apply) [1]
pluginsTyped(List, Trees$Select) [1]
@@ -160,27 +160,26 @@ pluginsTyped(String("huhu"), Trees$Literal) [1]
pluginsTyped(String("str") @testAnn, Trees$Typed) [1]
pluginsTyped(String("str"), Trees$Literal) [1]
pluginsTyped(String("str"), Trees$Typed) [1]
-pluginsTyped(String("two"), Trees$Literal) [2]
+pluginsTyped(String("two"), Trees$Literal) [3]
pluginsTyped(String, Trees$Apply) [2]
pluginsTyped(String, Trees$Block) [2]
pluginsTyped(String, Trees$Ident) [1]
pluginsTyped(String, Trees$Select) [9]
-pluginsTyped(String, Trees$TypeTree) [7]
+pluginsTyped(String, Trees$TypeTree) [8]
pluginsTyped(Unit, Trees$Apply) [2]
pluginsTyped(Unit, Trees$Assign) [8]
-pluginsTyped(Unit, Trees$Block) [4]
+pluginsTyped(Unit, Trees$Block) [7]
pluginsTyped(Unit, Trees$If) [1]
-pluginsTyped(Unit, Trees$Literal) [5]
+pluginsTyped(Unit, Trees$Literal) [8]
pluginsTyped(Unit, Trees$TypeTree) [1]
pluginsTyped([A](xs: A*)List[A], Trees$Select) [1]
pluginsTyped([T <: Int]=> Int, Trees$Select) [1]
pluginsTyped([T0 >: ? <: ?]()T0, Trees$Select) [1]
pluginsTyped([T](xs: Array[T])scala.collection.mutable.WrappedArray[T], Trees$Select) [1]
-pluginsTyped(annotation.type, Trees$Select) [4]
+pluginsTyped(annotation.type, Trees$Select) [2]
pluginsTyped(math.type, Trees$Select) [9]
pluginsTyped(scala.annotation.Annotation, Trees$Apply) [1]
pluginsTyped(scala.annotation.TypeConstraint, Trees$Select) [4]
-pluginsTyped(scala.annotation.TypeConstraint, Trees$TypeTree) [2]
pluginsTyped(scala.collection.immutable.List.type, Trees$Select) [2]
pluginsTyped(scala.collection.immutable.StringOps, Trees$ApplyImplicitView) [2]
pluginsTyped(scala.collection.mutable.WrappedArray[Any], Trees$Apply) [1]
diff --git a/test/files/run/t5064.check b/test/files/run/t5064.check
index 61ccfd16e7..077006abd9 100644
--- a/test/files/run/t5064.check
+++ b/test/files/run/t5064.check
@@ -1,6 +1,6 @@
-[53] T5064.super.<init>()
-[53] T5064.super.<init>
-[53] this
+[12] T5064.super.<init>()
+[12] T5064.super.<init>
+[12] this
[16:23] immutable.this.List.apply(scala.this.Predef.wrapIntArray(Array[Int]{1}))
[16:20] immutable.this.List.apply
<16:20> immutable.this.List
diff --git a/test/files/run/t5603.check b/test/files/run/t5603.check
index 3b2eb55313..5127d3c1c7 100644
--- a/test/files/run/t5603.check
+++ b/test/files/run/t5603.check
@@ -12,7 +12,7 @@
[95:101]<paramaccessor> private[this] val i: [98:101]Int = _;
<119:139>def <init>([95]i: [98]Int) = <119:139>{
<119:139>val nameElse = <134:139>"Bob";
- [NoPosition][NoPosition][NoPosition]super.<init>();
+ [94][94][94]super.<init>();
[94]()
};
[168:184]val name = [179:184]"avc";
@@ -20,7 +20,7 @@
};
[215:241]object Test extends [227:241][235:238]App {
[227]def <init>() = [227]{
- [NoPosition][NoPosition][NoPosition]super.<init>();
+ [227][227][227]super.<init>();
[227]()
};
[NoPosition]<empty>
diff --git a/test/files/run/t6288.check b/test/files/run/t6288.check
index 4895c2c007..e6467edc95 100644
--- a/test/files/run/t6288.check
+++ b/test/files/run/t6288.check
@@ -1,8 +1,8 @@
[[syntax trees at end of patmat]] // newSource1
[7]package [7]<empty> {
[7]object Case3 extends [13][106]scala.AnyRef {
- [106]def <init>(): [13]Case3.type = [106]{
- [106][106][106]Case3.super.<init>();
+ [13]def <init>(): [13]Case3.type = [13]{
+ [13][13][13]Case3.super.<init>();
[13]()
};
[21]def unapply([29]z: [32]<type: [32]scala.Any>): [21]Option[Int] = [56][52][52]scala.Some.apply[[52]Int]([58]-1);
@@ -24,8 +24,8 @@
}
};
[113]object Case4 extends [119][217]scala.AnyRef {
- [217]def <init>(): [119]Case4.type = [217]{
- [217][217][217]Case4.super.<init>();
+ [119]def <init>(): [119]Case4.type = [119]{
+ [119][119][119]Case4.super.<init>();
[119]()
};
[127]def unapplySeq([138]z: [141]<type: [141]scala.Any>): [127]Option[List[Int]] = [167]scala.None;
@@ -50,8 +50,8 @@
}
};
[224]object Case5 extends [230][312]scala.AnyRef {
- [312]def <init>(): [230]Case5.type = [312]{
- [312][312][312]Case5.super.<init>();
+ [230]def <init>(): [230]Case5.type = [230]{
+ [230][230][230]Case5.super.<init>();
[230]()
};
[238]def unapply([246]z: [249]<type: [249]scala.Any>): [238]Boolean = [265]true;
diff --git a/test/files/run/t6288b-jump-position.check b/test/files/run/t6288b-jump-position.check
index ece88b18f0..83ba810958 100644
--- a/test/files/run/t6288b-jump-position.check
+++ b/test/files/run/t6288b-jump-position.check
@@ -65,9 +65,9 @@ object Case3 extends Object {
blocks: [1]
1:
- 12 THIS(Case3)
- 12 CALL_METHOD java.lang.Object.<init> (super())
- 12 RETURN(UNIT)
+ 1 THIS(Case3)
+ 1 CALL_METHOD java.lang.Object.<init> (super())
+ 1 RETURN(UNIT)
}
Exception handlers:
diff --git a/test/files/run/t7064-old-style-supercalls.check b/test/files/run/t7064-old-style-supercalls.check
new file mode 100644
index 0000000000..0cfbf08886
--- /dev/null
+++ b/test/files/run/t7064-old-style-supercalls.check
@@ -0,0 +1 @@
+2
diff --git a/test/files/run/t7064-old-style-supercalls.scala b/test/files/run/t7064-old-style-supercalls.scala
new file mode 100644
index 0000000000..cffa7b1888
--- /dev/null
+++ b/test/files/run/t7064-old-style-supercalls.scala
@@ -0,0 +1,48 @@
+import scala.reflect.runtime.universe._
+import Flag._
+import definitions._
+import scala.reflect.runtime.{currentMirror => cm}
+import scala.tools.reflect.ToolBox
+import scala.tools.reflect.Eval
+
+object Test extends App {
+ val PARAMACCESSOR = (1L << 29).asInstanceOf[FlagSet]
+
+ // these trees can be acquired by running the following incantation:
+ // echo 'class C(val x: Int); class D extends C(2)' > foo.scala
+ // ./scalac -Xprint:parser -Yshow-trees-stringified -Yshow-trees-compact foo.scala
+
+ val c = ClassDef(
+ Modifiers(), newTypeName("C"), List(),
+ Template(
+ List(Select(Ident(ScalaPackage), newTypeName("AnyRef"))),
+ emptyValDef,
+ List(
+ ValDef(Modifiers(PARAMACCESSOR), newTermName("x"), Ident(newTypeName("Int")), EmptyTree),
+ DefDef(
+ Modifiers(),
+ nme.CONSTRUCTOR,
+ List(),
+ List(List(ValDef(Modifiers(PARAM | PARAMACCESSOR), newTermName("x"), Ident(newTypeName("Int")), EmptyTree))),
+ TypeTree(),
+ Block(
+ List(Apply(Select(Super(This(tpnme.EMPTY), tpnme.EMPTY), nme.CONSTRUCTOR), List())),
+ Literal(Constant(())))))))
+ val d = ClassDef(
+ Modifiers(), newTypeName("D"), List(),
+ Template(
+ List(Ident(newTypeName("C"))),
+ emptyValDef,
+ List(
+ DefDef(
+ Modifiers(),
+ nme.CONSTRUCTOR,
+ List(),
+ List(List()),
+ TypeTree(),
+ Block(
+ List(Apply(Select(Super(This(tpnme.EMPTY), tpnme.EMPTY), nme.CONSTRUCTOR), List(Literal(Constant(2))))),
+ Literal(Constant(())))))))
+ val result = Select(Apply(Select(New(Ident(newTypeName("D"))), nme.CONSTRUCTOR), List()), newTermName("x"))
+ println(cm.mkToolBox().eval(Block(List(c, d), result)))
+} \ No newline at end of file