From 8d4d9a363d90cc24bd79b18ea2ef7cba6a746bef Mon Sep 17 00:00:00 2001 From: Martin Odersky Date: Sun, 7 Aug 2016 17:29:24 +0200 Subject: New string infterpolators Roll `sm` and `i` into one interpolator (also called `i`) Evolve `d` to `em` interpolator (for error messages) New interpolator `ex` with more explanations, replaces disambiguation. --- src/dotty/tools/dotc/typer/RefChecks.scala | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/dotty/tools/dotc/typer/RefChecks.scala') diff --git a/src/dotty/tools/dotc/typer/RefChecks.scala b/src/dotty/tools/dotc/typer/RefChecks.scala index a654bb08f..2838866fd 100644 --- a/src/dotty/tools/dotc/typer/RefChecks.scala +++ b/src/dotty/tools/dotc/typer/RefChecks.scala @@ -81,14 +81,14 @@ object RefChecks { def checkSelfConforms(other: TypeRef, category: String, relation: String) = { val otherSelf = other.givenSelfType.asSeenFrom(cls.thisType, other.classSymbol) if (otherSelf.exists && !(cinfo.selfType <:< otherSelf)) - ctx.error(d"$category: self type ${cinfo.selfType} of $cls does not conform to self type $otherSelf of $relation ${other.classSymbol}", cls.pos) + ctx.error(ex"$category: self type ${cinfo.selfType} of $cls does not conform to self type $otherSelf of $relation ${other.classSymbol}", cls.pos) } for (parent <- cinfo.classParents) { val pclazz = parent.classSymbol if (pclazz.is(Final)) - ctx.error(d"cannot extend final $pclazz", cls.pos) + ctx.error(em"cannot extend final $pclazz", cls.pos) if (pclazz.is(Sealed) && pclazz.associatedFile != cls.associatedFile) - ctx.error(d"cannot extend sealed $pclazz in different compilation unit", cls.pos) + ctx.error(em"cannot extend sealed $pclazz in different compilation unit", cls.pos) checkSelfConforms(parent, "illegal inheritance", "parent") } for (reqd <- cinfo.givenSelfType.classSymbols) -- cgit v1.2.3