Skip to content

Could not find proxy in macro #13571

Discussion options

You must be logged in to vote

Using the -Xcheck-macros compiler flag we get

-- Error: tests/pos-macros/i13571/Test_2.scala:3:12 ----------------------------
3 |    checked2(List(1L, 2L).map { k =>
  |    ^
  |Exception occurred while executing macro expansion.
  |java.lang.AssertionError: assertion failed: Tree had an unexpected owner for val xt
  |Expected: method $anonfun (Test_2$package$._$_$$anonfun)
  |But was: val macro (Test_2$package$._$macro)
  |
  |
  |The code of the definition of val xt is
  |val xt: scala.Long = u
  |
  |which was found in the code
  |{
  |  val xt: scala.Long = u
  |
  |  (xt: scala.Long)
  |}
  |
  |which has the AST representation
  |Block(Nil, Inlined(Some(TypeIdent("Macro_1$package$")…

Replies: 3 comments 4 replies

Comment options

You must be logged in to vote
1 reply
@nicolasstucki
Comment options

Answer selected by cquiroz
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
3 replies
@cquiroz
Comment options

@nicolasstucki
Comment options

@kubukoz
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
4 participants