File tree 2 files changed +18
-2
lines changed
compiler/src/dotty/tools/dotc/typer
2 files changed +18
-2
lines changed Original file line number Diff line number Diff line change @@ -949,7 +949,8 @@ class Namer { typer: Typer =>
949
949
if (sym.is(ImplicitOrImplied ) != exp.impliedOnly) s " is ${if (exp.impliedOnly) " not " else " " }implied "
950
950
else if (! sym.isAccessibleFrom(path.tpe)) " is not accessible"
951
951
else if (sym.isConstructor || sym.is(ModuleClass ) || sym.is(Bridge )) " _"
952
- else if (cls.derivesFrom(sym.owner)) i " is already a member of $cls"
952
+ else if (cls.derivesFrom(sym.owner) &&
953
+ (sym.owner == cls || ! sym.is(Deferred ))) i " is already a member of $cls"
953
954
else " "
954
955
}
955
956
@@ -965,7 +966,7 @@ class Namer { typer: Typer =>
965
966
case _ : ClassInfo =>
966
967
HKTypeLambda .fromParams(info.typeParams, ref)
967
968
case _ : TypeBounds =>
968
- ref
969
+ TypeAlias ( ref)
969
970
case info : HKTypeLambda =>
970
971
info.derivedLambdaType(info.paramNames, info.paramInfos,
971
972
fwdInfo(ref.appliedTo(info.paramRefs), info.resultType))
Original file line number Diff line number Diff line change
1
+ trait Session {
2
+ def call1 (): Unit
3
+ def call2 (): Unit
4
+ def call3 (): Unit
5
+ type T
6
+ }
7
+
8
+ class SessionProxy (val session : Session ) extends Session {
9
+ export session .{call2 , call3 , T }
10
+
11
+ def call1 (): Unit = {
12
+ println(" call1" )
13
+ session.call1()
14
+ }
15
+ }
You can’t perform that action at this time.
0 commit comments