Skip to content

Conversation

@nicolasstucki
Copy link
Contributor

No description provided.

private def trivialErasedTree(tree: Tree)(using Context): Tree =
tree match
case tree: ValOrDefDef if !tree.symbol.is(Inline) && !tree.symbol.is(Synthetic) =>
if tree.rhs.symbol == defn.Predef_undefined then
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Next step might be to do tree.rhs.symbol != defn.Compiletime_erasedValue.

@nicolasstucki nicolasstucki marked this pull request as ready for review March 15, 2021 14:12
Copy link
Contributor

@liufengyun liufengyun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In #11721 , it uses ??? for erased definitions. Is there a potential conflict?

@nicolasstucki
Copy link
Contributor Author

It is possible. Currently, it seems not non of the tests have fatal warning. It should be fine.

@liufengyun
Copy link
Contributor

It is possible. Currently, it seems not non of the tests have fatal warning. It should be fine.

In #11721 , it uses erased given T = ??? to desugar try/catch.

@nicolasstucki
Copy link
Contributor Author

nicolasstucki commented Mar 16, 2021

That is not on the RHS of an erased definition. It will be fine.

@liufengyun
Copy link
Contributor

That is not on the RHS of an erased definition. It will be fine.

Could you elaborate? In erased given T = ???, it seems ??? is on the RHS.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants