[JVM] Introduce MF Value Classes to frontend
This commit is contained in:
committed by
Space
parent
c15b1ec001
commit
7595f798e1
+13
@@ -7,6 +7,7 @@ package org.jetbrains.kotlin.test.runners;
|
||||
|
||||
import com.intellij.testFramework.TestDataPath;
|
||||
import org.jetbrains.kotlin.test.util.KtTestUtil;
|
||||
import org.jetbrains.kotlin.test.utils.TransformersFunctions;
|
||||
import org.jetbrains.kotlin.test.TestMetadata;
|
||||
import org.junit.jupiter.api.Nested;
|
||||
import org.junit.jupiter.api.Test;
|
||||
@@ -32113,6 +32114,12 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti
|
||||
runTest("compiler/testData/diagnostics/tests/valueClasses/propertiesWithBackingFieldsInsideValueClass.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("recursiveMultiFieldValueClasses.kt")
|
||||
public void testRecursiveMultiFieldValueClasses() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/valueClasses/recursiveMultiFieldValueClasses.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation());
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("recursiveValueClasses.kt")
|
||||
public void testRecursiveValueClasses() throws Exception {
|
||||
@@ -32167,6 +32174,12 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti
|
||||
runTest("compiler/testData/diagnostics/tests/valueClasses/valueClassWithForbiddenUnderlyingType.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("valueClassWithForbiddenUnderlyingTypeMultiField.kt")
|
||||
public void testValueClassWithForbiddenUnderlyingTypeMultiField() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/valueClasses/valueClassWithForbiddenUnderlyingTypeMultiField.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation());
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("valueClassesInsideAnnotations.kt")
|
||||
public void testValueClassesInsideAnnotations() throws Exception {
|
||||
|
||||
+13
@@ -7,6 +7,7 @@ package org.jetbrains.kotlin.test.runners;
|
||||
|
||||
import com.intellij.testFramework.TestDataPath;
|
||||
import org.jetbrains.kotlin.test.util.KtTestUtil;
|
||||
import org.jetbrains.kotlin.test.utils.TransformersFunctions;
|
||||
import org.jetbrains.kotlin.test.TestMetadata;
|
||||
import org.junit.jupiter.api.Nested;
|
||||
import org.junit.jupiter.api.Test;
|
||||
@@ -32113,6 +32114,12 @@ public class FirOldFrontendDiagnosticsWithLightTreeTestGenerated extends Abstrac
|
||||
runTest("compiler/testData/diagnostics/tests/valueClasses/propertiesWithBackingFieldsInsideValueClass.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("recursiveMultiFieldValueClasses.kt")
|
||||
public void testRecursiveMultiFieldValueClasses() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/valueClasses/recursiveMultiFieldValueClasses.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation());
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("recursiveValueClasses.kt")
|
||||
public void testRecursiveValueClasses() throws Exception {
|
||||
@@ -32167,6 +32174,12 @@ public class FirOldFrontendDiagnosticsWithLightTreeTestGenerated extends Abstrac
|
||||
runTest("compiler/testData/diagnostics/tests/valueClasses/valueClassWithForbiddenUnderlyingType.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("valueClassWithForbiddenUnderlyingTypeMultiField.kt")
|
||||
public void testValueClassWithForbiddenUnderlyingTypeMultiField() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/valueClasses/valueClassWithForbiddenUnderlyingTypeMultiField.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation());
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("valueClassesInsideAnnotations.kt")
|
||||
public void testValueClassesInsideAnnotations() throws Exception {
|
||||
|
||||
+1
@@ -405,6 +405,7 @@ object DIAGNOSTICS_LIST : DiagnosticList("FirErrors") {
|
||||
val VALUE_CLASS_NOT_FINAL by error<KtDeclaration>(PositioningStrategy.MODALITY_MODIFIER)
|
||||
val ABSENCE_OF_PRIMARY_CONSTRUCTOR_FOR_VALUE_CLASS by error<KtDeclaration>(PositioningStrategy.INLINE_OR_VALUE_MODIFIER)
|
||||
val INLINE_CLASS_CONSTRUCTOR_WRONG_PARAMETERS_SIZE by error<KtElement>()
|
||||
val VALUE_CLASS_EMPTY_CONSTRUCTOR by error<KtElement>()
|
||||
val VALUE_CLASS_CONSTRUCTOR_NOT_FINAL_READ_ONLY_PARAMETER by error<KtParameter>()
|
||||
val PROPERTY_WITH_BACKING_FIELD_INSIDE_VALUE_CLASS by error<KtProperty>(PositioningStrategy.DECLARATION_SIGNATURE)
|
||||
val DELEGATED_PROPERTY_INSIDE_VALUE_CLASS by error<PsiElement>()
|
||||
|
||||
@@ -306,6 +306,7 @@ object FirErrors {
|
||||
val VALUE_CLASS_NOT_FINAL by error0<KtDeclaration>(SourceElementPositioningStrategies.MODALITY_MODIFIER)
|
||||
val ABSENCE_OF_PRIMARY_CONSTRUCTOR_FOR_VALUE_CLASS by error0<KtDeclaration>(SourceElementPositioningStrategies.INLINE_OR_VALUE_MODIFIER)
|
||||
val INLINE_CLASS_CONSTRUCTOR_WRONG_PARAMETERS_SIZE by error0<KtElement>()
|
||||
val VALUE_CLASS_EMPTY_CONSTRUCTOR by error0<KtElement>()
|
||||
val VALUE_CLASS_CONSTRUCTOR_NOT_FINAL_READ_ONLY_PARAMETER by error0<KtParameter>()
|
||||
val PROPERTY_WITH_BACKING_FIELD_INSIDE_VALUE_CLASS by error0<KtProperty>(SourceElementPositioningStrategies.DECLARATION_SIGNATURE)
|
||||
val DELEGATED_PROPERTY_INSIDE_VALUE_CLASS by error0<PsiElement>()
|
||||
|
||||
+44
-31
@@ -15,18 +15,21 @@ import org.jetbrains.kotlin.fir.FirSession
|
||||
import org.jetbrains.kotlin.fir.analysis.checkers.context.CheckerContext
|
||||
import org.jetbrains.kotlin.fir.analysis.checkers.hasModifier
|
||||
import org.jetbrains.kotlin.fir.analysis.checkers.toRegularClassSymbol
|
||||
import org.jetbrains.kotlin.fir.analysis.diagnostics.*
|
||||
import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors
|
||||
import org.jetbrains.kotlin.fir.analysis.diagnostics.reportOnWithSuppression
|
||||
import org.jetbrains.kotlin.fir.analysis.diagnostics.withSuppressedDiagnostics
|
||||
import org.jetbrains.kotlin.fir.declarations.*
|
||||
import org.jetbrains.kotlin.fir.declarations.utils.*
|
||||
import org.jetbrains.kotlin.fir.expressions.toResolvedCallableReference
|
||||
import org.jetbrains.kotlin.fir.expressions.toResolvedCallableSymbol
|
||||
import org.jetbrains.kotlin.fir.resolve.fullyExpandedType
|
||||
import org.jetbrains.kotlin.fir.resolve.lookupSuperTypes
|
||||
import org.jetbrains.kotlin.fir.symbols.impl.FirConstructorSymbol
|
||||
import org.jetbrains.kotlin.fir.symbols.impl.FirValueParameterSymbol
|
||||
import org.jetbrains.kotlin.fir.types.*
|
||||
import org.jetbrains.kotlin.lexer.KtTokens
|
||||
import org.jetbrains.kotlin.name.ClassId
|
||||
import org.jetbrains.kotlin.name.FqName
|
||||
import org.jetbrains.kotlin.name.Name
|
||||
import org.jetbrains.kotlin.name.StandardClassIds
|
||||
|
||||
object FirInlineClassDeclarationChecker : FirRegularClassChecker() {
|
||||
@@ -60,8 +63,9 @@ object FirInlineClassDeclarationChecker : FirRegularClassChecker() {
|
||||
}
|
||||
|
||||
var primaryConstructor: FirConstructor? = null
|
||||
var primaryConstructorParameter: FirValueParameter? = null
|
||||
var primaryConstructorProperty: FirProperty? = null
|
||||
var primaryConstructorParametersByName = mapOf<Name, FirValueParameter>()
|
||||
val primaryConstructorPropertiesByName = mutableMapOf<Name, FirProperty>()
|
||||
var primaryConstructorParametersSymbolsSet = setOf<FirValueParameterSymbol>()
|
||||
|
||||
for (innerDeclaration in declaration.declarations) {
|
||||
when (innerDeclaration) {
|
||||
@@ -69,7 +73,9 @@ object FirInlineClassDeclarationChecker : FirRegularClassChecker() {
|
||||
when {
|
||||
innerDeclaration.isPrimary -> {
|
||||
primaryConstructor = innerDeclaration
|
||||
primaryConstructorParameter = innerDeclaration.valueParameters.singleOrNull()
|
||||
primaryConstructorParametersByName = innerDeclaration.valueParameters.associateBy { it.name }
|
||||
primaryConstructorParametersSymbolsSet =
|
||||
primaryConstructorParametersByName.map { (_, parameter) -> parameter.symbol }.toSet()
|
||||
}
|
||||
|
||||
innerDeclaration.body != null -> {
|
||||
@@ -100,7 +106,7 @@ object FirInlineClassDeclarationChecker : FirRegularClassChecker() {
|
||||
if (innerDeclaration.isSynthetic) {
|
||||
val symbol = innerDeclaration.initializer?.toResolvedCallableSymbol()
|
||||
if (context.languageVersionSettings.supportsFeature(LanguageFeature.InlineClassImplementationByDelegation) &&
|
||||
symbol != null && symbol == primaryConstructorParameter?.symbol
|
||||
symbol != null && symbol in primaryConstructorParametersSymbolsSet
|
||||
) {
|
||||
continue
|
||||
}
|
||||
@@ -115,8 +121,8 @@ object FirInlineClassDeclarationChecker : FirRegularClassChecker() {
|
||||
}
|
||||
}
|
||||
is FirProperty -> {
|
||||
if (innerDeclaration.isRelatedToParameter(primaryConstructorParameter)) {
|
||||
primaryConstructorProperty = innerDeclaration
|
||||
if (innerDeclaration.isRelatedToParameter(primaryConstructorParametersByName[innerDeclaration.name])) {
|
||||
primaryConstructorPropertiesByName[innerDeclaration.name] = innerDeclaration
|
||||
} else {
|
||||
when {
|
||||
innerDeclaration.delegate != null ->
|
||||
@@ -147,35 +153,42 @@ object FirInlineClassDeclarationChecker : FirRegularClassChecker() {
|
||||
return
|
||||
}
|
||||
|
||||
if (primaryConstructorParameter == null) {
|
||||
if (context.languageVersionSettings.supportsFeature(LanguageFeature.ValueClasses)) {
|
||||
if (primaryConstructorParametersByName.isEmpty()) {
|
||||
reporter.reportOnWithSuppression(primaryConstructor, FirErrors.VALUE_CLASS_EMPTY_CONSTRUCTOR, context)
|
||||
return
|
||||
}
|
||||
} else if (primaryConstructorParametersByName.size != 1) {
|
||||
reporter.reportOnWithSuppression(primaryConstructor, FirErrors.INLINE_CLASS_CONSTRUCTOR_WRONG_PARAMETERS_SIZE, context)
|
||||
return
|
||||
}
|
||||
|
||||
withSuppressedDiagnostics(primaryConstructor, context) { context ->
|
||||
withSuppressedDiagnostics(primaryConstructorParameter, context) { context ->
|
||||
when {
|
||||
primaryConstructorParameter.isNotFinalReadOnly(primaryConstructorProperty) ->
|
||||
reporter.reportOn(
|
||||
primaryConstructorParameter.source,
|
||||
FirErrors.VALUE_CLASS_CONSTRUCTOR_NOT_FINAL_READ_ONLY_PARAMETER,
|
||||
context
|
||||
)
|
||||
for ((name, primaryConstructorParameter) in primaryConstructorParametersByName) {
|
||||
withSuppressedDiagnostics(primaryConstructor, context) { context ->
|
||||
withSuppressedDiagnostics(primaryConstructorParameter, context) { context ->
|
||||
when {
|
||||
primaryConstructorParameter.isNotFinalReadOnly(primaryConstructorPropertiesByName[name]) ->
|
||||
reporter.reportOn(
|
||||
primaryConstructorParameter.source,
|
||||
FirErrors.VALUE_CLASS_CONSTRUCTOR_NOT_FINAL_READ_ONLY_PARAMETER,
|
||||
context
|
||||
)
|
||||
|
||||
primaryConstructorParameter.returnTypeRef.isInapplicableParameterType() ->
|
||||
reporter.reportOn(
|
||||
primaryConstructorParameter.returnTypeRef.source,
|
||||
FirErrors.VALUE_CLASS_HAS_INAPPLICABLE_PARAMETER_TYPE,
|
||||
primaryConstructorParameter.returnTypeRef.coneType,
|
||||
context
|
||||
)
|
||||
primaryConstructorParameter.returnTypeRef.isInapplicableParameterType() ->
|
||||
reporter.reportOn(
|
||||
primaryConstructorParameter.returnTypeRef.source,
|
||||
FirErrors.VALUE_CLASS_HAS_INAPPLICABLE_PARAMETER_TYPE,
|
||||
primaryConstructorParameter.returnTypeRef.coneType,
|
||||
context
|
||||
)
|
||||
|
||||
primaryConstructorParameter.returnTypeRef.coneType.isRecursiveInlineClassType(context.session) ->
|
||||
reporter.reportOnWithSuppression(
|
||||
primaryConstructorParameter.returnTypeRef,
|
||||
FirErrors.VALUE_CLASS_CANNOT_BE_RECURSIVE,
|
||||
context
|
||||
)
|
||||
primaryConstructorParameter.returnTypeRef.coneType.isRecursiveInlineClassType(context.session) ->
|
||||
reporter.reportOnWithSuppression(
|
||||
primaryConstructorParameter.returnTypeRef,
|
||||
FirErrors.VALUE_CLASS_CANNOT_BE_RECURSIVE,
|
||||
context
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+6
-4
@@ -534,6 +534,7 @@ import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors.VALUE_CLASS_CANNO
|
||||
import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors.VALUE_CLASS_CANNOT_EXTEND_CLASSES
|
||||
import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors.VALUE_CLASS_CANNOT_IMPLEMENT_INTERFACE_BY_DELEGATION
|
||||
import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors.VALUE_CLASS_CONSTRUCTOR_NOT_FINAL_READ_ONLY_PARAMETER
|
||||
import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors.VALUE_CLASS_EMPTY_CONSTRUCTOR
|
||||
import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors.VALUE_CLASS_HAS_INAPPLICABLE_PARAMETER_TYPE
|
||||
import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors.VALUE_CLASS_NOT_FINAL
|
||||
import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors.VALUE_CLASS_NOT_TOP_LEVEL
|
||||
@@ -1150,13 +1151,14 @@ object FirErrorsDefaultMessages : BaseDiagnosticRendererFactory() {
|
||||
)
|
||||
|
||||
// Value classes
|
||||
map.put(VALUE_CLASS_NOT_TOP_LEVEL, "Value classes cannot be local or inner")
|
||||
map.put(VALUE_CLASS_NOT_FINAL, "Value classes can be only final")
|
||||
map.put(VALUE_CLASS_NOT_TOP_LEVEL, "Value class cannot be local or inner")
|
||||
map.put(VALUE_CLASS_NOT_FINAL, "Value class can be only final")
|
||||
map.put(ABSENCE_OF_PRIMARY_CONSTRUCTOR_FOR_VALUE_CLASS, "Primary constructor is required for value class")
|
||||
map.put(INLINE_CLASS_CONSTRUCTOR_WRONG_PARAMETERS_SIZE, "Inline class must have exactly one primary constructor parameter") // +
|
||||
map.put(INLINE_CLASS_CONSTRUCTOR_WRONG_PARAMETERS_SIZE, "Inline class must have exactly one primary constructor parameter")
|
||||
map.put(VALUE_CLASS_EMPTY_CONSTRUCTOR, "Value class must have at least one primary constructor parameter")
|
||||
map.put(
|
||||
VALUE_CLASS_CONSTRUCTOR_NOT_FINAL_READ_ONLY_PARAMETER,
|
||||
"Value class primary constructor must only have final read-only (val) property parameter"
|
||||
"Value class primary constructor must only have final read-only (val) property parameters"
|
||||
)
|
||||
map.put(PROPERTY_WITH_BACKING_FIELD_INSIDE_VALUE_CLASS, "Value class cannot have properties with backing fields")
|
||||
map.put(DELEGATED_PROPERTY_INSIDE_VALUE_CLASS, "Value class cannot have delegated properties")
|
||||
|
||||
+22
@@ -47482,6 +47482,28 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT
|
||||
}
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestMetadata("compiler/testData/codegen/box/valueClasses")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
public class ValueClasses {
|
||||
@Test
|
||||
public void testAllFilesPresentInValueClasses() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/valueClasses"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("equality.kt")
|
||||
public void testEquality() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/valueClasses/equality.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal());
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("equality.kt")
|
||||
public void testEquality_valueClasses() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/valueClasses/equality.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation());
|
||||
}
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestMetadata("compiler/testData/codegen/box/vararg")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
|
||||
@@ -400,12 +400,13 @@ public interface Errors {
|
||||
DiagnosticFactory0<PsiElement> NON_PRIVATE_CONSTRUCTOR_IN_SEALED = DiagnosticFactory0.create(ERROR);
|
||||
DiagnosticFactory0<PsiElement> NON_PRIVATE_OR_PROTECTED_CONSTRUCTOR_IN_SEALED = DiagnosticFactory0.create(ERROR);
|
||||
|
||||
// Inline classes
|
||||
// Inline classes, Value classes
|
||||
|
||||
DiagnosticFactory0<PsiElement> VALUE_CLASS_NOT_TOP_LEVEL = DiagnosticFactory0.create(ERROR);
|
||||
DiagnosticFactory0<PsiElement> VALUE_CLASS_NOT_FINAL = DiagnosticFactory0.create(ERROR);
|
||||
DiagnosticFactory0<PsiElement> ABSENCE_OF_PRIMARY_CONSTRUCTOR_FOR_VALUE_CLASS = DiagnosticFactory0.create(ERROR);
|
||||
DiagnosticFactory0<KtElement> INLINE_CLASS_CONSTRUCTOR_WRONG_PARAMETERS_SIZE = DiagnosticFactory0.create(ERROR);
|
||||
DiagnosticFactory0<KtElement> VALUE_CLASS_EMPTY_CONSTRUCTOR = DiagnosticFactory0.create(ERROR);
|
||||
DiagnosticFactory0<KtParameter> VALUE_CLASS_CONSTRUCTOR_NOT_FINAL_READ_ONLY_PARAMETER = DiagnosticFactory0.create(ERROR);
|
||||
DiagnosticFactory0<KtProperty> PROPERTY_WITH_BACKING_FIELD_INSIDE_VALUE_CLASS = DiagnosticFactory0.create(ERROR, DECLARATION_SIGNATURE);
|
||||
DiagnosticFactory0<PsiElement> DELEGATED_PROPERTY_INSIDE_VALUE_CLASS = DiagnosticFactory0.create(ERROR);
|
||||
|
||||
+3
-2
@@ -755,8 +755,9 @@ public class DefaultErrorMessages {
|
||||
MAP.put(VALUE_CLASS_NOT_TOP_LEVEL, "Value classes cannot be local or inner");
|
||||
MAP.put(VALUE_CLASS_NOT_FINAL, "Value classes can be only final");
|
||||
MAP.put(ABSENCE_OF_PRIMARY_CONSTRUCTOR_FOR_VALUE_CLASS, "Primary constructor is required for value class");
|
||||
MAP.put(INLINE_CLASS_CONSTRUCTOR_WRONG_PARAMETERS_SIZE, "Inline class must have exactly one primary constructor parameter"); // +
|
||||
MAP.put(VALUE_CLASS_CONSTRUCTOR_NOT_FINAL_READ_ONLY_PARAMETER, "Value class primary constructor must only have final read-only (val) property parameter");
|
||||
MAP.put(INLINE_CLASS_CONSTRUCTOR_WRONG_PARAMETERS_SIZE, "Inline class must have exactly one primary constructor parameter");
|
||||
MAP.put(VALUE_CLASS_EMPTY_CONSTRUCTOR, "Value class must have at least one primary constructor parameter");
|
||||
MAP.put(VALUE_CLASS_CONSTRUCTOR_NOT_FINAL_READ_ONLY_PARAMETER, "Value class primary constructor must only have final read-only (val) property parameters");
|
||||
MAP.put(PROPERTY_WITH_BACKING_FIELD_INSIDE_VALUE_CLASS, "Value class cannot have properties with backing fields");
|
||||
MAP.put(DELEGATED_PROPERTY_INSIDE_VALUE_CLASS, "Value class cannot have delegated properties");
|
||||
MAP.put(VALUE_CLASS_HAS_INAPPLICABLE_PARAMETER_TYPE, "Value class cannot have value parameter of type ''{0}''", RENDER_TYPE);
|
||||
|
||||
+36
-19
@@ -80,31 +80,47 @@ object InlineClassDeclarationChecker : DeclarationChecker {
|
||||
return
|
||||
}
|
||||
|
||||
val baseParameter = primaryConstructor.valueParameters.singleOrNull()
|
||||
if (baseParameter == null) {
|
||||
if (context.languageVersionSettings.supportsFeature(LanguageFeature.ValueClasses)) {
|
||||
if (primaryConstructor.valueParameters.isEmpty()) {
|
||||
(primaryConstructor.valueParameterList ?: declaration).let {
|
||||
trace.report(Errors.VALUE_CLASS_EMPTY_CONSTRUCTOR.on(it))
|
||||
return
|
||||
}
|
||||
}
|
||||
} else if (primaryConstructor.valueParameters.size != 1) {
|
||||
(primaryConstructor.valueParameterList ?: declaration).let {
|
||||
trace.report(Errors.INLINE_CLASS_CONSTRUCTOR_WRONG_PARAMETERS_SIZE.on(it))
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
if (!isParameterAcceptableForInlineClass(baseParameter)) {
|
||||
trace.report(Errors.VALUE_CLASS_CONSTRUCTOR_NOT_FINAL_READ_ONLY_PARAMETER.on(baseParameter))
|
||||
return
|
||||
var baseParametersOk = true
|
||||
for (baseParameter in primaryConstructor.valueParameters) {
|
||||
|
||||
if (!isParameterAcceptableForInlineClass(baseParameter)) {
|
||||
trace.report(Errors.VALUE_CLASS_CONSTRUCTOR_NOT_FINAL_READ_ONLY_PARAMETER.on(baseParameter))
|
||||
baseParametersOk = false
|
||||
continue
|
||||
}
|
||||
|
||||
val baseParameterType = descriptor.safeAs<ClassDescriptor>()?.defaultType?.substitutedUnderlyingType()
|
||||
val baseParameterTypeReference = baseParameter.typeReference
|
||||
if (baseParameterType != null && baseParameterTypeReference != null) {
|
||||
if (baseParameterType.isInapplicableParameterType()) {
|
||||
trace.report(Errors.VALUE_CLASS_HAS_INAPPLICABLE_PARAMETER_TYPE.on(baseParameterTypeReference, baseParameterType))
|
||||
baseParametersOk = false
|
||||
continue
|
||||
}
|
||||
|
||||
if (baseParameterType.isRecursiveInlineClassType()) { // todo check work for MF VC
|
||||
trace.report(Errors.VALUE_CLASS_CANNOT_BE_RECURSIVE.on(baseParameterTypeReference))
|
||||
baseParametersOk = false
|
||||
continue
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
val baseParameterType = descriptor.safeAs<ClassDescriptor>()?.defaultType?.substitutedUnderlyingType()
|
||||
val baseParameterTypeReference = baseParameter.typeReference
|
||||
if (baseParameterType != null && baseParameterTypeReference != null) {
|
||||
if (baseParameterType.isInapplicableParameterType()) {
|
||||
trace.report(Errors.VALUE_CLASS_HAS_INAPPLICABLE_PARAMETER_TYPE.on(baseParameterTypeReference, baseParameterType))
|
||||
return
|
||||
}
|
||||
|
||||
if (baseParameterType.isRecursiveInlineClassType()) {
|
||||
trace.report(Errors.VALUE_CLASS_CANNOT_BE_RECURSIVE.on(baseParameterTypeReference))
|
||||
return
|
||||
}
|
||||
if (!baseParametersOk) {
|
||||
return
|
||||
}
|
||||
|
||||
for (supertypeEntry in declaration.superTypeListEntries) {
|
||||
@@ -129,7 +145,8 @@ object InlineClassDeclarationChecker : DeclarationChecker {
|
||||
}
|
||||
|
||||
if (descriptor.getAllSuperClassifiers().any {
|
||||
it.fqNameUnsafe == StandardNames.FqNames.cloneable || it.fqNameUnsafe == javaLangCloneable }
|
||||
it.fqNameUnsafe == StandardNames.FqNames.cloneable || it.fqNameUnsafe == javaLangCloneable
|
||||
}
|
||||
) {
|
||||
trace.report(Errors.VALUE_CLASS_CANNOT_BE_CLONEABLE.on(inlineOrValueKeyword))
|
||||
return
|
||||
|
||||
@@ -0,0 +1,167 @@
|
||||
// WITH_STDLIB
|
||||
// TARGET_BACKEND: JVM_IR
|
||||
// WORKS_WHEN_VALUE_CLASS
|
||||
// LANGUAGE: +ValueClasses
|
||||
|
||||
value class F1(val x: Int)
|
||||
|
||||
value class F2(val x: UInt)
|
||||
|
||||
value class F3(val x: String)
|
||||
|
||||
OPTIONAL_JVM_INLINE_ANNOTATION
|
||||
value class F4(val x: Int)
|
||||
|
||||
OPTIONAL_JVM_INLINE_ANNOTATION
|
||||
value class F5(val x: UInt)
|
||||
|
||||
OPTIONAL_JVM_INLINE_ANNOTATION
|
||||
value class F6(val x: String)
|
||||
|
||||
value class A(
|
||||
val f1: F1,
|
||||
val f2: F2,
|
||||
val f3: F3,
|
||||
val f4: F4,
|
||||
val f5: F5,
|
||||
val f6: F6,
|
||||
val f7: Int,
|
||||
val f8: UInt,
|
||||
val f9: String,
|
||||
)
|
||||
|
||||
value class B(val a1: A, val a2: A) {
|
||||
override fun toString(): String {
|
||||
return "OverridenBToString(a1 = $a1, a2 = $a2)"
|
||||
}
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
val f1 = F1(1)
|
||||
val f2 = F2(UInt.MAX_VALUE)
|
||||
val f3 = F3("234")
|
||||
val f4 = F4(5)
|
||||
val f5 = F5(UInt.MAX_VALUE.dec())
|
||||
val f6 = F6("678")
|
||||
val a1 = A(f1, f2, f3, f4, f5, f6, 9, UInt.MAX_VALUE - 2U, "0")
|
||||
val a2 = a1
|
||||
val b = B(a1, a2)
|
||||
|
||||
assert(f1.x == 1)
|
||||
assert(f2.x == UInt.MAX_VALUE)
|
||||
assert(f3.x == "234")
|
||||
assert(f4.x == 5)
|
||||
assert(f5.x == UInt.MAX_VALUE - 1U)
|
||||
assert(f6.x == "678")
|
||||
|
||||
assert(f1 == a1.f1)
|
||||
assert(f1.hashCode() == a1.f1.hashCode())
|
||||
assert(f1.toString() == a1.f1.toString())
|
||||
assert(f1 == a2.f1)
|
||||
assert(f1.hashCode() == a2.f1.hashCode())
|
||||
assert(f1.toString() == a2.f1.toString())
|
||||
assert(a1.f1 == a2.f1)
|
||||
assert(a1.f1.hashCode() == a2.f1.hashCode())
|
||||
assert(a1.f1.toString() == a2.f1.toString())
|
||||
|
||||
assert(f2 == a1.f2)
|
||||
assert(f2.hashCode() == a1.f2.hashCode())
|
||||
assert(f2.toString() == a1.f2.toString())
|
||||
assert(f2 == a2.f2)
|
||||
assert(f2.hashCode() == a2.f2.hashCode())
|
||||
assert(f2.toString() == a2.f2.toString())
|
||||
assert(a1.f2 == a2.f2)
|
||||
assert(a1.f2.hashCode() == a2.f2.hashCode())
|
||||
assert(a1.f2.toString() == a2.f2.toString())
|
||||
|
||||
assert(f3 == a1.f3)
|
||||
assert(f3.hashCode() == a1.f3.hashCode())
|
||||
assert(f3.toString() == a1.f3.toString())
|
||||
assert(f3 == a2.f3)
|
||||
assert(f3.hashCode() == a2.f3.hashCode())
|
||||
assert(f3.toString() == a2.f3.toString())
|
||||
assert(a1.f3 == a2.f3)
|
||||
assert(a1.f3.hashCode() == a2.f3.hashCode())
|
||||
assert(a1.f3.toString() == a2.f3.toString())
|
||||
|
||||
assert(f4 == a1.f4)
|
||||
assert(f4.hashCode() == a1.f4.hashCode())
|
||||
assert(f4.toString() == a1.f4.toString())
|
||||
assert(f4 == a2.f4)
|
||||
assert(f4.hashCode() == a2.f4.hashCode())
|
||||
assert(f4.toString() == a2.f4.toString())
|
||||
assert(a1.f4 == a2.f4)
|
||||
assert(a1.f4.hashCode() == a2.f4.hashCode())
|
||||
assert(a1.f4.toString() == a2.f4.toString())
|
||||
|
||||
assert(f5 == a1.f5)
|
||||
assert(f5.hashCode() == a1.f5.hashCode())
|
||||
assert(f5.toString() == a1.f5.toString())
|
||||
assert(f5 == a2.f5)
|
||||
assert(f5.hashCode() == a2.f5.hashCode())
|
||||
assert(f5.toString() == a2.f5.toString())
|
||||
assert(a1.f5 == a2.f5)
|
||||
assert(a1.f5.hashCode() == a2.f5.hashCode())
|
||||
assert(a1.f5.toString() == a2.f5.toString())
|
||||
|
||||
assert(f6 == a1.f6)
|
||||
assert(f6.hashCode() == a1.f6.hashCode())
|
||||
assert(f6.toString() == a1.f6.toString())
|
||||
assert(f6 == a2.f6)
|
||||
assert(f6.hashCode() == a2.f6.hashCode())
|
||||
assert(f6.toString() == a2.f6.toString())
|
||||
assert(a1.f6 == a2.f6)
|
||||
assert(a1.f6.hashCode() == a2.f6.hashCode())
|
||||
assert(a1.f6.toString() == a2.f6.toString())
|
||||
|
||||
assert(9 == a1.f7)
|
||||
assert(9.hashCode() == a1.f7.hashCode())
|
||||
assert(9.toString() == a1.f7.toString())
|
||||
assert(9 == a2.f7)
|
||||
assert(9.hashCode() == a2.f7.hashCode())
|
||||
assert(9.toString() == a2.f7.toString())
|
||||
assert(a1.f7 == a2.f7)
|
||||
assert(a1.f7.hashCode() == a2.f7.hashCode())
|
||||
assert(a1.f7.toString() == a2.f7.toString())
|
||||
|
||||
assert((UInt.MAX_VALUE - 2U) == a1.f8)
|
||||
assert((UInt.MAX_VALUE - 2U).hashCode() == a1.f8.hashCode())
|
||||
assert((UInt.MAX_VALUE - 2U).toString() == a1.f8.toString())
|
||||
assert((UInt.MAX_VALUE - 2U) == a2.f8)
|
||||
assert((UInt.MAX_VALUE - 2U).hashCode() == a2.f8.hashCode())
|
||||
assert((UInt.MAX_VALUE - 2U).toString() == a2.f8.toString())
|
||||
assert(a1.f8 == a2.f8)
|
||||
assert(a1.f8.hashCode() == a2.f8.hashCode())
|
||||
assert(a1.f8.toString() == a2.f8.toString())
|
||||
|
||||
assert("0" == a1.f9)
|
||||
assert("0".hashCode() == a1.f9.hashCode())
|
||||
assert("0".toString() == a1.f9.toString())
|
||||
assert("0" == a2.f9)
|
||||
assert("0".hashCode() == a2.f9.hashCode())
|
||||
assert("0".toString() == a2.f9.toString())
|
||||
assert(a1.f9 == a2.f9)
|
||||
assert(a1.f9.hashCode() == a2.f9.hashCode())
|
||||
assert(a1.f9.toString() == a2.f9.toString())
|
||||
|
||||
|
||||
assert(a1 == a2)
|
||||
assert(a1.hashCode() == a2.hashCode())
|
||||
assert(a1.toString() == a2.toString())
|
||||
|
||||
assert(b == b)
|
||||
assert(b.toString() == b.toString())
|
||||
assert(b.hashCode() == b.hashCode())
|
||||
|
||||
assert(f1.toString() == "to be replaced")
|
||||
assert(f2.toString() == "to be replaced")
|
||||
assert(f3.toString() == "to be replaced")
|
||||
assert(f4.toString() == "to be replaced")
|
||||
assert(f5.toString() == "to be replaced")
|
||||
assert(f6.toString() == "to be replaced")
|
||||
assert(a1.toString() == "to be replaced")
|
||||
assert(a2.toString() == "to be replaced")
|
||||
assert(b.toString() == "to be replaced")
|
||||
|
||||
return "OK"
|
||||
}
|
||||
+63
@@ -0,0 +1,63 @@
|
||||
// FIR_IDENTICAL
|
||||
// WITH_STDLIB
|
||||
// TARGET_BACKEND: JVM_IR
|
||||
// WORKS_WHEN_VALUE_CLASS
|
||||
// LANGUAGE: +ValueClasses
|
||||
|
||||
|
||||
OPTIONAL_JVM_INLINE_ANNOTATION
|
||||
value class A1(val x: <!VALUE_CLASS_CANNOT_BE_RECURSIVE!>A1<!>)
|
||||
|
||||
value class B1(val x: <!VALUE_CLASS_CANNOT_BE_RECURSIVE!>B1<!>, val y: <!VALUE_CLASS_CANNOT_BE_RECURSIVE!>B1<!>)
|
||||
|
||||
|
||||
OPTIONAL_JVM_INLINE_ANNOTATION
|
||||
value class A2(val x: <!VALUE_CLASS_CANNOT_BE_RECURSIVE!>B2<!>)
|
||||
|
||||
value class B2(val x: <!VALUE_CLASS_CANNOT_BE_RECURSIVE!>A2<!>, val y: <!VALUE_CLASS_CANNOT_BE_RECURSIVE!>A2<!>)
|
||||
|
||||
|
||||
OPTIONAL_JVM_INLINE_ANNOTATION
|
||||
value class A3(val x: <!VALUE_CLASS_CANNOT_BE_RECURSIVE!>B3<!>)
|
||||
|
||||
OPTIONAL_JVM_INLINE_ANNOTATION
|
||||
value class B3(val x: <!VALUE_CLASS_CANNOT_BE_RECURSIVE!>A3<!>)
|
||||
|
||||
|
||||
value class A4(val x: <!VALUE_CLASS_CANNOT_BE_RECURSIVE!>B4<!>, val y: <!VALUE_CLASS_CANNOT_BE_RECURSIVE!>B4<!>)
|
||||
|
||||
value class B4(val x: <!VALUE_CLASS_CANNOT_BE_RECURSIVE!>A4<!>, val y: <!VALUE_CLASS_CANNOT_BE_RECURSIVE!>A4<!>)
|
||||
|
||||
value class C4(val x: <!VALUE_CLASS_CANNOT_BE_RECURSIVE!>D4?<!>, val y: <!VALUE_CLASS_CANNOT_BE_RECURSIVE!>D4?<!>)
|
||||
|
||||
value class D4(val x: <!VALUE_CLASS_CANNOT_BE_RECURSIVE!>D4?<!>, val y: <!VALUE_CLASS_CANNOT_BE_RECURSIVE!>C4?<!>)
|
||||
|
||||
|
||||
|
||||
OPTIONAL_JVM_INLINE_ANNOTATION
|
||||
value class A5<T : A5<T>>(val x: <!VALUE_CLASS_HAS_INAPPLICABLE_PARAMETER_TYPE!>T<!>, val y: <!VALUE_CLASS_HAS_INAPPLICABLE_PARAMETER_TYPE!>T<!>)
|
||||
|
||||
value class B5<T : B5<T>>(val x: <!VALUE_CLASS_HAS_INAPPLICABLE_PARAMETER_TYPE!>T<!>, val y: <!VALUE_CLASS_HAS_INAPPLICABLE_PARAMETER_TYPE!>T<!>)
|
||||
|
||||
|
||||
OPTIONAL_JVM_INLINE_ANNOTATION
|
||||
value class A6<T : B6<<!UPPER_BOUND_VIOLATED!>T<!>>>(val x: <!VALUE_CLASS_HAS_INAPPLICABLE_PARAMETER_TYPE!>T<!>, val y: <!VALUE_CLASS_HAS_INAPPLICABLE_PARAMETER_TYPE!>T<!>)
|
||||
|
||||
value class B6<T : A6<<!UPPER_BOUND_VIOLATED!>T<!>>>(val x: <!VALUE_CLASS_HAS_INAPPLICABLE_PARAMETER_TYPE!>T<!>, val y: <!VALUE_CLASS_HAS_INAPPLICABLE_PARAMETER_TYPE!>T<!>)
|
||||
|
||||
|
||||
OPTIONAL_JVM_INLINE_ANNOTATION
|
||||
value class A7<T : B7<<!UPPER_BOUND_VIOLATED!>T<!>>>(val x: <!VALUE_CLASS_HAS_INAPPLICABLE_PARAMETER_TYPE!>T<!>, val y: <!VALUE_CLASS_HAS_INAPPLICABLE_PARAMETER_TYPE!>T<!>)
|
||||
|
||||
OPTIONAL_JVM_INLINE_ANNOTATION
|
||||
value class B7<T : A7<<!UPPER_BOUND_VIOLATED!>T<!>>>(val x: <!VALUE_CLASS_HAS_INAPPLICABLE_PARAMETER_TYPE!>T<!>, val y: <!VALUE_CLASS_HAS_INAPPLICABLE_PARAMETER_TYPE!>T<!>)
|
||||
|
||||
|
||||
value class A8<T : B8<<!UPPER_BOUND_VIOLATED!>T<!>>>(val x: <!VALUE_CLASS_HAS_INAPPLICABLE_PARAMETER_TYPE!>T<!>, val y: <!VALUE_CLASS_HAS_INAPPLICABLE_PARAMETER_TYPE!>T<!>)
|
||||
|
||||
value class B8<T : A8<<!UPPER_BOUND_VIOLATED!>T<!>>>(val x: <!VALUE_CLASS_HAS_INAPPLICABLE_PARAMETER_TYPE!>T<!>, val y: <!VALUE_CLASS_HAS_INAPPLICABLE_PARAMETER_TYPE!>T<!>)
|
||||
|
||||
|
||||
value class A9<T : B9<<!UPPER_BOUND_VIOLATED!>T<!>>>(val x: <!VALUE_CLASS_HAS_INAPPLICABLE_PARAMETER_TYPE!>T?<!>, val y: <!VALUE_CLASS_HAS_INAPPLICABLE_PARAMETER_TYPE!>T?<!>)
|
||||
|
||||
value class B9<T : A9<<!UPPER_BOUND_VIOLATED!>T<!>>>(val x: <!VALUE_CLASS_HAS_INAPPLICABLE_PARAMETER_TYPE!>T?<!>, val y: <!VALUE_CLASS_HAS_INAPPLICABLE_PARAMETER_TYPE!>T?<!>)
|
||||
+178
@@ -0,0 +1,178 @@
|
||||
package
|
||||
|
||||
public final value class A1 {
|
||||
public constructor A1(/*0*/ x: A1)
|
||||
public final val x: A1
|
||||
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 value class A2 {
|
||||
public constructor A2(/*0*/ x: B2)
|
||||
public final val x: B2
|
||||
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 value class A3 {
|
||||
public constructor A3(/*0*/ x: B3)
|
||||
public final val x: B3
|
||||
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 value class A4 {
|
||||
public constructor A4(/*0*/ x: B4, /*1*/ y: B4)
|
||||
public final val x: B4
|
||||
public final val y: B4
|
||||
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 value class A5</*0*/ T : A5<T>> {
|
||||
public constructor A5</*0*/ T : A5<T>>(/*0*/ x: T, /*1*/ y: T)
|
||||
public final val x: T
|
||||
public final val y: 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 value class A6</*0*/ T : B6<T>> {
|
||||
public constructor A6</*0*/ T : B6<T>>(/*0*/ x: T, /*1*/ y: T)
|
||||
public final val x: T
|
||||
public final val y: 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 value class A7</*0*/ T : B7<T>> {
|
||||
public constructor A7</*0*/ T : B7<T>>(/*0*/ x: T, /*1*/ y: T)
|
||||
public final val x: T
|
||||
public final val y: 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 value class A8</*0*/ T : B8<T>> {
|
||||
public constructor A8</*0*/ T : B8<T>>(/*0*/ x: T, /*1*/ y: T)
|
||||
public final val x: T
|
||||
public final val y: 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 value class A9</*0*/ T : B9<T>> {
|
||||
public constructor A9</*0*/ T : B9<T>>(/*0*/ x: T?, /*1*/ y: T?)
|
||||
public final val x: T?
|
||||
public final val y: 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 value class B1 {
|
||||
public constructor B1(/*0*/ x: B1, /*1*/ y: B1)
|
||||
public final val x: B1
|
||||
public final val y: B1
|
||||
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 value class B2 {
|
||||
public constructor B2(/*0*/ x: A2, /*1*/ y: A2)
|
||||
public final val x: A2
|
||||
public final val y: A2
|
||||
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 value class B3 {
|
||||
public constructor B3(/*0*/ x: A3)
|
||||
public final val x: A3
|
||||
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 value class B4 {
|
||||
public constructor B4(/*0*/ x: A4, /*1*/ y: A4)
|
||||
public final val x: A4
|
||||
public final val y: A4
|
||||
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 value class B5</*0*/ T : B5<T>> {
|
||||
public constructor B5</*0*/ T : B5<T>>(/*0*/ x: T, /*1*/ y: T)
|
||||
public final val x: T
|
||||
public final val y: 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 value class B6</*0*/ T : A6<T>> {
|
||||
public constructor B6</*0*/ T : A6<T>>(/*0*/ x: T, /*1*/ y: T)
|
||||
public final val x: T
|
||||
public final val y: 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 value class B7</*0*/ T : A7<T>> {
|
||||
public constructor B7</*0*/ T : A7<T>>(/*0*/ x: T, /*1*/ y: T)
|
||||
public final val x: T
|
||||
public final val y: 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 value class B8</*0*/ T : A8<T>> {
|
||||
public constructor B8</*0*/ T : A8<T>>(/*0*/ x: T, /*1*/ y: T)
|
||||
public final val x: T
|
||||
public final val y: 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 value class B9</*0*/ T : A9<T>> {
|
||||
public constructor B9</*0*/ T : A9<T>>(/*0*/ x: T?, /*1*/ y: T?)
|
||||
public final val x: T?
|
||||
public final val y: 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 value class C4 {
|
||||
public constructor C4(/*0*/ x: D4?, /*1*/ y: D4?)
|
||||
public final val x: D4?
|
||||
public final val y: D4?
|
||||
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 value class D4 {
|
||||
public constructor D4(/*0*/ x: D4?, /*1*/ y: C4?)
|
||||
public final val x: D4?
|
||||
public final val y: C4?
|
||||
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
+42
@@ -0,0 +1,42 @@
|
||||
// FIR_IDENTICAL
|
||||
// WITH_STDLIB
|
||||
// TARGET_BACKEND: JVM_IR
|
||||
// WORKS_WHEN_VALUE_CLASS
|
||||
// LANGUAGE: +ValueClasses
|
||||
|
||||
value class Empty<T><!VALUE_CLASS_EMPTY_CONSTRUCTOR!>()<!>
|
||||
|
||||
|
||||
OPTIONAL_JVM_INLINE_ANNOTATION
|
||||
value class Foo<T>(val x: <!VALUE_CLASS_HAS_INAPPLICABLE_PARAMETER_TYPE!>T<!>, val y: <!VALUE_CLASS_HAS_INAPPLICABLE_PARAMETER_TYPE!>T<!>)
|
||||
|
||||
OPTIONAL_JVM_INLINE_ANNOTATION
|
||||
value class FooNullable<T>(val x: <!VALUE_CLASS_HAS_INAPPLICABLE_PARAMETER_TYPE!>T?<!>, val y: <!VALUE_CLASS_HAS_INAPPLICABLE_PARAMETER_TYPE!>T?<!>)
|
||||
|
||||
|
||||
OPTIONAL_JVM_INLINE_ANNOTATION
|
||||
value class FooGenericArray<T>(val x: <!VALUE_CLASS_HAS_INAPPLICABLE_PARAMETER_TYPE!>Array<T><!>, val y: <!VALUE_CLASS_HAS_INAPPLICABLE_PARAMETER_TYPE!>Array<T><!>)
|
||||
|
||||
OPTIONAL_JVM_INLINE_ANNOTATION
|
||||
value class FooGenericArray2<T>(val x: <!VALUE_CLASS_HAS_INAPPLICABLE_PARAMETER_TYPE!>Array<Array<T>><!>, val y: <!VALUE_CLASS_HAS_INAPPLICABLE_PARAMETER_TYPE!>Array<Array<T>><!>)
|
||||
|
||||
|
||||
OPTIONAL_JVM_INLINE_ANNOTATION
|
||||
value class FooStarProjectedArray(val x: Array<*>, val y: Array<*>)
|
||||
|
||||
OPTIONAL_JVM_INLINE_ANNOTATION
|
||||
value class FooStarProjectedArray2(val x: Array<Array<*>>, val y: Array<Array<*>>)
|
||||
|
||||
|
||||
OPTIONAL_JVM_INLINE_ANNOTATION
|
||||
value class Bar(val u: <!VALUE_CLASS_HAS_INAPPLICABLE_PARAMETER_TYPE!>Unit<!>, val y: <!VALUE_CLASS_HAS_INAPPLICABLE_PARAMETER_TYPE!>Unit<!>)
|
||||
|
||||
OPTIONAL_JVM_INLINE_ANNOTATION
|
||||
value class BarNullable(val u: Unit?, val y: Unit?)
|
||||
|
||||
|
||||
OPTIONAL_JVM_INLINE_ANNOTATION
|
||||
value class Baz(val u: <!VALUE_CLASS_HAS_INAPPLICABLE_PARAMETER_TYPE!>Nothing<!>, val y: <!VALUE_CLASS_HAS_INAPPLICABLE_PARAMETER_TYPE!>Nothing<!>)
|
||||
|
||||
OPTIONAL_JVM_INLINE_ANNOTATION
|
||||
value class BazNullable(val u: Nothing?, val y: Nothing?)
|
||||
compiler/testData/diagnostics/tests/valueClasses/valueClassWithForbiddenUnderlyingTypeMultiField.txt
Vendored
+98
@@ -0,0 +1,98 @@
|
||||
package
|
||||
|
||||
public final value class Bar {
|
||||
public constructor Bar(/*0*/ u: kotlin.Unit, /*1*/ y: kotlin.Unit)
|
||||
public final val u: kotlin.Unit
|
||||
public final val y: 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 value class BarNullable {
|
||||
public constructor BarNullable(/*0*/ u: kotlin.Unit?, /*1*/ y: kotlin.Unit?)
|
||||
public final val u: kotlin.Unit?
|
||||
public final val y: 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 value class Baz {
|
||||
public constructor Baz(/*0*/ u: kotlin.Nothing, /*1*/ y: kotlin.Nothing)
|
||||
public final val u: kotlin.Nothing
|
||||
public final val y: 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 value class BazNullable {
|
||||
public constructor BazNullable(/*0*/ u: kotlin.Nothing?, /*1*/ y: kotlin.Nothing?)
|
||||
public final val u: kotlin.Nothing?
|
||||
public final val y: 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 value class Empty</*0*/ T> {
|
||||
public constructor Empty</*0*/ 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 value class Foo</*0*/ T> {
|
||||
public constructor Foo</*0*/ T>(/*0*/ x: T, /*1*/ y: T)
|
||||
public final val x: T
|
||||
public final val y: 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 value class FooGenericArray</*0*/ T> {
|
||||
public constructor FooGenericArray</*0*/ T>(/*0*/ x: kotlin.Array<T>, /*1*/ y: kotlin.Array<T>)
|
||||
public final val x: kotlin.Array<T>
|
||||
public final val y: kotlin.Array<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 value class FooGenericArray2</*0*/ T> {
|
||||
public constructor FooGenericArray2</*0*/ T>(/*0*/ x: kotlin.Array<kotlin.Array<T>>, /*1*/ y: kotlin.Array<kotlin.Array<T>>)
|
||||
public final val x: kotlin.Array<kotlin.Array<T>>
|
||||
public final val y: kotlin.Array<kotlin.Array<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 value class FooNullable</*0*/ T> {
|
||||
public constructor FooNullable</*0*/ T>(/*0*/ x: T?, /*1*/ y: T?)
|
||||
public final val x: T?
|
||||
public final val y: 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 value class FooStarProjectedArray {
|
||||
public constructor FooStarProjectedArray(/*0*/ x: kotlin.Array<*>, /*1*/ y: kotlin.Array<*>)
|
||||
public final val x: kotlin.Array<*>
|
||||
public final val y: kotlin.Array<*>
|
||||
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 value class FooStarProjectedArray2 {
|
||||
public constructor FooStarProjectedArray2(/*0*/ x: kotlin.Array<kotlin.Array<*>>, /*1*/ y: kotlin.Array<kotlin.Array<*>>)
|
||||
public final val x: kotlin.Array<kotlin.Array<*>>
|
||||
public final val y: kotlin.Array<kotlin.Array<*>>
|
||||
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
|
||||
}
|
||||
Generated
+13
@@ -7,6 +7,7 @@ package org.jetbrains.kotlin.test.runners;
|
||||
|
||||
import com.intellij.testFramework.TestDataPath;
|
||||
import org.jetbrains.kotlin.test.util.KtTestUtil;
|
||||
import org.jetbrains.kotlin.test.utils.TransformersFunctions;
|
||||
import org.jetbrains.kotlin.test.TestMetadata;
|
||||
import org.junit.jupiter.api.Nested;
|
||||
import org.junit.jupiter.api.Test;
|
||||
@@ -32203,6 +32204,12 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest {
|
||||
runTest("compiler/testData/diagnostics/tests/valueClasses/propertiesWithBackingFieldsInsideValueClass.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("recursiveMultiFieldValueClasses.kt")
|
||||
public void testRecursiveMultiFieldValueClasses() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/valueClasses/recursiveMultiFieldValueClasses.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation());
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("recursiveValueClasses.kt")
|
||||
public void testRecursiveValueClasses() throws Exception {
|
||||
@@ -32257,6 +32264,12 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest {
|
||||
runTest("compiler/testData/diagnostics/tests/valueClasses/valueClassWithForbiddenUnderlyingType.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("valueClassWithForbiddenUnderlyingTypeMultiField.kt")
|
||||
public void testValueClassWithForbiddenUnderlyingTypeMultiField() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/valueClasses/valueClassWithForbiddenUnderlyingTypeMultiField.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation());
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("valueClassesInsideAnnotations.kt")
|
||||
public void testValueClassesInsideAnnotations() throws Exception {
|
||||
|
||||
+10
@@ -44692,6 +44692,16 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
|
||||
}
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestMetadata("compiler/testData/codegen/box/valueClasses")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
public class ValueClasses {
|
||||
@Test
|
||||
public void testAllFilesPresentInValueClasses() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/valueClasses"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true);
|
||||
}
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestMetadata("compiler/testData/codegen/box/vararg")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
|
||||
+22
@@ -47482,6 +47482,28 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes
|
||||
}
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestMetadata("compiler/testData/codegen/box/valueClasses")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
public class ValueClasses {
|
||||
@Test
|
||||
public void testAllFilesPresentInValueClasses() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/valueClasses"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("equality.kt")
|
||||
public void testEquality() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/valueClasses/equality.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal());
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("equality.kt")
|
||||
public void testEquality_valueClasses() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/valueClasses/equality.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation());
|
||||
}
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestMetadata("compiler/testData/codegen/box/vararg")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
|
||||
+13
@@ -36253,6 +36253,19 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/box/valueClasses")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class ValueClasses extends AbstractLightAnalysisModeTest {
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath);
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInValueClasses() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/valueClasses"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true);
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/box/vararg")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
|
||||
+1
-1
@@ -300,7 +300,7 @@ class NewTestGeneratorImpl(
|
||||
private fun TestClassModel.predefinedNativeTransformers(recursive: Boolean): List<Pair<String, String>> =
|
||||
methods.mapNotNull { method ->
|
||||
(method as? TransformingTestMethodModel)
|
||||
?.takeIf { it.registerInConstructor }
|
||||
?.takeIf { it.registerInConstructor && it.shouldBeGenerated() }
|
||||
?.let { it.source.file.invariantSeparatorsPath to it.transformer }
|
||||
} + if (recursive) innerTestClasses.flatMap { it.predefinedNativeTransformers(true) } else listOf()
|
||||
}
|
||||
|
||||
+1
-1
@@ -120,7 +120,7 @@ class SimpleTestClassModel(
|
||||
}
|
||||
}
|
||||
}
|
||||
if (result.any { it is WithoutJvmInlineTestMethodModel }) {
|
||||
if (result.any { it is TransformingTestMethodModel && it.shouldBeGenerated() }) {
|
||||
val additionalRunner =
|
||||
RunTestMethodModel(targetBackend, doTestMethodName, testRunnerMethodName, additionalRunnerArguments, withTransformer = true)
|
||||
result.add(additionalRunner)
|
||||
|
||||
+1
-1
@@ -40,7 +40,7 @@ class SingleClassTestModel(
|
||||
}
|
||||
true
|
||||
}
|
||||
if (result.any { it is WithoutJvmInlineTestMethodModel }) {
|
||||
if (result.any { it is TransformingTestMethodModel && it.shouldBeGenerated() }) {
|
||||
val additionalRunner =
|
||||
RunTestMethodModel(targetBackend, doTestMethodName, testRunnerMethodName, additionalRunnerArguments, withTransformer = true)
|
||||
result.add(additionalRunner)
|
||||
|
||||
+10
@@ -32376,6 +32376,16 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest {
|
||||
}
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestMetadata("compiler/testData/codegen/box/valueClasses")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
public class ValueClasses {
|
||||
@Test
|
||||
public void testAllFilesPresentInValueClasses() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/valueClasses"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS, true);
|
||||
}
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestMetadata("compiler/testData/codegen/box/vararg")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
|
||||
+10
@@ -32478,6 +32478,16 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest {
|
||||
}
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestMetadata("compiler/testData/codegen/box/valueClasses")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
public class ValueClasses {
|
||||
@Test
|
||||
public void testAllFilesPresentInValueClasses() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/valueClasses"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true);
|
||||
}
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestMetadata("compiler/testData/codegen/box/vararg")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
|
||||
+13
-12
@@ -14018,10 +14018,6 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest
|
||||
KotlinTestUtils.runTest0(this::doTest, TargetBackend.WASM, testDataFilePath);
|
||||
}
|
||||
|
||||
private void runTest(String testDataFilePath, java.util.function.Function<String, String> transformer) throws Exception {
|
||||
KotlinTestUtils.runTest0(path -> doTestWithTransformer(path, transformer), TargetBackend.WASM, testDataFilePath);
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInDefaultWithDefaultParameter() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/inlineClasses/defaultParameterValues/defaultWithDefaultParameter"), Pattern.compile("^([^_](.+))\\.kt$"), null, TargetBackend.WASM, true);
|
||||
}
|
||||
@@ -14035,10 +14031,6 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest
|
||||
KotlinTestUtils.runTest0(this::doTest, TargetBackend.WASM, testDataFilePath);
|
||||
}
|
||||
|
||||
private void runTest(String testDataFilePath, java.util.function.Function<String, String> transformer) throws Exception {
|
||||
KotlinTestUtils.runTest0(path -> doTestWithTransformer(path, transformer), TargetBackend.WASM, testDataFilePath);
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInOverrideFunctionWithDefaultParameter() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/inlineClasses/defaultParameterValues/overrideFunctionWithDefaultParameter"), Pattern.compile("^([^_](.+))\\.kt$"), null, TargetBackend.WASM, true);
|
||||
}
|
||||
@@ -14476,10 +14468,6 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest
|
||||
KotlinTestUtils.runTest0(this::doTest, TargetBackend.WASM, testDataFilePath);
|
||||
}
|
||||
|
||||
private void runTest(String testDataFilePath, java.util.function.Function<String, String> transformer) throws Exception {
|
||||
KotlinTestUtils.runTest0(path -> doTestWithTransformer(path, transformer), TargetBackend.WASM, testDataFilePath);
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInJvm8DefaultInterfaceMethods() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/inlineClasses/jvm8DefaultInterfaceMethods"), Pattern.compile("^([^_](.+))\\.kt$"), null, TargetBackend.WASM, true);
|
||||
}
|
||||
@@ -27187,6 +27175,19 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/box/valueClasses")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class ValueClasses extends AbstractIrCodegenBoxWasmTest {
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTest0(this::doTest, TargetBackend.WASM, testDataFilePath);
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInValueClasses() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/valueClasses"), Pattern.compile("^([^_](.+))\\.kt$"), null, TargetBackend.WASM, true);
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/box/vararg")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
|
||||
Generated
+12
-54
@@ -15966,8 +15966,6 @@ public class ExternalTestGenerated extends AbstractExternalNativeBlackBoxTest {
|
||||
register("compiler/testData/codegen/box/inlineClasses/bridgeGenerationWithInlineClassOverAny.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation());
|
||||
register("compiler/testData/codegen/box/inlineClasses/bridgesWhenInlineClassImplementsGenericInterface.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation());
|
||||
register("compiler/testData/codegen/box/inlineClasses/callComputablePropertyInsideInlineClass.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation());
|
||||
register("compiler/testData/codegen/box/inlineClasses/callSpecializedEqualsViaReflection.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation());
|
||||
register("compiler/testData/codegen/box/inlineClasses/callSpeciallyOverriddenPropertyOfInlineClass.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation());
|
||||
register("compiler/testData/codegen/box/inlineClasses/callableReferencesWithInlineClasses.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation());
|
||||
register("compiler/testData/codegen/box/inlineClasses/castInsideWhenExpression.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation());
|
||||
register("compiler/testData/codegen/box/inlineClasses/checkBoxUnboxOfArgumentsOnInlinedFunctions.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation());
|
||||
@@ -15984,11 +15982,9 @@ public class ExternalTestGenerated extends AbstractExternalNativeBlackBoxTest {
|
||||
register("compiler/testData/codegen/box/inlineClasses/checkLambdaWithInlineClassesInFunctionalType.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation());
|
||||
register("compiler/testData/codegen/box/inlineClasses/checkUnboxingResultFromTypeVariable.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation());
|
||||
register("compiler/testData/codegen/box/inlineClasses/classInInlineClassInit.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation());
|
||||
register("compiler/testData/codegen/box/inlineClasses/classLiteralOnInlineClass.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation());
|
||||
register("compiler/testData/codegen/box/inlineClasses/computablePropertyInsideInlineClass.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation());
|
||||
register("compiler/testData/codegen/box/inlineClasses/conformToComparableAndCallInterfaceMethod.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation());
|
||||
register("compiler/testData/codegen/box/inlineClasses/constructorCallableReference.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation());
|
||||
register("compiler/testData/codegen/box/inlineClasses/constructorImplVisibility.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation());
|
||||
register("compiler/testData/codegen/box/inlineClasses/correctBoxingForBranchExpressions.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation());
|
||||
register("compiler/testData/codegen/box/inlineClasses/createInlineClassInArgumentPosition.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation());
|
||||
register("compiler/testData/codegen/box/inlineClasses/crossinlineWithInlineClassInParameter.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation());
|
||||
@@ -16027,7 +16023,6 @@ public class ExternalTestGenerated extends AbstractExternalNativeBlackBoxTest {
|
||||
register("compiler/testData/codegen/box/inlineClasses/inlineClassEqualityShouldUseTotalOrderForFloatingPointData.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation());
|
||||
register("compiler/testData/codegen/box/inlineClasses/inlineClassFieldHandling.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation());
|
||||
register("compiler/testData/codegen/box/inlineClasses/inlineClassFunctionInvoke.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation());
|
||||
register("compiler/testData/codegen/box/inlineClasses/inlineClassImplementsCollection.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation());
|
||||
register("compiler/testData/codegen/box/inlineClasses/inlineClassInInitBlock.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation());
|
||||
register("compiler/testData/codegen/box/inlineClasses/inlineClassInStringTemplate.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation());
|
||||
register("compiler/testData/codegen/box/inlineClasses/inlineClassPropertyReferenceGetAndSet.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation());
|
||||
@@ -16043,19 +16038,9 @@ public class ExternalTestGenerated extends AbstractExternalNativeBlackBoxTest {
|
||||
register("compiler/testData/codegen/box/inlineClasses/inlineExtLambdaInInlineClassFun.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation());
|
||||
register("compiler/testData/codegen/box/inlineClasses/inlineExtLambdaInInlineClassFun2.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation());
|
||||
register("compiler/testData/codegen/box/inlineClasses/inlineFunctionInsideInlineClass.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation());
|
||||
register("compiler/testData/codegen/box/inlineClasses/inlineInCompanion.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation());
|
||||
register("compiler/testData/codegen/box/inlineClasses/inlineToString.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation());
|
||||
register("compiler/testData/codegen/box/inlineClasses/iterateOverArrayOfInlineClassValues.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation());
|
||||
register("compiler/testData/codegen/box/inlineClasses/iterateOverListOfInlineClassValues.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation());
|
||||
register("compiler/testData/codegen/box/inlineClasses/javaClassIntrinsicOnInlineClasses.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation());
|
||||
register("compiler/testData/codegen/box/inlineClasses/javaPrimitiveTypeIC.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation());
|
||||
register("compiler/testData/codegen/box/inlineClasses/jvmFieldInInlineClassCompanion.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation());
|
||||
register("compiler/testData/codegen/box/inlineClasses/jvmInline.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation());
|
||||
register("compiler/testData/codegen/box/inlineClasses/jvmOverloadsOnTopLevelFunctionReturningInlineClassValue.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation());
|
||||
register("compiler/testData/codegen/box/inlineClasses/jvmStaticFunInInlineClassCompanion.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation());
|
||||
register("compiler/testData/codegen/box/inlineClasses/jvmStaticPropertyAccessorInInlineClassCompanion.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation());
|
||||
register("compiler/testData/codegen/box/inlineClasses/jvmStaticVarInInlineClassCompanion.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation());
|
||||
register("compiler/testData/codegen/box/inlineClasses/kclassInAnnotation.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation());
|
||||
register("compiler/testData/codegen/box/inlineClasses/kt25246.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation());
|
||||
register("compiler/testData/codegen/box/inlineClasses/kt25750.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation());
|
||||
register("compiler/testData/codegen/box/inlineClasses/kt25771.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation());
|
||||
@@ -16083,21 +16068,16 @@ public class ExternalTestGenerated extends AbstractExternalNativeBlackBoxTest {
|
||||
register("compiler/testData/codegen/box/inlineClasses/kt38680.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation());
|
||||
register("compiler/testData/codegen/box/inlineClasses/kt38680a.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation());
|
||||
register("compiler/testData/codegen/box/inlineClasses/kt38680b.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation());
|
||||
register("compiler/testData/codegen/box/inlineClasses/kt44701_jvmOverloads.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation());
|
||||
register("compiler/testData/codegen/box/inlineClasses/kt44978.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation());
|
||||
register("compiler/testData/codegen/box/inlineClasses/kt45084.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation());
|
||||
register("compiler/testData/codegen/box/inlineClasses/kt45991.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation());
|
||||
register("compiler/testData/codegen/box/inlineClasses/kt46554.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation());
|
||||
register("compiler/testData/codegen/box/inlineClasses/kt47609.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation());
|
||||
register("compiler/testData/codegen/box/inlineClasses/kt47762.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation());
|
||||
register("compiler/testData/codegen/box/inlineClasses/kt48993.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation());
|
||||
register("compiler/testData/codegen/box/inlineClasses/mangledDefaultParameterFunction.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation());
|
||||
register("compiler/testData/codegen/box/inlineClasses/mangledSuperCalls.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation());
|
||||
register("compiler/testData/codegen/box/inlineClasses/mappingOfBoxedFlexibleInlineClassType.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation());
|
||||
register("compiler/testData/codegen/box/inlineClasses/nestedInlineClass.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation());
|
||||
register("compiler/testData/codegen/box/inlineClasses/noAssertionsOnInlineClassBasedOnNullableType.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation());
|
||||
register("compiler/testData/codegen/box/inlineClasses/noReturnTypeMangling.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation());
|
||||
register("compiler/testData/codegen/box/inlineClasses/noReturnTypeManglingJvmName.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation());
|
||||
register("compiler/testData/codegen/box/inlineClasses/nullableEqeqNonNull.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation());
|
||||
register("compiler/testData/codegen/box/inlineClasses/nullableWrapperEquality.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation());
|
||||
register("compiler/testData/codegen/box/inlineClasses/overridingFunCallingPrivateFun.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation());
|
||||
@@ -16131,7 +16111,6 @@ public class ExternalTestGenerated extends AbstractExternalNativeBlackBoxTest {
|
||||
register("compiler/testData/codegen/box/inlineClasses/unboxValueOfAnyBeforeMethodInvocation.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation());
|
||||
register("compiler/testData/codegen/box/inlineClasses/useInlineClassesInsideElvisOperator.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation());
|
||||
register("compiler/testData/codegen/box/inlineClasses/useInlineFunctionInsideInlineClass.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation());
|
||||
register("compiler/testData/codegen/box/inlineClasses/useOfInlineClassWithGenericMethodFromJava.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation());
|
||||
register("compiler/testData/codegen/box/inlineClasses/useThisInsideInlineClass.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation());
|
||||
register("compiler/testData/codegen/box/inlineClasses/whenWithSubject.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation());
|
||||
}
|
||||
@@ -17956,7 +17935,6 @@ public class ExternalTestGenerated extends AbstractExternalNativeBlackBoxTest {
|
||||
register("compiler/testData/codegen/box/inlineClasses/contextsAndAccessors/accessPrivateInlineClassMethodFromInlineLambda2.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation());
|
||||
register("compiler/testData/codegen/box/inlineClasses/contextsAndAccessors/accessPrivateInlineClassMethodFromLambda.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation());
|
||||
register("compiler/testData/codegen/box/inlineClasses/contextsAndAccessors/accessPrivateInlineClassMethodFromLambda2.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation());
|
||||
register("compiler/testData/codegen/box/inlineClasses/contextsAndAccessors/accessPrivateStaticInlineClassCompanionMethod.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation());
|
||||
register("compiler/testData/codegen/box/inlineClasses/contextsAndAccessors/captureInlineClassInstanceInLambda.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation());
|
||||
register("compiler/testData/codegen/box/inlineClasses/contextsAndAccessors/captureInlineClassInstanceInLambda2.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation());
|
||||
register("compiler/testData/codegen/box/inlineClasses/contextsAndAccessors/captureInlineClassInstanceInObject.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation());
|
||||
@@ -18239,13 +18217,6 @@ public class ExternalTestGenerated extends AbstractExternalNativeBlackBoxTest {
|
||||
@Tag("external")
|
||||
@UseExtTestCaseGroupProvider()
|
||||
public class DefaultWithDefaultParameter {
|
||||
public DefaultWithDefaultParameter() {
|
||||
register("compiler/testData/codegen/box/inlineClasses/defaultParameterValues/defaultWithDefaultParameter/all.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation());
|
||||
register("compiler/testData/codegen/box/inlineClasses/defaultParameterValues/defaultWithDefaultParameter/all-compatibility.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation());
|
||||
register("compiler/testData/codegen/box/inlineClasses/defaultParameterValues/defaultWithDefaultParameter/compatibility.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation());
|
||||
register("compiler/testData/codegen/box/inlineClasses/defaultParameterValues/defaultWithDefaultParameter/default.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testAllFilesPresentInDefaultWithDefaultParameter() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/inlineClasses/defaultParameterValues/defaultWithDefaultParameter"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.NATIVE, true);
|
||||
@@ -18258,13 +18229,6 @@ public class ExternalTestGenerated extends AbstractExternalNativeBlackBoxTest {
|
||||
@Tag("external")
|
||||
@UseExtTestCaseGroupProvider()
|
||||
public class OverrideFunctionWithDefaultParameter {
|
||||
public OverrideFunctionWithDefaultParameter() {
|
||||
register("compiler/testData/codegen/box/inlineClasses/defaultParameterValues/overrideFunctionWithDefaultParameter/all.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation());
|
||||
register("compiler/testData/codegen/box/inlineClasses/defaultParameterValues/overrideFunctionWithDefaultParameter/all-compatibility.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation());
|
||||
register("compiler/testData/codegen/box/inlineClasses/defaultParameterValues/overrideFunctionWithDefaultParameter/compatibility.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation());
|
||||
register("compiler/testData/codegen/box/inlineClasses/defaultParameterValues/overrideFunctionWithDefaultParameter/default.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testAllFilesPresentInOverrideFunctionWithDefaultParameter() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/inlineClasses/defaultParameterValues/overrideFunctionWithDefaultParameter"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.NATIVE, true);
|
||||
@@ -18364,7 +18328,6 @@ public class ExternalTestGenerated extends AbstractExternalNativeBlackBoxTest {
|
||||
register("compiler/testData/codegen/box/inlineClasses/functionNameMangling/extensionFunctionsDoNotClash.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation());
|
||||
register("compiler/testData/codegen/box/inlineClasses/functionNameMangling/functionsWithDifferentNullabilityDoNotClash.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation());
|
||||
register("compiler/testData/codegen/box/inlineClasses/functionNameMangling/genericFunctionsDoNotClash.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation());
|
||||
register("compiler/testData/codegen/box/inlineClasses/functionNameMangling/genericSignatureOfFunctionWithMangledName.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation());
|
||||
register("compiler/testData/codegen/box/inlineClasses/functionNameMangling/localClassInFunctionWithMangledName.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation());
|
||||
register("compiler/testData/codegen/box/inlineClasses/functionNameMangling/mangledFunctionsCanBeOverridden.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation());
|
||||
register("compiler/testData/codegen/box/inlineClasses/functionNameMangling/mangledFunctionsDoNotClash.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation());
|
||||
@@ -18374,7 +18337,6 @@ public class ExternalTestGenerated extends AbstractExternalNativeBlackBoxTest {
|
||||
register("compiler/testData/codegen/box/inlineClasses/functionNameMangling/overridingMethodInGenericClass2.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation());
|
||||
register("compiler/testData/codegen/box/inlineClasses/functionNameMangling/propertySetterWithInlineClassTypeArgument.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation());
|
||||
register("compiler/testData/codegen/box/inlineClasses/functionNameMangling/reflectionForFunctionWithMangledName.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation());
|
||||
register("compiler/testData/codegen/box/inlineClasses/functionNameMangling/reflectionForLocalClassInFunctionWithMangledName.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation());
|
||||
register("compiler/testData/codegen/box/inlineClasses/functionNameMangling/reflectionForPropertyOfInlineClassType.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation());
|
||||
register("compiler/testData/codegen/box/inlineClasses/functionNameMangling/syntheticAccessorForFunctionWithMangledName.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation());
|
||||
register("compiler/testData/codegen/box/inlineClasses/functionNameMangling/syntheticAccessorsForPropertyOfInlineClassType.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation());
|
||||
@@ -18854,21 +18816,6 @@ public class ExternalTestGenerated extends AbstractExternalNativeBlackBoxTest {
|
||||
@Tag("external")
|
||||
@UseExtTestCaseGroupProvider()
|
||||
public class Jvm8DefaultInterfaceMethods {
|
||||
public Jvm8DefaultInterfaceMethods() {
|
||||
register("compiler/testData/codegen/box/inlineClasses/jvm8DefaultInterfaceMethods/javaDefaultMethod.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation());
|
||||
register("compiler/testData/codegen/box/inlineClasses/jvm8DefaultInterfaceMethods/javaDefaultMethodOverriddenByKotlin.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation());
|
||||
register("compiler/testData/codegen/box/inlineClasses/jvm8DefaultInterfaceMethods/jvmDefaultAll.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation());
|
||||
register("compiler/testData/codegen/box/inlineClasses/jvm8DefaultInterfaceMethods/jvmDefaultAllPrimaryProperty.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation());
|
||||
register("compiler/testData/codegen/box/inlineClasses/jvm8DefaultInterfaceMethods/jvmDefaultAllProperty.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation());
|
||||
register("compiler/testData/codegen/box/inlineClasses/jvm8DefaultInterfaceMethods/jvmDefaultEnable.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation());
|
||||
register("compiler/testData/codegen/box/inlineClasses/jvm8DefaultInterfaceMethods/jvmDefaultEnablePrimaryProperty.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation());
|
||||
register("compiler/testData/codegen/box/inlineClasses/jvm8DefaultInterfaceMethods/jvmDefaultEnableProperty.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation());
|
||||
register("compiler/testData/codegen/box/inlineClasses/jvm8DefaultInterfaceMethods/jvmDefaultGeneric.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation());
|
||||
register("compiler/testData/codegen/box/inlineClasses/jvm8DefaultInterfaceMethods/jvmDefaultSafeCall.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation());
|
||||
register("compiler/testData/codegen/box/inlineClasses/jvm8DefaultInterfaceMethods/jvmDefaultSmartCast.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation());
|
||||
register("compiler/testData/codegen/box/inlineClasses/jvm8DefaultInterfaceMethods/jvmDefaultSuspend.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testAllFilesPresentInJvm8DefaultInterfaceMethods() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/inlineClasses/jvm8DefaultInterfaceMethods"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.NATIVE, true);
|
||||
@@ -18886,7 +18833,6 @@ public class ExternalTestGenerated extends AbstractExternalNativeBlackBoxTest {
|
||||
register("compiler/testData/codegen/box/inlineClasses/propertyDelegation/delegateClassVarToInlineClass.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation());
|
||||
register("compiler/testData/codegen/box/inlineClasses/propertyDelegation/delegateClassVarToInlineClassWithProvideDelegate.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation());
|
||||
register("compiler/testData/codegen/box/inlineClasses/propertyDelegation/delegateCompanionVarToInlineClass.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation());
|
||||
register("compiler/testData/codegen/box/inlineClasses/propertyDelegation/delegateJvmStaticCompanionVarToInlineClass.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation());
|
||||
register("compiler/testData/codegen/box/inlineClasses/propertyDelegation/delegateLocalVarToInlineClass.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation());
|
||||
register("compiler/testData/codegen/box/inlineClasses/propertyDelegation/delegateObjectVarToInlineClass.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation());
|
||||
register("compiler/testData/codegen/box/inlineClasses/propertyDelegation/delegatePrivateCompanionVarToInlineClass.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation());
|
||||
@@ -34787,6 +34733,18 @@ public class ExternalTestGenerated extends AbstractExternalNativeBlackBoxTest {
|
||||
}
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestMetadata("compiler/testData/codegen/box/valueClasses")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@Tag("external")
|
||||
@UseExtTestCaseGroupProvider()
|
||||
public class ValueClasses {
|
||||
@Test
|
||||
public void testAllFilesPresentInValueClasses() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/valueClasses"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.NATIVE, true);
|
||||
}
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestMetadata("compiler/testData/codegen/box/vararg")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
|
||||
Reference in New Issue
Block a user