diff --git a/compiler/src/dotty/tools/dotc/parsing/Parsers.scala b/compiler/src/dotty/tools/dotc/parsing/Parsers.scala index 0f243fdf7088..643cf8c9caca 100644 --- a/compiler/src/dotty/tools/dotc/parsing/Parsers.scala +++ b/compiler/src/dotty/tools/dotc/parsing/Parsers.scala @@ -2873,7 +2873,7 @@ object Parsers { val isAccessMod = accessModifierTokens contains in.token val mods1 = addModifier(mods) loop(if (isAccessMod) accessQualifierOpt(mods1) else mods1) - else if (in.token == NEWLINE && (mods.hasFlags || mods.hasAnnotations)) { + else if (in.isNewLine && (mods.hasFlags || mods.hasAnnotations)) { in.nextToken() loop(mods) } diff --git a/library/src/scala/quoted/Expr.scala b/library/src/scala/quoted/Expr.scala index bf7922239314..996fe3ff8da2 100644 --- a/library/src/scala/quoted/Expr.scala +++ b/library/src/scala/quoted/Expr.scala @@ -4,7 +4,7 @@ package scala.quoted * * `Expr` has extension methods that are defined in `scala.quoted.Quotes`. */ -abstract class Expr[+T] private[scala] +abstract class Expr[+T] private[scala] () /** Constructors for expressions */ object Expr { diff --git a/tests/pos/i11712.scala b/tests/pos/i11712.scala new file mode 100644 index 000000000000..27fc1ef2771e --- /dev/null +++ b/tests/pos/i11712.scala @@ -0,0 +1,21 @@ +object Test: + + def transparent = println("transparent method called") + + transparent + println() + inline def f1 = 1 + + transparent + inline def f2 = 2 + + transparent + trait T1 + + transparent + + inline def f3 = 3 + + transparent + + trait T2 \ No newline at end of file