@@ -30,7 +30,6 @@ import config.Feature.{sourceVersion, modularity}
30
30
import config .SourceVersion .*
31
31
32
32
import scala .compiletime .uninitialized
33
- import dotty .tools .dotc .transform .init .Util .tree
34
33
35
34
/** This class creates symbols from definitions and imports and gives them
36
35
* lazy types.
@@ -1699,7 +1698,6 @@ class Namer { typer: Typer =>
1699
1698
end addUsingTraits
1700
1699
1701
1700
completeConstructor(denot)
1702
- val constrSym = symbolOfTree(constr)
1703
1701
denot.info = tempInfo.nn
1704
1702
1705
1703
val parentTypes = defn.adjustForTuple(cls, cls.typeParams,
@@ -1995,7 +1993,11 @@ class Namer { typer: Typer =>
1995
1993
*/
1996
1994
def needsTracked (sym : Symbol , param : ValDef )(using Context ) =
1997
1995
! sym.is(Tracked )
1998
- && sym.maybeOwner.isConstructor
1996
+ && sym.isTerm
1997
+ && sym.maybeOwner.isPrimaryConstructor
1998
+ // && !sym.flags.is(Synthetic)
1999
+ // && !sym.maybeOwner.flags.is(Synthetic)
2000
+ && ! sym.maybeOwner.maybeOwner.flags.is(Synthetic )
1999
2001
&& (
2000
2002
isContextBoundWitnessWithAbstractMembers(sym, param)
2001
2003
|| isReferencedInPublicSignatures(sym)
@@ -2018,7 +2020,7 @@ class Namer { typer: Typer =>
2018
2020
def checkOwnerMemberSignatures (owner : Symbol ): Boolean =
2019
2021
owner.infoOrCompleter match
2020
2022
case info : ClassInfo =>
2021
- info.decls.filter(_.isTerm)
2023
+ info.decls.filter(_.isTerm).filter(_.isPublic)
2022
2024
.filter(_ != sym.maybeOwner)
2023
2025
.exists(d => tpeContainsSymbolRef(d.info, accessorSyms))
2024
2026
case _ => false
@@ -2039,8 +2041,9 @@ class Namer { typer: Typer =>
2039
2041
case _ => false
2040
2042
2041
2043
private def tpeContainsSymbolRef (tpe0 : Type , syms : List [Symbol ])(using Context ): Boolean =
2042
- val tpe = tpe0.dropAlias.widenExpr.dealias
2044
+ val tpe = tpe0.dropAlias.safeDealias
2043
2045
tpe match
2046
+ case ExprType (resType) => tpeContainsSymbolRef(resType, syms)
2044
2047
case m : MethodOrPoly =>
2045
2048
m.paramInfos.exists(tpeContainsSymbolRef(_, syms))
2046
2049
|| tpeContainsSymbolRef(m.resultType, syms)
0 commit comments