summaryrefslogtreecommitdiff
path: root/test/files/pos
diff options
context:
space:
mode:
Diffstat (limited to 'test/files/pos')
-rw-r--r--test/files/pos/annotated-original/M_1.scala4
-rw-r--r--test/files/pos/annotated-treecopy/Impls_Macros_1.scala4
-rw-r--r--test/files/pos/attachments-typed-another-ident/Impls_1.scala4
-rw-r--r--test/files/pos/attachments-typed-ident/Impls_1.scala4
-rw-r--r--test/files/pos/macro-implicit-invalidate-on-error.scala2
-rw-r--r--test/files/pos/t2066.scala25
-rw-r--r--test/files/pos/t5692a/Macros_1.scala4
-rw-r--r--test/files/pos/t5692b/Macros_1.scala4
-rw-r--r--test/files/pos/t5706.scala4
-rw-r--r--test/files/pos/t5744/Macros_1.scala6
-rw-r--r--test/files/pos/t6047.scala4
-rw-r--r--test/files/pos/t6447.scala8
-rw-r--r--test/files/pos/t6485a/Macros_1.scala4
-rw-r--r--test/files/pos/t6485b/Test.scala4
-rw-r--r--test/files/pos/t6516.scala6
-rw-r--r--test/files/pos/t7377/Macro_1.scala4
-rw-r--r--test/files/pos/t7461/Macros_1.scala4
-rw-r--r--test/files/pos/t7649.scala2
-rw-r--r--test/files/pos/t7776.scala2
-rw-r--r--test/files/pos/t8001/Macros_1.scala4
-rw-r--r--test/files/pos/t8013/inpervolator_1.scala2
-rw-r--r--test/files/pos/t8045.scala17
-rw-r--r--test/files/pos/t8046.scala20
-rw-r--r--test/files/pos/t8046b.scala16
-rw-r--r--test/files/pos/t8046c.scala19
-rw-r--r--test/files/pos/t8064.flags1
-rw-r--r--test/files/pos/t8064/Client_2.scala8
-rw-r--r--test/files/pos/t8064/Macro_1.scala10
-rw-r--r--test/files/pos/t8064b.flags1
-rw-r--r--test/files/pos/t8064b/Client_2.scala6
-rw-r--r--test/files/pos/t8064b/Macro_1.scala11
-rw-r--r--test/files/pos/t8128.scala15
-rw-r--r--test/files/pos/t8132.scala5
-rw-r--r--test/files/pos/t8146a.scala9
-rw-r--r--test/files/pos/t8146b.scala77
35 files changed, 280 insertions, 40 deletions
diff --git a/test/files/pos/annotated-original/M_1.scala b/test/files/pos/annotated-original/M_1.scala
index 089a3a13c5..e312f9abbf 100644
--- a/test/files/pos/annotated-original/M_1.scala
+++ b/test/files/pos/annotated-original/M_1.scala
@@ -1,7 +1,7 @@
import language.experimental.macros
-import reflect.macros.BlackboxContext
+import scala.reflect.macros.blackbox.Context
object M {
- def impl(c: BlackboxContext)(a: c.Expr[Any]) = c.Expr[Any](c.resetLocalAttrs(a.tree))
+ def impl(c: Context)(a: c.Expr[Any]) = c.Expr[Any](c.resetLocalAttrs(a.tree))
def m(a: Any) = macro impl
}
diff --git a/test/files/pos/annotated-treecopy/Impls_Macros_1.scala b/test/files/pos/annotated-treecopy/Impls_Macros_1.scala
index 50c671707d..b02864b994 100644
--- a/test/files/pos/annotated-treecopy/Impls_Macros_1.scala
+++ b/test/files/pos/annotated-treecopy/Impls_Macros_1.scala
@@ -1,5 +1,5 @@
import scala.language.experimental.macros
-import scala.reflect.macros.BlackboxContext
+import scala.reflect.macros.blackbox.Context
import collection.mutable.ListBuffer
import collection.mutable.Stack
@@ -12,7 +12,7 @@ object Macros {
def tree[T,U](f:Function1[T,U]): Function1[T,U] = macro tree_impl[T,U]
- def tree_impl[T:c.WeakTypeTag,U:c.WeakTypeTag](c: BlackboxContext)
+ def tree_impl[T:c.WeakTypeTag,U:c.WeakTypeTag](c: Context)
(f:c.Expr[Function1[T,U]]): c.Expr[Function1[T,U]] = {
import c.universe._
val ttag = c.weakTypeTag[U]
diff --git a/test/files/pos/attachments-typed-another-ident/Impls_1.scala b/test/files/pos/attachments-typed-another-ident/Impls_1.scala
index 6271359921..8016143a4c 100644
--- a/test/files/pos/attachments-typed-another-ident/Impls_1.scala
+++ b/test/files/pos/attachments-typed-another-ident/Impls_1.scala
@@ -1,10 +1,10 @@
-import scala.reflect.macros.BlackboxContext
+import scala.reflect.macros.blackbox.Context
import language.experimental.macros
object MyAttachment
object Macros {
- def impl(c: BlackboxContext) = {
+ def impl(c: Context) = {
import c.universe._
val ident = Ident(TermName("bar")) updateAttachment MyAttachment
assert(ident.attachments.get[MyAttachment.type].isDefined, ident.attachments)
diff --git a/test/files/pos/attachments-typed-ident/Impls_1.scala b/test/files/pos/attachments-typed-ident/Impls_1.scala
index f24ea88a5d..af2cc59ecd 100644
--- a/test/files/pos/attachments-typed-ident/Impls_1.scala
+++ b/test/files/pos/attachments-typed-ident/Impls_1.scala
@@ -1,10 +1,10 @@
-import scala.reflect.macros.BlackboxContext
+import scala.reflect.macros.blackbox.Context
import language.experimental.macros
object MyAttachment
object Macros {
- def impl(c: BlackboxContext) = {
+ def impl(c: Context) = {
import c.universe._
val ident = Ident(TermName("bar")) updateAttachment MyAttachment
assert(ident.attachments.get[MyAttachment.type].isDefined, ident.attachments)
diff --git a/test/files/pos/macro-implicit-invalidate-on-error.scala b/test/files/pos/macro-implicit-invalidate-on-error.scala
index f9756d965f..bb83e3cc38 100644
--- a/test/files/pos/macro-implicit-invalidate-on-error.scala
+++ b/test/files/pos/macro-implicit-invalidate-on-error.scala
@@ -1,5 +1,5 @@
import scala.language.experimental.macros
-import scala.reflect.macros.Context
+import scala.reflect.macros.blackbox.Context
trait LegacyLiftable[T] {
def apply(universe: scala.reflect.api.Universe, value: T): universe.Tree
diff --git a/test/files/pos/t2066.scala b/test/files/pos/t2066.scala
new file mode 100644
index 0000000000..30cb99d45c
--- /dev/null
+++ b/test/files/pos/t2066.scala
@@ -0,0 +1,25 @@
+trait A1 {
+ def f[T[+_]] = ()
+}
+
+trait B1 extends A1 {
+ override def f[T[_]] = ()
+}
+
+
+trait A2 {
+ def f[T[-_]] = ()
+}
+
+trait B2 extends A2 {
+ override def f[T[_]] = ()
+}
+
+
+trait A3 {
+ def f[T[X[_]]] = ()
+}
+
+trait B3 extends A3 {
+ override def f[T[X[+_]]] = ()
+}
diff --git a/test/files/pos/t5692a/Macros_1.scala b/test/files/pos/t5692a/Macros_1.scala
index 0e91f4d6a0..440e37d75d 100644
--- a/test/files/pos/t5692a/Macros_1.scala
+++ b/test/files/pos/t5692a/Macros_1.scala
@@ -1,6 +1,6 @@
-import scala.reflect.macros.BlackboxContext
+import scala.reflect.macros.blackbox.Context
object Macros {
- def impl[T](c: BlackboxContext) = { import c.universe._; c.Expr[Unit](q"()") }
+ def impl[T](c: Context) = { import c.universe._; c.Expr[Unit](q"()") }
def foo[T] = macro impl[T]
} \ No newline at end of file
diff --git a/test/files/pos/t5692b/Macros_1.scala b/test/files/pos/t5692b/Macros_1.scala
index 1034a1ea4a..98fb882844 100644
--- a/test/files/pos/t5692b/Macros_1.scala
+++ b/test/files/pos/t5692b/Macros_1.scala
@@ -1,6 +1,6 @@
-import scala.reflect.macros.BlackboxContext
+import scala.reflect.macros.blackbox.Context
object Macros {
- def impl[T, U](c: BlackboxContext) = { import c.universe._; c.Expr[Unit](q"()") }
+ def impl[T, U](c: Context) = { import c.universe._; c.Expr[Unit](q"()") }
def foo[T, U] = macro impl[T, U]
} \ No newline at end of file
diff --git a/test/files/pos/t5706.scala b/test/files/pos/t5706.scala
index 1970f5971f..6f0207366b 100644
--- a/test/files/pos/t5706.scala
+++ b/test/files/pos/t5706.scala
@@ -1,5 +1,5 @@
-import scala.reflect.macros.BlackboxContext
-import scala.reflect.macros.WhiteboxContext
+import scala.reflect.macros.blackbox.{Context => BlackboxContext}
+import scala.reflect.macros.whitebox.{Context => WhiteboxContext}
class Logger {
def error1(message: String) = macro Impls.error1
diff --git a/test/files/pos/t5744/Macros_1.scala b/test/files/pos/t5744/Macros_1.scala
index 0fc13c12d7..6e2bf4825b 100644
--- a/test/files/pos/t5744/Macros_1.scala
+++ b/test/files/pos/t5744/Macros_1.scala
@@ -1,18 +1,18 @@
import scala.language.experimental.macros
-import scala.reflect.macros.BlackboxContext
+import scala.reflect.macros.blackbox.Context
object Macros {
def foo[U: Numeric](x: U) = macro foo_impl[U]
def bar[U: Numeric : Equiv, Y <% String](x: U)(implicit s: String) = macro bar_impl[U, Y]
- def foo_impl[U](c: BlackboxContext)(x: c.Expr[U])(numeric: c.Expr[Numeric[U]]) = {
+ def foo_impl[U](c: Context)(x: c.Expr[U])(numeric: c.Expr[Numeric[U]]) = {
import c.universe._
val plusOne = Apply(Select(numeric.tree, newTermName("plus")), List(x.tree, Literal(Constant(1))))
val body = Apply(Select(Ident(definitions.PredefModule), newTermName("println")), List(plusOne))
c.Expr[Unit](body)
}
- def bar_impl[U, Y](c: BlackboxContext)(x: c.Expr[U])(numeric: c.Expr[Numeric[U]], equiv: c.Expr[Equiv[U]], viewAsString: c.Expr[Y => String], s: c.Expr[String]) = {
+ def bar_impl[U, Y](c: Context)(x: c.Expr[U])(numeric: c.Expr[Numeric[U]], equiv: c.Expr[Equiv[U]], viewAsString: c.Expr[Y => String], s: c.Expr[String]) = {
import c.universe._
val plusOne = Apply(Select(numeric.tree, newTermName("plus")), List(x.tree, Literal(Constant(1))))
val plusLen = Apply(Select(numeric.tree, newTermName("plus")), List(plusOne, Select(s.tree, newTermName("length"))))
diff --git a/test/files/pos/t6047.scala b/test/files/pos/t6047.scala
index c5bb44d87e..8c3dd18953 100644
--- a/test/files/pos/t6047.scala
+++ b/test/files/pos/t6047.scala
@@ -1,10 +1,10 @@
-import scala.reflect.macros.BlackboxContext
+import scala.reflect.macros.blackbox.Context
import java.io.InputStream
object Macros {
def unpack[A](input: InputStream): A = macro unpack_impl[A]
- def unpack_impl[A: c.WeakTypeTag](c: BlackboxContext)(input: c.Expr[InputStream]): c.Expr[A] = {
+ def unpack_impl[A: c.WeakTypeTag](c: Context)(input: c.Expr[InputStream]): c.Expr[A] = {
import c.universe._
def unpackcode(tpe: c.Type): c.Expr[_] = {
diff --git a/test/files/pos/t6447.scala b/test/files/pos/t6447.scala
index 8203c0cddd..6ef69d4852 100644
--- a/test/files/pos/t6447.scala
+++ b/test/files/pos/t6447.scala
@@ -1,18 +1,18 @@
import scala.language.experimental.macros
-import scala.reflect.macros.BlackboxContext
+import scala.reflect.macros.blackbox.Context
class X { type T }
object X {
// this works
def foo(x: X): x.T = macro fooImpl
- def fooImpl(c: BlackboxContext)(x: c.Expr[X]): c.Expr[x.value.T] = ???
+ def fooImpl(c: Context)(x: c.Expr[X]): c.Expr[x.value.T] = ???
// this doesn't
def bar(x: X, y: X): (x.T, y.T) = macro barImpl
- def barImpl(c: BlackboxContext)(x: c.Expr[X], y: c.Expr[X]): c.Expr[(x.value.T, y.value.T)] = ???
+ def barImpl(c: Context)(x: c.Expr[X], y: c.Expr[X]): c.Expr[(x.value.T, y.value.T)] = ???
// neither does this
def baz(x: X)(xs: List[x.T]): Unit = macro bazImpl
- def bazImpl(c: BlackboxContext)(x: c.Expr[X])(xs: c.Expr[List[x.value.T]]): c.Expr[Unit] = ???
+ def bazImpl(c: Context)(x: c.Expr[X])(xs: c.Expr[List[x.value.T]]): c.Expr[Unit] = ???
}
diff --git a/test/files/pos/t6485a/Macros_1.scala b/test/files/pos/t6485a/Macros_1.scala
index c637c2cfee..570c987709 100644
--- a/test/files/pos/t6485a/Macros_1.scala
+++ b/test/files/pos/t6485a/Macros_1.scala
@@ -1,5 +1,5 @@
-import scala.reflect.macros.BlackboxContext
+import scala.reflect.macros.blackbox.Context
object Macros {
- def crash(c: BlackboxContext): c.Expr[Unit] = c.universe.reify(())
+ def crash(c: Context): c.Expr[Unit] = c.universe.reify(())
} \ No newline at end of file
diff --git a/test/files/pos/t6485b/Test.scala b/test/files/pos/t6485b/Test.scala
index 9897987516..3b81c6f8ab 100644
--- a/test/files/pos/t6485b/Test.scala
+++ b/test/files/pos/t6485b/Test.scala
@@ -1,10 +1,10 @@
import scala.language.experimental.macros
-import scala.reflect.macros.BlackboxContext
+import scala.reflect.macros.blackbox.Context
final class Ops[T](val x: T) extends AnyVal {
def f = macro Macros.crash
}
object Macros {
- def crash(c: BlackboxContext): c.Expr[Unit] = c.universe.reify(())
+ def crash(c: Context): c.Expr[Unit] = c.universe.reify(())
} \ No newline at end of file
diff --git a/test/files/pos/t6516.scala b/test/files/pos/t6516.scala
index aed359976e..2980d83eb6 100644
--- a/test/files/pos/t6516.scala
+++ b/test/files/pos/t6516.scala
@@ -1,17 +1,17 @@
import scala.language.experimental.macros
-import scala.reflect.macros.BlackboxContext
+import scala.reflect.macros.blackbox.Context
import scala.collection.TraversableLike
// This one compiles
object Test {
- type Alias[T, CC[_]] = BlackboxContext { type PrefixType = TraversableLike[T, CC[T]] }
+ type Alias[T, CC[_]] = Context { type PrefixType = TraversableLike[T, CC[T]] }
def f() = macro f_impl
def f_impl(c: Alias[Int, List])() = ???
}
// This one doesn't
object Test2 {
- type Ctx = scala.reflect.macros.BlackboxContext
+ type Ctx = scala.reflect.macros.blackbox.Context
type Alias[T, CC[_]] = Ctx { type PrefixType = TraversableLike[T, CC[T]] }
def f() = macro f_impl
diff --git a/test/files/pos/t7377/Macro_1.scala b/test/files/pos/t7377/Macro_1.scala
index 7280cfeaf5..9f51248095 100644
--- a/test/files/pos/t7377/Macro_1.scala
+++ b/test/files/pos/t7377/Macro_1.scala
@@ -1,7 +1,7 @@
import language.experimental._
-import reflect.macros.BlackboxContext
+import scala.reflect.macros.blackbox.Context
object M {
- def noopImpl[A](c: BlackboxContext)(expr: c.Expr[A]): c.Expr[A] = c.Expr(c.typecheck(c.resetLocalAttrs(expr.tree)))
+ def noopImpl[A](c: Context)(expr: c.Expr[A]): c.Expr[A] = c.Expr(c.typecheck(c.resetLocalAttrs(expr.tree)))
def noop[A](expr: A): A = macro noopImpl[A]
}
diff --git a/test/files/pos/t7461/Macros_1.scala b/test/files/pos/t7461/Macros_1.scala
index 89ae7c70e3..ca84d75624 100644
--- a/test/files/pos/t7461/Macros_1.scala
+++ b/test/files/pos/t7461/Macros_1.scala
@@ -1,8 +1,8 @@
-import scala.reflect.macros.BlackboxContext
+import scala.reflect.macros.blackbox.Context
import language.experimental.macros
object Macros {
- def impl(c: BlackboxContext) = {
+ def impl(c: Context) = {
import c.universe._
val wut = c.typecheck(Select(Literal(Constant(10)), newTermName("$minus")), silent = true)
// println(showRaw(wut, printIds = true, printTypes = true))
diff --git a/test/files/pos/t7649.scala b/test/files/pos/t7649.scala
index fa5d13369f..d70dc05ea4 100644
--- a/test/files/pos/t7649.scala
+++ b/test/files/pos/t7649.scala
@@ -1,5 +1,5 @@
object Test {
- val c: reflect.macros.BlackboxContext = ???
+ val c: scala.reflect.macros.blackbox.Context = ???
import c.universe._
reify {
// The lookup of the implicit WeakTypeTag[Any]
diff --git a/test/files/pos/t7776.scala b/test/files/pos/t7776.scala
index e0584b70e2..a36497a7a1 100644
--- a/test/files/pos/t7776.scala
+++ b/test/files/pos/t7776.scala
@@ -1,5 +1,5 @@
import scala.language.experimental.macros
-import scala.reflect.macros.Context
+import scala.reflect.macros.blackbox.Context
class MacroErasure {
def app(f: Any => Any, x: Any): Any = macro MacroErasure.appMacro
diff --git a/test/files/pos/t8001/Macros_1.scala b/test/files/pos/t8001/Macros_1.scala
index fd26016d4b..3b80b88295 100644
--- a/test/files/pos/t8001/Macros_1.scala
+++ b/test/files/pos/t8001/Macros_1.scala
@@ -1,9 +1,9 @@
import scala.language.experimental.macros
-import scala.reflect.macros.BlackboxContext
+import scala.reflect.macros.blackbox.Context
object Macros {
def foo: Unit = macro impl
- def impl(c: BlackboxContext) = {
+ def impl(c: Context) = {
import c.universe._
q"()"
}
diff --git a/test/files/pos/t8013/inpervolator_1.scala b/test/files/pos/t8013/inpervolator_1.scala
index fb71571afc..89b7c22709 100644
--- a/test/files/pos/t8013/inpervolator_1.scala
+++ b/test/files/pos/t8013/inpervolator_1.scala
@@ -4,7 +4,7 @@ package t8013
// perverse macro to confuse Xlint
import scala.language.experimental.macros
-import scala.reflect.macros.{ BlackboxContext => Context }
+import scala.reflect.macros.blackbox.Context
object Perverse {
diff --git a/test/files/pos/t8045.scala b/test/files/pos/t8045.scala
new file mode 100644
index 0000000000..21154e386a
--- /dev/null
+++ b/test/files/pos/t8045.scala
@@ -0,0 +1,17 @@
+object Test extends App {
+ case class Number(i: Int)
+
+ object UnliftNumber {
+ def unapply(t: Any): Option[Number] = t match {
+ case i: Int => Some(Number(i))
+ case _ => None
+ }
+ }
+
+ def eval(expr: Any): Option[Number] = expr match {
+ case UnliftNumber(n) => Some(n)
+ case _ => None
+ }
+
+ println(eval(1))
+}
diff --git a/test/files/pos/t8046.scala b/test/files/pos/t8046.scala
new file mode 100644
index 0000000000..304d70b6b8
--- /dev/null
+++ b/test/files/pos/t8046.scala
@@ -0,0 +1,20 @@
+trait One {
+ type Op[A]
+ type Alias[A] = Op[A]
+}
+
+trait Two extends One {
+ trait Op[A] extends (A => A)
+
+ // This compiles
+ class View1 extends Op[Int] { def apply(xs: Int) = xs }
+
+ // ??? base class View2 not found in basetypes of class View2
+ // ./a.scala:9: error: class View2 needs to be abstract, since \
+ // method apply in trait Function1 of type (v1: T1)R is not defined
+ // (Note that T1 does not match Int)
+ // class View2 extends Alias[Int] { def apply(xs: Int) = xs }
+ // ^
+ // one error found
+ class View2 extends Alias[Int] { def apply(xs: Int) = xs }
+}
diff --git a/test/files/pos/t8046b.scala b/test/files/pos/t8046b.scala
new file mode 100644
index 0000000000..45b99fd7e0
--- /dev/null
+++ b/test/files/pos/t8046b.scala
@@ -0,0 +1,16 @@
+trait One {
+ type Op[A]
+ type Alias = Op[Int]
+}
+
+trait Two extends One {
+ trait Op[A] extends M[A]
+ //(a: Alias) => a.value.toChar // okay
+ // (=> A).asSeenFrom(a.type, trait M): => Int
+ class View2 extends Alias { value.toChar } // toChar is not a member of type parameter A
+ // (=> A).asSeenFrom(View2.this.type, trait M): => A
+
+ // override type Alias = Op[Int] // works with this
+}
+
+trait M[A] { def value: A = sys.error("") }
diff --git a/test/files/pos/t8046c.scala b/test/files/pos/t8046c.scala
new file mode 100644
index 0000000000..f05b4c15b5
--- /dev/null
+++ b/test/files/pos/t8046c.scala
@@ -0,0 +1,19 @@
+trait One {
+ type Op[A]
+ type Alias[A] = Op[A]
+}
+
+trait Three extends One {
+ trait Op[A] extends (A => A)
+
+ def f1(f: Op[Int]) = f(5)
+ def f2(f: Alias[Int]) = f(5)
+ def f3[T <: Op[Int]](f: T) = f(5)
+ def f4[T <: Alias[Int]](f: T) = f(5)
+ // ./a.scala:12: error: type mismatch;
+ // found : Int(5)
+ // required: T1
+ // def f4[T <: Alias[Int]](f: T) = f(5)
+ // ^
+}
+
diff --git a/test/files/pos/t8064.flags b/test/files/pos/t8064.flags
new file mode 100644
index 0000000000..281f0a10cd
--- /dev/null
+++ b/test/files/pos/t8064.flags
@@ -0,0 +1 @@
+-Yrangepos
diff --git a/test/files/pos/t8064/Client_2.scala b/test/files/pos/t8064/Client_2.scala
new file mode 100644
index 0000000000..44106782c7
--- /dev/null
+++ b/test/files/pos/t8064/Client_2.scala
@@ -0,0 +1,8 @@
+object Test {
+ Macro {
+ def s = ""
+ Macro(s): @unchecked
+ ???
+ }
+}
+// Was: a range position validation error (unpositioned tree) \ No newline at end of file
diff --git a/test/files/pos/t8064/Macro_1.scala b/test/files/pos/t8064/Macro_1.scala
new file mode 100644
index 0000000000..dd42950b34
--- /dev/null
+++ b/test/files/pos/t8064/Macro_1.scala
@@ -0,0 +1,10 @@
+import language.experimental.macros
+import scala.reflect.macros.blackbox.Context
+
+object Macro {
+ def apply(a: Any): Any = macro impl
+
+ def impl(c: Context)(a: c.Tree): c.Tree = {
+ c.resetLocalAttrs(a)
+ }
+}
diff --git a/test/files/pos/t8064b.flags b/test/files/pos/t8064b.flags
new file mode 100644
index 0000000000..281f0a10cd
--- /dev/null
+++ b/test/files/pos/t8064b.flags
@@ -0,0 +1 @@
+-Yrangepos
diff --git a/test/files/pos/t8064b/Client_2.scala b/test/files/pos/t8064b/Client_2.scala
new file mode 100644
index 0000000000..a7bf2b9fb4
--- /dev/null
+++ b/test/files/pos/t8064b/Client_2.scala
@@ -0,0 +1,6 @@
+object Test {
+ Macro {
+ "".reverse
+ }
+}
+// Was: a range position validation error (tree with offset position enclosing tree with range position) \ No newline at end of file
diff --git a/test/files/pos/t8064b/Macro_1.scala b/test/files/pos/t8064b/Macro_1.scala
new file mode 100644
index 0000000000..60996bfeca
--- /dev/null
+++ b/test/files/pos/t8064b/Macro_1.scala
@@ -0,0 +1,11 @@
+import language.experimental.macros
+import scala.reflect.macros.blackbox.Context
+
+object Macro {
+ def apply(a: Any): Any = macro impl
+ def impl(c: Context)(a: c.Tree): c.Tree = {
+ import c.universe._
+
+ q"{$a; true}"
+ }
+}
diff --git a/test/files/pos/t8128.scala b/test/files/pos/t8128.scala
new file mode 100644
index 0000000000..b6f76691b0
--- /dev/null
+++ b/test/files/pos/t8128.scala
@@ -0,0 +1,15 @@
+object G {
+ def unapply(m: Any): Option[_] = Some("")
+}
+
+object H {
+ def unapplySeq(m: Any): Option[Seq[_]] = None
+}
+
+object Test {
+ (0: Any) match {
+ case G(v) => v
+ case H(v) => v
+ case _ =>
+ }
+}
diff --git a/test/files/pos/t8132.scala b/test/files/pos/t8132.scala
new file mode 100644
index 0000000000..b4d6fd9441
--- /dev/null
+++ b/test/files/pos/t8132.scala
@@ -0,0 +1,5 @@
+trait T {
+ protected def s: String
+}
+
+case class G(override protected val s: String) extends T
diff --git a/test/files/pos/t8146a.scala b/test/files/pos/t8146a.scala
new file mode 100644
index 0000000000..e4eb8d3fd1
--- /dev/null
+++ b/test/files/pos/t8146a.scala
@@ -0,0 +1,9 @@
+trait M[+A]
+
+object Test {
+ type Inty = Int
+ def t1(
+ x: M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[Int @unchecked]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]
+ ): M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[Inty @unchecked]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]
+ = x
+}
diff --git a/test/files/pos/t8146b.scala b/test/files/pos/t8146b.scala
new file mode 100644
index 0000000000..dd031f66c8
--- /dev/null
+++ b/test/files/pos/t8146b.scala
@@ -0,0 +1,77 @@
+// non-deterministic type errors, non-termination.
+// seems to be due to inconsistent hashing/equality in SubTypePair
+
+import scala.language.{existentials, implicitConversions}
+import scala.annotation.unchecked.uncheckedVariance
+
+trait Column[T]
+
+// Turning this into a trait reduces (eliminates?) the likelihood of type errors (but not of non-termination)
+abstract class Shape[Level <: ShapeLevel, -Mixed_, Unpacked_, Packed_]
+
+trait ShapeLevel
+trait NestedShapeLevel extends ShapeLevel
+trait FlatShapeLevel extends NestedShapeLevel
+trait ColumnsShapeLevel extends FlatShapeLevel
+
+trait ProvenShape[U]
+
+object ProvenShape {
+ implicit def proveShapeOf[T, U](v: T)(implicit sh: Shape[_ <: FlatShapeLevel, T, U, _]): ProvenShape[U] = ???
+}
+
+sealed abstract class HList {
+ type Self <: HList
+ type :: [E] = HCons[E, Self]
+ final def :: [E](elem: E): :: [E] = ???
+}
+
+final class HCons[+H, +T <: HList](val head: H, val tail: T) extends HList {
+ type Self = HCons[H @uncheckedVariance, T @uncheckedVariance]
+}
+
+final object HNil extends HList {
+ type Self = HNil.type
+}
+
+// Success is more likely when not using these aliases
+object syntax {
+ type :: [+H, +T <: HList] = HCons[H, T]
+ type HNil = HNil.type
+}
+
+class HListBench {
+
+ import syntax._
+
+ implicit def columnShape[T, Level <: ShapeLevel]: Shape[Level, Column[T], T, Column[T]] = ???
+ implicit def provenShape[T, P](implicit shape: Shape[_ <: FlatShapeLevel, T, _, P]): Shape[FlatShapeLevel, ProvenShape[T], T, P] = ???
+ final class HListShape[Level <: ShapeLevel, M <: HList, U <: HList, P <: HList](val shapes: Seq[Shape[_ <: ShapeLevel, _, _, _]]) extends Shape[Level, M, U, P]
+ implicit def hnilShape[Level <: ShapeLevel] = new HListShape[Level, HNil.type, HNil.type, HNil.type](Nil)
+ implicit def hconsShape[Level <: ShapeLevel, M1, M2 <: HList, U1, U2 <: HList, P1, P2 <: HList]
+ (implicit s1: Shape[_ <: Level, M1, U1, P1], s2: HListShape[_ <: Level, M2, U2, P2]) =
+ new HListShape[Level, M1 :: M2, U1 :: U2, P1 :: P2](s1 +: s2.shapes)
+
+ trait A[T] {
+ def * : ProvenShape[T]
+ }
+
+ trait B extends A[
+ Int :: Int :: Int :: Int :: Int ::
+ Int :: Int :: Int :: Int :: Int ::
+ Int :: Int :: Int :: Int :: Int ::
+ Int :: Int :: Int :: Int :: Int ::
+ Int :: Int :: Int :: Int :: Int ::
+ Int :: Int :: HNil ] {
+
+ def c: Column[Int]
+
+ def * = c :: c :: c :: c :: c ::
+ c :: c :: c :: c :: c ::
+ c :: c :: c :: c :: c ::
+ c :: c :: c :: c :: c ::
+ c :: c :: c :: c :: c ::
+ c :: c :: HNil
+
+ }
+}