diff --git a/compiler/frontend.java/src/org/jetbrains/jet/lang/resolve/kotlin/JavaDeclarationCheckerProvider.kt b/compiler/frontend.java/src/org/jetbrains/jet/lang/resolve/kotlin/JavaDeclarationCheckerProvider.kt index 8a6aaa2e7ed..0b46789e236 100644 --- a/compiler/frontend.java/src/org/jetbrains/jet/lang/resolve/kotlin/JavaDeclarationCheckerProvider.kt +++ b/compiler/frontend.java/src/org/jetbrains/jet/lang/resolve/kotlin/JavaDeclarationCheckerProvider.kt @@ -35,10 +35,21 @@ import org.jetbrains.jet.lang.descriptors.SimpleFunctionDescriptor import org.jetbrains.jet.lang.descriptors.FunctionDescriptor import org.jetbrains.jet.lang.diagnostics.Errors import org.jetbrains.jet.lang.descriptors.DeclarationDescriptor +import org.jetbrains.jet.lang.descriptors.CallableDescriptor +import org.jetbrains.jet.lang.descriptors.ClassDescriptor +import org.jetbrains.jet.lang.descriptors.TypeParameterDescriptor +import org.jetbrains.jet.lang.resolve.DescriptorToSourceUtils +import org.jetbrains.jet.lang.psi.JetTypeParameter +import org.jetbrains.jet.lang.descriptors.PackageFragmentDescriptor +import org.jetbrains.jet.lang.types.lang.KotlinBuiltIns +import org.jetbrains.jet.lang.resolve.name.Name +import org.jetbrains.jet.lang.resolve.annotations.hasIntrinsicAnnotation public object JavaDeclarationCheckerProvider : AdditionalCheckerProvider { - override val annotationCheckers: List = listOf(PlatformStaticAnnotationChecker(), LocalFunInlineChecker()) + override val annotationCheckers: List = listOf( + PlatformStaticAnnotationChecker(), LocalFunInlineChecker(), ReifiedTypeParameterAnnotationChecker() + ) } public class LocalFunInlineChecker : AnnotationChecker { @@ -85,4 +96,35 @@ public class PlatformStaticAnnotationChecker : AnnotationChecker { } } } -} \ No newline at end of file +} + +public class ReifiedTypeParameterAnnotationChecker : AnnotationChecker { + + override fun check(declaration: JetDeclaration, descriptor: DeclarationDescriptor, diagnosticHolder: DiagnosticSink) { + if (descriptor.hasIntrinsicAnnotation()) return + + if (descriptor is CallableDescriptor && !descriptor.hasInlineAnnotation()) { + checkTypeParameterDescriptorsAreNotReified(descriptor.getTypeParameters(), diagnosticHolder) + } + if (descriptor is ClassDescriptor) { + checkTypeParameterDescriptorsAreNotReified(descriptor.getTypeConstructor().getParameters(), diagnosticHolder) + } + } + +} + +private fun checkTypeParameterDescriptorsAreNotReified( + typeParameterDescriptors: List, + diagnosticHolder: DiagnosticSink +) { + for (reifiedTypeParameterDescriptor in typeParameterDescriptors.filter { it.isReified() }) { + val typeParameterDeclaration = DescriptorToSourceUtils.descriptorToDeclaration(reifiedTypeParameterDescriptor) + if (typeParameterDeclaration !is JetTypeParameter) throw AssertionError("JetTypeParameter expected") + + diagnosticHolder.report( + Errors.REIFIED_TYPE_PARAMETER_NO_INLINE.on( + typeParameterDeclaration.getModifierList().getModifier(JetTokens.REIFIED_KEYWORD)!! + ) + ) + } +} diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/diagnostics/Errors.java b/compiler/frontend/src/org/jetbrains/jet/lang/diagnostics/Errors.java index fa1e1dee223..b4a65a84dec 100644 --- a/compiler/frontend/src/org/jetbrains/jet/lang/diagnostics/Errors.java +++ b/compiler/frontend/src/org/jetbrains/jet/lang/diagnostics/Errors.java @@ -381,6 +381,7 @@ public interface Errors { DiagnosticFactory0 DANGLING_FUNCTION_LITERAL_ARGUMENT_SUSPECTED = DiagnosticFactory0.create(WARNING); DiagnosticFactory1 TYPE_PARAMETER_AS_REIFIED = DiagnosticFactory1.create(ERROR); + DiagnosticFactory0 REIFIED_TYPE_PARAMETER_NO_INLINE = DiagnosticFactory0.create(ERROR); // Type inference diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/diagnostics/rendering/DefaultErrorMessages.java b/compiler/frontend/src/org/jetbrains/jet/lang/diagnostics/rendering/DefaultErrorMessages.java index bc1d980ab57..40b44d34335 100644 --- a/compiler/frontend/src/org/jetbrains/jet/lang/diagnostics/rendering/DefaultErrorMessages.java +++ b/compiler/frontend/src/org/jetbrains/jet/lang/diagnostics/rendering/DefaultErrorMessages.java @@ -479,6 +479,7 @@ public class DefaultErrorMessages { "Separate it with a semicolon (;) if it is not intended to be an argument."); MAP.put(TYPE_PARAMETER_AS_REIFIED, "Cannot use ''{0}'' as reified type parameter. Use a class instead.", NAME); + MAP.put(REIFIED_TYPE_PARAMETER_NO_INLINE, "Only type parameters of inline functions can be reified"); MAP.put(SUPERTYPES_FOR_ANNOTATION_CLASS, "Annotation class cannot have supertypes"); MAP.put(MISSING_VAL_ON_ANNOTATION_PARAMETER, "'val' keyword is missing on annotation parameter"); diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/resolve/AnnotationUtil.kt b/compiler/frontend/src/org/jetbrains/jet/lang/resolve/AnnotationUtil.kt index 6c556c7729a..fd5b085d355 100644 --- a/compiler/frontend/src/org/jetbrains/jet/lang/resolve/AnnotationUtil.kt +++ b/compiler/frontend/src/org/jetbrains/jet/lang/resolve/AnnotationUtil.kt @@ -30,6 +30,10 @@ public fun DeclarationDescriptor.hasPlatformStaticAnnotation(): Boolean { return getAnnotations().findAnnotation(FqName("kotlin.platform.platformStatic")) != null } +public fun DeclarationDescriptor.hasIntrinsicAnnotation(): Boolean { + return getAnnotations().findAnnotation(FqName("kotlin.jvm.internal.Intrinsic")) != null +} + public fun CallableDescriptor.isPlatformStaticInObject(): Boolean = DescriptorUtils.isObject(getContainingDeclaration()) && hasPlatformStaticAnnotation() diff --git a/compiler/testData/diagnostics/tests/generics/tpAsReified/Conventions.kt b/compiler/testData/diagnostics/tests/generics/tpAsReified/Conventions.kt index ef8f2582c9a..797d5cdff9e 100644 --- a/compiler/testData/diagnostics/tests/generics/tpAsReified/Conventions.kt +++ b/compiler/testData/diagnostics/tests/generics/tpAsReified/Conventions.kt @@ -1,6 +1,8 @@ -fun T.plus(p: T): T = this +// !DIAGNOSTICS: -NOTHING_TO_INLINE -UNUSED_PARAMETER -fun T.invoke(): T = this +inline fun T.plus(p: T): T = this + +inline fun T.invoke(): T = this fun main(tp: A, any: Any) { tp + tp diff --git a/compiler/testData/diagnostics/tests/generics/tpAsReified/Conventions.lazy.log b/compiler/testData/diagnostics/tests/generics/tpAsReified/Conventions.lazy.log index 20be73cfaf7..32d8090b260 100644 --- a/compiler/testData/diagnostics/tests/generics/tpAsReified/Conventions.lazy.log +++ b/compiler/testData/diagnostics/tests/generics/tpAsReified/Conventions.lazy.log @@ -1,51 +1,67 @@ -LazyJavaPackageFragmentProvider@0 { - packageFragments('': FqName@1) = LazyJavaPackageFragment@2[''] - packageFragments('A': FqName@3) = null - packageFragments('Any': FqName@4) = null - packageFragments('T': FqName@5) = null - packageFragments('java': FqName@6) = LazyJavaPackageFragment@7['java'] - packageFragments('java.lang': FqName@8) = LazyJavaPackageFragment@9['lang'] - packageFragments('java.lang.A': FqName@10) = null - packageFragments('java.lang.Any': FqName@11) = null - packageFragments('java.lang.T': FqName@12) = null - packageFragments('kotlin': FqName@13) = null - packageFragments('kotlin.A': FqName@14) = null - packageFragments('kotlin.Any': FqName@15) = null - packageFragments('kotlin.T': FqName@16) = null - packageFragments('kotlin.io': FqName@17) = null - packageFragments('kotlin.jvm': FqName@18) = null +LazyAnnotationDescriptor@0 { + resolutionResults = OverloadResolutionResultsImpl@1 + type = JetTypeImpl@2['inline'] + valueArguments(ValueParameterDescriptorImpl@3['strategy']) = null } -LazyJavaPackageFragment@2[''] { - classes('Any': Name@19) = null // through LazyPackageFragmentScopeForJavaPackage@20 - classes('any': Name@21) = null // through LazyPackageFragmentScopeForJavaPackage@20 - classes('invoke': Name@22) = null // through LazyPackageFragmentScopeForJavaPackage@20 - classes('plus': Name@23) = null // through LazyPackageFragmentScopeForJavaPackage@20 - classes('tp': Name@24) = null // through LazyPackageFragmentScopeForJavaPackage@20 - deserializedPackageScope = Empty@25 // through LazyPackageFragmentScopeForJavaPackage@20 - functions('any': Name@21) = EmptyList@26[empty] // through LazyPackageFragmentScopeForJavaPackage@20 - functions('invoke': Name@22) = EmptyList@26[empty] // through LazyPackageFragmentScopeForJavaPackage@20 - functions('plus': Name@23) = EmptyList@26[empty] // through LazyPackageFragmentScopeForJavaPackage@20 - functions('tp': Name@24) = EmptyList@26[empty] // through LazyPackageFragmentScopeForJavaPackage@20 - memberIndex = computeMemberIndex$1@27 // through LazyPackageFragmentScopeForJavaPackage@20 +LazyAnnotationDescriptor@4 { + resolutionResults = OverloadResolutionResultsImpl@5 + type = JetTypeImpl@6['inline'] + valueArguments(ValueParameterDescriptorImpl@3['strategy']) = null } -LazyJavaPackageFragment@7['java'] { - classes('lang': Name@28) = null // through LazyPackageFragmentScopeForJavaPackage@29 - deserializedPackageScope = Empty@25 // through LazyPackageFragmentScopeForJavaPackage@29 - functions('lang': Name@30) = EmptyList@26[empty] // through LazyPackageFragmentScopeForJavaPackage@29 - memberIndex = computeMemberIndex$1@31 // through LazyPackageFragmentScopeForJavaPackage@29 +LazyJavaPackageFragmentProvider@7 { + packageFragments('': FqName@8) = LazyJavaPackageFragment@9[''] + packageFragments('A': FqName@10) = null + packageFragments('Any': FqName@11) = null + packageFragments('T': FqName@12) = null + packageFragments('inline': FqName@13) = null + packageFragments('java': FqName@14) = LazyJavaPackageFragment@15['java'] + packageFragments('java.lang': FqName@16) = LazyJavaPackageFragment@17['lang'] + packageFragments('java.lang.A': FqName@18) = null + packageFragments('java.lang.Any': FqName@19) = null + packageFragments('java.lang.T': FqName@20) = null + packageFragments('java.lang.inline': FqName@21) = null + packageFragments('kotlin': FqName@22) = null + packageFragments('kotlin.A': FqName@23) = null + packageFragments('kotlin.Any': FqName@24) = null + packageFragments('kotlin.T': FqName@25) = null + packageFragments('kotlin.inline': FqName@26) = null + packageFragments('kotlin.io': FqName@27) = null + packageFragments('kotlin.jvm': FqName@28) = null } -LazyJavaPackageFragment@9['lang'] { - classes('any': Name@21) = null // through LazyPackageFragmentScopeForJavaPackage@32 - classes('invoke': Name@22) = null // through LazyPackageFragmentScopeForJavaPackage@32 - classes('plus': Name@23) = null // through LazyPackageFragmentScopeForJavaPackage@32 - classes('tp': Name@24) = null // through LazyPackageFragmentScopeForJavaPackage@32 - deserializedPackageScope = Empty@25 // through LazyPackageFragmentScopeForJavaPackage@32 - functions('any': Name@21) = EmptyList@26[empty] // through LazyPackageFragmentScopeForJavaPackage@32 - functions('invoke': Name@22) = EmptyList@26[empty] // through LazyPackageFragmentScopeForJavaPackage@32 - functions('plus': Name@23) = EmptyList@26[empty] // through LazyPackageFragmentScopeForJavaPackage@32 - functions('tp': Name@24) = EmptyList@26[empty] // through LazyPackageFragmentScopeForJavaPackage@32 - memberIndex = computeMemberIndex$1@33 // through LazyPackageFragmentScopeForJavaPackage@32 +LazyJavaPackageFragment@9[''] { + classes('Any': Name@29) = null // through LazyPackageFragmentScopeForJavaPackage@30 + classes('any': Name@31) = null // through LazyPackageFragmentScopeForJavaPackage@30 + classes('inline': Name@32) = null // through LazyPackageFragmentScopeForJavaPackage@30 + classes('invoke': Name@33) = null // through LazyPackageFragmentScopeForJavaPackage@30 + classes('plus': Name@34) = null // through LazyPackageFragmentScopeForJavaPackage@30 + classes('tp': Name@35) = null // through LazyPackageFragmentScopeForJavaPackage@30 + deserializedPackageScope = Empty@36 // through LazyPackageFragmentScopeForJavaPackage@30 + functions('any': Name@31) = EmptyList@37[empty] // through LazyPackageFragmentScopeForJavaPackage@30 + functions('invoke': Name@33) = EmptyList@37[empty] // through LazyPackageFragmentScopeForJavaPackage@30 + functions('plus': Name@34) = EmptyList@37[empty] // through LazyPackageFragmentScopeForJavaPackage@30 + functions('tp': Name@35) = EmptyList@37[empty] // through LazyPackageFragmentScopeForJavaPackage@30 + memberIndex = computeMemberIndex$1@38 // through LazyPackageFragmentScopeForJavaPackage@30 +} + +LazyJavaPackageFragment@15['java'] { + classes('lang': Name@39) = null // through LazyPackageFragmentScopeForJavaPackage@40 + deserializedPackageScope = Empty@36 // through LazyPackageFragmentScopeForJavaPackage@40 + functions('lang': Name@41) = EmptyList@37[empty] // through LazyPackageFragmentScopeForJavaPackage@40 + memberIndex = computeMemberIndex$1@42 // through LazyPackageFragmentScopeForJavaPackage@40 +} + +LazyJavaPackageFragment@17['lang'] { + classes('any': Name@31) = null // through LazyPackageFragmentScopeForJavaPackage@43 + classes('invoke': Name@33) = null // through LazyPackageFragmentScopeForJavaPackage@43 + classes('plus': Name@34) = null // through LazyPackageFragmentScopeForJavaPackage@43 + classes('tp': Name@35) = null // through LazyPackageFragmentScopeForJavaPackage@43 + deserializedPackageScope = Empty@36 // through LazyPackageFragmentScopeForJavaPackage@43 + functions('any': Name@31) = EmptyList@37[empty] // through LazyPackageFragmentScopeForJavaPackage@43 + functions('invoke': Name@33) = EmptyList@37[empty] // through LazyPackageFragmentScopeForJavaPackage@43 + functions('plus': Name@34) = EmptyList@37[empty] // through LazyPackageFragmentScopeForJavaPackage@43 + functions('tp': Name@35) = EmptyList@37[empty] // through LazyPackageFragmentScopeForJavaPackage@43 + memberIndex = computeMemberIndex$1@44 // through LazyPackageFragmentScopeForJavaPackage@43 } diff --git a/compiler/testData/diagnostics/tests/generics/tpAsReified/Conventions.txt b/compiler/testData/diagnostics/tests/generics/tpAsReified/Conventions.txt index 8b0fa168830..d6a8da2d430 100644 --- a/compiler/testData/diagnostics/tests/generics/tpAsReified/Conventions.txt +++ b/compiler/testData/diagnostics/tests/generics/tpAsReified/Conventions.txt @@ -1,5 +1,5 @@ package internal fun main(/*0*/ tp: A, /*1*/ any: kotlin.Any): kotlin.Unit -internal fun T.invoke(): T -internal fun T.plus(/*0*/ p: T): T +kotlin.inline() internal fun T.invoke(): T +kotlin.inline() internal fun T.plus(/*0*/ p: T): T diff --git a/compiler/testData/diagnostics/tests/generics/tpAsReified/InConstructor.kt b/compiler/testData/diagnostics/tests/generics/tpAsReified/InConstructor.kt index 66d837295c6..24641a0eaca 100644 --- a/compiler/testData/diagnostics/tests/generics/tpAsReified/InConstructor.kt +++ b/compiler/testData/diagnostics/tests/generics/tpAsReified/InConstructor.kt @@ -1,4 +1,4 @@ -class C +class C<reified T> fun id(p: T): T = p diff --git a/compiler/testData/diagnostics/tests/generics/tpAsReified/InFunction.kt b/compiler/testData/diagnostics/tests/generics/tpAsReified/InFunction.kt index 9e7d62fc243..dd116955fca 100644 --- a/compiler/testData/diagnostics/tests/generics/tpAsReified/InFunction.kt +++ b/compiler/testData/diagnostics/tests/generics/tpAsReified/InFunction.kt @@ -1,4 +1,6 @@ -fun f(): T = throw UnsupportedOperationException() +// !DIAGNOSTICS: -NOTHING_TO_INLINE -UNUSED_PARAMETER + +inline fun f(): T = throw UnsupportedOperationException() fun id(p: T): T = p diff --git a/compiler/testData/diagnostics/tests/generics/tpAsReified/InFunction.lazy.log b/compiler/testData/diagnostics/tests/generics/tpAsReified/InFunction.lazy.log index c4da0086d56..506a595f85c 100644 --- a/compiler/testData/diagnostics/tests/generics/tpAsReified/InFunction.lazy.log +++ b/compiler/testData/diagnostics/tests/generics/tpAsReified/InFunction.lazy.log @@ -1,150 +1,160 @@ -LazyJavaClassDescriptor@0['Exception'] { - typeConstructor = LazyJavaClassTypeConstructor@1['Exception'] +LazyAnnotationDescriptor@0 { + resolutionResults = OverloadResolutionResultsImpl@1 + type = JetTypeImpl@2['inline'] + valueArguments(ValueParameterDescriptorImpl@3['strategy']) = null } -LazyJavaClassDescriptor@2['RuntimeException'] { - typeConstructor = LazyJavaClassTypeConstructor@3['RuntimeException'] +LazyJavaClassDescriptor@4['Exception'] { + typeConstructor = LazyJavaClassTypeConstructor@5['Exception'] } -LazyJavaClassDescriptor@4['UnsupportedOperationException'] { - constructors = ArrayList@5[4] { JavaConstructorDescriptor@6[''], JavaConstructorDescriptor@7[''], JavaConstructorDescriptor@8[''], ... } // through LazyJavaClassMemberScope@9 - defaultType = JetTypeImpl@10['UnsupportedOperationException'] +LazyJavaClassDescriptor@6['RuntimeException'] { + typeConstructor = LazyJavaClassTypeConstructor@7['RuntimeException'] +} + +LazyJavaClassDescriptor@8['UnsupportedOperationException'] { + constructors = ArrayList@9[4] { JavaConstructorDescriptor@10[''], JavaConstructorDescriptor@11[''], JavaConstructorDescriptor@12[''], ... } // through LazyJavaClassMemberScope@13 + defaultType = JetTypeImpl@14['UnsupportedOperationException'] functionTypeForSamInterface = null - typeConstructor = LazyJavaClassTypeConstructor@11['UnsupportedOperationException'] + typeConstructor = LazyJavaClassTypeConstructor@15['UnsupportedOperationException'] } -LazyJavaClassTypeConstructor@1['Exception'] { - parameters = ArrayList@12[empty] - supertypes = ArrayList@13[1] { LazyJavaClassifierType@14['Throwable'] } +LazyJavaClassTypeConstructor@5['Exception'] { + parameters = ArrayList@16[empty] + supertypes = ArrayList@17[1] { LazyJavaClassifierType@18['Throwable'] } } -LazyJavaClassTypeConstructor@3['RuntimeException'] { - parameters = ArrayList@15[empty] - supertypes = ArrayList@16[1] { LazyJavaClassifierType@17['Exception'] } +LazyJavaClassTypeConstructor@7['RuntimeException'] { + parameters = ArrayList@19[empty] + supertypes = ArrayList@20[1] { LazyJavaClassifierType@21['Exception'] } } -LazyJavaClassTypeConstructor@11['UnsupportedOperationException'] { - parameters = ArrayList@18[empty] - supertypes = ArrayList@19[1] { LazyJavaClassifierType@20['RuntimeException'] } +LazyJavaClassTypeConstructor@15['UnsupportedOperationException'] { + parameters = ArrayList@22[empty] + supertypes = ArrayList@23[1] { LazyJavaClassifierType@24['RuntimeException'] } } -LazyJavaClassifierType@17['Exception'] { - arguments = ArrayList@21[empty] - classifier = JavaClassImpl@22['Exception'] - typeConstructor = LazyJavaClassTypeConstructor@1['Exception'] +LazyJavaClassifierType@21['Exception'] { + arguments = ArrayList@25[empty] + classifier = JavaClassImpl@26['Exception'] + typeConstructor = LazyJavaClassTypeConstructor@5['Exception'] } -LazyJavaClassifierType@20['RuntimeException'] { - arguments = ArrayList@23[empty] - classifier = JavaClassImpl@24['RuntimeException'] - typeConstructor = LazyJavaClassTypeConstructor@3['RuntimeException'] +LazyJavaClassifierType@24['RuntimeException'] { + arguments = ArrayList@27[empty] + classifier = JavaClassImpl@28['RuntimeException'] + typeConstructor = LazyJavaClassTypeConstructor@7['RuntimeException'] } -LazyJavaClassifierType@25['String'] { - arguments = ArrayList@26[empty] - classifier = JavaClassImpl@27['String'] - nullable = 'false': Boolean@28 - typeConstructor = DeserializedClassTypeConstructor@29 +LazyJavaClassifierType@29['String'] { + arguments = ArrayList@30[empty] + classifier = JavaClassImpl@31['String'] + nullable = 'false': Boolean@32 + typeConstructor = DeserializedClassTypeConstructor@33 } -LazyJavaClassifierType@30['String'] { - arguments = ArrayList@31[empty] - classifier = JavaClassImpl@32['String'] - nullable = 'false': Boolean@28 - typeConstructor = DeserializedClassTypeConstructor@29 +LazyJavaClassifierType@34['String'] { + arguments = ArrayList@35[empty] + classifier = JavaClassImpl@36['String'] + nullable = 'false': Boolean@32 + typeConstructor = DeserializedClassTypeConstructor@33 } -LazyJavaClassifierType@33['String'] { - arguments = ArrayList@34[empty] - classifier = JavaClassImpl@32['String'] - nullable = 'true': Boolean@35 - typeConstructor = DeserializedClassTypeConstructor@29 +LazyJavaClassifierType@37['String'] { + arguments = ArrayList@38[empty] + classifier = JavaClassImpl@36['String'] + nullable = 'true': Boolean@39 + typeConstructor = DeserializedClassTypeConstructor@33 } -LazyJavaClassifierType@36['String'] { - arguments = ArrayList@37[empty] - classifier = JavaClassImpl@27['String'] - nullable = 'true': Boolean@35 - typeConstructor = DeserializedClassTypeConstructor@29 -} - -LazyJavaClassifierType@38['Throwable'] { - arguments = ArrayList@39[empty] - classifier = JavaClassImpl@40['Throwable'] - nullable = 'false': Boolean@28 - typeConstructor = DeserializedClassTypeConstructor@41 +LazyJavaClassifierType@40['String'] { + arguments = ArrayList@41[empty] + classifier = JavaClassImpl@31['String'] + nullable = 'true': Boolean@39 + typeConstructor = DeserializedClassTypeConstructor@33 } LazyJavaClassifierType@42['Throwable'] { arguments = ArrayList@43[empty] classifier = JavaClassImpl@44['Throwable'] - nullable = 'false': Boolean@28 - typeConstructor = DeserializedClassTypeConstructor@41 + nullable = 'false': Boolean@32 + typeConstructor = DeserializedClassTypeConstructor@45 } -LazyJavaClassifierType@45['Throwable'] { - arguments = ArrayList@46[empty] - classifier = JavaClassImpl@40['Throwable'] - nullable = 'true': Boolean@35 - typeConstructor = DeserializedClassTypeConstructor@41 +LazyJavaClassifierType@46['Throwable'] { + arguments = ArrayList@47[empty] + classifier = JavaClassImpl@48['Throwable'] + nullable = 'false': Boolean@32 + typeConstructor = DeserializedClassTypeConstructor@45 } -LazyJavaClassifierType@47['Throwable'] { - arguments = ArrayList@48[empty] +LazyJavaClassifierType@49['Throwable'] { + arguments = ArrayList@50[empty] + classifier = JavaClassImpl@48['Throwable'] + nullable = 'true': Boolean@39 + typeConstructor = DeserializedClassTypeConstructor@45 +} + +LazyJavaClassifierType@51['Throwable'] { + arguments = ArrayList@52[empty] classifier = JavaClassImpl@44['Throwable'] - nullable = 'true': Boolean@35 - typeConstructor = DeserializedClassTypeConstructor@41 + nullable = 'true': Boolean@39 + typeConstructor = DeserializedClassTypeConstructor@45 } -LazyJavaClassifierType@14['Throwable'] { - arguments = ArrayList@49[empty] - classifier = JavaClassImpl@50['Throwable'] - typeConstructor = DeserializedClassTypeConstructor@41 +LazyJavaClassifierType@18['Throwable'] { + arguments = ArrayList@53[empty] + classifier = JavaClassImpl@54['Throwable'] + typeConstructor = DeserializedClassTypeConstructor@45 } -LazyJavaPackageFragmentProvider@51 { - packageFragments('': FqName@52) = LazyJavaPackageFragment@53[''] - packageFragments('A': FqName@54) = null - packageFragments('Int': FqName@55) = null - packageFragments('T': FqName@56) = null - packageFragments('java': FqName@57) = LazyJavaPackageFragment@58['java'] - packageFragments('java.lang': FqName@59) = LazyJavaPackageFragment@60['lang'] - packageFragments('java.lang.A': FqName@61) = null - packageFragments('java.lang.Int': FqName@62) = null - packageFragments('java.lang.T': FqName@63) = null - packageFragments('kotlin': FqName@64) = null - packageFragments('kotlin.A': FqName@65) = null - packageFragments('kotlin.Int': FqName@66) = null - packageFragments('kotlin.T': FqName@67) = null - packageFragments('kotlin.io': FqName@68) = null - packageFragments('kotlin.jvm': FqName@69) = null - topLevelClasses(JavaClassImpl@22['Exception']) = LazyJavaClassDescriptor@0['Exception'] - topLevelClasses(JavaClassImpl@24['RuntimeException']) = LazyJavaClassDescriptor@2['RuntimeException'] - topLevelClasses(JavaClassImpl@70['UnsupportedOperationException']) = LazyJavaClassDescriptor@4['UnsupportedOperationException'] +LazyJavaPackageFragmentProvider@55 { + packageFragments('': FqName@56) = LazyJavaPackageFragment@57[''] + packageFragments('A': FqName@58) = null + packageFragments('Int': FqName@59) = null + packageFragments('T': FqName@60) = null + packageFragments('inline': FqName@61) = null + packageFragments('java': FqName@62) = LazyJavaPackageFragment@63['java'] + packageFragments('java.lang': FqName@64) = LazyJavaPackageFragment@65['lang'] + packageFragments('java.lang.A': FqName@66) = null + packageFragments('java.lang.Int': FqName@67) = null + packageFragments('java.lang.T': FqName@68) = null + packageFragments('java.lang.inline': FqName@69) = null + packageFragments('kotlin': FqName@70) = null + packageFragments('kotlin.A': FqName@71) = null + packageFragments('kotlin.Int': FqName@72) = null + packageFragments('kotlin.T': FqName@73) = null + packageFragments('kotlin.inline': FqName@74) = null + packageFragments('kotlin.io': FqName@75) = null + packageFragments('kotlin.jvm': FqName@76) = null + topLevelClasses(JavaClassImpl@26['Exception']) = LazyJavaClassDescriptor@4['Exception'] + topLevelClasses(JavaClassImpl@28['RuntimeException']) = LazyJavaClassDescriptor@6['RuntimeException'] + topLevelClasses(JavaClassImpl@77['UnsupportedOperationException']) = LazyJavaClassDescriptor@8['UnsupportedOperationException'] } -LazyJavaPackageFragment@53[''] { - classes('Int': Name@71) = null // through LazyPackageFragmentScopeForJavaPackage@72 - classes('UnsupportedOperationException': Name@73) = null // through LazyPackageFragmentScopeForJavaPackage@72 - classes('f': Name@74) = null // through LazyPackageFragmentScopeForJavaPackage@72 - deserializedPackageScope = Empty@75 // through LazyPackageFragmentScopeForJavaPackage@72 - functions('UnsupportedOperationException': Name@73) = EmptyList@76[empty] // through LazyPackageFragmentScopeForJavaPackage@72 - functions('f': Name@74) = EmptyList@76[empty] // through LazyPackageFragmentScopeForJavaPackage@72 - memberIndex = computeMemberIndex$1@77 // through LazyPackageFragmentScopeForJavaPackage@72 +LazyJavaPackageFragment@57[''] { + classes('Int': Name@78) = null // through LazyPackageFragmentScopeForJavaPackage@79 + classes('UnsupportedOperationException': Name@80) = null // through LazyPackageFragmentScopeForJavaPackage@79 + classes('f': Name@81) = null // through LazyPackageFragmentScopeForJavaPackage@79 + classes('inline': Name@82) = null // through LazyPackageFragmentScopeForJavaPackage@79 + deserializedPackageScope = Empty@83 // through LazyPackageFragmentScopeForJavaPackage@79 + functions('UnsupportedOperationException': Name@80) = EmptyList@84[empty] // through LazyPackageFragmentScopeForJavaPackage@79 + functions('f': Name@81) = EmptyList@84[empty] // through LazyPackageFragmentScopeForJavaPackage@79 + memberIndex = computeMemberIndex$1@85 // through LazyPackageFragmentScopeForJavaPackage@79 } -LazyJavaPackageFragment@58['java'] { - classes('lang': Name@78) = null // through LazyPackageFragmentScopeForJavaPackage@79 - deserializedPackageScope = Empty@75 // through LazyPackageFragmentScopeForJavaPackage@79 - functions('lang': Name@80) = EmptyList@76[empty] // through LazyPackageFragmentScopeForJavaPackage@79 - memberIndex = computeMemberIndex$1@81 // through LazyPackageFragmentScopeForJavaPackage@79 +LazyJavaPackageFragment@63['java'] { + classes('lang': Name@86) = null // through LazyPackageFragmentScopeForJavaPackage@87 + deserializedPackageScope = Empty@83 // through LazyPackageFragmentScopeForJavaPackage@87 + functions('lang': Name@88) = EmptyList@84[empty] // through LazyPackageFragmentScopeForJavaPackage@87 + memberIndex = computeMemberIndex$1@89 // through LazyPackageFragmentScopeForJavaPackage@87 } -LazyJavaPackageFragment@60['lang'] { - classes('UnsupportedOperationException': Name@73) = LazyJavaClassDescriptor@4['UnsupportedOperationException'] // through LazyPackageFragmentScopeForJavaPackage@82 - classes('f': Name@74) = null // through LazyPackageFragmentScopeForJavaPackage@82 - deserializedPackageScope = Empty@75 // through LazyPackageFragmentScopeForJavaPackage@82 - functions('UnsupportedOperationException': Name@73) = EmptyList@76[empty] // through LazyPackageFragmentScopeForJavaPackage@82 - functions('f': Name@74) = EmptyList@76[empty] // through LazyPackageFragmentScopeForJavaPackage@82 - memberIndex = computeMemberIndex$1@83 // through LazyPackageFragmentScopeForJavaPackage@82 +LazyJavaPackageFragment@65['lang'] { + classes('UnsupportedOperationException': Name@80) = LazyJavaClassDescriptor@8['UnsupportedOperationException'] // through LazyPackageFragmentScopeForJavaPackage@90 + classes('f': Name@81) = null // through LazyPackageFragmentScopeForJavaPackage@90 + deserializedPackageScope = Empty@83 // through LazyPackageFragmentScopeForJavaPackage@90 + functions('UnsupportedOperationException': Name@80) = EmptyList@84[empty] // through LazyPackageFragmentScopeForJavaPackage@90 + functions('f': Name@81) = EmptyList@84[empty] // through LazyPackageFragmentScopeForJavaPackage@90 + memberIndex = computeMemberIndex$1@91 // through LazyPackageFragmentScopeForJavaPackage@90 } diff --git a/compiler/testData/diagnostics/tests/generics/tpAsReified/InFunction.txt b/compiler/testData/diagnostics/tests/generics/tpAsReified/InFunction.txt index 1d353e04283..7a3fe97c15a 100644 --- a/compiler/testData/diagnostics/tests/generics/tpAsReified/InFunction.txt +++ b/compiler/testData/diagnostics/tests/generics/tpAsReified/InFunction.txt @@ -1,5 +1,5 @@ package -internal fun f(): T +kotlin.inline() internal fun f(): T internal fun id(/*0*/ p: T): T internal fun main(): kotlin.Unit diff --git a/compiler/testData/diagnostics/tests/generics/tpAsReified/InProperty.kt b/compiler/testData/diagnostics/tests/generics/tpAsReified/InProperty.kt index 79a8acc836b..55431d2d0f0 100644 --- a/compiler/testData/diagnostics/tests/generics/tpAsReified/InProperty.kt +++ b/compiler/testData/diagnostics/tests/generics/tpAsReified/InProperty.kt @@ -1,4 +1,4 @@ -val v: T +val <reified T> v: T get() = throw UnsupportedOperationException() fun id(p: T): T = p diff --git a/compiler/testData/diagnostics/tests/generics/tpAsReified/InType.kt b/compiler/testData/diagnostics/tests/generics/tpAsReified/InType.kt index bfe498fe7fd..9fc73d5ca1d 100644 --- a/compiler/testData/diagnostics/tests/generics/tpAsReified/InType.kt +++ b/compiler/testData/diagnostics/tests/generics/tpAsReified/InType.kt @@ -1,4 +1,4 @@ -class C +class C<reified T> fun main(p1: C, p2: C) { } \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/generics/tpAsReified/InlineableReified.kt b/compiler/testData/diagnostics/tests/generics/tpAsReified/InlineableReified.kt new file mode 100644 index 00000000000..a4fdc6c2574 --- /dev/null +++ b/compiler/testData/diagnostics/tests/generics/tpAsReified/InlineableReified.kt @@ -0,0 +1,8 @@ +// !DIAGNOSTICS: -NOTHING_TO_INLINE -UNUSED_PARAMETER + +inline fun bar(x: T1, y: T2): T2 = y +inline fun foo(z: R): R = bar(1, z) + +fun box() { + foo("abc") +} diff --git a/compiler/testData/diagnostics/tests/generics/tpAsReified/InlineableReified.lazy.log b/compiler/testData/diagnostics/tests/generics/tpAsReified/InlineableReified.lazy.log new file mode 100644 index 00000000000..31c81196e64 --- /dev/null +++ b/compiler/testData/diagnostics/tests/generics/tpAsReified/InlineableReified.lazy.log @@ -0,0 +1,58 @@ +LazyAnnotationDescriptor@0 { + resolutionResults = OverloadResolutionResultsImpl@1 + type = JetTypeImpl@2['inline'] + valueArguments(ValueParameterDescriptorImpl@3['strategy']) = null +} + +LazyAnnotationDescriptor@4 { + resolutionResults = OverloadResolutionResultsImpl@5 + type = JetTypeImpl@6['inline'] + valueArguments(ValueParameterDescriptorImpl@3['strategy']) = null +} + +LazyJavaPackageFragmentProvider@7 { + packageFragments('': FqName@8) = LazyJavaPackageFragment@9[''] + packageFragments('R': FqName@10) = null + packageFragments('T1': FqName@11) = null + packageFragments('T2': FqName@12) = null + packageFragments('inline': FqName@13) = null + packageFragments('java': FqName@14) = LazyJavaPackageFragment@15['java'] + packageFragments('java.lang': FqName@16) = LazyJavaPackageFragment@17['lang'] + packageFragments('java.lang.R': FqName@18) = null + packageFragments('java.lang.T1': FqName@19) = null + packageFragments('java.lang.T2': FqName@20) = null + packageFragments('java.lang.inline': FqName@21) = null + packageFragments('kotlin': FqName@22) = null + packageFragments('kotlin.R': FqName@23) = null + packageFragments('kotlin.T1': FqName@24) = null + packageFragments('kotlin.T2': FqName@25) = null + packageFragments('kotlin.inline': FqName@26) = null + packageFragments('kotlin.io': FqName@27) = null + packageFragments('kotlin.jvm': FqName@28) = null +} + +LazyJavaPackageFragment@9[''] { + classes('bar': Name@29) = null // through LazyPackageFragmentScopeForJavaPackage@30 + classes('foo': Name@31) = null // through LazyPackageFragmentScopeForJavaPackage@30 + classes('inline': Name@32) = null // through LazyPackageFragmentScopeForJavaPackage@30 + deserializedPackageScope = Empty@33 // through LazyPackageFragmentScopeForJavaPackage@30 + functions('bar': Name@29) = EmptyList@34[empty] // through LazyPackageFragmentScopeForJavaPackage@30 + functions('foo': Name@31) = EmptyList@34[empty] // through LazyPackageFragmentScopeForJavaPackage@30 + memberIndex = computeMemberIndex$1@35 // through LazyPackageFragmentScopeForJavaPackage@30 +} + +LazyJavaPackageFragment@15['java'] { + classes('lang': Name@36) = null // through LazyPackageFragmentScopeForJavaPackage@37 + deserializedPackageScope = Empty@33 // through LazyPackageFragmentScopeForJavaPackage@37 + functions('lang': Name@38) = EmptyList@34[empty] // through LazyPackageFragmentScopeForJavaPackage@37 + memberIndex = computeMemberIndex$1@39 // through LazyPackageFragmentScopeForJavaPackage@37 +} + +LazyJavaPackageFragment@17['lang'] { + classes('bar': Name@29) = null // through LazyPackageFragmentScopeForJavaPackage@40 + classes('foo': Name@31) = null // through LazyPackageFragmentScopeForJavaPackage@40 + deserializedPackageScope = Empty@33 // through LazyPackageFragmentScopeForJavaPackage@40 + functions('bar': Name@29) = EmptyList@34[empty] // through LazyPackageFragmentScopeForJavaPackage@40 + functions('foo': Name@31) = EmptyList@34[empty] // through LazyPackageFragmentScopeForJavaPackage@40 + memberIndex = computeMemberIndex$1@41 // through LazyPackageFragmentScopeForJavaPackage@40 +} diff --git a/compiler/testData/diagnostics/tests/generics/tpAsReified/InlineableReified.txt b/compiler/testData/diagnostics/tests/generics/tpAsReified/InlineableReified.txt new file mode 100644 index 00000000000..43cf27f68b0 --- /dev/null +++ b/compiler/testData/diagnostics/tests/generics/tpAsReified/InlineableReified.txt @@ -0,0 +1,5 @@ +package + +kotlin.inline() internal fun bar(/*0*/ x: T1, /*1*/ y: T2): T2 +internal fun box(): kotlin.Unit +kotlin.inline() internal fun foo(/*0*/ z: R): R \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/generics/tpAsReified/LocalFun.kt b/compiler/testData/diagnostics/tests/generics/tpAsReified/LocalFun.kt new file mode 100644 index 00000000000..2af48e7f4cf --- /dev/null +++ b/compiler/testData/diagnostics/tests/generics/tpAsReified/LocalFun.kt @@ -0,0 +1,9 @@ +// !DIAGNOSTICS: -NOTHING_TO_INLINE -UNUSED_PARAMETER -NOT_YET_SUPPORTED_IN_INLINE + +inline fun foo(x: T) { + fun<reified R> bar() { + + } + + bar() +} diff --git a/compiler/testData/diagnostics/tests/generics/tpAsReified/LocalFun.lazy.log b/compiler/testData/diagnostics/tests/generics/tpAsReified/LocalFun.lazy.log new file mode 100644 index 00000000000..12609b1aee0 --- /dev/null +++ b/compiler/testData/diagnostics/tests/generics/tpAsReified/LocalFun.lazy.log @@ -0,0 +1,42 @@ +LazyAnnotationDescriptor@0 { + resolutionResults = OverloadResolutionResultsImpl@1 + type = JetTypeImpl@2['inline'] + valueArguments(ValueParameterDescriptorImpl@3['strategy']) = null +} + +LazyJavaPackageFragmentProvider@4 { + packageFragments('': FqName@5) = LazyJavaPackageFragment@6[''] + packageFragments('T': FqName@7) = null + packageFragments('inline': FqName@8) = null + packageFragments('java': FqName@9) = LazyJavaPackageFragment@10['java'] + packageFragments('java.lang': FqName@11) = LazyJavaPackageFragment@12['lang'] + packageFragments('java.lang.T': FqName@13) = null + packageFragments('java.lang.inline': FqName@14) = null + packageFragments('kotlin': FqName@15) = null + packageFragments('kotlin.T': FqName@16) = null + packageFragments('kotlin.inline': FqName@17) = null + packageFragments('kotlin.io': FqName@18) = null + packageFragments('kotlin.jvm': FqName@19) = null +} + +LazyJavaPackageFragment@6[''] { + classes('bar': Name@20) = null // through LazyPackageFragmentScopeForJavaPackage@21 + classes('inline': Name@22) = null // through LazyPackageFragmentScopeForJavaPackage@21 + deserializedPackageScope = Empty@23 // through LazyPackageFragmentScopeForJavaPackage@21 + functions('bar': Name@20) = EmptyList@24[empty] // through LazyPackageFragmentScopeForJavaPackage@21 + memberIndex = computeMemberIndex$1@25 // through LazyPackageFragmentScopeForJavaPackage@21 +} + +LazyJavaPackageFragment@10['java'] { + classes('lang': Name@26) = null // through LazyPackageFragmentScopeForJavaPackage@27 + deserializedPackageScope = Empty@23 // through LazyPackageFragmentScopeForJavaPackage@27 + functions('lang': Name@28) = EmptyList@24[empty] // through LazyPackageFragmentScopeForJavaPackage@27 + memberIndex = computeMemberIndex$1@29 // through LazyPackageFragmentScopeForJavaPackage@27 +} + +LazyJavaPackageFragment@12['lang'] { + classes('bar': Name@20) = null // through LazyPackageFragmentScopeForJavaPackage@30 + deserializedPackageScope = Empty@23 // through LazyPackageFragmentScopeForJavaPackage@30 + functions('bar': Name@20) = EmptyList@24[empty] // through LazyPackageFragmentScopeForJavaPackage@30 + memberIndex = computeMemberIndex$1@31 // through LazyPackageFragmentScopeForJavaPackage@30 +} diff --git a/compiler/testData/diagnostics/tests/generics/tpAsReified/LocalFun.txt b/compiler/testData/diagnostics/tests/generics/tpAsReified/LocalFun.txt new file mode 100644 index 00000000000..06ea686575f --- /dev/null +++ b/compiler/testData/diagnostics/tests/generics/tpAsReified/LocalFun.txt @@ -0,0 +1,3 @@ +package + +kotlin.inline() internal fun foo(/*0*/ x: T): kotlin.Unit \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/generics/tpAsReified/NotInlineableReified.kt b/compiler/testData/diagnostics/tests/generics/tpAsReified/NotInlineableReified.kt new file mode 100644 index 00000000000..c1154e70574 --- /dev/null +++ b/compiler/testData/diagnostics/tests/generics/tpAsReified/NotInlineableReified.kt @@ -0,0 +1,4 @@ + +funreified T2, T3, reified T4> foo() { + +} diff --git a/compiler/testData/diagnostics/tests/generics/tpAsReified/NotInlineableReified.lazy.log b/compiler/testData/diagnostics/tests/generics/tpAsReified/NotInlineableReified.lazy.log new file mode 100644 index 00000000000..aa2c933144a --- /dev/null +++ b/compiler/testData/diagnostics/tests/generics/tpAsReified/NotInlineableReified.lazy.log @@ -0,0 +1,15 @@ +LazyJavaPackageFragmentProvider@0 { + packageFragments('': FqName@1) = LazyJavaPackageFragment@2[''] + packageFragments('java': FqName@3) = LazyJavaPackageFragment@4['java'] + packageFragments('java.lang': FqName@5) = LazyJavaPackageFragment@6['lang'] + packageFragments('kotlin': FqName@7) = null + packageFragments('kotlin.io': FqName@8) = null + packageFragments('kotlin.jvm': FqName@9) = null +} + +LazyJavaPackageFragment@4['java'] { + classes('lang': Name@10) = null // through LazyPackageFragmentScopeForJavaPackage@11 + deserializedPackageScope = Empty@12 // through LazyPackageFragmentScopeForJavaPackage@11 + functions('lang': Name@13) = EmptyList@14[empty] // through LazyPackageFragmentScopeForJavaPackage@11 + memberIndex = computeMemberIndex$1@15 // through LazyPackageFragmentScopeForJavaPackage@11 +} diff --git a/compiler/testData/diagnostics/tests/generics/tpAsReified/NotInlineableReified.txt b/compiler/testData/diagnostics/tests/generics/tpAsReified/NotInlineableReified.txt new file mode 100644 index 00000000000..5ab5fda4f11 --- /dev/null +++ b/compiler/testData/diagnostics/tests/generics/tpAsReified/NotInlineableReified.txt @@ -0,0 +1,3 @@ +package + +internal fun foo(): kotlin.Unit \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/generics/tpAsReified/ReifiedClass.kt b/compiler/testData/diagnostics/tests/generics/tpAsReified/ReifiedClass.kt new file mode 100644 index 00000000000..ba9e188b4f8 --- /dev/null +++ b/compiler/testData/diagnostics/tests/generics/tpAsReified/ReifiedClass.kt @@ -0,0 +1,3 @@ +class Areified T2, T3, reified T4> { + fun<reified R> foo(): T2 = throw UnsupportedOperationException() +} diff --git a/compiler/testData/diagnostics/tests/generics/tpAsReified/ReifiedClass.lazy.log b/compiler/testData/diagnostics/tests/generics/tpAsReified/ReifiedClass.lazy.log new file mode 100644 index 00000000000..c842c8844c0 --- /dev/null +++ b/compiler/testData/diagnostics/tests/generics/tpAsReified/ReifiedClass.lazy.log @@ -0,0 +1,140 @@ +LazyJavaClassDescriptor@0['Exception'] { + typeConstructor = LazyJavaClassTypeConstructor@1['Exception'] +} + +LazyJavaClassDescriptor@2['RuntimeException'] { + typeConstructor = LazyJavaClassTypeConstructor@3['RuntimeException'] +} + +LazyJavaClassDescriptor@4['UnsupportedOperationException'] { + constructors = ArrayList@5[4] { JavaConstructorDescriptor@6[''], JavaConstructorDescriptor@7[''], JavaConstructorDescriptor@8[''], ... } // through LazyJavaClassMemberScope@9 + defaultType = JetTypeImpl@10['UnsupportedOperationException'] + functionTypeForSamInterface = null + typeConstructor = LazyJavaClassTypeConstructor@11['UnsupportedOperationException'] +} + +LazyJavaClassTypeConstructor@1['Exception'] { + parameters = ArrayList@12[empty] + supertypes = ArrayList@13[1] { LazyJavaClassifierType@14['Throwable'] } +} + +LazyJavaClassTypeConstructor@3['RuntimeException'] { + parameters = ArrayList@15[empty] + supertypes = ArrayList@16[1] { LazyJavaClassifierType@17['Exception'] } +} + +LazyJavaClassTypeConstructor@11['UnsupportedOperationException'] { + parameters = ArrayList@18[empty] + supertypes = ArrayList@19[1] { LazyJavaClassifierType@20['RuntimeException'] } +} + +LazyJavaClassifierType@17['Exception'] { + arguments = ArrayList@21[empty] + classifier = JavaClassImpl@22['Exception'] + typeConstructor = LazyJavaClassTypeConstructor@1['Exception'] +} + +LazyJavaClassifierType@20['RuntimeException'] { + arguments = ArrayList@23[empty] + classifier = JavaClassImpl@24['RuntimeException'] + typeConstructor = LazyJavaClassTypeConstructor@3['RuntimeException'] +} + +LazyJavaClassifierType@25['String'] { + arguments = ArrayList@26[empty] + classifier = JavaClassImpl@27['String'] + nullable = 'false': Boolean@28 + typeConstructor = DeserializedClassTypeConstructor@29 +} + +LazyJavaClassifierType@30['String'] { + arguments = ArrayList@31[empty] + classifier = JavaClassImpl@32['String'] + nullable = 'false': Boolean@28 + typeConstructor = DeserializedClassTypeConstructor@29 +} + +LazyJavaClassifierType@33['String'] { + arguments = ArrayList@34[empty] + classifier = JavaClassImpl@27['String'] + nullable = 'true': Boolean@35 + typeConstructor = DeserializedClassTypeConstructor@29 +} + +LazyJavaClassifierType@36['String'] { + arguments = ArrayList@37[empty] + classifier = JavaClassImpl@32['String'] + nullable = 'true': Boolean@35 + typeConstructor = DeserializedClassTypeConstructor@29 +} + +LazyJavaClassifierType@38['Throwable'] { + arguments = ArrayList@39[empty] + classifier = JavaClassImpl@40['Throwable'] + nullable = 'false': Boolean@28 + typeConstructor = DeserializedClassTypeConstructor@41 +} + +LazyJavaClassifierType@42['Throwable'] { + arguments = ArrayList@43[empty] + classifier = JavaClassImpl@44['Throwable'] + nullable = 'false': Boolean@28 + typeConstructor = DeserializedClassTypeConstructor@41 +} + +LazyJavaClassifierType@45['Throwable'] { + arguments = ArrayList@46[empty] + classifier = JavaClassImpl@40['Throwable'] + nullable = 'true': Boolean@35 + typeConstructor = DeserializedClassTypeConstructor@41 +} + +LazyJavaClassifierType@47['Throwable'] { + arguments = ArrayList@48[empty] + classifier = JavaClassImpl@44['Throwable'] + nullable = 'true': Boolean@35 + typeConstructor = DeserializedClassTypeConstructor@41 +} + +LazyJavaClassifierType@14['Throwable'] { + arguments = ArrayList@49[empty] + classifier = JavaClassImpl@50['Throwable'] + typeConstructor = DeserializedClassTypeConstructor@41 +} + +LazyJavaPackageFragmentProvider@51 { + packageFragments('': FqName@52) = LazyJavaPackageFragment@53[''] + packageFragments('A': FqName@54) = null + packageFragments('T2': FqName@55) = null + packageFragments('java': FqName@56) = LazyJavaPackageFragment@57['java'] + packageFragments('java.lang': FqName@58) = LazyJavaPackageFragment@59['lang'] + packageFragments('java.lang.T2': FqName@60) = null + packageFragments('kotlin': FqName@61) = null + packageFragments('kotlin.T2': FqName@62) = null + packageFragments('kotlin.io': FqName@63) = null + packageFragments('kotlin.jvm': FqName@64) = null + topLevelClasses(JavaClassImpl@22['Exception']) = LazyJavaClassDescriptor@0['Exception'] + topLevelClasses(JavaClassImpl@24['RuntimeException']) = LazyJavaClassDescriptor@2['RuntimeException'] + topLevelClasses(JavaClassImpl@65['UnsupportedOperationException']) = LazyJavaClassDescriptor@4['UnsupportedOperationException'] +} + +LazyJavaPackageFragment@53[''] { + classes('UnsupportedOperationException': Name@66) = null // through LazyPackageFragmentScopeForJavaPackage@67 + deserializedPackageScope = Empty@68 // through LazyPackageFragmentScopeForJavaPackage@67 + functions('UnsupportedOperationException': Name@66) = EmptyList@69[empty] // through LazyPackageFragmentScopeForJavaPackage@67 + memberIndex = computeMemberIndex$1@70 // through LazyPackageFragmentScopeForJavaPackage@67 +} + +LazyJavaPackageFragment@57['java'] { + classes('lang': Name@71) = null // through LazyPackageFragmentScopeForJavaPackage@72 + deserializedPackageScope = Empty@68 // through LazyPackageFragmentScopeForJavaPackage@72 + functions('lang': Name@73) = EmptyList@69[empty] // through LazyPackageFragmentScopeForJavaPackage@72 + memberIndex = computeMemberIndex$1@74 // through LazyPackageFragmentScopeForJavaPackage@72 +} + +LazyJavaPackageFragment@59['lang'] { + classes('UnsupportedOperationException': Name@66) = LazyJavaClassDescriptor@4['UnsupportedOperationException'] // through LazyPackageFragmentScopeForJavaPackage@75 + deserializedPackageScope = Empty@68 // through LazyPackageFragmentScopeForJavaPackage@75 + functions('UnsupportedOperationException': Name@66) = EmptyList@69[empty] // through LazyPackageFragmentScopeForJavaPackage@75 + memberIndex = computeMemberIndex$1@76 // through LazyPackageFragmentScopeForJavaPackage@75 +} diff --git a/compiler/testData/diagnostics/tests/generics/tpAsReified/ReifiedClass.txt b/compiler/testData/diagnostics/tests/generics/tpAsReified/ReifiedClass.txt new file mode 100644 index 00000000000..c89b8583492 --- /dev/null +++ b/compiler/testData/diagnostics/tests/generics/tpAsReified/ReifiedClass.txt @@ -0,0 +1,9 @@ +package + +internal final class A { + public constructor A() + public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean + internal final fun foo(): T2 + public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int + public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String +} \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/resolve/invoke/KT-4372.kt b/compiler/testData/diagnostics/tests/resolve/invoke/KT-4372.kt index b33f336a2af..96cf43ff1cb 100644 --- a/compiler/testData/diagnostics/tests/resolve/invoke/KT-4372.kt +++ b/compiler/testData/diagnostics/tests/resolve/invoke/KT-4372.kt @@ -19,4 +19,4 @@ object Y { val T.javaClass : Class get() = throw Exception() -fun javaClass() : Class = throw Exception() +fun <reified T> javaClass() : Class = throw Exception() diff --git a/compiler/testData/diagnostics/testsWithStdLib/annotations/annotationParameterMustBeConstant/simple.lazy.log b/compiler/testData/diagnostics/testsWithStdLib/annotations/annotationParameterMustBeConstant/simple.lazy.log index 81e01c38a0b..75b7159489d 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/annotations/annotationParameterMustBeConstant/simple.lazy.log +++ b/compiler/testData/diagnostics/testsWithStdLib/annotations/annotationParameterMustBeConstant/simple.lazy.log @@ -1,325 +1,332 @@ ClassDeserializer@0 { classes(ClassKey@1) = DeserializedClassDescriptor@2['Intrinsic'] + classes(ClassKey@3) = DeserializedClassDescriptor@4['inline'] } -DescriptorLoadersStorage@3 { - storage(VirtualFileKotlinClass@4) = Storage@5 +DescriptorLoadersStorage@5 { + storage(VirtualFileKotlinClass@6) = Storage@7 } -DescriptorResolver@6 { - = IntValue@7 - = IntValue@8 +DescriptorResolver@8 { = IntValue@9 = IntValue@10 - = JetTypeImpl@11['Int'] - = JetTypeImpl@11['Int'] - = JetTypeImpl@11['Int'] - = JetTypeImpl@11['Int'] - = JetTypeImpl@12['Int'] - = JetTypeImpl@11['Int'] + = IntValue@11 + = IntValue@12 + = JetTypeImpl@13['Int'] + = JetTypeImpl@13['Int'] + = JetTypeImpl@13['Int'] + = JetTypeImpl@13['Int'] + = JetTypeImpl@14['Int'] + = JetTypeImpl@13['Int'] = null } DeserializedClassDescriptor@2['Intrinsic'] { - containingDeclaration = LazyJavaPackageFragment@13['internal'] - defaultType = JetTypeImpl@14['Intrinsic'] - primaryConstructor = ConstructorDescriptorImpl@15[''] + containingDeclaration = LazyJavaPackageFragment@15['internal'] + defaultType = JetTypeImpl@16['Intrinsic'] + primaryConstructor = ConstructorDescriptorImpl@17[''] } -DeserializedTypeParameterDescriptor@16['T'] { - typeConstructor = AbstractLazyTypeParameterDescriptor$1@17 - upperBounds = LinkedHashSet@18[1] { DeserializedType@19['kotlin.Any'] } +DeserializedClassDescriptor@4['inline'] { + containingDeclaration = LazyJavaPackageFragment@18['kotlin'] + defaultType = JetTypeImpl@19['inline'] } -DeserializedType@20['T in kotlin'] { - constructor = AbstractLazyTypeParameterDescriptor$1@17 +DeserializedTypeParameterDescriptor@20['T'] { + typeConstructor = AbstractLazyTypeParameterDescriptor$1@21 + upperBounds = LinkedHashSet@22[1] { DeserializedType@23['kotlin.Any'] } } -DeserializedType@21['T in kotlin'] { - constructor = AbstractLazyTypeParameterDescriptor$1@17 +DeserializedType@24['T in kotlin'] { + constructor = AbstractLazyTypeParameterDescriptor$1@21 } -DeserializedType@22['T in kotlin'] { - constructor = AbstractLazyTypeParameterDescriptor$1@17 +DeserializedType@25['T in kotlin'] { + constructor = AbstractLazyTypeParameterDescriptor$1@21 } -DeserializedType@19['kotlin.Any'] { - constructor = DeserializedClassTypeConstructor@23 - memberScope = DeserializedClassMemberScope@24 +DeserializedType@26['T in kotlin'] { + constructor = AbstractLazyTypeParameterDescriptor$1@21 } -DeserializedType@25['kotlin.Array'] { - constructor = DeserializedClassTypeConstructor@26 - memberScope = SubstitutingScope@27 +DeserializedType@23['kotlin.Any'] { + constructor = DeserializedClassTypeConstructor@27 + memberScope = DeserializedClassMemberScope@28 } -DeserializedType@28['kotlin.Array'] { - constructor = DeserializedClassTypeConstructor@26 - memberScope = SubstitutingScope@29 +DeserializedType@29['kotlin.Array'] { + constructor = DeserializedClassTypeConstructor@30 + memberScope = SubstitutingScope@31 } -DeserializedType@30['kotlin.Int'] { - constructor = DeserializedClassTypeConstructor@31 +DeserializedType@32['kotlin.Array'] { + constructor = DeserializedClassTypeConstructor@30 + memberScope = SubstitutingScope@33 } -DeserializedType@32['kotlin.IntArray'] { - constructor = DeserializedClassTypeConstructor@33 +DeserializedType@34['kotlin.Int'] { + constructor = DeserializedClassTypeConstructor@35 } -LazyAnnotationDescriptor@34 { - resolutionResults = OverloadResolutionResultsImpl@35 - type = JetTypeImpl@36['Ann'] - valueArguments(ValueParameterDescriptorImpl@37['i']) = IntValue@38 +DeserializedType@36['kotlin.IntArray'] { + constructor = DeserializedClassTypeConstructor@37 } -LazyAnnotationDescriptor@39 { - resolutionResults = OverloadResolutionResultsImpl@40 - type = JetTypeImpl@41['Ann'] - valueArguments(ValueParameterDescriptorImpl@37['i']) = IntValue@42 +LazyAnnotationDescriptor@38 { + resolutionResults = OverloadResolutionResultsImpl@39 + type = JetTypeImpl@40['Ann'] + valueArguments(ValueParameterDescriptorImpl@41['i']) = IntValue@42 } LazyAnnotationDescriptor@43 { resolutionResults = OverloadResolutionResultsImpl@44 type = JetTypeImpl@45['Ann'] - valueArguments(ValueParameterDescriptorImpl@37['i']) = IntValue@46 + valueArguments(ValueParameterDescriptorImpl@41['i']) = IntValue@46 } LazyAnnotationDescriptor@47 { resolutionResults = OverloadResolutionResultsImpl@48 type = JetTypeImpl@49['Ann'] - valueArguments(ValueParameterDescriptorImpl@37['i']) = null + valueArguments(ValueParameterDescriptorImpl@41['i']) = IntValue@50 } -LazyAnnotationDescriptor@50 { - resolutionResults = OverloadResolutionResultsImpl@51 - type = JetTypeImpl@52['Ann'] - valueArguments(ValueParameterDescriptorImpl@37['i']) = null +LazyAnnotationDescriptor@51 { + resolutionResults = OverloadResolutionResultsImpl@52 + type = JetTypeImpl@53['Ann'] + valueArguments(ValueParameterDescriptorImpl@41['i']) = null } -LazyAnnotationDescriptor@53 { - resolutionResults = OverloadResolutionResultsImpl@54 - type = JetTypeImpl@55['AnnIA'] - valueArguments(ValueParameterDescriptorImpl@56['ia']) = null +LazyAnnotationDescriptor@54 { + resolutionResults = OverloadResolutionResultsImpl@55 + type = JetTypeImpl@56['Ann'] + valueArguments(ValueParameterDescriptorImpl@41['i']) = null } LazyAnnotationDescriptor@57 { resolutionResults = OverloadResolutionResultsImpl@58 - type = JetTypeImpl@59['AnnSA'] - valueArguments(ValueParameterDescriptorImpl@60['sa']) = null + type = JetTypeImpl@59['AnnIA'] + valueArguments(ValueParameterDescriptorImpl@60['ia']) = null } -LazyJavaPackageFragmentProvider@61 { - packageFragments('': FqName@62) = LazyJavaPackageFragment@63[''] - packageFragments('Ann': FqName@64) = null - packageFragments('Ann2': FqName@65) = null - packageFragments('AnnIA': FqName@66) = null - packageFragments('AnnSA': FqName@67) = null - packageFragments('Array': FqName@68) = null - packageFragments('Int': FqName@69) = null - packageFragments('IntArray': FqName@70) = null - packageFragments('MyClass': FqName@71) = null - packageFragments('O': FqName@72) = null - packageFragments('String': FqName@73) = null - packageFragments('Test': FqName@74) = null - packageFragments('i': FqName@75) = null - packageFragments('i2': FqName@76) = null - packageFragments('ia': FqName@77) = null - packageFragments('java': FqName@78) = LazyJavaPackageFragment@79['java'] - packageFragments('java.lang': FqName@80) = LazyJavaPackageFragment@81['lang'] - packageFragments('java.lang.Ann': FqName@82) = null - packageFragments('java.lang.AnnIA': FqName@83) = null - packageFragments('java.lang.AnnSA': FqName@84) = null - packageFragments('java.lang.Array': FqName@85) = null - packageFragments('java.lang.Int': FqName@86) = null - packageFragments('java.lang.IntArray': FqName@87) = null - packageFragments('java.lang.O': FqName@88) = null - packageFragments('java.lang.String': FqName@89) = null - packageFragments('kotlin': FqName@90) = LazyJavaPackageFragment@91['kotlin'] - packageFragments('kotlin.Ann': FqName@92) = null - packageFragments('kotlin.AnnIA': FqName@93) = null - packageFragments('kotlin.AnnSA': FqName@94) = null - packageFragments('kotlin.Array': FqName@95) = null - packageFragments('kotlin.Int': FqName@96) = null - packageFragments('kotlin.IntArray': FqName@97) = null - packageFragments('kotlin.O': FqName@98) = null - packageFragments('kotlin.String': FqName@99) = null - packageFragments('kotlin.io': FqName@100) = LazyJavaPackageFragment@101['io'] - packageFragments('kotlin.io.Ann': FqName@102) = null - packageFragments('kotlin.io.AnnIA': FqName@103) = null - packageFragments('kotlin.io.AnnSA': FqName@104) = null - packageFragments('kotlin.io.Array': FqName@105) = null - packageFragments('kotlin.io.Int': FqName@106) = null - packageFragments('kotlin.io.IntArray': FqName@107) = null - packageFragments('kotlin.io.O': FqName@108) = null - packageFragments('kotlin.io.String': FqName@109) = null - packageFragments('kotlin.jvm': FqName@110) = LazyJavaPackageFragment@111['jvm'] - packageFragments('kotlin.jvm.Ann': FqName@112) = null - packageFragments('kotlin.jvm.AnnIA': FqName@113) = null - packageFragments('kotlin.jvm.AnnSA': FqName@114) = null - packageFragments('kotlin.jvm.Array': FqName@115) = null - packageFragments('kotlin.jvm.Int': FqName@116) = null - packageFragments('kotlin.jvm.IntArray': FqName@117) = null - packageFragments('kotlin.jvm.O': FqName@118) = null - packageFragments('kotlin.jvm.String': FqName@119) = null - packageFragments('kotlin.jvm.internal': FqName@120) = LazyJavaPackageFragment@13['internal'] - packageFragments('sa': FqName@121) = null +LazyAnnotationDescriptor@61 { + resolutionResults = OverloadResolutionResultsImpl@62 + type = JetTypeImpl@63['AnnSA'] + valueArguments(ValueParameterDescriptorImpl@64['sa']) = null } -LazyJavaPackageFragment@63[''] { - classes('Array': Name@122) = null // through LazyPackageFragmentScopeForJavaPackage@123 - classes('Int': Name@124) = null // through LazyPackageFragmentScopeForJavaPackage@123 - classes('IntArray': Name@125) = null // through LazyPackageFragmentScopeForJavaPackage@123 - classes('MyClass': Name@126) = null // through LazyPackageFragmentScopeForJavaPackage@123 - classes('String': Name@127) = null // through LazyPackageFragmentScopeForJavaPackage@123 - classes('array': Name@128) = null // through LazyPackageFragmentScopeForJavaPackage@123 - classes('foo': Name@129) = null // through LazyPackageFragmentScopeForJavaPackage@123 - classes('i': Name@130) = null // through LazyPackageFragmentScopeForJavaPackage@123 - classes('i2': Name@131) = null // through LazyPackageFragmentScopeForJavaPackage@123 - classes('ia': Name@132) = null // through LazyPackageFragmentScopeForJavaPackage@123 - classes('intArray': Name@133) = null // through LazyPackageFragmentScopeForJavaPackage@123 - classes('sa': Name@134) = null // through LazyPackageFragmentScopeForJavaPackage@123 - deserializedPackageScope = Empty@135 // through LazyPackageFragmentScopeForJavaPackage@123 - functions('MyClass': Name@126) = EmptyList@136[empty] // through LazyPackageFragmentScopeForJavaPackage@123 - functions('array': Name@128) = EmptyList@136[empty] // through LazyPackageFragmentScopeForJavaPackage@123 - functions('foo': Name@129) = EmptyList@136[empty] // through LazyPackageFragmentScopeForJavaPackage@123 - functions('intArray': Name@133) = EmptyList@136[empty] // through LazyPackageFragmentScopeForJavaPackage@123 - memberIndex = computeMemberIndex$1@137 // through LazyPackageFragmentScopeForJavaPackage@123 +LazyJavaPackageFragmentProvider@65 { + packageFragments('': FqName@66) = LazyJavaPackageFragment@67[''] + packageFragments('Ann': FqName@68) = null + packageFragments('Ann2': FqName@69) = null + packageFragments('AnnIA': FqName@70) = null + packageFragments('AnnSA': FqName@71) = null + packageFragments('Array': FqName@72) = null + packageFragments('Int': FqName@73) = null + packageFragments('IntArray': FqName@74) = null + packageFragments('MyClass': FqName@75) = null + packageFragments('O': FqName@76) = null + packageFragments('String': FqName@77) = null + packageFragments('Test': FqName@78) = null + packageFragments('i': FqName@79) = null + packageFragments('i2': FqName@80) = null + packageFragments('ia': FqName@81) = null + packageFragments('java': FqName@82) = LazyJavaPackageFragment@83['java'] + packageFragments('java.lang': FqName@84) = LazyJavaPackageFragment@85['lang'] + packageFragments('java.lang.Ann': FqName@86) = null + packageFragments('java.lang.AnnIA': FqName@87) = null + packageFragments('java.lang.AnnSA': FqName@88) = null + packageFragments('java.lang.Array': FqName@89) = null + packageFragments('java.lang.Int': FqName@90) = null + packageFragments('java.lang.IntArray': FqName@91) = null + packageFragments('java.lang.O': FqName@92) = null + packageFragments('java.lang.String': FqName@93) = null + packageFragments('kotlin': FqName@94) = LazyJavaPackageFragment@18['kotlin'] + packageFragments('kotlin.Ann': FqName@95) = null + packageFragments('kotlin.AnnIA': FqName@96) = null + packageFragments('kotlin.AnnSA': FqName@97) = null + packageFragments('kotlin.Array': FqName@98) = null + packageFragments('kotlin.Int': FqName@99) = null + packageFragments('kotlin.IntArray': FqName@100) = null + packageFragments('kotlin.O': FqName@101) = null + packageFragments('kotlin.String': FqName@102) = null + packageFragments('kotlin.io': FqName@103) = LazyJavaPackageFragment@104['io'] + packageFragments('kotlin.io.Ann': FqName@105) = null + packageFragments('kotlin.io.AnnIA': FqName@106) = null + packageFragments('kotlin.io.AnnSA': FqName@107) = null + packageFragments('kotlin.io.Array': FqName@108) = null + packageFragments('kotlin.io.Int': FqName@109) = null + packageFragments('kotlin.io.IntArray': FqName@110) = null + packageFragments('kotlin.io.O': FqName@111) = null + packageFragments('kotlin.io.String': FqName@112) = null + packageFragments('kotlin.jvm': FqName@113) = LazyJavaPackageFragment@114['jvm'] + packageFragments('kotlin.jvm.Ann': FqName@115) = null + packageFragments('kotlin.jvm.AnnIA': FqName@116) = null + packageFragments('kotlin.jvm.AnnSA': FqName@117) = null + packageFragments('kotlin.jvm.Array': FqName@118) = null + packageFragments('kotlin.jvm.Int': FqName@119) = null + packageFragments('kotlin.jvm.IntArray': FqName@120) = null + packageFragments('kotlin.jvm.O': FqName@121) = null + packageFragments('kotlin.jvm.String': FqName@122) = null + packageFragments('kotlin.jvm.internal': FqName@123) = LazyJavaPackageFragment@15['internal'] + packageFragments('sa': FqName@124) = null } -LazyJavaPackageFragment@13['internal'] { - classes('Intrinsic': Name@138) = DeserializedClassDescriptor@2['Intrinsic'] // through LazyPackageFragmentScopeForJavaPackage@139 +LazyJavaPackageFragment@67[''] { + classes('Array': Name@125) = null // through LazyPackageFragmentScopeForJavaPackage@126 + classes('Int': Name@127) = null // through LazyPackageFragmentScopeForJavaPackage@126 + classes('IntArray': Name@128) = null // through LazyPackageFragmentScopeForJavaPackage@126 + classes('MyClass': Name@129) = null // through LazyPackageFragmentScopeForJavaPackage@126 + classes('String': Name@130) = null // through LazyPackageFragmentScopeForJavaPackage@126 + classes('array': Name@131) = null // through LazyPackageFragmentScopeForJavaPackage@126 + classes('foo': Name@132) = null // through LazyPackageFragmentScopeForJavaPackage@126 + classes('i': Name@133) = null // through LazyPackageFragmentScopeForJavaPackage@126 + classes('i2': Name@134) = null // through LazyPackageFragmentScopeForJavaPackage@126 + classes('ia': Name@135) = null // through LazyPackageFragmentScopeForJavaPackage@126 + classes('intArray': Name@136) = null // through LazyPackageFragmentScopeForJavaPackage@126 + classes('sa': Name@137) = null // through LazyPackageFragmentScopeForJavaPackage@126 + deserializedPackageScope = Empty@138 // through LazyPackageFragmentScopeForJavaPackage@126 + functions('MyClass': Name@129) = EmptyList@139[empty] // through LazyPackageFragmentScopeForJavaPackage@126 + functions('array': Name@131) = EmptyList@139[empty] // through LazyPackageFragmentScopeForJavaPackage@126 + functions('foo': Name@132) = EmptyList@139[empty] // through LazyPackageFragmentScopeForJavaPackage@126 + functions('intArray': Name@136) = EmptyList@139[empty] // through LazyPackageFragmentScopeForJavaPackage@126 + memberIndex = computeMemberIndex$1@140 // through LazyPackageFragmentScopeForJavaPackage@126 } -LazyJavaPackageFragment@101['io'] { - classes('Array': Name@122) = null // through LazyPackageFragmentScopeForJavaPackage@140 - classes('Int': Name@124) = null // through LazyPackageFragmentScopeForJavaPackage@140 - classes('IntArray': Name@125) = null // through LazyPackageFragmentScopeForJavaPackage@140 - classes('MyClass': Name@126) = null // through LazyPackageFragmentScopeForJavaPackage@140 - classes('String': Name@127) = null // through LazyPackageFragmentScopeForJavaPackage@140 - classes('array': Name@128) = null // through LazyPackageFragmentScopeForJavaPackage@140 - classes('foo': Name@129) = null // through LazyPackageFragmentScopeForJavaPackage@140 - classes('i': Name@130) = null // through LazyPackageFragmentScopeForJavaPackage@140 - classes('i2': Name@131) = null // through LazyPackageFragmentScopeForJavaPackage@140 - classes('ia': Name@132) = null // through LazyPackageFragmentScopeForJavaPackage@140 - classes('intArray': Name@133) = null // through LazyPackageFragmentScopeForJavaPackage@140 - classes('sa': Name@134) = null // through LazyPackageFragmentScopeForJavaPackage@140 - deserializedPackageScope = DeserializedPackageMemberScope@141 // through LazyPackageFragmentScopeForJavaPackage@140 - functions('MyClass': Name@126) = EmptyList@136[empty] // through DeserializedPackageMemberScope@141 - functions('MyClass': Name@126) = EmptyList@136[empty] // through LazyPackageFragmentScopeForJavaPackage@140 - functions('array': Name@128) = EmptyList@136[empty] // through DeserializedPackageMemberScope@141 - functions('array': Name@128) = EmptyList@136[empty] // through LazyPackageFragmentScopeForJavaPackage@140 - functions('foo': Name@129) = EmptyList@136[empty] // through DeserializedPackageMemberScope@141 - functions('foo': Name@129) = EmptyList@136[empty] // through LazyPackageFragmentScopeForJavaPackage@140 - functions('intArray': Name@133) = EmptyList@136[empty] // through DeserializedPackageMemberScope@141 - functions('intArray': Name@133) = EmptyList@136[empty] // through LazyPackageFragmentScopeForJavaPackage@140 - memberIndex = computeMemberIndex$1@142 // through LazyPackageFragmentScopeForJavaPackage@140 - membersProtos = HashMap@143 // through DeserializedPackageMemberScope@141 - properties('MyClass': Name@126) = EmptyList@136[empty] // through DeserializedPackageMemberScope@141 - properties('O': Name@144) = EmptyList@136[empty] // through DeserializedPackageMemberScope@141 - properties('array': Name@128) = EmptyList@136[empty] // through DeserializedPackageMemberScope@141 - properties('foo': Name@129) = EmptyList@136[empty] // through DeserializedPackageMemberScope@141 - properties('i': Name@130) = EmptyList@136[empty] // through DeserializedPackageMemberScope@141 - properties('i2': Name@131) = EmptyList@136[empty] // through DeserializedPackageMemberScope@141 - properties('ia': Name@132) = EmptyList@136[empty] // through DeserializedPackageMemberScope@141 - properties('intArray': Name@133) = EmptyList@136[empty] // through DeserializedPackageMemberScope@141 - properties('sa': Name@134) = EmptyList@136[empty] // through DeserializedPackageMemberScope@141 +LazyJavaPackageFragment@15['internal'] { + classes('Intrinsic': Name@141) = DeserializedClassDescriptor@2['Intrinsic'] // through LazyPackageFragmentScopeForJavaPackage@142 } -LazyJavaPackageFragment@79['java'] { - classes('lang': Name@145) = null // through LazyPackageFragmentScopeForJavaPackage@146 - deserializedPackageScope = Empty@135 // through LazyPackageFragmentScopeForJavaPackage@146 - functions('lang': Name@147) = EmptyList@136[empty] // through LazyPackageFragmentScopeForJavaPackage@146 - memberIndex = computeMemberIndex$1@148 // through LazyPackageFragmentScopeForJavaPackage@146 +LazyJavaPackageFragment@104['io'] { + classes('Array': Name@125) = null // through LazyPackageFragmentScopeForJavaPackage@143 + classes('Int': Name@127) = null // through LazyPackageFragmentScopeForJavaPackage@143 + classes('IntArray': Name@128) = null // through LazyPackageFragmentScopeForJavaPackage@143 + classes('MyClass': Name@129) = null // through LazyPackageFragmentScopeForJavaPackage@143 + classes('String': Name@130) = null // through LazyPackageFragmentScopeForJavaPackage@143 + classes('array': Name@131) = null // through LazyPackageFragmentScopeForJavaPackage@143 + classes('foo': Name@132) = null // through LazyPackageFragmentScopeForJavaPackage@143 + classes('i': Name@133) = null // through LazyPackageFragmentScopeForJavaPackage@143 + classes('i2': Name@134) = null // through LazyPackageFragmentScopeForJavaPackage@143 + classes('ia': Name@135) = null // through LazyPackageFragmentScopeForJavaPackage@143 + classes('intArray': Name@136) = null // through LazyPackageFragmentScopeForJavaPackage@143 + classes('sa': Name@137) = null // through LazyPackageFragmentScopeForJavaPackage@143 + deserializedPackageScope = DeserializedPackageMemberScope@144 // through LazyPackageFragmentScopeForJavaPackage@143 + functions('MyClass': Name@129) = EmptyList@139[empty] // through DeserializedPackageMemberScope@144 + functions('MyClass': Name@129) = EmptyList@139[empty] // through LazyPackageFragmentScopeForJavaPackage@143 + functions('array': Name@131) = EmptyList@139[empty] // through DeserializedPackageMemberScope@144 + functions('array': Name@131) = EmptyList@139[empty] // through LazyPackageFragmentScopeForJavaPackage@143 + functions('foo': Name@132) = EmptyList@139[empty] // through DeserializedPackageMemberScope@144 + functions('foo': Name@132) = EmptyList@139[empty] // through LazyPackageFragmentScopeForJavaPackage@143 + functions('intArray': Name@136) = EmptyList@139[empty] // through DeserializedPackageMemberScope@144 + functions('intArray': Name@136) = EmptyList@139[empty] // through LazyPackageFragmentScopeForJavaPackage@143 + memberIndex = computeMemberIndex$1@145 // through LazyPackageFragmentScopeForJavaPackage@143 + membersProtos = HashMap@146 // through DeserializedPackageMemberScope@144 + properties('MyClass': Name@129) = EmptyList@139[empty] // through DeserializedPackageMemberScope@144 + properties('O': Name@147) = EmptyList@139[empty] // through DeserializedPackageMemberScope@144 + properties('array': Name@131) = EmptyList@139[empty] // through DeserializedPackageMemberScope@144 + properties('foo': Name@132) = EmptyList@139[empty] // through DeserializedPackageMemberScope@144 + properties('i': Name@133) = EmptyList@139[empty] // through DeserializedPackageMemberScope@144 + properties('i2': Name@134) = EmptyList@139[empty] // through DeserializedPackageMemberScope@144 + properties('ia': Name@135) = EmptyList@139[empty] // through DeserializedPackageMemberScope@144 + properties('intArray': Name@136) = EmptyList@139[empty] // through DeserializedPackageMemberScope@144 + properties('sa': Name@137) = EmptyList@139[empty] // through DeserializedPackageMemberScope@144 } -LazyJavaPackageFragment@111['jvm'] { - classes('Array': Name@122) = null // through LazyPackageFragmentScopeForJavaPackage@149 - classes('Int': Name@124) = null // through LazyPackageFragmentScopeForJavaPackage@149 - classes('IntArray': Name@125) = null // through LazyPackageFragmentScopeForJavaPackage@149 - classes('MyClass': Name@126) = null // through LazyPackageFragmentScopeForJavaPackage@149 - classes('String': Name@127) = null // through LazyPackageFragmentScopeForJavaPackage@149 - classes('array': Name@128) = null // through LazyPackageFragmentScopeForJavaPackage@149 - classes('foo': Name@129) = null // through LazyPackageFragmentScopeForJavaPackage@149 - classes('i': Name@130) = null // through LazyPackageFragmentScopeForJavaPackage@149 - classes('i2': Name@131) = null // through LazyPackageFragmentScopeForJavaPackage@149 - classes('ia': Name@132) = null // through LazyPackageFragmentScopeForJavaPackage@149 - classes('intArray': Name@133) = null // through LazyPackageFragmentScopeForJavaPackage@149 - classes('sa': Name@134) = null // through LazyPackageFragmentScopeForJavaPackage@149 - deserializedPackageScope = Empty@135 // through LazyPackageFragmentScopeForJavaPackage@149 - functions('MyClass': Name@126) = EmptyList@136[empty] // through LazyPackageFragmentScopeForJavaPackage@149 - functions('array': Name@128) = EmptyList@136[empty] // through LazyPackageFragmentScopeForJavaPackage@149 - functions('foo': Name@129) = EmptyList@136[empty] // through LazyPackageFragmentScopeForJavaPackage@149 - functions('intArray': Name@133) = EmptyList@136[empty] // through LazyPackageFragmentScopeForJavaPackage@149 - memberIndex = computeMemberIndex$1@150 // through LazyPackageFragmentScopeForJavaPackage@149 +LazyJavaPackageFragment@83['java'] { + classes('lang': Name@148) = null // through LazyPackageFragmentScopeForJavaPackage@149 + deserializedPackageScope = Empty@138 // through LazyPackageFragmentScopeForJavaPackage@149 + functions('lang': Name@150) = EmptyList@139[empty] // through LazyPackageFragmentScopeForJavaPackage@149 + memberIndex = computeMemberIndex$1@151 // through LazyPackageFragmentScopeForJavaPackage@149 } -LazyJavaPackageFragment@91['kotlin'] { - classes('Any': Name@151) = null // through LazyPackageFragmentScopeForJavaPackage@152 - classes('Array': Name@122) = null // through LazyPackageFragmentScopeForJavaPackage@152 - classes('Int': Name@124) = null // through LazyPackageFragmentScopeForJavaPackage@152 - classes('IntArray': Name@125) = null // through LazyPackageFragmentScopeForJavaPackage@152 - classes('MyClass': Name@126) = null // through LazyPackageFragmentScopeForJavaPackage@152 - classes('String': Name@127) = null // through LazyPackageFragmentScopeForJavaPackage@152 - classes('array': Name@128) = null // through LazyPackageFragmentScopeForJavaPackage@152 - classes('foo': Name@129) = null // through LazyPackageFragmentScopeForJavaPackage@152 - classes('i': Name@130) = null // through LazyPackageFragmentScopeForJavaPackage@152 - classes('i2': Name@131) = null // through LazyPackageFragmentScopeForJavaPackage@152 - classes('ia': Name@132) = null // through LazyPackageFragmentScopeForJavaPackage@152 - classes('intArray': Name@133) = null // through LazyPackageFragmentScopeForJavaPackage@152 - classes('io': Name@153) = null // through LazyPackageFragmentScopeForJavaPackage@152 - classes('jvm': Name@154) = null // through LazyPackageFragmentScopeForJavaPackage@152 - classes('sa': Name@134) = null // through LazyPackageFragmentScopeForJavaPackage@152 - deserializedPackageScope = DeserializedPackageMemberScope@155 // through LazyPackageFragmentScopeForJavaPackage@152 - functions('MyClass': Name@126) = EmptyList@136[empty] // through DeserializedPackageMemberScope@155 - functions('MyClass': Name@126) = EmptyList@136[empty] // through LazyPackageFragmentScopeForJavaPackage@152 - functions('array': Name@128) = ArrayList@156[1] { DeserializedSimpleFunctionDescriptor@157['array'] } // through DeserializedPackageMemberScope@155 - functions('array': Name@128) = EmptyList@136[empty] // through LazyPackageFragmentScopeForJavaPackage@152 - functions('foo': Name@129) = EmptyList@136[empty] // through DeserializedPackageMemberScope@155 - functions('foo': Name@129) = EmptyList@136[empty] // through LazyPackageFragmentScopeForJavaPackage@152 - functions('intArray': Name@133) = ArrayList@158[1] { DeserializedSimpleFunctionDescriptor@159['intArray'] } // through DeserializedPackageMemberScope@155 - functions('intArray': Name@133) = EmptyList@136[empty] // through LazyPackageFragmentScopeForJavaPackage@152 - functions('io': Name@160) = EmptyList@136[empty] // through DeserializedPackageMemberScope@155 - functions('io': Name@160) = EmptyList@136[empty] // through LazyPackageFragmentScopeForJavaPackage@152 - functions('jvm': Name@161) = EmptyList@136[empty] // through DeserializedPackageMemberScope@155 - functions('jvm': Name@161) = EmptyList@136[empty] // through LazyPackageFragmentScopeForJavaPackage@152 - memberIndex = computeMemberIndex$1@162 // through LazyPackageFragmentScopeForJavaPackage@152 - membersProtos = HashMap@163 // through DeserializedPackageMemberScope@155 - properties('MyClass': Name@126) = EmptyList@136[empty] // through DeserializedPackageMemberScope@155 - properties('O': Name@144) = EmptyList@136[empty] // through DeserializedPackageMemberScope@155 - properties('array': Name@128) = EmptyList@136[empty] // through DeserializedPackageMemberScope@155 - properties('foo': Name@129) = EmptyList@136[empty] // through DeserializedPackageMemberScope@155 - properties('i': Name@130) = EmptyList@136[empty] // through DeserializedPackageMemberScope@155 - properties('i2': Name@131) = EmptyList@136[empty] // through DeserializedPackageMemberScope@155 - properties('ia': Name@132) = EmptyList@136[empty] // through DeserializedPackageMemberScope@155 - properties('intArray': Name@133) = EmptyList@136[empty] // through DeserializedPackageMemberScope@155 - properties('io': Name@160) = EmptyList@136[empty] // through DeserializedPackageMemberScope@155 - properties('jvm': Name@161) = EmptyList@136[empty] // through DeserializedPackageMemberScope@155 - properties('sa': Name@134) = EmptyList@136[empty] // through DeserializedPackageMemberScope@155 +LazyJavaPackageFragment@114['jvm'] { + classes('Array': Name@125) = null // through LazyPackageFragmentScopeForJavaPackage@152 + classes('Int': Name@127) = null // through LazyPackageFragmentScopeForJavaPackage@152 + classes('IntArray': Name@128) = null // through LazyPackageFragmentScopeForJavaPackage@152 + classes('MyClass': Name@129) = null // through LazyPackageFragmentScopeForJavaPackage@152 + classes('String': Name@130) = null // through LazyPackageFragmentScopeForJavaPackage@152 + classes('array': Name@131) = null // through LazyPackageFragmentScopeForJavaPackage@152 + classes('foo': Name@132) = null // through LazyPackageFragmentScopeForJavaPackage@152 + classes('i': Name@133) = null // through LazyPackageFragmentScopeForJavaPackage@152 + classes('i2': Name@134) = null // through LazyPackageFragmentScopeForJavaPackage@152 + classes('ia': Name@135) = null // through LazyPackageFragmentScopeForJavaPackage@152 + classes('intArray': Name@136) = null // through LazyPackageFragmentScopeForJavaPackage@152 + classes('sa': Name@137) = null // through LazyPackageFragmentScopeForJavaPackage@152 + deserializedPackageScope = Empty@138 // through LazyPackageFragmentScopeForJavaPackage@152 + functions('MyClass': Name@129) = EmptyList@139[empty] // through LazyPackageFragmentScopeForJavaPackage@152 + functions('array': Name@131) = EmptyList@139[empty] // through LazyPackageFragmentScopeForJavaPackage@152 + functions('foo': Name@132) = EmptyList@139[empty] // through LazyPackageFragmentScopeForJavaPackage@152 + functions('intArray': Name@136) = EmptyList@139[empty] // through LazyPackageFragmentScopeForJavaPackage@152 + memberIndex = computeMemberIndex$1@153 // through LazyPackageFragmentScopeForJavaPackage@152 } -LazyJavaPackageFragment@81['lang'] { - classes('MyClass': Name@126) = null // through LazyPackageFragmentScopeForJavaPackage@164 - classes('array': Name@128) = null // through LazyPackageFragmentScopeForJavaPackage@164 - classes('foo': Name@129) = null // through LazyPackageFragmentScopeForJavaPackage@164 - classes('i': Name@130) = null // through LazyPackageFragmentScopeForJavaPackage@164 - classes('i2': Name@131) = null // through LazyPackageFragmentScopeForJavaPackage@164 - classes('ia': Name@132) = null // through LazyPackageFragmentScopeForJavaPackage@164 - classes('intArray': Name@133) = null // through LazyPackageFragmentScopeForJavaPackage@164 - classes('sa': Name@134) = null // through LazyPackageFragmentScopeForJavaPackage@164 - deserializedPackageScope = Empty@135 // through LazyPackageFragmentScopeForJavaPackage@164 - functions('MyClass': Name@126) = EmptyList@136[empty] // through LazyPackageFragmentScopeForJavaPackage@164 - functions('array': Name@128) = EmptyList@136[empty] // through LazyPackageFragmentScopeForJavaPackage@164 - functions('foo': Name@129) = EmptyList@136[empty] // through LazyPackageFragmentScopeForJavaPackage@164 - functions('intArray': Name@133) = EmptyList@136[empty] // through LazyPackageFragmentScopeForJavaPackage@164 - memberIndex = computeMemberIndex$1@165 // through LazyPackageFragmentScopeForJavaPackage@164 +LazyJavaPackageFragment@18['kotlin'] { + classes('Any': Name@154) = null // through LazyPackageFragmentScopeForJavaPackage@155 + classes('Array': Name@125) = null // through LazyPackageFragmentScopeForJavaPackage@155 + classes('Int': Name@127) = null // through LazyPackageFragmentScopeForJavaPackage@155 + classes('IntArray': Name@128) = null // through LazyPackageFragmentScopeForJavaPackage@155 + classes('MyClass': Name@129) = null // through LazyPackageFragmentScopeForJavaPackage@155 + classes('String': Name@130) = null // through LazyPackageFragmentScopeForJavaPackage@155 + classes('array': Name@131) = null // through LazyPackageFragmentScopeForJavaPackage@155 + classes('foo': Name@132) = null // through LazyPackageFragmentScopeForJavaPackage@155 + classes('i': Name@133) = null // through LazyPackageFragmentScopeForJavaPackage@155 + classes('i2': Name@134) = null // through LazyPackageFragmentScopeForJavaPackage@155 + classes('ia': Name@135) = null // through LazyPackageFragmentScopeForJavaPackage@155 + classes('inline': Name@156) = DeserializedClassDescriptor@4['inline'] // through LazyPackageFragmentScopeForJavaPackage@155 + classes('intArray': Name@136) = null // through LazyPackageFragmentScopeForJavaPackage@155 + classes('io': Name@157) = null // through LazyPackageFragmentScopeForJavaPackage@155 + classes('jvm': Name@158) = null // through LazyPackageFragmentScopeForJavaPackage@155 + classes('sa': Name@137) = null // through LazyPackageFragmentScopeForJavaPackage@155 + deserializedPackageScope = DeserializedPackageMemberScope@159 // through LazyPackageFragmentScopeForJavaPackage@155 + functions('MyClass': Name@129) = EmptyList@139[empty] // through DeserializedPackageMemberScope@159 + functions('MyClass': Name@129) = EmptyList@139[empty] // through LazyPackageFragmentScopeForJavaPackage@155 + functions('array': Name@131) = ArrayList@160[1] { DeserializedSimpleFunctionDescriptor@161['array'] } // through DeserializedPackageMemberScope@159 + functions('array': Name@131) = EmptyList@139[empty] // through LazyPackageFragmentScopeForJavaPackage@155 + functions('foo': Name@132) = EmptyList@139[empty] // through DeserializedPackageMemberScope@159 + functions('foo': Name@132) = EmptyList@139[empty] // through LazyPackageFragmentScopeForJavaPackage@155 + functions('intArray': Name@136) = ArrayList@162[1] { DeserializedSimpleFunctionDescriptor@163['intArray'] } // through DeserializedPackageMemberScope@159 + functions('intArray': Name@136) = EmptyList@139[empty] // through LazyPackageFragmentScopeForJavaPackage@155 + functions('io': Name@164) = EmptyList@139[empty] // through DeserializedPackageMemberScope@159 + functions('io': Name@164) = EmptyList@139[empty] // through LazyPackageFragmentScopeForJavaPackage@155 + functions('jvm': Name@165) = EmptyList@139[empty] // through DeserializedPackageMemberScope@159 + functions('jvm': Name@165) = EmptyList@139[empty] // through LazyPackageFragmentScopeForJavaPackage@155 + memberIndex = computeMemberIndex$1@166 // through LazyPackageFragmentScopeForJavaPackage@155 + membersProtos = HashMap@167 // through DeserializedPackageMemberScope@159 + properties('MyClass': Name@129) = EmptyList@139[empty] // through DeserializedPackageMemberScope@159 + properties('O': Name@147) = EmptyList@139[empty] // through DeserializedPackageMemberScope@159 + properties('array': Name@131) = EmptyList@139[empty] // through DeserializedPackageMemberScope@159 + properties('foo': Name@132) = EmptyList@139[empty] // through DeserializedPackageMemberScope@159 + properties('i': Name@133) = EmptyList@139[empty] // through DeserializedPackageMemberScope@159 + properties('i2': Name@134) = EmptyList@139[empty] // through DeserializedPackageMemberScope@159 + properties('ia': Name@135) = EmptyList@139[empty] // through DeserializedPackageMemberScope@159 + properties('intArray': Name@136) = EmptyList@139[empty] // through DeserializedPackageMemberScope@159 + properties('io': Name@164) = EmptyList@139[empty] // through DeserializedPackageMemberScope@159 + properties('jvm': Name@165) = EmptyList@139[empty] // through DeserializedPackageMemberScope@159 + properties('sa': Name@137) = EmptyList@139[empty] // through DeserializedPackageMemberScope@159 } -TypeDeserializer@166 { - classDescriptors('2': Integer@167) = DeserializedClassDescriptor@168['Any'] - classDescriptors('3': Integer@169) = DeserializedClassDescriptor@170['Array'] +LazyJavaPackageFragment@85['lang'] { + classes('MyClass': Name@129) = null // through LazyPackageFragmentScopeForJavaPackage@168 + classes('array': Name@131) = null // through LazyPackageFragmentScopeForJavaPackage@168 + classes('foo': Name@132) = null // through LazyPackageFragmentScopeForJavaPackage@168 + classes('i': Name@133) = null // through LazyPackageFragmentScopeForJavaPackage@168 + classes('i2': Name@134) = null // through LazyPackageFragmentScopeForJavaPackage@168 + classes('ia': Name@135) = null // through LazyPackageFragmentScopeForJavaPackage@168 + classes('intArray': Name@136) = null // through LazyPackageFragmentScopeForJavaPackage@168 + classes('sa': Name@137) = null // through LazyPackageFragmentScopeForJavaPackage@168 + deserializedPackageScope = Empty@138 // through LazyPackageFragmentScopeForJavaPackage@168 + functions('MyClass': Name@129) = EmptyList@139[empty] // through LazyPackageFragmentScopeForJavaPackage@168 + functions('array': Name@131) = EmptyList@139[empty] // through LazyPackageFragmentScopeForJavaPackage@168 + functions('foo': Name@132) = EmptyList@139[empty] // through LazyPackageFragmentScopeForJavaPackage@168 + functions('intArray': Name@136) = EmptyList@139[empty] // through LazyPackageFragmentScopeForJavaPackage@168 + memberIndex = computeMemberIndex$1@169 // through LazyPackageFragmentScopeForJavaPackage@168 } -TypeDeserializer@171 { - classDescriptors('20': Integer@172) = DeserializedClassDescriptor@173['Int'] - classDescriptors('45': Integer@174) = DeserializedClassDescriptor@175['IntArray'] +TypeDeserializer@170 { + classDescriptors('2': Integer@171) = DeserializedClassDescriptor@172['Any'] + classDescriptors('3': Integer@173) = DeserializedClassDescriptor@174['Array'] +} + +TypeDeserializer@175 { + classDescriptors('20': Integer@176) = DeserializedClassDescriptor@177['Int'] + classDescriptors('45': Integer@178) = DeserializedClassDescriptor@179['IntArray'] } diff --git a/compiler/tests/org/jetbrains/jet/checkers/JetDiagnosticsTestGenerated.java b/compiler/tests/org/jetbrains/jet/checkers/JetDiagnosticsTestGenerated.java index 04bd2989805..bc69bc475a3 100644 --- a/compiler/tests/org/jetbrains/jet/checkers/JetDiagnosticsTestGenerated.java +++ b/compiler/tests/org/jetbrains/jet/checkers/JetDiagnosticsTestGenerated.java @@ -4506,6 +4506,30 @@ public class JetDiagnosticsTestGenerated extends AbstractJetDiagnosticsTest { String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/tpAsReified/InType.kt"); doTest(fileName); } + + @TestMetadata("InlineableReified.kt") + public void testInlineableReified() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/tpAsReified/InlineableReified.kt"); + doTest(fileName); + } + + @TestMetadata("LocalFun.kt") + public void testLocalFun() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/tpAsReified/LocalFun.kt"); + doTest(fileName); + } + + @TestMetadata("NotInlineableReified.kt") + public void testNotInlineableReified() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/tpAsReified/NotInlineableReified.kt"); + doTest(fileName); + } + + @TestMetadata("ReifiedClass.kt") + public void testReifiedClass() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/tpAsReified/ReifiedClass.kt"); + doTest(fileName); + } } @TestMetadata("compiler/testData/diagnostics/tests/generics/varProjection")