File tree Expand file tree Collapse file tree 1 file changed +2
-6
lines changed
compiler/src/dotty/tools/dotc/typer Expand file tree Collapse file tree 1 file changed +2
-6
lines changed Original file line number Diff line number Diff line change @@ -190,12 +190,8 @@ object Checking {
190190 case tref : TypeRef =>
191191 val cls = tref.symbol
192192 if (cls.isOneOf(AbstractOrTrait )) {
193- srcTp.underlyingClassRef(refinementOK = false ) match
194- case tref0 : TypeRef =>
195- val srcCls = tref0.symbol
196- report.error(CantInstantiateAbstractClassOrTrait (srcCls, isTrait = srcCls.is(Trait )), pos)
197- case _ =>
198- report.error(CantInstantiateAbstractClassOrTrait (cls, isTrait = cls.is(Trait )), pos)
193+ val srcCls = srcTp.underlyingClassRef(refinementOK = false ).typeSymbol
194+ report.error(CantInstantiateAbstractClassOrTrait (srcCls, isTrait = srcCls.is(Trait )), pos)
199195 }
200196 if ! cls.is(Module ) then
201197 // Create a synthetic singleton type instance, and check whether
You can’t perform that action at this time.
0 commit comments