File tree Expand file tree Collapse file tree 3 files changed +3
-13
lines changed
compiler/src/dotty/tools/dotc Expand file tree Collapse file tree 3 files changed +3
-13
lines changed Original file line number Diff line number Diff line change @@ -1917,14 +1917,6 @@ object Types {
1917
1917
if (nameSpace == this .nameSpace) this
1918
1918
else NamedType (prefix, designator.withNameSpace(nameSpace))
1919
1919
1920
- /** Create a NamedType of the same kind as this type, but without a namespace
1921
- */
1922
- def withoutNameSpace (implicit ctx : Context ): NamedType =
1923
- (designator : Designator ) match { // Dotty deviation: need the widening
1924
- case LocalName (underlying, _) => NamedType (prefix, underlying)
1925
- case _ => this
1926
- }
1927
-
1928
1920
override def equals (that : Any ) = that match {
1929
1921
case that : NamedType =>
1930
1922
this .designator == that.designator &&
@@ -1995,9 +1987,6 @@ object Types {
1995
1987
else designator
1996
1988
fixDenot(TermRef (prefix, designator1), prefix)
1997
1989
}
1998
-
1999
- override def withoutNameSpace (implicit ctx : Context ): NamedType =
2000
- fixDenot(super .withoutNameSpace.asInstanceOf [TermRef ], prefix)
2001
1990
}
2002
1991
2003
1992
abstract case class TypeRef (override val prefix : Type , designator : TypeDesignator ) extends NamedType {
Original file line number Diff line number Diff line change @@ -72,7 +72,8 @@ class ParamForwarding(thisTransformer: DenotTransformer) {
72
72
if (alias.owner != currentClass.superClass)
73
73
// need to use shadowed in order not to accidentally address an
74
74
// intervening private forwarder in the superclass
75
- superAcc = superAcc.withType(superAcc.tpe.asInstanceOf [TermRef ].withoutNameSpace)
75
+ superAcc = superAcc.withType(
76
+ superAcc.tpe.asInstanceOf [TermRef ].withNameSpace(noNameSpace))
76
77
typr.println(i " adding param forwarder $superAcc" )
77
78
DefDef (sym, superAcc.ensureConforms(sym.info.widen))
78
79
}
Original file line number Diff line number Diff line change @@ -188,7 +188,7 @@ trait TypeAssigner {
188
188
// an inherited non-private member with the same name and signature.
189
189
val d2 = pre.nonPrivateMember(name)
190
190
if (reallyExists(d2) && firstTry)
191
- test(tpe.withoutNameSpace .withDenot(d2), false )
191
+ test(tpe.withNameSpace(noNameSpace) .withDenot(d2), false )
192
192
else if (pre.derivesFrom(defn.DynamicClass )) {
193
193
TryDynamicCallType
194
194
} else {
You can’t perform that action at this time.
0 commit comments