Prohibit inline classes with special underlying types
#KT-25328 Fixed #KT-23819 Fixed
This commit is contained in:
Vendored
+10
@@ -0,0 +1,10 @@
|
||||
// !LANGUAGE: +InlineClasses
|
||||
|
||||
inline class Foo<T>(val x: <!INLINE_CLASS_HAS_INAPPLICABLE_PARAMETER_TYPE!>T<!>)
|
||||
inline class FooNullable<T>(val x: <!INLINE_CLASS_HAS_INAPPLICABLE_PARAMETER_TYPE!>T?<!>)
|
||||
|
||||
inline class Bar(val u: <!INLINE_CLASS_HAS_INAPPLICABLE_PARAMETER_TYPE!>Unit<!>)
|
||||
inline class BarNullable(val u: Unit?)
|
||||
|
||||
inline class Baz(val u: <!INLINE_CLASS_HAS_INAPPLICABLE_PARAMETER_TYPE!>Nothing<!>)
|
||||
inline class BazNullable(val u: Nothing?)
|
||||
Vendored
+49
@@ -0,0 +1,49 @@
|
||||
package
|
||||
|
||||
public final inline class Bar {
|
||||
public constructor Bar(/*0*/ u: kotlin.Unit)
|
||||
public final val u: kotlin.Unit
|
||||
public open override /*1*/ /*synthesized*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*synthesized*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*synthesized*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public final inline class BarNullable {
|
||||
public constructor BarNullable(/*0*/ u: kotlin.Unit?)
|
||||
public final val u: kotlin.Unit?
|
||||
public open override /*1*/ /*synthesized*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*synthesized*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*synthesized*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public final inline class Baz {
|
||||
public constructor Baz(/*0*/ u: kotlin.Nothing)
|
||||
public final val u: kotlin.Nothing
|
||||
public open override /*1*/ /*synthesized*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*synthesized*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*synthesized*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public final inline class BazNullable {
|
||||
public constructor BazNullable(/*0*/ u: kotlin.Nothing?)
|
||||
public final val u: kotlin.Nothing?
|
||||
public open override /*1*/ /*synthesized*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*synthesized*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*synthesized*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public final inline class Foo</*0*/ T> {
|
||||
public constructor Foo</*0*/ T>(/*0*/ x: T)
|
||||
public final val x: T
|
||||
public open override /*1*/ /*synthesized*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*synthesized*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*synthesized*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public final inline class FooNullable</*0*/ T> {
|
||||
public constructor FooNullable</*0*/ T>(/*0*/ x: T?)
|
||||
public final val x: T?
|
||||
public open override /*1*/ /*synthesized*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*synthesized*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*synthesized*/ fun toString(): kotlin.String
|
||||
}
|
||||
Vendored
+1
@@ -1,5 +1,6 @@
|
||||
// !LANGUAGE: +InlineClasses
|
||||
|
||||
@Suppress("INLINE_CLASS_HAS_INAPPLICABLE_PARAMETER_TYPE")
|
||||
inline class Default<T>(val x: T)
|
||||
|
||||
class Inv<T>
|
||||
|
||||
Vendored
+3
@@ -1,6 +1,9 @@
|
||||
// !LANGUAGE: +InlineClasses
|
||||
|
||||
@Suppress("INLINE_CLASS_HAS_INAPPLICABLE_PARAMETER_TYPE")
|
||||
inline class NonNull<T : Any>(val x: T)
|
||||
|
||||
@Suppress("INLINE_CLASS_HAS_INAPPLICABLE_PARAMETER_TYPE")
|
||||
inline class NullableValue<T : Any>(val x: T?)
|
||||
|
||||
object Test {
|
||||
|
||||
Reference in New Issue
Block a user