diff --git a/compiler/src/dotty/tools/dotc/parsing/Parsers.scala b/compiler/src/dotty/tools/dotc/parsing/Parsers.scala index 641123095522..de873698989b 100644 --- a/compiler/src/dotty/tools/dotc/parsing/Parsers.scala +++ b/compiler/src/dotty/tools/dotc/parsing/Parsers.scala @@ -3859,7 +3859,7 @@ object Parsers { syntaxError(em"`using` expected") val (firstParamMod, paramsAreNamed) = var mods = EmptyModifiers - if in.lookahead.isColon then + if in.token != INTERPOLATIONID && in.lookahead.isColon then (mods, true) else if isConsume then (mods, true) else diff --git a/tests/neg/i25717.scala b/tests/neg/i25717.scala new file mode 100644 index 000000000000..4755cea51e31 --- /dev/null +++ b/tests/neg/i25717.scala @@ -0,0 +1,9 @@ +import scala.quoted.* + +object Crash { + def macroImpl(using Quotes)(q"a: String"): Expr[Boolean] = ??? // error + + def f(s"a: String") = ??? // error + + def softie(into q"a: String") = ??? // error +}