Permalink
Browse files

SI-7100 Fixed infinite recursion in duplicators

  • Loading branch information...
1 parent 33608ff commit a53e1508660f849e86e34808e5d4230b078f7a3e @VladUreche VladUreche committed Feb 7, 2013
Showing with 7 additions and 1 deletion.
  1. +1 −1 src/compiler/scala/tools/nsc/typechecker/Duplicators.scala
  2. +6 −0 test/files/pos/SI-7100.scala
View
2 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
View
6 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]
+ }
+}

3 comments on commit a53e150

@scala-jenkins

Job pr-checkin-per-commit failed for a53e150 (results):


Took 11 s.
sad kitty
to rebuild, comment "PLS REBUILD/pr-checkin-per-commit@a53e150"on PR #2112

@scala-jenkins

Job pr-rangepos-per-commit failed for a53e150 (results):


Took 9 s.
sad kitty
to rebuild, comment "PLS REBUILD/pr-rangepos-per-commit@a53e150"on PR #2112

@VladUreche
The Scala Programming Language member

@scala-jenkins: Bad kitteh, bad kitteh, no forgive! Commenting ugly stuff on people's commits won't get you any hamburgerz.

Please sign in to comment.