From bba147a4c38727ef2bae2769a85369cf11a8e6b5 Mon Sep 17 00:00:00 2001 From: Guillaume Martres Date: Mon, 13 Mar 2017 21:43:13 +0100 Subject: Fix #2089: Error when compiling ParSetLike, ParSet, SetLike, in this order This fix is inspired by 6c91684, but I couldn't tell you why it works exactly, it's just something I tried. --- compiler/src/dotty/tools/dotc/typer/Typer.scala | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'compiler/src/dotty/tools/dotc/typer/Typer.scala') 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]] -- cgit v1.2.3