Skip to content

Commit 0c0b48d

Browse files
nicolasstuckiKordyjan
authored andcommitted
Add comment on Template case of TreeMap
[Cherry-picked 7dd263d]
1 parent 44d5ada commit 0c0b48d

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

compiler/src/dotty/tools/dotc/ast/Trees.scala

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1574,6 +1574,9 @@ object Trees {
15741574
case tree @ TypeDef(name, rhs) =>
15751575
cpy.TypeDef(tree)(name, transform(rhs))
15761576
case tree @ Template(constr, parents, self, _) if tree.derived.isEmpty =>
1577+
// Currently we do not have cases where we expect `tree.derived` to contain trees for typed trees.
1578+
// If it is the case we will fall in `transformMoreCases` and throw an exception there.
1579+
// In the future we might keep the `derived` clause after typing, in that case we might want to start handling it here.
15771580
cpy.Template(tree)(transformSub(constr), transform(tree.parents), Nil, transformSub(self), transformStats(tree.body, tree.symbol))
15781581
case Import(expr, selectors) =>
15791582
cpy.Import(tree)(transform(expr), selectors)

0 commit comments

Comments
 (0)