File tree 3 files changed +18
-2
lines changed
src/compiler/scala/tools/nsc/typechecker
3 files changed +18
-2
lines changed Original file line number Diff line number Diff line change @@ -527,7 +527,7 @@ trait TypeDiagnostics {
527
527
// Only record type references which don't originate within the
528
528
// definition of the class being referenced.
529
529
if (t.tpe ne null ) {
530
- for (tp <- t.tpe if ! treeTypes(tp) && ! currentOwner.ownerChain.contains (tp.typeSymbol )) {
530
+ for (tp <- t.tpe if ! treeTypes(tp) && ! currentOwner.hasTransOwner (tp.typeSymbolDirect )) {
531
531
tp match {
532
532
case NoType | NoPrefix =>
533
533
case NullaryMethodType (_) =>
@@ -550,7 +550,7 @@ trait TypeDiagnostics {
550
550
m.isType
551
551
&& ! m.isTypeParameterOrSkolem // would be nice to improve this
552
552
&& (m.isPrivate || m.isLocalToBlock)
553
- && ! (treeTypes.exists(tp => tp exists (t => t .typeSymbolDirect == m)))
553
+ && ! (treeTypes.exists(_. exists(_ .typeSymbolDirect == m)))
554
554
)
555
555
def isSyntheticWarnable (sym : Symbol ) = (
556
556
sym.isDefaultGetter
Original file line number Diff line number Diff line change
1
+ -Xfatal-warnings -Xlint:unused
Original file line number Diff line number Diff line change
1
+
2
+ import language .higherKinds
3
+
4
+ object `package` {
5
+ def refl [A ]: A Is A = ???
6
+ }
7
+
8
+ sealed trait Is [A , B ] { ab =>
9
+ def subst [F [_]](fa : F [A ]): F [B ]
10
+ final def flip : B Is A = {
11
+ type f [a] = a Is A
12
+ subst[f](refl)
13
+ }
14
+ }
15
+
You can’t perform that action at this time.
0 commit comments