Skip to content

Commit 5893a72

Browse files
committed
Add InferredTypeTree to Trees.Instance
# Conflicts: # compiler/src/dotty/tools/dotc/typer/RefineTypes.scala
1 parent 1ceafdf commit 5893a72

File tree

4 files changed

+4
-3
lines changed

4 files changed

+4
-3
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1081,6 +1081,7 @@ object Trees {
10811081
type JavaSeqLiteral = Trees.JavaSeqLiteral[T]
10821082
type Inlined = Trees.Inlined[T]
10831083
type TypeTree = Trees.TypeTree[T]
1084+
type InferredTypeTree = Trees.InferredTypeTree[T]
10841085
type SingletonTypeTree = Trees.SingletonTypeTree[T]
10851086
type RefinedTypeTree = Trees.RefinedTypeTree[T]
10861087
type AppliedTypeTree = Trees.AppliedTypeTree[T]

compiler/src/dotty/tools/dotc/printing/RefinedPrinter.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -501,7 +501,7 @@ class RefinedPrinter(_ctx: Context) extends PlainPrinter(_ctx) {
501501
"<derived typetree watching " ~ tpt.watched.showSummary() ~ ">"
502502
case TypeTree() =>
503503
typeText(toText(tree.typeOpt))
504-
~ Str("(inf)").provided(tree.isInstanceOf[InferredTypeTree[_]] && printDebug)
504+
~ Str("(inf)").provided(tree.isInstanceOf[InferredTypeTree] && printDebug)
505505
case SingletonTypeTree(ref) =>
506506
toTextLocal(ref) ~ "." ~ keywordStr("type")
507507
case RefinedTypeTree(tpt, refines) =>

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,7 @@ object Inferencing {
333333
@tailrec def boundVars(tree: Tree, acc: List[TypeVar]): List[TypeVar] = tree match {
334334
case Apply(fn, _) => boundVars(fn, acc)
335335
case TypeApply(fn, targs) =>
336-
val tvars = targs.filter(_.isInstanceOf[InferredTypeTree[?]]).tpes.collect {
336+
val tvars = targs.filter(_.isInstanceOf[InferredTypeTree]).tpes.collect {
337337
case tvar: TypeVar
338338
if !tvar.isInstantiated &&
339339
ctx.typerState.ownedVars.contains(tvar) &&

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3069,7 +3069,7 @@ class Typer extends Namer
30693069
else Some(adapt(tree1, pt, locked))
30703070
} { (_, _) => None
30713071
}
3072-
case TypeApply(fn, args) if args.forall(_.isInstanceOf[InferredTypeTree[_]]) =>
3072+
case TypeApply(fn, args) if args.forall(_.isInstanceOf[untpd.InferredTypeTree]) =>
30733073
tryInsertImplicitOnQualifier(fn, pt, locked)
30743074
case _ => None
30753075
}

0 commit comments

Comments
 (0)