Skip to content

Commit bb8642e

Browse files
committed
Move error locations
1 parent 29744fe commit bb8642e

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

tests/neg/i7618.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ enum Exp {
1212
object Compiler {
1313
import Exp._
1414

15-
inline def compile(e: Exp, env: Map[String, Expr[Int]])(given ctx: QuoteContext): Expr[Int] = inline e match { // error
15+
inline def compile(e: Exp, env: Map[String, Expr[Int]])(given ctx: QuoteContext): Expr[Int] = inline e match {
1616
case Num(n) =>
1717
Expr(n)
1818
case Plus(e1, e2) =>
@@ -31,6 +31,6 @@ object Example {
3131
val exp = Plus(Plus(Num(2), Var("x")), Num(4))
3232
val letExp = Let("x", Num(3), exp)
3333

34-
Compiler.compile(letExp, Map.empty)(given QuoteContext.macroContext) // error
34+
Compiler.compile(letExp, Map.empty)(given QuoteContext.macroContext) // error // error
3535
}
3636
}

tests/neg/i7618b.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ enum Exp {
1212
object Compiler {
1313
import Exp._
1414

15-
inline def compile(e: Exp, env: Map[String, Expr[Int]])(given ctx: QuoteContext): Expr[Int] = inline e match { // error
15+
inline def compile(e: Exp, env: Map[String, Expr[Int]])(given ctx: QuoteContext): Expr[Int] = inline e match {
1616
case Num(n) =>
1717
Expr(n)
1818
case Plus(e1, e2) =>
@@ -31,6 +31,6 @@ object Example {
3131
val exp = Plus(Plus(Num(2), Var("x")), Num(4))
3232
val letExp = Let("x", Num(3), exp)
3333

34-
Compiler.compile(letExp, Map.empty)(given (??? : QuoteContext))
34+
Compiler.compile(letExp, Map.empty)(given (??? : QuoteContext)) // error
3535
}
3636
}

0 commit comments

Comments
 (0)