File tree Expand file tree Collapse file tree 4 files changed +35
-0
lines changed Expand file tree Collapse file tree 4 files changed +35
-0
lines changed Original file line number Diff line number Diff line change 1+ -- [E172] Type Error: tests/neg/i19328.scala:14:5 ----------------------------------------------------------------------
2+ 14 | bar // error: missing implicit (should not crash)
3+ | ^
4+ | No given instance of type Boolean was found for parameter bool of method bar in object i19328
Original file line number Diff line number Diff line change 1+ import scala .language .implicitConversions
2+
3+ object i19328 :
4+
5+ trait Foo [B ]
6+ given foo [C ]: Foo [C ] = new Foo [C ] {}
7+
8+ type Id [A ] = A
9+
10+ implicit def wrapId [A ](a : A ): Id [A ] = a
11+
12+ def bar (using bool : Boolean ): Unit = ()
13+
14+ bar // error: missing implicit (should not crash)
Original file line number Diff line number Diff line change 1+ -- [E172] Type Error: tests/neg/i19328conversion.scala:13:5 ------------------------------------------------------------
2+ 13 | bar // error: missing implicit (should not crash)
3+ | ^
4+ | No given instance of type Boolean was found for parameter bool of method bar in object i19328conversion
Original file line number Diff line number Diff line change 1+ object i19328conversion :
2+
3+ trait Foo [B ]
4+ given foo [C ]: Foo [C ] = new Foo [C ] {}
5+
6+ type Id [A ] = A
7+
8+ given wrapId [A ]: Conversion [A , Id [A ]] with
9+ def apply (x : A ): Id [A ] = x
10+
11+ def bar (using bool : Boolean ): Unit = ()
12+
13+ bar // error: missing implicit (should not crash)
You can’t perform that action at this time.
0 commit comments