Skip to content

Commit a1d6be0

Browse files
committed
backport: Also backport missing scala#18893
1 parent 95b8702 commit a1d6be0

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

compiler/src/dotty/tools/dotc/core/NamerOps.scala

+5-2
Original file line numberDiff line numberDiff line change
@@ -113,8 +113,11 @@ object NamerOps:
113113
var flags = ApplyProxyFlags | (constr.flagsUNSAFE & AccessFlags)
114114
if cls.is(Protected) && !modcls.is(Protected) then flags |= Protected
115115
newSymbol(
116-
modcls, nme.apply, flags,
117-
ApplyProxyCompleter(constr), coord = constr.coord)
116+
modcls, nme.apply,
117+
flags,
118+
ApplyProxyCompleter(constr),
119+
cls.privateWithin,
120+
constr.coord)
118121
for dcl <- cls.info.decls do
119122
if dcl.isConstructor then scope.enter(proxy(dcl))
120123
scope

tests/pos/i22560b/client_2.scala

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@ package companioned:
1414

1515
package p:
1616

17-
def f = internal.P(42)
17+
def f = new internal.P(42)

0 commit comments

Comments
 (0)