[FIR] Fix detecting selector for safe calls in light tree
This commit is contained in:
committed by
teamcityserver
parent
4f8c854ead
commit
9116c341ba
+3
-2
@@ -947,11 +947,12 @@ fun FlyweightCapableTreeStructure<LighterASTNode>.selector(node: LighterASTNode)
|
||||
var dotOrDoubleColonFound = false
|
||||
for (child in children) {
|
||||
if (child == null) continue
|
||||
if (child.tokenType == KtTokens.DOT || child.tokenType == KtTokens.COLONCOLON) {
|
||||
val tokenType = child.tokenType
|
||||
if (tokenType == KtTokens.DOT || tokenType == KtTokens.COLONCOLON || tokenType == KtTokens.SAFE_ACCESS) {
|
||||
dotOrDoubleColonFound = true
|
||||
continue
|
||||
}
|
||||
if (dotOrDoubleColonFound && (child.tokenType == KtNodeTypes.CALL_EXPRESSION || child.tokenType == KtNodeTypes.REFERENCE_EXPRESSION)) {
|
||||
if (dotOrDoubleColonFound && (tokenType == KtNodeTypes.CALL_EXPRESSION || tokenType == KtNodeTypes.REFERENCE_EXPRESSION)) {
|
||||
return child
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user