Skip to content

Commit 5e295b3

Browse files
committed
Cleanup infer-tracked
1 parent 161f697 commit 5e295b3

File tree

3 files changed

+2
-2
lines changed

3 files changed

+2
-2
lines changed

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -2070,7 +2070,7 @@ class Namer { typer: Typer =>
20702070
sym.maybeOwner.maybeOwner.infoOrCompleter match
20712071
case info: ClassInfo
20722072
if !sym.is(Tracked) && isContextBoundWitnessWithAbstractMembers(sym, param, sym.maybeOwner.maybeOwner) =>
2073-
typr.println(i"set tracked $param, $sym: ${sym.info}")
2073+
typr.println(i"set tracked $param, $sym: ${sym.info} containing ${sym.info.memberNames(abstractTypeNameFilter).toList}")
20742074
for acc <- info.decls.lookupAll(sym.name) if acc.is(ParamAccessor) do
20752075
acc.resetFlag(PrivateLocal)
20762076
acc.setFlag(Tracked)

scaladoc/src/dotty/tools/scaladoc/tasty/TastyParser.scala

-1
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,6 @@ case class ScaladocTastyInspector()(using ctx: DocContext) extends Inspector:
127127
topLevels ++= intrinsicTypeDefs
128128
val scalaPckg = defn.ScalaPackage
129129
given parser.qctx.type = parser.qctx
130-
import parser.dri
131130
topLevels += "scala" -> Member(scalaPckg.fullName, "", scalaPckg.dri, Kind.Package)
132131
topLevels += mergeAnyRefAliasAndObject(parser)
133132

tests/pos/infer-tracked.scala

+1
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ def Test =
3333
val f = new F(c)
3434
val _: Int = f.result
3535

36+
// Not really possible to work with inference in Namer, should emit a lint
3637
// val g = new G(c)
3738
// val _: Int = g.result
3839

0 commit comments

Comments
 (0)