summaryrefslogtreecommitdiff
path: root/test/files/run
diff options
context:
space:
mode:
Diffstat (limited to 'test/files/run')
-rw-r--r--test/files/run/t5294.scala22
-rw-r--r--test/files/run/t7747-repl.scala4
2 files changed, 23 insertions, 3 deletions
diff --git a/test/files/run/t5294.scala b/test/files/run/t5294.scala
new file mode 100644
index 0000000000..2551ae89a6
--- /dev/null
+++ b/test/files/run/t5294.scala
@@ -0,0 +1,22 @@
+import scala.language.higherKinds
+
+package p {
+ trait T[+A, +CC] {
+ def t: CC
+ }
+ class C {
+ def test[CC[X] <: T[X,String] with T[X,Int]](from: CC[_]): Unit = ()
+ }
+}
+
+object Test {
+ def main(args: Array[String]): Unit = {
+ val symtab = reflect.runtime.universe.asInstanceOf[reflect.internal.SymbolTable]
+ val CTpe = reflect.runtime.universe.typeOf[p.C].asInstanceOf[symtab.Type]
+ val TClass = reflect.runtime.universe.symbolOf[p.T[_, _]].asInstanceOf[symtab.Symbol]
+ import symtab._
+ val from = CTpe.member(TermName("test")).paramss.head.head
+ assert(from.baseClasses contains TClass)
+ assert(from.info.baseTypeIndex(TClass) != -1) // was failing!
+ }
+}
diff --git a/test/files/run/t7747-repl.scala b/test/files/run/t7747-repl.scala
index 0094d3ba98..8203f4c802 100644
--- a/test/files/run/t7747-repl.scala
+++ b/test/files/run/t7747-repl.scala
@@ -10,9 +10,7 @@ object Test extends ReplTest {
override def normalize(s: String) = {
// replace indylambda function names by <function0>
- val s2 = """\$Lambda.*""".r.replaceAllIn(s, "<function0>")
- // Normalize ordering of LUB
- s2.replace("Serializable with Product", "Product with Serializable")
+ """\$Lambda.*""".r.replaceAllIn(s, "<function0>")
}
def code = """