We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 95a8a9c commit 02533edCopy full SHA for 02533ed
compiler/src/dotty/tools/dotc/typer/RefChecks.scala
@@ -52,7 +52,7 @@ object RefChecks {
52
}}
53
54
for (name <- defaultMethodNames) {
55
- val methods = clazz.info.member(name).alternatives.map(_.symbol)
+ val methods = clazz.thisType.member(name).alternatives.map(_.symbol)
56
val haveDefaults = methods.filter(_.hasDefaultParams)
57
if (haveDefaults.length > 1) {
58
val owners = haveDefaults map (_.owner)
tests/pos/i18555.scala
@@ -0,0 +1,14 @@
1
+trait GenericCollectionWithCommands {
2
+ self: PackSupport =>
3
+
4
+ def bar(foo: Int = 1): Any = ???
5
+ def bar(writer: GenericCollectionWithCommands.this.pack.Writer[Any]): Any = ???
6
+}
7
8
+trait PackSupport {
9
+ val pack: SerializationPack
10
11
12
+trait SerializationPack {
13
+ type Writer[A]
14
0 commit comments