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 {
19171917 if (nameSpace == this .nameSpace) this
19181918 else NamedType (prefix, designator.withNameSpace(nameSpace))
19191919
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-
19281920 override def equals (that : Any ) = that match {
19291921 case that : NamedType =>
19301922 this .designator == that.designator &&
@@ -1995,9 +1987,6 @@ object Types {
19951987 else designator
19961988 fixDenot(TermRef (prefix, designator1), prefix)
19971989 }
1998-
1999- override def withoutNameSpace (implicit ctx : Context ): NamedType =
2000- fixDenot(super .withoutNameSpace.asInstanceOf [TermRef ], prefix)
20011990 }
20021991
20031992 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) {
7272 if (alias.owner != currentClass.superClass)
7373 // need to use shadowed in order not to accidentally address an
7474 // 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))
7677 typr.println(i " adding param forwarder $superAcc" )
7778 DefDef (sym, superAcc.ensureConforms(sym.info.widen))
7879 }
Original file line number Diff line number Diff line change @@ -188,7 +188,7 @@ trait TypeAssigner {
188188 // an inherited non-private member with the same name and signature.
189189 val d2 = pre.nonPrivateMember(name)
190190 if (reallyExists(d2) && firstTry)
191- test(tpe.withoutNameSpace .withDenot(d2), false )
191+ test(tpe.withNameSpace(noNameSpace) .withDenot(d2), false )
192192 else if (pre.derivesFrom(defn.DynamicClass )) {
193193 TryDynamicCallType
194194 } else {
You can’t perform that action at this time.
0 commit comments