Value classes: treat @JvmInline value classes as inline classes
Report error on value classes without @JvmInline annotation. Do not check for @JvmInline annotation in value classes since it breaks reflection.
This commit is contained in:
Vendored
+21
@@ -0,0 +1,21 @@
|
||||
// FIR_IDENTICAL
|
||||
// !LANGUAGE: +InlineClasses
|
||||
|
||||
package kotlin
|
||||
|
||||
annotation class JvmInline
|
||||
|
||||
@JvmInline
|
||||
value class Name(val name: String)
|
||||
@JvmInline
|
||||
value class Password(val password: String)
|
||||
|
||||
interface NameVerifier {
|
||||
fun verify(name: Name)
|
||||
}
|
||||
|
||||
interface PasswordVerifier {
|
||||
fun verify(password: Password)
|
||||
}
|
||||
|
||||
interface NameAndPasswordVerifier : NameVerifier, PasswordVerifier
|
||||
Reference in New Issue
Block a user