summaryrefslogtreecommitdiff
path: root/test/files/run
diff options
context:
space:
mode:
Diffstat (limited to 'test/files/run')
-rw-r--r--test/files/run/existentials3.check24
-rw-r--r--test/files/run/existentials3.check.temporarily.disabled22
-rw-r--r--test/files/run/existentials3.scala (renamed from test/files/run/existentials3.scala.temporarily.disabled)20
-rw-r--r--test/files/run/repl-colon-type.check173
-rw-r--r--test/files/run/repl-colon-type.scala8
-rw-r--r--test/files/run/repl-power.check1
-rw-r--r--test/files/run/repl-type-verbose.check186
-rw-r--r--test/files/run/repl-type-verbose.scala20
-rw-r--r--test/files/run/t1195.check6
-rw-r--r--test/files/run/t1195.check.temporarily.disabled6
-rw-r--r--test/files/run/t1195.scala (renamed from test/files/run/t1195.scala.temporarily.disabled)4
-rw-r--r--test/files/run/t3507.check1
-rw-r--r--test/files/run/t3507.scala15
-rw-r--r--test/files/run/t4110.check2
-rw-r--r--test/files/run/t4110.check.temporarily.disabled2
-rw-r--r--test/files/run/t4110.scala (renamed from test/files/run/t4110.scala.temporarily.disabled)0
-rw-r--r--test/files/run/treePrint.check (renamed from test/files/run/treePrint.check.temporarily.disabled)0
-rw-r--r--test/files/run/treePrint.scala (renamed from test/files/run/treePrint.scala.temporarily.disabled)11
18 files changed, 453 insertions, 48 deletions
diff --git a/test/files/run/existentials3.check b/test/files/run/existentials3.check
new file mode 100644
index 0000000000..8227d77909
--- /dev/null
+++ b/test/files/run/existentials3.check
@@ -0,0 +1,24 @@
+ConcreteTypeTag[Bar.type], t=TypeRef, s= <: scala.runtime.AbstractFunction0[Bar] with Serializable{case def unapply(x$0: Bar): Boolean} with Singleton
+ConcreteTypeTag[Bar], t=TypeRef, s= <: Test.ToS with Product with Serializable{def copy(): Bar}
+ConcreteTypeTag[Test.ToS], t=RefinedType, s=f3
+ConcreteTypeTag[Test.ToS], t=RefinedType, s=f4
+ConcreteTypeTag[Test.ToS], t=RefinedType, s=f5
+ConcreteTypeTag[() => Test.ToS], t=TypeRef, s=class Function0
+ConcreteTypeTag[() => Test.ToS], t=TypeRef, s=class Function0
+ConcreteTypeTag[$anon], t=TypeRef, s= <: B with Test.ToS
+ConcreteTypeTag[$anon], t=TypeRef, s= <: B with A with Test.ToS
+ConcreteTypeTag[List[Object{type T1}#T1]], t=TypeRef, s=class List
+ConcreteTypeTag[List[Seq[Int]]], t=TypeRef, s=class List
+ConcreteTypeTag[List[Seq[U forSome { type U <: Int }]]], t=TypeRef, s=class List
+ConcreteTypeTag[Bar.type], t=TypeRef, s= <: scala.runtime.AbstractFunction0[Bar] with Serializable{case def unapply(x$0: Bar): Boolean} with Singleton
+ConcreteTypeTag[Bar], t=TypeRef, s= <: Test.ToS with Product with Serializable{def copy(): Bar}
+ConcreteTypeTag[Test.ToS], t=RefinedType, s=g3
+ConcreteTypeTag[Test.ToS], t=RefinedType, s=g4
+ConcreteTypeTag[Test.ToS], t=RefinedType, s=g5
+ConcreteTypeTag[() => Test.ToS], t=TypeRef, s=class Function0
+ConcreteTypeTag[() => Test.ToS], t=TypeRef, s=class Function0
+ConcreteTypeTag[$anon], t=TypeRef, s= <: B with Test.ToS
+ConcreteTypeTag[$anon], t=TypeRef, s= <: B with A with Test.ToS
+ConcreteTypeTag[List[Object{type T1}#T1]], t=TypeRef, s=class List
+ConcreteTypeTag[List[Seq[Int]]], t=TypeRef, s=class List
+ConcreteTypeTag[List[Seq[U forSome { type U <: Int }]]], t=TypeRef, s=class List
diff --git a/test/files/run/existentials3.check.temporarily.disabled b/test/files/run/existentials3.check.temporarily.disabled
deleted file mode 100644
index 36a458dacc..0000000000
--- a/test/files/run/existentials3.check.temporarily.disabled
+++ /dev/null
@@ -1,22 +0,0 @@
-_ <: scala.runtime.AbstractFunction0[_ <: Object with Test$ToS with scala.Product with scala.Serializable] with scala.Serializable with java.lang.Object
-_ <: Object with Test$ToS with scala.Product with scala.Serializable
-Object with Test$ToS
-Object with Test$ToS
-Object with Test$ToS
-scala.Function0[Object with Test$ToS]
-scala.Function0[Object with Test$ToS]
-_ <: Object with _ <: Object with Object with Test$ToS
-_ <: Object with _ <: Object with _ <: Object with Test$ToS
-scala.collection.immutable.List[Object with scala.collection.Seq[Int]]
-scala.collection.immutable.List[Object with scala.collection.Seq[_ <: Int]]
-_ <: scala.runtime.AbstractFunction0[_ <: Object with Test$ToS with scala.Product with scala.Serializable] with scala.Serializable with java.lang.Object
-_ <: Object with Test$ToS with scala.Product with scala.Serializable
-Object with Test$ToS
-Object with Test$ToS
-Object with Test$ToS
-scala.Function0[Object with Test$ToS]
-scala.Function0[Object with Test$ToS]
-_ <: Object with _ <: Object with Object with Test$ToS
-_ <: Object with _ <: Object with _ <: Object with Test$ToS
-scala.collection.immutable.List[Object with scala.collection.Seq[Int]]
-scala.collection.immutable.List[Object with scala.collection.Seq[_ <: Int]]
diff --git a/test/files/run/existentials3.scala.temporarily.disabled b/test/files/run/existentials3.scala
index bb80d366cc..d6d5612687 100644
--- a/test/files/run/existentials3.scala.temporarily.disabled
+++ b/test/files/run/existentials3.scala
@@ -11,11 +11,11 @@ object Test {
def f8 = { trait A ; trait B extends A ; class C extends B with ToS; new C { } }
def f9 = { trait A ; trait B ; class C extends B with A with ToS; new C { } }
-
+
def f10 = { class A { type T1 } ; List[A#T1]() }
def f11 = { abstract class A extends Seq[Int] ; List[A]() }
def f12 = { abstract class A extends Seq[U forSome { type U <: Int }] ; List[A]() }
-
+
val g1 = { case class Bar() extends ToS; Bar }
val g2 = { case class Bar() extends ToS; Bar() }
val g3 = { class Bar() extends ToS; object Bar extends ToS; Bar }
@@ -30,10 +30,16 @@ object Test {
val g10 = { class A { type T1 } ; List[A#T1]() }
val g11 = { abstract class A extends Seq[Int] ; List[A]() }
val g12 = { abstract class A extends Seq[U forSome { type U <: Int }] ; List[A]() }
-
- def m[T: Manifest](x: T) = println(manifest[T])
-
+
+ def printTag(t: TypeTag[_]) = {
+ val s = if (t.sym.isFreeType) t.sym.typeSignature.toString else t.sym.toString
+ println("%s, t=%s, s=%s".format(t, t.tpe.kind, s))
+ }
+ def m[T: ConcreteTypeTag](x: T) = printTag(concreteTypeTag[T])
+ def m2[T: TypeTag](x: T) = printTag(typeTag[T])
+
// manifests don't work for f10/g10
+ // oh, they do now :)
def main(args: Array[String]): Unit = {
m(f1)
m(f2)
@@ -44,7 +50,7 @@ object Test {
m(f7)
m(f8)
m(f9)
- // m(f10)
+ m2(f10)
m(f11)
m(f12)
m(g1)
@@ -56,7 +62,7 @@ object Test {
m(g7)
m(g8)
m(g9)
- // m(g10)
+ m2(g10)
m(g11)
m(g12)
}
diff --git a/test/files/run/repl-colon-type.check b/test/files/run/repl-colon-type.check
index 66c2fcc77f..cb0b9a6c8b 100644
--- a/test/files/run/repl-colon-type.check
+++ b/test/files/run/repl-colon-type.check
@@ -7,6 +7,12 @@ scala> :type List[1, 2, 3]
<console>:2: error: identifier expected but integer literal found.
List[1, 2, 3]
^
+<console>:3: error: ']' expected but '}' found.
+ }
+ ^
+<console>:1: error: identifier expected but integer literal found.
+ List[1, 2, 3]
+ ^
scala> :type List(1, 2, 3)
@@ -25,7 +31,7 @@ scala> :type def f[T >: Null, U <: String](x: T, y: U) = Set(x, y)
[T >: Null, U <: String](x: T, y: U)scala.collection.immutable.Set[Any]
scala> :type def x = 1 ; def bar[T >: Null <: AnyRef](xyz: T) = 5
-[T >: Null <: AnyRef](xyz: T)Int
+=> Int <and> [T >: Null <: AnyRef](xyz: T)Int
scala>
@@ -39,10 +45,19 @@ scala> :type lazy val f = 5
Int
scala> :type protected lazy val f = 5
-Int
+<console>:2: error: illegal start of statement (no modifiers allowed here)
+ protected lazy val f = 5
+ ^
+<console>:5: error: lazy value f cannot be accessed in object $iw
+ Access to protected value f not permitted because
+ enclosing object $eval in package $line19 is not a subclass of
+ object $iw where target is defined
+ lazy val $result = `f`
+ ^
+
scala> :type def f = 5
-Int
+=> Int
scala> :type def f() = 5
()Int
@@ -54,4 +69,156 @@ scala> :type def g[T](xs: Set[_ <: T]) = Some(xs.head)
scala>
+scala> // verbose!
+
+scala> :type -v List(1,2,3) filter _
+// Type signature
+(Int => Boolean) => List[Int]
+
+// Internal Type structure
+TypeRef(
+ TypeSymbol(abstract trait Function1[-T1, +R] extends Object)
+ args = List(
+ TypeRef(
+ TypeSymbol(abstract trait Function1[-T1, +R] extends Object)
+ args = List(
+ TypeRef(TypeSymbol(final class Int extends AnyVal))
+ TypeRef(TypeSymbol(final class Boolean extends AnyVal))
+ )
+ )
+ TypeRef(
+ TypeSymbol(
+ sealed abstract class List[+A] extends AbstractSeq[A] with LinearSeq[A] with Product with GenericTraversableTemplate[A,List] with LinearSeqOptimized[A,List[A]]
+
+ )
+ args = List(
+ TypeRef(TypeSymbol(final class Int extends AnyVal))
+ )
+ )
+ )
+)
+
+scala> :type -v def f[T >: Null, U <: String](x: T, y: U) = Set(x, y)
+// Type signature
+[T >: Null, U <: String](x: T, y: U)scala.collection.immutable.Set[Any]
+
+// Internal Type structure
+PolyType(
+ typeParams = List(TypeParam(T >: Null), TypeParam(U <: String))
+ resultType = MethodType(
+ params = List(TermSymbol(x: T), TermSymbol(y: U))
+ resultType = TypeRef(
+ TypeSymbol(
+ abstract trait Set[A] extends Iterable[A] with Set[A] with GenericSetTemplate[A,scala.collection.immutable.Set] with SetLike[A,scala.collection.immutable.Set[A]] with Parallelizable[A,scala.collection.parallel.immutable.ParSet[A]]
+
+ )
+ args = List(TypeRef(TypeSymbol(abstract class Any extends )))
+ )
+ )
+)
+
+scala> :type -v def x = 1 ; def bar[T >: Null <: AnyRef](xyz: T) = 5
+// Type signature
+=> Int <and> [T >: Null <: AnyRef](xyz: T)Int
+
+// Internal Type structure
+OverloadedType(
+ alts = List(
+ NullaryMethodType(
+ TypeRef(TypeSymbol(final class Int extends AnyVal))
+ )
+ PolyType(
+ typeParams = List(TypeParam(T >: Null <: AnyRef))
+ resultType = MethodType(
+ params = List(TermSymbol(xyz: T))
+ resultType = TypeRef(
+ TypeSymbol(final class Int extends AnyVal)
+ )
+ )
+ )
+ )
+)
+
+scala> :type -v Nil.combinations _
+// Type signature
+Int => Iterator[List[Nothing]]
+
+// Internal Type structure
+TypeRef(
+ TypeSymbol(abstract trait Function1[-T1, +R] extends Object)
+ args = List(
+ TypeRef(TypeSymbol(final class Int extends AnyVal))
+ TypeRef(
+ TypeSymbol(
+ abstract trait Iterator[+A] extends TraversableOnce[A]
+ )
+ args = List(
+ TypeRef(
+ TypeSymbol(
+ sealed abstract class List[+A] extends AbstractSeq[A] with LinearSeq[A] with Product with GenericTraversableTemplate[A,List] with LinearSeqOptimized[A,List[A]]
+
+ )
+ args = List(
+ TypeRef(
+ TypeSymbol(final abstract class Nothing extends Any)
+ )
+ )
+ )
+ )
+ )
+ )
+)
+
+scala> :type -v def f[T <: AnyVal] = List[T]().combinations _
+// Type signature
+[T <: AnyVal]=> Int => Iterator[List[T]]
+
+// Internal Type structure
+PolyType(
+ typeParams = List(TypeParam(T <: AnyVal))
+ resultType = NullaryMethodType(
+ TypeRef(
+ TypeSymbol(abstract trait Function1[-T1, +R] extends Object)
+ args = List(
+ TypeRef(TypeSymbol(final class Int extends AnyVal))
+ TypeRef(
+ TypeSymbol(
+ abstract trait Iterator[+A] extends TraversableOnce[A]
+ )
+ args = List(
+ TypeRef(
+ TypeSymbol(
+ sealed abstract class List[+A] extends AbstractSeq[A] with LinearSeq[A] with Product with GenericTraversableTemplate[A,List] with LinearSeqOptimized[A,List[A]]
+
+ )
+ args = List(TypeParamTypeRef(TypeParam(T <: AnyVal)))
+ )
+ )
+ )
+ )
+ )
+ )
+)
+
+scala> :type -v def f[T, U >: T](x: T, y: List[U]) = x :: y
+// Type signature
+[T, U >: T](x: T, y: List[U])List[U]
+
+// Internal Type structure
+PolyType(
+ typeParams = List(TypeParam(T), TypeParam(U >: T))
+ resultType = MethodType(
+ params = List(TermSymbol(x: T), TermSymbol(y: List[U]))
+ resultType = TypeRef(
+ TypeSymbol(
+ sealed abstract class List[+A] extends AbstractSeq[A] with LinearSeq[A] with Product with GenericTraversableTemplate[A,List] with LinearSeqOptimized[A,List[A]]
+
+ )
+ args = List(TypeParamTypeRef(TypeParam(U >: T)))
+ )
+ )
+)
+
+scala>
+
scala>
diff --git a/test/files/run/repl-colon-type.scala b/test/files/run/repl-colon-type.scala
index 39ab580d2a..c055b215c2 100644
--- a/test/files/run/repl-colon-type.scala
+++ b/test/files/run/repl-colon-type.scala
@@ -18,6 +18,14 @@ object Test extends ReplTest {
|:type def f() = 5
|
|:type def g[T](xs: Set[_ <: T]) = Some(xs.head)
+ |
+ |// verbose!
+ |:type -v List(1,2,3) filter _
+ |:type -v def f[T >: Null, U <: String](x: T, y: U) = Set(x, y)
+ |:type -v def x = 1 ; def bar[T >: Null <: AnyRef](xyz: T) = 5
+ |:type -v Nil.combinations _
+ |:type -v def f[T <: AnyVal] = List[T]().combinations _
+ |:type -v def f[T, U >: T](x: T, y: List[U]) = x :: y
""".stripMargin
}
diff --git a/test/files/run/repl-power.check b/test/files/run/repl-power.check
index e439a2a7f4..1e7b6f0cd8 100644
--- a/test/files/run/repl-power.check
+++ b/test/files/run/repl-power.check
@@ -14,7 +14,6 @@ scala> global.emptyValDef // "it is imported twice in the same scope by ..."
res0: $r.global.emptyValDef.type = private val _ = _
scala> val tp = ArrayClass[scala.util.Random] // magic with manifests
-warning: there were 2 feature warnings; re-run with -feature for details
tp: $r.global.Type = Array[scala.util.Random]
scala> tp.memberType(Array_apply) // evidence
diff --git a/test/files/run/repl-type-verbose.check b/test/files/run/repl-type-verbose.check
new file mode 100644
index 0000000000..103ac3e64d
--- /dev/null
+++ b/test/files/run/repl-type-verbose.check
@@ -0,0 +1,186 @@
+Type in expressions to have them evaluated.
+Type :help for more information.
+
+scala>
+
+scala> // verbose!
+
+scala> :type -v def f = 5
+// Type signature
+=> Int
+
+// Internal Type structure
+NullaryMethodType(
+ TypeRef(TypeSymbol(final class Int extends AnyVal))
+)
+
+scala> :type -v def f() = 5
+// Type signature
+()Int
+
+// Internal Type structure
+NullaryMethodType(
+ resultType = TypeRef(TypeSymbol(final class Int extends AnyVal))
+)
+
+scala> :type -v def f[T] = 5
+// Type signature
+[T]=> Int
+
+// Internal Type structure
+PolyType(
+ typeParams = List(TypeParam(T))
+ resultType = NullaryMethodType(
+ TypeRef(TypeSymbol(final class Int extends AnyVal))
+ )
+)
+
+scala> :type -v def f[T >: Null] = 5
+// Type signature
+[T >: Null]=> Int
+
+// Internal Type structure
+PolyType(
+ typeParams = List(TypeParam(T >: Null))
+ resultType = NullaryMethodType(
+ TypeRef(TypeSymbol(final class Int extends AnyVal))
+ )
+)
+
+scala> :type -v def f[T <: String] = 5
+// Type signature
+[T <: String]=> Int
+
+// Internal Type structure
+PolyType(
+ typeParams = List(TypeParam(T <: String))
+ resultType = NullaryMethodType(
+ TypeRef(TypeSymbol(final class Int extends AnyVal))
+ )
+)
+
+scala> :type -v def f[T]() = 5
+// Type signature
+[T]()Int
+
+// Internal Type structure
+PolyType(
+ typeParams = List(TypeParam(T))
+ resultType = NullaryMethodType(
+ resultType = TypeRef(TypeSymbol(final class Int extends AnyVal))
+ )
+)
+
+scala> :type -v def f[T, U]() = 5
+// Type signature
+[T, U]()Int
+
+// Internal Type structure
+PolyType(
+ typeParams = List(TypeParam(T), TypeParam(U))
+ resultType = NullaryMethodType(
+ resultType = TypeRef(TypeSymbol(final class Int extends AnyVal))
+ )
+)
+
+scala> :type -v def f[T, U]()() = 5
+// Type signature
+[T, U]()()Int
+
+// Internal Type structure
+PolyType(
+ typeParams = List(TypeParam(T), TypeParam(U))
+ resultType = NullaryMethodType(
+ resultType = NullaryMethodType(
+ resultType = TypeRef(
+ TypeSymbol(final class Int extends AnyVal)
+ )
+ )
+ )
+)
+
+scala> :type -v def f[T, U <: T] = 5
+// Type signature
+[T, U <: T]=> Int
+
+// Internal Type structure
+PolyType(
+ typeParams = List(TypeParam(T), TypeParam(U <: T))
+ resultType = NullaryMethodType(
+ TypeRef(TypeSymbol(final class Int extends AnyVal))
+ )
+)
+
+scala> :type -v def f[T, U <: T](x: T)(y: U) = 5
+// Type signature
+[T, U <: T](x: T)(y: U)Int
+
+// Internal Type structure
+PolyType(
+ typeParams = List(TypeParam(T), TypeParam(U <: T))
+ resultType = MethodType(
+ params = List(TermSymbol(x: T))
+ resultType = MethodType(
+ params = List(TermSymbol(y: U))
+ resultType = TypeRef(
+ TypeSymbol(final class Int extends AnyVal)
+ )
+ )
+ )
+)
+
+scala> :type -v def f[T: Ordering] = 5
+// Type signature
+[T](implicit evidence$1: Ordering[T])Int
+
+// Internal Type structure
+PolyType(
+ typeParams = List(TypeParam(T))
+ resultType = MethodType(
+ params = List(TermSymbol(implicit evidence$1: Ordering[T]))
+ resultType = TypeRef(TypeSymbol(final class Int extends AnyVal))
+ )
+)
+
+scala> :type -v def f[T: Ordering] = implicitly[Ordering[T]]
+// Type signature
+[T](implicit evidence$1: Ordering[T])Ordering[T]
+
+// Internal Type structure
+PolyType(
+ typeParams = List(TypeParam(T))
+ resultType = MethodType(
+ params = List(TermSymbol(implicit evidence$1: Ordering[T]))
+ resultType = AliasTypeRef(
+ Alias(type Ordering[T] = scala.math.Ordering[T])
+ args = List(TypeParamTypeRef(TypeParam(T)))
+ normalize = TypeRef(
+ TypeSymbol(
+ abstract trait Ordering[T] extends Comparator[T] with PartialOrdering[T] with Serializable
+
+ )
+ args = List(TypeParamTypeRef(TypeParam(T)))
+ )
+ )
+ )
+)
+
+scala> :type -v def f[T <: { type Bippy = List[Int] ; def g(): Bippy }] = 5
+// Type signature
+[T <: AnyRef{type Bippy = List[Int]; def g(): this.Bippy}]=> Int
+
+// Internal Type structure
+PolyType(
+ typeParams = List(
+ TypeParam(
+ T <: AnyRef{type Bippy = List[Int]; def g(): this.Bippy}
+ )
+ )
+ resultType = NullaryMethodType(
+ TypeRef(TypeSymbol(final class Int extends AnyVal))
+ )
+)
+
+scala>
+
+scala>
diff --git a/test/files/run/repl-type-verbose.scala b/test/files/run/repl-type-verbose.scala
new file mode 100644
index 0000000000..10c390550a
--- /dev/null
+++ b/test/files/run/repl-type-verbose.scala
@@ -0,0 +1,20 @@
+import scala.tools.partest.ReplTest
+
+object Test extends ReplTest {
+ def code = """
+ |// verbose!
+ |:type -v def f = 5
+ |:type -v def f() = 5
+ |:type -v def f[T] = 5
+ |:type -v def f[T >: Null] = 5
+ |:type -v def f[T <: String] = 5
+ |:type -v def f[T]() = 5
+ |:type -v def f[T, U]() = 5
+ |:type -v def f[T, U]()() = 5
+ |:type -v def f[T, U <: T] = 5
+ |:type -v def f[T, U <: T](x: T)(y: U) = 5
+ |:type -v def f[T: Ordering] = 5
+ |:type -v def f[T: Ordering] = implicitly[Ordering[T]]
+ |:type -v def f[T <: { type Bippy = List[Int] ; def g(): Bippy }] = 5
+ """.stripMargin
+}
diff --git a/test/files/run/t1195.check b/test/files/run/t1195.check
new file mode 100644
index 0000000000..554e3fd03d
--- /dev/null
+++ b/test/files/run/t1195.check
@@ -0,0 +1,6 @@
+ConcreteTypeTag[Bar.type], underlying = <: scala.runtime.AbstractFunction1[Int,Bar] with Serializable{case def unapply(x$0: Bar): Option[Int]} with Singleton
+ConcreteTypeTag[Bar], underlying = <: Product with Serializable{val x: Int; def copy(x: Int): Bar; def copy$default$1: Int; def _1: Int}
+ConcreteTypeTag[Product with Serializable], underlying = Product with Serializable
+ConcreteTypeTag[Bar.type], underlying = <: scala.runtime.AbstractFunction1[Int,Bar] with Serializable{case def unapply(x$0: Bar): Option[Int]} with Singleton
+ConcreteTypeTag[Bar], underlying = <: Product with Serializable{val x: Int; def copy(x: Int): Bar; def copy$default$1: Int; def _1: Int}
+ConcreteTypeTag[Product with Serializable], underlying = Product with Serializable
diff --git a/test/files/run/t1195.check.temporarily.disabled b/test/files/run/t1195.check.temporarily.disabled
deleted file mode 100644
index d023bc91f7..0000000000
--- a/test/files/run/t1195.check.temporarily.disabled
+++ /dev/null
@@ -1,6 +0,0 @@
-_ <: scala.runtime.AbstractFunction1[Int, _ <: Object with scala.Product with scala.Serializable] with scala.Serializable with java.lang.Object
-_ <: Object with scala.Product with scala.Serializable
-Object with scala.Product with scala.Serializable
-_ <: scala.runtime.AbstractFunction1[Int, _ <: Object with scala.Product with scala.Serializable] with scala.Serializable with java.lang.Object
-_ <: Object with scala.Product with scala.Serializable
-Object with scala.Product with scala.Serializable
diff --git a/test/files/run/t1195.scala.temporarily.disabled b/test/files/run/t1195.scala
index 81ef5bdb0e..93b1dcbd07 100644
--- a/test/files/run/t1195.scala.temporarily.disabled
+++ b/test/files/run/t1195.scala
@@ -6,8 +6,8 @@ object Test {
val f1 = f()
val g1 = g()
val h1 = h()
-
- def m[T: Manifest](x: T) = println(manifest[T])
+
+ def m[T: Manifest](x: T) = println(manifest[T] + ", underlying = " + manifest[T].sym.typeSignature)
def main(args: Array[String]): Unit = {
m(f)
diff --git a/test/files/run/t3507.check b/test/files/run/t3507.check
new file mode 100644
index 0000000000..50ab029592
--- /dev/null
+++ b/test/files/run/t3507.check
@@ -0,0 +1 @@
+ConcreteTypeTag[_1.type#b.c.type]
diff --git a/test/files/run/t3507.scala b/test/files/run/t3507.scala
new file mode 100644
index 0000000000..3cdd40a881
--- /dev/null
+++ b/test/files/run/t3507.scala
@@ -0,0 +1,15 @@
+class A {
+ object b {
+ object c
+ }
+ def m = b.c
+}
+
+object Test extends App {
+ var a: A = new A // mutable
+ val c /*: object _1.b.c forSome { val _1: A } */ = a.m // widening using existential
+
+ def mani[T: Manifest](x: T) = println(manifest[T])
+ mani/*[object _1.b.c]*/(c) // kaboom in manifestOfType / TreeGen.mkAttributedQualifier
+ // --> _1 is not in scope here
+} \ No newline at end of file
diff --git a/test/files/run/t4110.check b/test/files/run/t4110.check
new file mode 100644
index 0000000000..28f220e1fe
--- /dev/null
+++ b/test/files/run/t4110.check
@@ -0,0 +1,2 @@
+ConcreteTypeTag[Test.A with Test.B]
+ConcreteTypeTag[Test.A with Test.B]
diff --git a/test/files/run/t4110.check.temporarily.disabled b/test/files/run/t4110.check.temporarily.disabled
deleted file mode 100644
index 8b005989de..0000000000
--- a/test/files/run/t4110.check.temporarily.disabled
+++ /dev/null
@@ -1,2 +0,0 @@
-Object with Test$A with Test$B
-Object with Test$A with Test$B
diff --git a/test/files/run/t4110.scala.temporarily.disabled b/test/files/run/t4110.scala
index 4bd377b73e..4bd377b73e 100644
--- a/test/files/run/t4110.scala.temporarily.disabled
+++ b/test/files/run/t4110.scala
diff --git a/test/files/run/treePrint.check.temporarily.disabled b/test/files/run/treePrint.check
index 3360815ac1..3360815ac1 100644
--- a/test/files/run/treePrint.check.temporarily.disabled
+++ b/test/files/run/treePrint.check
diff --git a/test/files/run/treePrint.scala.temporarily.disabled b/test/files/run/treePrint.scala
index e0332a705f..4a80e2824d 100644
--- a/test/files/run/treePrint.scala.temporarily.disabled
+++ b/test/files/run/treePrint.scala
@@ -4,7 +4,7 @@ object Test {
import scala.tools.nsc._
import interpreter._
import java.io.{ OutputStream, BufferedReader, StringReader, PrintWriter, Writer, OutputStreamWriter}
-
+
val code = """
def foo = {
var q: Boolean = false
@@ -22,11 +22,11 @@ object Test {
else 20
}
else 30
-
+
(x == 5) || !q || true
}
- """
-
+ """
+
class NullOutputStream extends OutputStream { def write(b: Int) { } }
def main(args: Array[String]) {
@@ -35,7 +35,8 @@ object Test {
settings.Ycompacttrees.value = true
val intp = new IMain(settings, new PrintWriter(new NullOutputStream))
- val power = new Power(intp, new ReplVals { })
+ val vals = new ReplVals { }
+ val power = new Power(intp, vals)
intp.interpret("""def initialize = "Have to interpret something or we get errors." """)
power trees code foreach println
}