diff options
author | odersky <odersky@gmail.com> | 2017-03-14 11:24:11 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-03-14 11:24:11 +0100 |
commit | 3a93b3ee128bae804044b25aa7354ce32e074678 (patch) | |
tree | 999687ca66b7c039fac23f3009e184a9c049f227 /compiler | |
parent | a832273c1b3bb2532dcca82ed9ca371c1250dea1 (diff) | |
parent | bba147a4c38727ef2bae2769a85369cf11a8e6b5 (diff) | |
download | dotty-3a93b3ee128bae804044b25aa7354ce32e074678.tar.gz dotty-3a93b3ee128bae804044b25aa7354ce32e074678.tar.bz2 dotty-3a93b3ee128bae804044b25aa7354ce32e074678.zip |
Merge pull request #2090 from dotty-staging/fix/ParSetLike
Fix #2089: Error when compiling ParSetLike, ParSet, SetLike, in this order
Diffstat (limited to 'compiler')
-rw-r--r-- | compiler/src/dotty/tools/dotc/typer/Typer.scala | 7 | ||||
-rw-r--r-- | compiler/test/dotc/tests.scala | 4 |
2 files changed, 11 insertions, 0 deletions
diff --git a/compiler/src/dotty/tools/dotc/typer/Typer.scala b/compiler/src/dotty/tools/dotc/typer/Typer.scala index ccfe218b3..fd0c7c73d 100644 --- a/compiler/src/dotty/tools/dotc/typer/Typer.scala +++ b/compiler/src/dotty/tools/dotc/typer/Typer.scala @@ -1080,6 +1080,13 @@ class Typer extends Namer with TypeAssigner with Applications with Implicits wit (if (isVarPattern(arg)) desugar.patternVar(arg) else arg, tparam.paramBounds) else (arg, WildcardType) + if (tpt1.symbol.isClass) + tparam match { + case tparam: Symbol => + // This is needed to get the test `compileParSetSubset` to work + tparam.ensureCompleted() + case _ => + } typed(desugaredArg, argPt) } args.zipWithConserve(tparams)(typedArg(_, _)).asInstanceOf[List[Tree]] diff --git a/compiler/test/dotc/tests.scala b/compiler/test/dotc/tests.scala index 78a8aefd5..01db2d9cc 100644 --- a/compiler/test/dotc/tests.scala +++ b/compiler/test/dotc/tests.scala @@ -225,6 +225,10 @@ class tests extends CompilerTest { |../scala-scala/src/library/scala/collection/generic/GenSeqFactory.scala""".stripMargin) @Test def compileIndexedSeq = compileLine("../scala-scala/src/library/scala/collection/immutable/IndexedSeq.scala") @Test def compileParSetLike = compileLine("../scala-scala/src/library/scala/collection/parallel/mutable/ParSetLike.scala") + @Test def compileParSetSubset = compileLine( + """../scala-scala/src/library/scala/collection/parallel/mutable/ParSetLike.scala + |../scala-scala/src/library/scala/collection/parallel/mutable/ParSet.scala + |../scala-scala/src/library/scala/collection/mutable/SetLike.scala""".stripMargin)(scala2mode ++ defaultOptions) @Test def dotty = { dottyBootedLib |