[scripting] Make properties from destructing declarations available with reflection
This commit is contained in:
committed by
teamcityserver
parent
1c16f2f8c9
commit
58831eacca
+10
-1
@@ -212,6 +212,15 @@ protected constructor(
|
||||
}.toList()
|
||||
}
|
||||
|
||||
protected open fun collectDescriptorsFromDestructingDeclaration(
|
||||
result: MutableSet<DeclarationDescriptor>,
|
||||
declaration: KtDestructuringDeclaration,
|
||||
nameFilter: (Name) -> Boolean,
|
||||
location: LookupLocation,
|
||||
) {
|
||||
// MultiDeclarations are not supported on global level by default
|
||||
}
|
||||
|
||||
protected fun computeDescriptorsFromDeclaredElements(
|
||||
kindFilter: DescriptorKindFilter,
|
||||
nameFilter: (Name) -> Boolean,
|
||||
@@ -258,7 +267,7 @@ protected constructor(
|
||||
}
|
||||
}
|
||||
is KtDestructuringDeclaration -> {
|
||||
// MultiDeclarations are not supported on global level
|
||||
collectDescriptorsFromDestructingDeclaration(result, declaration, nameFilter, location)
|
||||
}
|
||||
else -> throw IllegalArgumentException("Unsupported declaration kind: " + declaration)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user