Files
kotlin-fork/compiler/testData/multiplatform/genericDeclarations/output.txt
T
Nikita Bobko 01fc708a0f Mark expect/actual classifiers as experimental
^KT-61573 Fixed
Review: https://jetbrains.team/p/kt/reviews/11969/timeline

Tests:
- MultiPlatformIntegrationTestGenerated
- CliTestGenerated
- MultiPlatformIntegrationTestGenerated
- DiagnosticTestGenerated.Multiplatform
- FirLightTreeOldFrontendDiagnosticsTestGenerated

Also add -Xexpect-actual-classes flag to all necessary ./libraries/* modules
Otherwise compilation of those modules failes because of `-Werror`
2023-09-04 12:21:37 +00:00

23 lines
1.8 KiB
Plaintext
Vendored

-- Common --
Exit code: OK
Output:
compiler/testData/multiplatform/genericDeclarations/common.kt:9:1: warning: the expect/actual classes (including interfaces, objects, annotations, enums, actual typealiases) are an experimental feature. You can use -Xexpect-actual-classes flag to suppress this warning.
expect class C1<A>
^
compiler/testData/multiplatform/genericDeclarations/common.kt:10:1: warning: the expect/actual classes (including interfaces, objects, annotations, enums, actual typealiases) are an experimental feature. You can use -Xexpect-actual-classes flag to suppress this warning.
expect class C2<B : C2<B>>
^
compiler/testData/multiplatform/genericDeclarations/common.kt:11:1: warning: the expect/actual classes (including interfaces, objects, annotations, enums, actual typealiases) are an experimental feature. You can use -Xexpect-actual-classes flag to suppress this warning.
expect class C3<D, E : MutableList<in D>>
^
compiler/testData/multiplatform/genericDeclarations/common.kt:13:1: warning: the expect/actual classes (including interfaces, objects, annotations, enums, actual typealiases) are an experimental feature. You can use -Xexpect-actual-classes flag to suppress this warning.
expect abstract class AbstractList<F> : MutableList<F>
^
-- JVM --
Exit code: COMPILATION_ERROR
Output:
compiler/testData/multiplatform/genericDeclarations/jvm.kt:15:17: error: actual class 'AbstractList': actual class and its non-final expect class must declare exactly the same supertypes. Actual class declares the following supertypes that are not presented in expect class: 'Serializable'. This error happens because the expect class 'AbstractList' is non-final. Also see https://youtrack.jetbrains.com/issue/KT-22841 for more details
actual abstract class AbstractList<F> : MutableList<F>, java.io.Serializable
^