inline val class parameter in backend
See original GitHub issueclass Foo(inline val i: Int)
emits the following error
Concrete method has no definition: Concrete method has no definition: DefDef(i,List(),List(List()),TypeTree[TypeRef(ThisType(TypeRef(NoPrefix,module class scala)),class Int)],EmptyTree)
one error found
Issue Analytics
- State:
- Created 6 years ago
- Comments:9 (9 by maintainers)
Top Results From Across the Web
Inline parameters for constructors - Language Design
Classes with inline parameters should be marked as inline; Inline classes's field should only be called directly like Dummy("Hello World").value ...
Read more >Inline classes | Kotlin
To declare an inline class for the JVM backend, use the value modifier along with the @JvmInline annotation before the class declaration:.
Read more >Effective Kotlin Item 49: Consider using inline value classes
We can use inline value classes to make a wrapper around some type (like String in the above example) with no performance overhead...
Read more >Inline - Scala 3 - EPFL
The Config object contains a definition of the inline value logging . This means that logging is treated as a constant value, equivalent...
Read more >Methods with Inline classes return type are not usable from Java
inline class InlineClass (val value: String) ; class Main { private String someField ; : · private · = ·.INSTANCE ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I assume that
inline
should never be used in a class parameter as we cannot ensure that accesses to those field are inlined. @odersky is that the correct semantics.I don’t think this should compile at all.