Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions compiler/src/dotty/tools/dotc/typer/Applications.scala
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,7 @@ object Applications {
case Select(receiver, _) => receiver
case mr => mr.tpe.normalizedPrefix match {
case mr: TermRef => ref(mr)
case mr: ThisType => singleton(mr)
case mr =>
if testOnly then
// In this case it is safe to skolemize now; we will produce a stable prefix for the actual call.
Expand Down
5 changes: 5 additions & 0 deletions tests/pos/i12897/A.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@

package TestFoo
extension (text : String) def foo(defaultArg : Boolean = true) : String = ""

//def foo(text : String) (defaultArg : Boolean = true) : String = ""
4 changes: 4 additions & 0 deletions tests/pos/i12897/B.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@

package TestFoo

val f = "123".foo() //error