File tree Expand file tree Collapse file tree 2 files changed +40
-0
lines changed Expand file tree Collapse file tree 2 files changed +40
-0
lines changed Original file line number Diff line number Diff line change 1+ import scala .language .`3.0`
2+
3+ trait Foo [A ]
4+
5+ object Example {
6+
7+ given as Foo [Int ] {
8+ }
9+
10+ def foo0 [A : Foo ]: A => A = identity
11+ def foo1 [A ](implicit foo : Foo [A ]): A => A = identity
12+ def foo2 [A ](using Foo [A ]): A => A = identity
13+
14+ def test (): Unit = {
15+ foo0(32 ) // error
16+ foo1(32 ) // error
17+ foo2(32 )
18+ }
19+
20+ }
Original file line number Diff line number Diff line change 1+ import scala .language .`3.1`
2+
3+ trait Foo [A ]
4+
5+ object Example {
6+
7+ given as Foo [Int ] {
8+ }
9+
10+ def foo0 [A : Foo ]: A => A = identity
11+ def foo1 [A ](implicit foo : Foo [A ]): A => A = identity
12+ def foo2 [A ](using Foo [A ]): A => A = identity
13+
14+ def test (): Unit = {
15+ foo0(32 )
16+ foo1(32 ) // error
17+ foo2(32 )
18+ }
19+
20+ }
You can’t perform that action at this time.
0 commit comments