diff options
-rw-r--r-- | src/compiler/scala/tools/nsc/typechecker/Duplicators.scala | 2 | ||||
-rw-r--r-- | test/files/pos/SI-7100.scala | 6 |
2 files changed, 7 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/Duplicators.scala b/src/compiler/scala/tools/nsc/typechecker/Duplicators.scala index 0b46582cbf..f6142a81be 100644 --- a/src/compiler/scala/tools/nsc/typechecker/Duplicators.scala +++ b/src/compiler/scala/tools/nsc/typechecker/Duplicators.scala @@ -388,7 +388,7 @@ abstract class Duplicators extends Analyzer { cases } - super.typedPos(tree.pos, mode, pt)(Match(scrut, cases1)) + super.typed(atPos(tree.pos)(Match(scrut, cases1)), mode, pt) case EmptyTree => // no need to do anything, in particular, don't set the type to null, EmptyTree.tpe_= asserts diff --git a/test/files/pos/SI-7100.scala b/test/files/pos/SI-7100.scala new file mode 100644 index 0000000000..7cb6356ec8 --- /dev/null +++ b/test/files/pos/SI-7100.scala @@ -0,0 +1,6 @@ +class Buffer { + def f[@specialized(Int) T](): T = 0 match { + case 0 => 0.asInstanceOf[T] + case 1 => 0.asInstanceOf[T] + } +} |