Closed
Description
Compiler version
3.0.0-RC3
Issue
Typed
assumes that it is typing a Term
but it might also be a pattern.
- Could contain a wildcard
- Could contain an
Alternatives
- Could contain an
Unpaplly
(has an extra buggy workaround see Inconsistency between reflect Typed and #12221) - Could contain a
Bind
- ...
Solution 1
Make Typed
contain a Tree
.
This is a simple change at the definition site, but it has an impact at the use site.
For all Typed
that are terms we would need to do:
- case Typed(expr, tpt) =>
+ case Typed(expr: Term, tpt) =>
Solution 2
Create an alternative type such as TypedTree
which handles the cases where the expr
is not a Term
.
There might be a subtyping relationship Typed <:< TypedTree
.
Metadata
Metadata
Assignees
Labels
No labels