FIR IDE: Add IDE tests for sample compiler plugin
This commit is contained in:
+13
@@ -0,0 +1,13 @@
|
||||
// WITH_FIR_TEST_COMPILER_PLUGIN
|
||||
package test
|
||||
|
||||
@org.jetbrains.kotlin.fir.plugin.MySerializable
|
||||
class FirstTarget
|
||||
|
||||
@org.jetbrains.kotlin.fir.plugin.MySerializable
|
||||
class SecondTarget
|
||||
|
||||
@org.jetbrains.kotlin.fir.plugin.CoreSerializer
|
||||
class Serializer
|
||||
|
||||
// class: test/Serializer
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
fun serializeFirstTarget(x: test.FirstTarget)
|
||||
|
||||
fun serializeSecondTarget(x: test.SecondTarget)
|
||||
|
||||
open operator fun equals(other: kotlin.Any?): kotlin.Boolean
|
||||
|
||||
open fun hashCode(): kotlin.Int
|
||||
|
||||
open fun toString(): kotlin.String
|
||||
|
||||
constructor()
|
||||
+146
@@ -0,0 +1,146 @@
|
||||
KtFunctionSymbol:
|
||||
annotationsList: []
|
||||
callableIdIfNonLocal: test/Serializer.serializeFirstTarget
|
||||
hasStableParameterNames: true
|
||||
isBuiltinFunctionInvoke: false
|
||||
isExtension: false
|
||||
isExternal: false
|
||||
isInfix: false
|
||||
isInline: false
|
||||
isOperator: false
|
||||
isOverride: false
|
||||
isStatic: false
|
||||
isSuspend: false
|
||||
modality: FINAL
|
||||
name: serializeFirstTarget
|
||||
origin: PLUGIN
|
||||
receiverType: null
|
||||
returnType: kotlin/Unit
|
||||
symbolKind: CLASS_MEMBER
|
||||
typeParameters: []
|
||||
valueParameters: [
|
||||
KtValueParameterSymbol(x)
|
||||
]
|
||||
visibility: Public
|
||||
getDispatchReceiver(): test/Serializer
|
||||
deprecationStatus: null
|
||||
|
||||
KtFunctionSymbol:
|
||||
annotationsList: []
|
||||
callableIdIfNonLocal: test/Serializer.serializeSecondTarget
|
||||
hasStableParameterNames: true
|
||||
isBuiltinFunctionInvoke: false
|
||||
isExtension: false
|
||||
isExternal: false
|
||||
isInfix: false
|
||||
isInline: false
|
||||
isOperator: false
|
||||
isOverride: false
|
||||
isStatic: false
|
||||
isSuspend: false
|
||||
modality: FINAL
|
||||
name: serializeSecondTarget
|
||||
origin: PLUGIN
|
||||
receiverType: null
|
||||
returnType: kotlin/Unit
|
||||
symbolKind: CLASS_MEMBER
|
||||
typeParameters: []
|
||||
valueParameters: [
|
||||
KtValueParameterSymbol(x)
|
||||
]
|
||||
visibility: Public
|
||||
getDispatchReceiver(): test/Serializer
|
||||
deprecationStatus: null
|
||||
|
||||
KtFunctionSymbol:
|
||||
annotationsList: []
|
||||
callableIdIfNonLocal: kotlin/Any.equals
|
||||
hasStableParameterNames: true
|
||||
isBuiltinFunctionInvoke: false
|
||||
isExtension: false
|
||||
isExternal: false
|
||||
isInfix: false
|
||||
isInline: false
|
||||
isOperator: true
|
||||
isOverride: false
|
||||
isStatic: false
|
||||
isSuspend: false
|
||||
modality: OPEN
|
||||
name: equals
|
||||
origin: LIBRARY
|
||||
receiverType: null
|
||||
returnType: kotlin/Boolean
|
||||
symbolKind: CLASS_MEMBER
|
||||
typeParameters: []
|
||||
valueParameters: [
|
||||
KtValueParameterSymbol(other)
|
||||
]
|
||||
visibility: Public
|
||||
getDispatchReceiver(): kotlin/Any
|
||||
deprecationStatus: null
|
||||
|
||||
KtFunctionSymbol:
|
||||
annotationsList: []
|
||||
callableIdIfNonLocal: kotlin/Any.hashCode
|
||||
hasStableParameterNames: true
|
||||
isBuiltinFunctionInvoke: false
|
||||
isExtension: false
|
||||
isExternal: false
|
||||
isInfix: false
|
||||
isInline: false
|
||||
isOperator: false
|
||||
isOverride: false
|
||||
isStatic: false
|
||||
isSuspend: false
|
||||
modality: OPEN
|
||||
name: hashCode
|
||||
origin: LIBRARY
|
||||
receiverType: null
|
||||
returnType: kotlin/Int
|
||||
symbolKind: CLASS_MEMBER
|
||||
typeParameters: []
|
||||
valueParameters: []
|
||||
visibility: Public
|
||||
getDispatchReceiver(): kotlin/Any
|
||||
deprecationStatus: null
|
||||
|
||||
KtFunctionSymbol:
|
||||
annotationsList: []
|
||||
callableIdIfNonLocal: kotlin/Any.toString
|
||||
hasStableParameterNames: true
|
||||
isBuiltinFunctionInvoke: false
|
||||
isExtension: false
|
||||
isExternal: false
|
||||
isInfix: false
|
||||
isInline: false
|
||||
isOperator: false
|
||||
isOverride: false
|
||||
isStatic: false
|
||||
isSuspend: false
|
||||
modality: OPEN
|
||||
name: toString
|
||||
origin: LIBRARY
|
||||
receiverType: null
|
||||
returnType: kotlin/String
|
||||
symbolKind: CLASS_MEMBER
|
||||
typeParameters: []
|
||||
valueParameters: []
|
||||
visibility: Public
|
||||
getDispatchReceiver(): kotlin/Any
|
||||
deprecationStatus: null
|
||||
|
||||
KtConstructorSymbol:
|
||||
annotationsList: []
|
||||
callableIdIfNonLocal: null
|
||||
containingClassIdIfNonLocal: test/Serializer
|
||||
hasStableParameterNames: true
|
||||
isExtension: false
|
||||
isPrimary: true
|
||||
origin: SOURCE_MEMBER_GENERATED
|
||||
receiverType: null
|
||||
returnType: test/Serializer
|
||||
symbolKind: CLASS_MEMBER
|
||||
typeParameters: []
|
||||
valueParameters: []
|
||||
visibility: Public
|
||||
deprecationStatus: null
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
// WITH_FIR_TEST_COMPILER_PLUGIN
|
||||
package test
|
||||
|
||||
@org.jetbrains.kotlin.fir.plugin.CompanionWithFoo
|
||||
class WithGeneratedCompanion
|
||||
|
||||
// class: test/WithGeneratedCompanion.Companion
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
fun foo(): kotlin.Int
|
||||
|
||||
open operator fun equals(other: kotlin.Any?): kotlin.Boolean
|
||||
|
||||
open fun hashCode(): kotlin.Int
|
||||
|
||||
open fun toString(): kotlin.String
|
||||
|
||||
constructor()
|
||||
+117
@@ -0,0 +1,117 @@
|
||||
KtFunctionSymbol:
|
||||
annotationsList: []
|
||||
callableIdIfNonLocal: test/WithGeneratedCompanion.Companion.foo
|
||||
hasStableParameterNames: true
|
||||
isBuiltinFunctionInvoke: false
|
||||
isExtension: false
|
||||
isExternal: false
|
||||
isInfix: false
|
||||
isInline: false
|
||||
isOperator: false
|
||||
isOverride: false
|
||||
isStatic: false
|
||||
isSuspend: false
|
||||
modality: FINAL
|
||||
name: foo
|
||||
origin: PLUGIN
|
||||
receiverType: null
|
||||
returnType: kotlin/Int
|
||||
symbolKind: CLASS_MEMBER
|
||||
typeParameters: []
|
||||
valueParameters: []
|
||||
visibility: Public
|
||||
getDispatchReceiver(): test/WithGeneratedCompanion.Companion
|
||||
deprecationStatus: null
|
||||
|
||||
KtFunctionSymbol:
|
||||
annotationsList: []
|
||||
callableIdIfNonLocal: kotlin/Any.equals
|
||||
hasStableParameterNames: true
|
||||
isBuiltinFunctionInvoke: false
|
||||
isExtension: false
|
||||
isExternal: false
|
||||
isInfix: false
|
||||
isInline: false
|
||||
isOperator: true
|
||||
isOverride: false
|
||||
isStatic: false
|
||||
isSuspend: false
|
||||
modality: OPEN
|
||||
name: equals
|
||||
origin: LIBRARY
|
||||
receiverType: null
|
||||
returnType: kotlin/Boolean
|
||||
symbolKind: CLASS_MEMBER
|
||||
typeParameters: []
|
||||
valueParameters: [
|
||||
KtValueParameterSymbol(other)
|
||||
]
|
||||
visibility: Public
|
||||
getDispatchReceiver(): kotlin/Any
|
||||
deprecationStatus: null
|
||||
|
||||
KtFunctionSymbol:
|
||||
annotationsList: []
|
||||
callableIdIfNonLocal: kotlin/Any.hashCode
|
||||
hasStableParameterNames: true
|
||||
isBuiltinFunctionInvoke: false
|
||||
isExtension: false
|
||||
isExternal: false
|
||||
isInfix: false
|
||||
isInline: false
|
||||
isOperator: false
|
||||
isOverride: false
|
||||
isStatic: false
|
||||
isSuspend: false
|
||||
modality: OPEN
|
||||
name: hashCode
|
||||
origin: LIBRARY
|
||||
receiverType: null
|
||||
returnType: kotlin/Int
|
||||
symbolKind: CLASS_MEMBER
|
||||
typeParameters: []
|
||||
valueParameters: []
|
||||
visibility: Public
|
||||
getDispatchReceiver(): kotlin/Any
|
||||
deprecationStatus: null
|
||||
|
||||
KtFunctionSymbol:
|
||||
annotationsList: []
|
||||
callableIdIfNonLocal: kotlin/Any.toString
|
||||
hasStableParameterNames: true
|
||||
isBuiltinFunctionInvoke: false
|
||||
isExtension: false
|
||||
isExternal: false
|
||||
isInfix: false
|
||||
isInline: false
|
||||
isOperator: false
|
||||
isOverride: false
|
||||
isStatic: false
|
||||
isSuspend: false
|
||||
modality: OPEN
|
||||
name: toString
|
||||
origin: LIBRARY
|
||||
receiverType: null
|
||||
returnType: kotlin/String
|
||||
symbolKind: CLASS_MEMBER
|
||||
typeParameters: []
|
||||
valueParameters: []
|
||||
visibility: Public
|
||||
getDispatchReceiver(): kotlin/Any
|
||||
deprecationStatus: null
|
||||
|
||||
KtConstructorSymbol:
|
||||
annotationsList: []
|
||||
callableIdIfNonLocal: null
|
||||
containingClassIdIfNonLocal: test/WithGeneratedCompanion.Companion
|
||||
hasStableParameterNames: true
|
||||
isExtension: false
|
||||
isPrimary: true
|
||||
origin: PLUGIN
|
||||
receiverType: null
|
||||
returnType: test/WithGeneratedCompanion.Companion
|
||||
symbolKind: CLASS_MEMBER
|
||||
typeParameters: []
|
||||
valueParameters: []
|
||||
visibility: Public
|
||||
deprecationStatus: null
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
// WITH_FIR_TEST_COMPILER_PLUGIN
|
||||
package test
|
||||
|
||||
@org.jetbrains.kotlin.fir.plugin.NestedClassAndMaterializeMember
|
||||
class MyClass
|
||||
|
||||
// class: test/MyClass
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
fun materialize(): test.MyClass
|
||||
|
||||
open operator fun equals(other: kotlin.Any?): kotlin.Boolean
|
||||
|
||||
open fun hashCode(): kotlin.Int
|
||||
|
||||
open fun toString(): kotlin.String
|
||||
|
||||
class Nested
|
||||
|
||||
constructor()
|
||||
+138
@@ -0,0 +1,138 @@
|
||||
KtFunctionSymbol:
|
||||
annotationsList: []
|
||||
callableIdIfNonLocal: test/MyClass.materialize
|
||||
hasStableParameterNames: true
|
||||
isBuiltinFunctionInvoke: false
|
||||
isExtension: false
|
||||
isExternal: false
|
||||
isInfix: false
|
||||
isInline: false
|
||||
isOperator: false
|
||||
isOverride: false
|
||||
isStatic: false
|
||||
isSuspend: false
|
||||
modality: FINAL
|
||||
name: materialize
|
||||
origin: PLUGIN
|
||||
receiverType: null
|
||||
returnType: test/MyClass
|
||||
symbolKind: CLASS_MEMBER
|
||||
typeParameters: []
|
||||
valueParameters: []
|
||||
visibility: Public
|
||||
getDispatchReceiver(): test/MyClass
|
||||
deprecationStatus: null
|
||||
|
||||
KtFunctionSymbol:
|
||||
annotationsList: []
|
||||
callableIdIfNonLocal: kotlin/Any.equals
|
||||
hasStableParameterNames: true
|
||||
isBuiltinFunctionInvoke: false
|
||||
isExtension: false
|
||||
isExternal: false
|
||||
isInfix: false
|
||||
isInline: false
|
||||
isOperator: true
|
||||
isOverride: false
|
||||
isStatic: false
|
||||
isSuspend: false
|
||||
modality: OPEN
|
||||
name: equals
|
||||
origin: LIBRARY
|
||||
receiverType: null
|
||||
returnType: kotlin/Boolean
|
||||
symbolKind: CLASS_MEMBER
|
||||
typeParameters: []
|
||||
valueParameters: [
|
||||
KtValueParameterSymbol(other)
|
||||
]
|
||||
visibility: Public
|
||||
getDispatchReceiver(): kotlin/Any
|
||||
deprecationStatus: null
|
||||
|
||||
KtFunctionSymbol:
|
||||
annotationsList: []
|
||||
callableIdIfNonLocal: kotlin/Any.hashCode
|
||||
hasStableParameterNames: true
|
||||
isBuiltinFunctionInvoke: false
|
||||
isExtension: false
|
||||
isExternal: false
|
||||
isInfix: false
|
||||
isInline: false
|
||||
isOperator: false
|
||||
isOverride: false
|
||||
isStatic: false
|
||||
isSuspend: false
|
||||
modality: OPEN
|
||||
name: hashCode
|
||||
origin: LIBRARY
|
||||
receiverType: null
|
||||
returnType: kotlin/Int
|
||||
symbolKind: CLASS_MEMBER
|
||||
typeParameters: []
|
||||
valueParameters: []
|
||||
visibility: Public
|
||||
getDispatchReceiver(): kotlin/Any
|
||||
deprecationStatus: null
|
||||
|
||||
KtFunctionSymbol:
|
||||
annotationsList: []
|
||||
callableIdIfNonLocal: kotlin/Any.toString
|
||||
hasStableParameterNames: true
|
||||
isBuiltinFunctionInvoke: false
|
||||
isExtension: false
|
||||
isExternal: false
|
||||
isInfix: false
|
||||
isInline: false
|
||||
isOperator: false
|
||||
isOverride: false
|
||||
isStatic: false
|
||||
isSuspend: false
|
||||
modality: OPEN
|
||||
name: toString
|
||||
origin: LIBRARY
|
||||
receiverType: null
|
||||
returnType: kotlin/String
|
||||
symbolKind: CLASS_MEMBER
|
||||
typeParameters: []
|
||||
valueParameters: []
|
||||
visibility: Public
|
||||
getDispatchReceiver(): kotlin/Any
|
||||
deprecationStatus: null
|
||||
|
||||
KtNamedClassOrObjectSymbol:
|
||||
annotationsList: []
|
||||
classIdIfNonLocal: test/MyClass.Nested
|
||||
classKind: CLASS
|
||||
companionObject: null
|
||||
isData: false
|
||||
isExternal: false
|
||||
isFun: false
|
||||
isInline: false
|
||||
isInner: false
|
||||
modality: FINAL
|
||||
name: Nested
|
||||
origin: PLUGIN
|
||||
superTypes: [
|
||||
kotlin/Any
|
||||
]
|
||||
symbolKind: CLASS_MEMBER
|
||||
typeParameters: []
|
||||
visibility: Public
|
||||
deprecationStatus: null
|
||||
|
||||
KtConstructorSymbol:
|
||||
annotationsList: []
|
||||
callableIdIfNonLocal: null
|
||||
containingClassIdIfNonLocal: test/MyClass
|
||||
hasStableParameterNames: true
|
||||
isExtension: false
|
||||
isPrimary: true
|
||||
origin: SOURCE_MEMBER_GENERATED
|
||||
receiverType: null
|
||||
returnType: test/MyClass
|
||||
symbolKind: CLASS_MEMBER
|
||||
typeParameters: []
|
||||
valueParameters: []
|
||||
visibility: Public
|
||||
deprecationStatus: null
|
||||
Reference in New Issue
Block a user