Skip to content

Commit 82677da

Browse files
Merge pull request #13499 from dotty-staging/fix-13497
fix #13497: add regression test
2 parents 2b74f88 + 52e47de commit 82677da

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

tests/neg/i13497.scala

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
trait Foo
2+
trait Bar
3+
object Foo:
4+
given (using Bar): Foo = ???
5+
6+
object Bug:
7+
def demonstrate: Unit =
8+
Option.empty[Unit].flatMap { _ =>
9+
Option.empty[Unit].map { _ =>
10+
val foo = summon[Foo] // error: Foo.given_Foo(/* missing */summon[Bar])
11+
Option.empty[Unit]
12+
}
13+
}

0 commit comments

Comments
 (0)