diff options
Diffstat (limited to 'compiler/src/dotty/tools/dotc')
4 files changed, 7 insertions, 3 deletions
diff --git a/compiler/src/dotty/tools/dotc/core/TypeErasure.scala b/compiler/src/dotty/tools/dotc/core/TypeErasure.scala index f35752644..1eb90b8eb 100644 --- a/compiler/src/dotty/tools/dotc/core/TypeErasure.scala +++ b/compiler/src/dotty/tools/dotc/core/TypeErasure.scala @@ -377,6 +377,8 @@ class TypeErasure(isJava: Boolean, semiEraseVCs: Boolean, isConstructor: Boolean defn.FunctionType(0) case AndType(tp1, tp2) => erasedGlb(this(tp1), this(tp2), isJava) + case tp: HKApply => + apply(tp.superType) case OrType(tp1, tp2) => ctx.typeComparer.orType(this(tp1), this(tp2), erased = true) case tp: MethodType => @@ -508,6 +510,8 @@ class TypeErasure(isJava: Boolean, semiEraseVCs: Boolean, isConstructor: Boolean normalizeClass(sym.asClass).fullName.asTypeName case defn.ArrayOf(elem) => sigName(this(tp)) + case tp: HKApply => + sigName(tp.superType) case JavaArrayType(elem) => sigName(elem) ++ "[]" case tp: TermRef => diff --git a/compiler/src/dotty/tools/dotc/parsing/Parsers.scala b/compiler/src/dotty/tools/dotc/parsing/Parsers.scala index 3112be659..9f393df00 100644 --- a/compiler/src/dotty/tools/dotc/parsing/Parsers.scala +++ b/compiler/src/dotty/tools/dotc/parsing/Parsers.scala @@ -2151,7 +2151,7 @@ object Parsers { /** EnumCaseStats = EnumCaseStat {semi EnumCaseStat */ def enumCaseStats(): List[DefTree] = { val cases = new ListBuffer[DefTree] += enumCaseStat() - while (in.token != RBRACE) { + while (in.token != RBRACE && in.token != EOF) { acceptStatSep() cases += enumCaseStat() } diff --git a/compiler/src/dotty/tools/dotc/printing/SyntaxHighlighting.scala b/compiler/src/dotty/tools/dotc/printing/SyntaxHighlighting.scala index e20f846ac..87ce31ad9 100644 --- a/compiler/src/dotty/tools/dotc/printing/SyntaxHighlighting.scala +++ b/compiler/src/dotty/tools/dotc/printing/SyntaxHighlighting.scala @@ -31,7 +31,7 @@ object SyntaxHighlighting { private val tripleQs = Console.RED_B + "???" + NoColor private val keywords: Seq[String] = for { - index <- IF to INLINE // All alpha keywords + index <- IF to ENUM // All alpha keywords } yield tokenString(index) private val interpolationPrefixes = diff --git a/compiler/src/dotty/tools/dotc/reporting/MessageRendering.scala b/compiler/src/dotty/tools/dotc/reporting/MessageRendering.scala index 91e65ab66..98af775da 100644 --- a/compiler/src/dotty/tools/dotc/reporting/MessageRendering.scala +++ b/compiler/src/dotty/tools/dotc/reporting/MessageRendering.scala @@ -113,7 +113,7 @@ trait MessageRendering { */ def posStr(pos: SourcePosition, diagnosticLevel: String, message: Message)(implicit ctx: Context): String = if (pos.exists) Blue({ - val file = pos.source.file.toString + val file = s"${pos.source.file.toString}:${pos.line + 1}:${pos.column}" val errId = if (message.errorId ne ErrorMessageID.NoExplanationID) { val errorNumber = message.errorId.errorNumber() |