Skip to content

Commit 13624d5

Browse files
committed
revert MemoizedTypeTree, use TypedSplice instead
1 parent 04ea25c commit 13624d5

File tree

3 files changed

+1
-8
lines changed

3 files changed

+1
-8
lines changed

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

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -345,12 +345,6 @@ object untpd extends Trees.Instance[Untyped] with UntypedTreeInfo {
345345
def derivedTree(originalSym: Symbol)(using Context): tpd.Tree
346346
}
347347

348-
/** A type tree that memoizes the result of a typed tree. Used when
349-
* typechecking selectDynamic calls to prevent typechecking type arguments
350-
* multiple types.
351-
*/
352-
final class MemoizedTypeTree(val result: tpd.Tree)(implicit @constructorOnly src: SourceFile) extends TypeTree
353-
354348
/** Property key containing TypeTrees whose type is computed
355349
* from the symbol in this type. These type trees have marker trees
356350
* TypeRefOfSym or InfoOfSym as their originals.

compiler/src/dotty/tools/dotc/typer/Applications.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1076,7 +1076,7 @@ trait Applications extends Compatibility {
10761076
case _ =>
10771077
}
10781078
def tryDynamicTypeApply(): Tree = typedFn match {
1079-
case typedFn: Select if !pt.isInstanceOf[FunProto] => typedDynamicSelect(typedFn, typedArgs.map(untpd.MemoizedTypeTree(_)), pt)
1079+
case typedFn: Select if !pt.isInstanceOf[FunProto] => typedDynamicSelect(typedFn, typedArgs.map(untpd.TypedSplice(_)), pt)
10801080
case _ => tree.withType(TryDynamicCallType)
10811081
}
10821082
if (typedFn.tpe eq TryDynamicCallType) tryDynamicTypeApply()

compiler/src/dotty/tools/dotc/typer/Typer.scala

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1695,7 +1695,6 @@ class Typer extends Namer
16951695
case None =>
16961696
errorTree(tree, "Something's wrong: missing original symbol for type tree")
16971697
}
1698-
case tree: untpd.MemoizedTypeTree => tree.result
16991698
case _ =>
17001699
tree.withType(
17011700
if (isFullyDefined(pt, ForceDegree.flipBottom)) pt

0 commit comments

Comments
 (0)