aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/core/TypeErasure.scala
diff options
context:
space:
mode:
authorGuillaume Martres <smarter@ubuntu.com>2015-12-01 16:52:01 +0100
committerGuillaume Martres <smarter@ubuntu.com>2015-12-01 17:11:28 +0100
commit60fb657649d800c03e8335892cd82455e7e34235 (patch)
tree00a90ea37bd3031884aecbe3834a98a59b826c2e /src/dotty/tools/dotc/core/TypeErasure.scala
parent112564655f4f23552cb9ae48d0fdb7d8ac5b725c (diff)
downloaddotty-60fb657649d800c03e8335892cd82455e7e34235.tar.gz
dotty-60fb657649d800c03e8335892cd82455e7e34235.tar.bz2
dotty-60fb657649d800c03e8335892cd82455e7e34235.zip
Compile scala.collection.Seq without double-binding error
This commit fixes two issues which caused us to complete Seq too early and read it from the classpath instead of from the sources: - Evaluting RepeatedParamClass forced Seq, this is not necessary because the type of RepeatedParamClass is a LazyType - TypeErasure#sigName on a Scala type always forced Seq, even if the type is not a repeated param type. This fixes #980.
Diffstat (limited to 'src/dotty/tools/dotc/core/TypeErasure.scala')
-rw-r--r--src/dotty/tools/dotc/core/TypeErasure.scala6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/dotty/tools/dotc/core/TypeErasure.scala b/src/dotty/tools/dotc/core/TypeErasure.scala
index 7cca37911..108d862a9 100644
--- a/src/dotty/tools/dotc/core/TypeErasure.scala
+++ b/src/dotty/tools/dotc/core/TypeErasure.scala
@@ -126,9 +126,11 @@ object TypeErasure {
erasureFn(isJava = false, semiEraseVCs = true, isConstructor = false, wildcardOK = false)(tp)(erasureCtx)
def sigName(tp: Type, isJava: Boolean)(implicit ctx: Context): TypeName = {
- val seqClass = if (isJava) defn.ArrayClass else defn.SeqClass
val normTp =
- if (tp.isRepeatedParam) tp.translateParameterized(defn.RepeatedParamClass, seqClass)
+ if (tp.isRepeatedParam) {
+ val seqClass = if (isJava) defn.ArrayClass else defn.SeqClass
+ tp.translateParameterized(defn.RepeatedParamClass, seqClass)
+ }
else tp
val erase = erasureFn(isJava, semiEraseVCs = false, isConstructor = false, wildcardOK = true)
erase.sigName(normTp)(erasureCtx)