Skip to content

Commit 878b022

Browse files
test: add in a regression test for #13691 (#17507)
Looks like there was already another test linked to this, but this adds in the original example to fully close the issue. [skip community_build] close #13691
2 parents 59be459 + 6b91b5f commit 878b022

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

tests/run/i13691b.scala

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
// https://github.com/lampepfl/dotty/issues/13691
2+
import language.experimental.saferExceptions
3+
4+
trait Decoder[+T]:
5+
def apply(): T
6+
7+
given Decoder[Int throws Exception] = new Decoder[Int throws Exception]:
8+
def apply(): Int throws Exception = 1
9+
10+
@main def Test(): Unit =
11+
import unsafeExceptions.canThrowAny
12+
summon[Decoder[Int throws Exception]]()

0 commit comments

Comments
 (0)