Skip to content

Commit

Permalink
fix scala#13497: add regression test
Browse files Browse the repository at this point in the history
  • Loading branch information
bishabosha authored and olsdavis committed Apr 4, 2022
1 parent 2bad914 commit 5c25467
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions tests/neg/i13497.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
trait Foo
trait Bar
object Foo:
given (using Bar): Foo = ???

object Bug:
def demonstrate: Unit =
Option.empty[Unit].flatMap { _ =>
Option.empty[Unit].map { _ =>
val foo = summon[Foo] // error: Foo.given_Foo(/* missing */summon[Bar])
Option.empty[Unit]
}
}

0 comments on commit 5c25467

Please sign in to comment.