summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorEugene Burmako <xeno.by@gmail.com>2012-09-26 11:17:51 -0700
committerEugene Burmako <xeno.by@gmail.com>2012-09-26 11:17:51 -0700
commitcf08f25d598a1d44ed4440b1cc1097a5869aefdd (patch)
treef2d61c11311598090224c33a9bf5be0815d2167c /test
parent01b68268a94e247696f2993363427f87d5143140 (diff)
parent2fb507b849e2b0f86c2480bde95200f8ae30803d (diff)
downloadscala-cf08f25d598a1d44ed4440b1cc1097a5869aefdd.tar.gz
scala-cf08f25d598a1d44ed4440b1cc1097a5869aefdd.tar.bz2
scala-cf08f25d598a1d44ed4440b1cc1097a5869aefdd.zip
Merge pull request #1380 from scalamacros/ticket/6277
SI-6277 fix for isXXX methods in reflection
Diffstat (limited to 'test')
-rw-r--r--test/files/run/existentials3-new.check8
-rw-r--r--test/files/run/reflection-java-annotations.scala4
-rw-r--r--test/files/run/reflection-magicsymbols-invoke.check4
-rw-r--r--test/files/run/reify_ann1a.scala1
-rw-r--r--test/files/run/reify_ann1b.scala1
-rw-r--r--test/files/run/reify_ann2a.scala1
-rw-r--r--test/files/run/reify_ann3.scala1
-rw-r--r--test/files/run/reify_ann4.scala1
-rw-r--r--test/files/run/reify_ann5.scala1
-rw-r--r--test/files/run/t5423.scala2
-rw-r--r--test/files/run/t6277.check1
-rw-r--r--test/files/run/t6277.scala9
12 files changed, 19 insertions, 15 deletions
diff --git a/test/files/run/existentials3-new.check b/test/files/run/existentials3-new.check
index bb6fe1a5e3..00614b19db 100644
--- a/test/files/run/existentials3-new.check
+++ b/test/files/run/existentials3-new.check
@@ -3,8 +3,8 @@ Bar, t=TypeRef, s=type Bar
Test.ToS, t=RefinedType, s=f3
Test.ToS, t=RefinedType, s=f4
Test.ToS, t=RefinedType, s=f5
-() => Test.ToS, t=TypeRef, s=class Function0
-() => Test.ToS, t=TypeRef, s=class Function0
+() => Test.ToS, t=TypeRef, s=trait Function0
+() => Test.ToS, t=TypeRef, s=trait Function0
$anon, t=TypeRef, s=type $anon
$anon, t=TypeRef, s=type $anon
List[java.lang.Object{type T1}#T1], t=TypeRef, s=class List
@@ -15,8 +15,8 @@ Bar, t=TypeRef, s=type Bar
Test.ToS, t=RefinedType, s=g3
Test.ToS, t=RefinedType, s=g4
Test.ToS, t=RefinedType, s=g5
-() => Test.ToS, t=TypeRef, s=class Function0
-() => Test.ToS, t=TypeRef, s=class Function0
+() => Test.ToS, t=TypeRef, s=trait Function0
+() => Test.ToS, t=TypeRef, s=trait Function0
$anon, t=TypeRef, s=type $anon
$anon, t=TypeRef, s=type $anon
List[java.lang.Object{type T1}#T1], t=TypeRef, s=class List
diff --git a/test/files/run/reflection-java-annotations.scala b/test/files/run/reflection-java-annotations.scala
index 0b16c0d103..2e3fed48ce 100644
--- a/test/files/run/reflection-java-annotations.scala
+++ b/test/files/run/reflection-java-annotations.scala
@@ -2,6 +2,6 @@ object Test extends App {
import scala.reflect.runtime.universe._
val sym = typeOf[JavaAnnottee].typeSymbol
sym.typeSignature
- sym.getAnnotations foreach (_.javaArgs)
- println(sym.getAnnotations)
+ sym.annotations foreach (_.javaArgs)
+ println(sym.annotations)
} \ No newline at end of file
diff --git a/test/files/run/reflection-magicsymbols-invoke.check b/test/files/run/reflection-magicsymbols-invoke.check
index 520dc2bfbe..f5258efeb7 100644
--- a/test/files/run/reflection-magicsymbols-invoke.check
+++ b/test/files/run/reflection-magicsymbols-invoke.check
@@ -90,7 +90,7 @@ method $asInstanceOf: [T0]()T0
method $isInstanceOf: [T0]()Boolean
method ==: (x$1: Any)Boolean
method ==: (x$1: AnyRef)Boolean
-method apply: (i: <?>)T
+method apply: (i: Int)T
method asInstanceOf: [T0]=> T0
method clone: ()Array[T]
method eq: (x$1: AnyRef)Boolean
@@ -105,7 +105,7 @@ method notify: ()Unit
method notifyAll: ()Unit
method synchronized: [T0](x$1: T0)T0
method toString: ()java.lang.String
-method update: (i: <?>, x: <?>)Unit
+method update: (i: Int, x: T)Unit
method wait: ()Unit
method wait: (x$1: Long)Unit
method wait: (x$1: Long, x$2: Int)Unit
diff --git a/test/files/run/reify_ann1a.scala b/test/files/run/reify_ann1a.scala
index 88b4191195..c23048e463 100644
--- a/test/files/run/reify_ann1a.scala
+++ b/test/files/run/reify_ann1a.scala
@@ -21,7 +21,6 @@ object Test extends App {
// test 2: import and typecheck
val toolbox = cm.mkToolBox()
val ttree = toolbox.typeCheck(tree)
- ttree.foreach(sub => if (sub.hasSymbol) sub.symbol.typeSignature)
println(ttree.toString)
// test 3: import and compile
diff --git a/test/files/run/reify_ann1b.scala b/test/files/run/reify_ann1b.scala
index a8fb876023..29ce6021a2 100644
--- a/test/files/run/reify_ann1b.scala
+++ b/test/files/run/reify_ann1b.scala
@@ -21,7 +21,6 @@ object Test extends App {
// test 2: import and typecheck
val toolbox = cm.mkToolBox()
val ttree = toolbox.typeCheck(tree)
- ttree.foreach(sub => if (sub.hasSymbol) sub.symbol.typeSignature)
println(ttree.toString)
// test 3: import and compile
diff --git a/test/files/run/reify_ann2a.scala b/test/files/run/reify_ann2a.scala
index b7e5833584..53423e12c3 100644
--- a/test/files/run/reify_ann2a.scala
+++ b/test/files/run/reify_ann2a.scala
@@ -21,7 +21,6 @@ object Test extends App {
// test 2: import and typecheck
val toolbox = cm.mkToolBox()
val ttree = toolbox.typeCheck(tree)
- ttree.foreach(sub => if (sub.hasSymbol) sub.symbol.typeSignature)
println(ttree.toString)
// test 3: import and compile
diff --git a/test/files/run/reify_ann3.scala b/test/files/run/reify_ann3.scala
index 662d58aaf3..4162fa532f 100644
--- a/test/files/run/reify_ann3.scala
+++ b/test/files/run/reify_ann3.scala
@@ -15,7 +15,6 @@ object Test extends App {
// test 2: import and typecheck
val toolbox = cm.mkToolBox()
val ttree = toolbox.typeCheck(tree)
- ttree.foreach(sub => if (sub.hasSymbol) sub.symbol.typeSignature)
println(ttree.toString)
// test 3: import and compile
diff --git a/test/files/run/reify_ann4.scala b/test/files/run/reify_ann4.scala
index a85e5e3625..0aedb77b5e 100644
--- a/test/files/run/reify_ann4.scala
+++ b/test/files/run/reify_ann4.scala
@@ -19,7 +19,6 @@ object Test extends App {
// test 2: import and typecheck
val toolbox = cm.mkToolBox()
val ttree = toolbox.typeCheck(tree)
- ttree.foreach(sub => if (sub.hasSymbol) sub.symbol.typeSignature)
println(ttree.toString)
// test 3: import and compile
diff --git a/test/files/run/reify_ann5.scala b/test/files/run/reify_ann5.scala
index 877360180c..d27be3b6d5 100644
--- a/test/files/run/reify_ann5.scala
+++ b/test/files/run/reify_ann5.scala
@@ -16,7 +16,6 @@ object Test extends App {
// test 2: import and typecheck
val toolbox = cm.mkToolBox()
val ttree = toolbox.typeCheck(tree)
- ttree.foreach(sub => if (sub.hasSymbol) sub.symbol.typeSignature)
println(ttree.toString)
// test 3: import and compile
diff --git a/test/files/run/t5423.scala b/test/files/run/t5423.scala
index 9b8ba090fa..c1632126b2 100644
--- a/test/files/run/t5423.scala
+++ b/test/files/run/t5423.scala
@@ -7,5 +7,5 @@ final class table extends annotation.StaticAnnotation
object Test extends App {
val s = cm.classSymbol(classOf[A])
- println(s.getAnnotations)
+ println(s.annotations)
} \ No newline at end of file
diff --git a/test/files/run/t6277.check b/test/files/run/t6277.check
new file mode 100644
index 0000000000..f32a5804e2
--- /dev/null
+++ b/test/files/run/t6277.check
@@ -0,0 +1 @@
+true \ No newline at end of file
diff --git a/test/files/run/t6277.scala b/test/files/run/t6277.scala
new file mode 100644
index 0000000000..41feee8a8a
--- /dev/null
+++ b/test/files/run/t6277.scala
@@ -0,0 +1,9 @@
+import scala.reflect.runtime.universe._
+
+object Test extends App {
+ locally {
+ val sym = typeOf[List[_]].typeSymbol.asClass
+ val q = sym.isSealed
+ println(q)
+ }
+} \ No newline at end of file