Closed
Description
minimized code
def testImpl(f: (Expr[Int], Expr[Int]) => Expr[Int]): Expr[Int] = f('{1}, '{2})
inline def test(f: (Int, Int) => Int) = ${
testImpl((a: Expr[Int], b: Expr[Int]) => '{ f(${a}, ${b}) }) // error: splice outside quotes
}
test((a, b) => a + b)
def testImpl(f: Expr[(Int, Int) => Int]): Expr[Int] = f('{1}, '{2})
inline def test(f: (Int, Int) => Int) = ${
testImpl('f)
} // malformed macro
test((a, b) => a + b)
expectation
I think the first one has an inaccurate error message while the second should have passed. @nicolasstucki WDYT?