Skip to content

Commit 2685ba9

Browse files
committed
pr remarks
1 parent 527ef94 commit 2685ba9

File tree

3 files changed

+3
-9
lines changed

3 files changed

+3
-9
lines changed

compiler/src/dotty/tools/dotc/typer/RefChecks.scala

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1190,8 +1190,7 @@ object RefChecks {
11901190
}
11911191
}
11921192
.exists
1193-
if !target.typeSymbol.denot.isOpaqueAlias // Opaque types hide original members so extension is not nullified by the original member
1194-
&& hidden
1193+
if !target.typeSymbol.isOpaqueAlias && hidden
11951194
then report.warning(ExtensionNullifiedByMember(sym, target.typeSymbol), sym.srcPos)
11961195
end checkExtensionMethods
11971196

tests/warn/i22233.check

Lines changed: 0 additions & 7 deletions
This file was deleted.

tests/pos/ext-override.scala renamed to tests/warns/ext-override.scala

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
package warns
2+
13
//> using options -Xfatal-warnings
24

35
trait Foo[T]:

0 commit comments

Comments
 (0)