diff options
author | Jason Zaugg <jzaugg@gmail.com> | 2012-06-24 18:56:02 +0200 |
---|---|---|
committer | Jason Zaugg <jzaugg@gmail.com> | 2012-06-30 09:20:46 +0200 |
commit | d9d5dcd1e21c215826a915db47eaf993621e0441 (patch) | |
tree | a6c4bf8aab8ff6d548c1a8763b3640d03282bb0d /src/compiler/scala/tools/nsc/typechecker/Typers.scala | |
parent | f43de697595eaebcf2feec03beb95daf606ac678 (diff) | |
download | scala-d9d5dcd1e21c215826a915db47eaf993621e0441.tar.gz scala-d9d5dcd1e21c215826a915db47eaf993621e0441.tar.bz2 scala-d9d5dcd1e21c215826a915db47eaf993621e0441.zip |
SI-4176 A repeat dose of repeated parameter type sanitization.
- During eta expansion, treat parameters of type A* as Seq[A]
- Do the same for method/class parameters as referred to by an Ident.
Also fixes SI-5967, which shows up during pattern matching.
Diffstat (limited to 'src/compiler/scala/tools/nsc/typechecker/Typers.scala')
-rw-r--r-- | src/compiler/scala/tools/nsc/typechecker/Typers.scala | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/Typers.scala b/src/compiler/scala/tools/nsc/typechecker/Typers.scala index 69d3fd7f47..04d9d67d68 100644 --- a/src/compiler/scala/tools/nsc/typechecker/Typers.scala +++ b/src/compiler/scala/tools/nsc/typechecker/Typers.scala @@ -4687,7 +4687,10 @@ trait Typers extends Modes with Adaptations with Tags { ) val (tree2, pre2) = makeAccessible(tree1, defSym, pre, qual) // assert(pre.typeArgs isEmpty) // no need to add #2416-style check here, right? - stabilize(tree2, pre2, mode, pt) + val tree3 = stabilize(tree2, pre2, mode, pt) + // SI-5967 Important to replace param type A* with Seq[A] when seen from from a reference, to avoid + // inference errors in pattern matching. + tree3 setType dropRepeatedParamType(tree3.tpe) } } } |