forked from scala/scala3
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path21538.check
11 lines (11 loc) · 842 Bytes
/
21538.check
1
2
3
4
5
6
7
8
9
10
11
-- [E083] Type Error: tests/neg/21538.scala:3:45 -----------------------------------------------------------------------
3 |inline def foo[V](inline value: V)(using Bar[value.type]) : Unit = {} // error
| ^^^^^^^^^^
| (value : V) is not a valid singleton type, since it is not an immutable path
| Inline parameters are not considered immutable paths and cannot be used as
| singleton types.
|
| Hint: Removing the `inline` qualifier from the `value` parameter
| may help resolve this issue.
|
| longer explanation available when compiling with `-explain`