You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: tests/worksheets/src/test/scala/tests/worksheets/WorksheetSuite.scala
+17
Original file line number
Diff line number
Diff line change
@@ -329,6 +329,23 @@ class WorksheetSuite extends BaseSuite {
329
329
|""".stripMargin
330
330
)
331
331
332
+
checkDiagnostics(
333
+
"dotty-ambiguous-implicit".tag(OnlyScala3),
334
+
"""|abstract class C:
335
+
| val x: Int
336
+
|given c1 as C:
337
+
| val x = 1
338
+
|given c2 as C:
339
+
| val x = 2
340
+
|def fn(using c: C) = ()
341
+
|val xx = fn
342
+
|""".stripMargin,
343
+
"""|dotty-ambiguous-implicit:8:10: error: ambiguous implicit arguments: both object c1 in class App and object c2 in class App match type App.this.C of parameter c of method fn in class App
0 commit comments