Skip to content

Commit cd52ec0

Browse files
authored
Merge pull request #5742 from dotty-staging/fix-#4536
Fix #4536: Add regression test
2 parents ee9960f + 6c946e6 commit cd52ec0

File tree

1 file changed

+14
-0
lines changed
  • compiler/test-resources/repl

1 file changed

+14
-0
lines changed

compiler/test-resources/repl/i4536

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
scala> object Foo { def apply() = 1; def apply()(implicit ord: Ordering[Int]) = 2; Foo() }
2+
1 | object Foo { def apply() = 1; def apply()(implicit ord: Ordering[Int]) = 2; Foo() }
3+
| ^^^
4+
|Ambiguous overload. The overloaded alternatives of method apply in object Foo with types
5+
| ()(implicit ord: Ordering[Int]): Int
6+
| (): Int
7+
|both match arguments ()
8+
scala> object Foo { def apply() = 1; def apply()(implicit ord: Ordering[Int]) = 2; Foo.apply() }
9+
1 | object Foo { def apply() = 1; def apply()(implicit ord: Ordering[Int]) = 2; Foo.apply() }
10+
| ^^^^^^^^^
11+
|Ambiguous overload. The overloaded alternatives of method apply in object Foo with types
12+
| ()(implicit ord: Ordering[Int]): Int
13+
| (): Int
14+
|both match arguments ()

0 commit comments

Comments
 (0)