We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 2cb5dd6 + 40739da commit 5dced62Copy full SHA for 5dced62
library/src-bootstrapped/dotty/DottyPredef.scala
@@ -32,7 +32,9 @@ object DottyPredef {
32
* }}}
33
* @group utilities
34
*/
35
- @forceInline def valueOf[T](implicit vt: ValueOf[T]): T = vt.value
+ inline def valueOf[T]: T = implicit match {
36
+ case ev: ValueOf[T] => ev.value
37
+ }
38
39
inline def the[T](implicit x: T): x.type = x
40
}
tests/pos/i6241.scala
@@ -0,0 +1,5 @@
1
+object Test {
2
+ inline def v[T] = valueOf[T]
3
+
4
+ v["foo"]
5
+}
0 commit comments