Reapply "Only create descriptors for candidates with lambda args"
#KT-36247 fixed A lot of testdata changed because significanly less (error) descriptors are created for unresolved types, so diagnostics became different.
This commit is contained in:
@@ -1,49 +0,0 @@
|
||||
UFile (package = )
|
||||
UClass (name = DestructuringDeclarationKt)
|
||||
UMethod (name = foo)
|
||||
UParameter (name = data)
|
||||
UAnnotation (fqName = org.jetbrains.annotations.NotNull)
|
||||
UBlockExpression
|
||||
UDeclarationsExpression
|
||||
ULocalVariable (name = var268d41a5)
|
||||
UAnnotation (fqName = null)
|
||||
UBinaryExpression (operator = <other>)
|
||||
ULiteralExpression (value = "foo")
|
||||
ULiteralExpression (value = 1)
|
||||
ULocalVariable (name = a)
|
||||
UAnnotation (fqName = null)
|
||||
UQualifiedReferenceExpression
|
||||
USimpleNameReferenceExpression (identifier = var268d41a5)
|
||||
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 0))
|
||||
UIdentifier (Identifier (component1))
|
||||
USimpleNameReferenceExpression (identifier = <ERROR FUNCTION>, resolvesTo = null)
|
||||
ULocalVariable (name = b)
|
||||
UAnnotation (fqName = null)
|
||||
UQualifiedReferenceExpression
|
||||
USimpleNameReferenceExpression (identifier = var268d41a5)
|
||||
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 0))
|
||||
UIdentifier (Identifier (component2))
|
||||
USimpleNameReferenceExpression (identifier = <ERROR FUNCTION>, resolvesTo = null)
|
||||
UDeclarationsExpression
|
||||
ULocalVariable (name = var465978a0)
|
||||
UAnnotation (fqName = null)
|
||||
UAnnotation (fqName = kotlin.Suppress)
|
||||
UNamedExpression (name = names)
|
||||
ULiteralExpression (value = "UNCHECKED_CAST")
|
||||
UBinaryExpressionWithType
|
||||
USimpleNameReferenceExpression (identifier = data)
|
||||
UTypeReferenceExpression (name = kotlin.Pair<? extends java.lang.String,? extends java.lang.String>)
|
||||
ULocalVariable (name = k)
|
||||
UAnnotation (fqName = null)
|
||||
UQualifiedReferenceExpression
|
||||
USimpleNameReferenceExpression (identifier = var465978a0)
|
||||
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 0))
|
||||
UIdentifier (Identifier (component1))
|
||||
USimpleNameReferenceExpression (identifier = <ERROR FUNCTION>, resolvesTo = null)
|
||||
ULocalVariable (name = v)
|
||||
UAnnotation (fqName = null)
|
||||
UQualifiedReferenceExpression
|
||||
USimpleNameReferenceExpression (identifier = var465978a0)
|
||||
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 0))
|
||||
UIdentifier (Identifier (component2))
|
||||
USimpleNameReferenceExpression (identifier = <ERROR FUNCTION>, resolvesTo = null)
|
||||
@@ -1,10 +0,0 @@
|
||||
public final class DestructuringDeclarationKt {
|
||||
public static final fun foo(@org.jetbrains.annotations.NotNull data: java.lang.Object) : void {
|
||||
@null var var268d41a5: <ErrorType> = "foo" <other> 1
|
||||
@null var a: java.lang.String = var268d41a5.<ERROR FUNCTION>()
|
||||
@null var b: int = var268d41a5.<ERROR FUNCTION>()
|
||||
@null @kotlin.Suppress(names = "UNCHECKED_CAST") var var465978a0: <ErrorType> = data as kotlin.Pair<? extends java.lang.String,? extends java.lang.String>
|
||||
@null var k: java.lang.String = var465978a0.<ERROR FUNCTION>()
|
||||
@null var v: java.lang.String = var465978a0.<ERROR FUNCTION>()
|
||||
}
|
||||
}
|
||||
@@ -4,15 +4,15 @@ UFile (package = ) [public final class InnerNonFixedTypeVariableKt {...]
|
||||
UParameter (name = list) [@org.jetbrains.annotations.NotNull var list: java.util.List<? extends java.lang.Object>]
|
||||
UAnnotation (fqName = org.jetbrains.annotations.NotNull) [@org.jetbrains.annotations.NotNull]
|
||||
UBlockExpression [{...}] : PsiType:<ErrorType>
|
||||
UQualifiedReferenceExpression [list.filterIsInstance().<ERROR FUNCTION>(mutableSetOf(), { ...})] : PsiType:<ErrorType>
|
||||
UQualifiedReferenceExpression [list.filterIsInstance().<anonymous class>(mutableSetOf(), { ...})] : PsiType:<ErrorType>
|
||||
UQualifiedReferenceExpression [list.filterIsInstance()]
|
||||
USimpleNameReferenceExpression (identifier = list) [list] : PsiType:List<? extends Object>
|
||||
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 0)) [filterIsInstance()]
|
||||
UIdentifier (Identifier (filterIsInstance)) [UIdentifier (Identifier (filterIsInstance))]
|
||||
USimpleNameReferenceExpression (identifier = filterIsInstance, resolvesTo = null) [filterIsInstance]
|
||||
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 2)) [<ERROR FUNCTION>(mutableSetOf(), { ...})] : PsiType:<ErrorType>
|
||||
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 2)) [<anonymous class>(mutableSetOf(), { ...})] : PsiType:<ErrorType>
|
||||
UIdentifier (Identifier (mapTo)) [UIdentifier (Identifier (mapTo))]
|
||||
USimpleNameReferenceExpression (identifier = <ERROR FUNCTION>, resolvesTo = null) [<ERROR FUNCTION>] : PsiType:<ErrorType>
|
||||
USimpleNameReferenceExpression (identifier = <anonymous class>, resolvesTo = null) [<anonymous class>] : PsiType:<ErrorType>
|
||||
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 0)) [mutableSetOf()] : PsiType:Set<NonExistentClass>
|
||||
UIdentifier (Identifier (mutableSetOf)) [UIdentifier (Identifier (mutableSetOf))]
|
||||
USimpleNameReferenceExpression (identifier = mutableSetOf, resolvesTo = null) [mutableSetOf] : PsiType:Set<NonExistentClass>
|
||||
|
||||
@@ -1,140 +0,0 @@
|
||||
UFile (package = org.jetbrains.uast.kotlin)
|
||||
UClass (name = LambdaReturnKt)
|
||||
UMethod (name = foo)
|
||||
UBlockExpression
|
||||
UDeclarationsExpression
|
||||
ULocalVariable (name = lam1)
|
||||
ULambdaExpression
|
||||
UParameter (name = a)
|
||||
UAnnotation (fqName = org.jetbrains.annotations.NotNull)
|
||||
UBlockExpression
|
||||
UDeclarationsExpression
|
||||
ULocalVariable (name = b)
|
||||
ULiteralExpression (value = 1)
|
||||
UReturnExpression
|
||||
UBinaryExpression (operator = +)
|
||||
USimpleNameReferenceExpression (identifier = a)
|
||||
USimpleNameReferenceExpression (identifier = b)
|
||||
UDeclarationsExpression
|
||||
ULocalVariable (name = lam2)
|
||||
ULambdaExpression
|
||||
UParameter (name = a)
|
||||
UAnnotation (fqName = org.jetbrains.annotations.NotNull)
|
||||
UBlockExpression
|
||||
UDeclarationsExpression
|
||||
ULocalVariable (name = c)
|
||||
ULiteralExpression (value = 1)
|
||||
UReturnExpression
|
||||
UIfExpression
|
||||
UBinaryExpression (operator = >)
|
||||
USimpleNameReferenceExpression (identifier = a)
|
||||
ULiteralExpression (value = 0)
|
||||
UBinaryExpression (operator = +)
|
||||
USimpleNameReferenceExpression (identifier = a)
|
||||
USimpleNameReferenceExpression (identifier = c)
|
||||
UBinaryExpression (operator = -)
|
||||
USimpleNameReferenceExpression (identifier = a)
|
||||
USimpleNameReferenceExpression (identifier = c)
|
||||
UDeclarationsExpression
|
||||
ULocalVariable (name = lam3)
|
||||
ULabeledExpression (label = lbd)
|
||||
ULambdaExpression
|
||||
UParameter (name = a)
|
||||
UAnnotation (fqName = org.jetbrains.annotations.NotNull)
|
||||
UBlockExpression
|
||||
UDeclarationsExpression
|
||||
ULocalVariable (name = d)
|
||||
ULiteralExpression (value = 1)
|
||||
UReturnExpression
|
||||
UBinaryExpression (operator = +)
|
||||
USimpleNameReferenceExpression (identifier = a)
|
||||
USimpleNameReferenceExpression (identifier = d)
|
||||
UDeclarationsExpression
|
||||
ULocalVariable (name = lam4)
|
||||
ULambdaExpression
|
||||
UParameter (name = a)
|
||||
UAnnotation (fqName = org.jetbrains.annotations.NotNull)
|
||||
UBlockExpression
|
||||
UIfExpression
|
||||
UBinaryExpression (operator = <)
|
||||
USimpleNameReferenceExpression (identifier = a)
|
||||
ULiteralExpression (value = 5)
|
||||
UReturnExpression
|
||||
ULiteralExpression (value = "5")
|
||||
UIfExpression
|
||||
UBinaryExpression (operator = >)
|
||||
USimpleNameReferenceExpression (identifier = a)
|
||||
ULiteralExpression (value = 0)
|
||||
UReturnExpression
|
||||
ULiteralExpression (value = "1")
|
||||
UReturnExpression
|
||||
ULiteralExpression (value = "2")
|
||||
UDeclarationsExpression
|
||||
ULocalVariable (name = lam5)
|
||||
ULambdaExpression
|
||||
UParameter (name = a)
|
||||
UAnnotation (fqName = org.jetbrains.annotations.NotNull)
|
||||
UBlockExpression
|
||||
UReturnExpression
|
||||
UBinaryExpression (operator = +)
|
||||
ULiteralExpression (value = "a")
|
||||
USimpleNameReferenceExpression (identifier = a)
|
||||
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 1))
|
||||
UIdentifier (Identifier (bar))
|
||||
USimpleNameReferenceExpression (identifier = bar, resolvesTo = null)
|
||||
ULambdaExpression
|
||||
UBlockExpression
|
||||
UIfExpression
|
||||
UBinaryExpression (operator = >)
|
||||
USimpleNameReferenceExpression (identifier = it)
|
||||
ULiteralExpression (value = 5)
|
||||
UReturnExpression
|
||||
UDeclarationsExpression
|
||||
ULocalVariable (name = b)
|
||||
ULiteralExpression (value = 1)
|
||||
UReturnExpression
|
||||
UBinaryExpression (operator = +)
|
||||
USimpleNameReferenceExpression (identifier = it)
|
||||
USimpleNameReferenceExpression (identifier = b)
|
||||
UDeclarationsExpression
|
||||
ULocalVariable (name = x)
|
||||
ULambdaExpression
|
||||
UBlockExpression
|
||||
UDeclarationsExpression
|
||||
ULocalVariable (name = vardbcd0724)
|
||||
UAnnotation (fqName = org.jetbrains.annotations.NotNull)
|
||||
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 2))
|
||||
UIdentifier (Identifier (listOf))
|
||||
USimpleNameReferenceExpression (identifier = listOf, resolvesTo = null)
|
||||
ULiteralExpression (value = 1)
|
||||
ULiteralExpression (value = 2)
|
||||
ULocalVariable (name = a)
|
||||
UAnnotation (fqName = org.jetbrains.annotations.NotNull)
|
||||
UQualifiedReferenceExpression
|
||||
USimpleNameReferenceExpression (identifier = vardbcd0724)
|
||||
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 0))
|
||||
UIdentifier (Identifier (component1))
|
||||
USimpleNameReferenceExpression (identifier = <ERROR FUNCTION>, resolvesTo = null)
|
||||
ULocalVariable (name = b)
|
||||
UAnnotation (fqName = org.jetbrains.annotations.NotNull)
|
||||
UQualifiedReferenceExpression
|
||||
USimpleNameReferenceExpression (identifier = vardbcd0724)
|
||||
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 0))
|
||||
UIdentifier (Identifier (component2))
|
||||
USimpleNameReferenceExpression (identifier = <ERROR FUNCTION>, resolvesTo = null)
|
||||
UDeclarationsExpression
|
||||
ULocalVariable (name = y)
|
||||
ULambdaExpression
|
||||
UBlockExpression
|
||||
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 1))
|
||||
UIdentifier (Identifier (listOf))
|
||||
USimpleNameReferenceExpression (identifier = listOf, resolvesTo = null)
|
||||
ULiteralExpression (value = 1)
|
||||
UMethod (name = bar)
|
||||
UParameter (name = lmbd)
|
||||
UAnnotation (fqName = org.jetbrains.annotations.NotNull)
|
||||
UBlockExpression
|
||||
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 1))
|
||||
UIdentifier (Identifier (lmbd))
|
||||
USimpleNameReferenceExpression (identifier = invoke, resolvesTo = null)
|
||||
ULiteralExpression (value = 1)
|
||||
@@ -1,44 +0,0 @@
|
||||
package org.jetbrains.uast.kotlin
|
||||
|
||||
public final class LambdaReturnKt {
|
||||
public static final fun foo() : void {
|
||||
var lam1: kotlin.jvm.functions.Function1<? super java.lang.Integer,? extends java.lang.Integer> = { @org.jetbrains.annotations.NotNull var a: int ->
|
||||
|
||||
var b: int = 1
|
||||
return a + b
|
||||
}
|
||||
var lam2: kotlin.jvm.functions.Function1<? super java.lang.Integer,? extends java.lang.Integer> = { @org.jetbrains.annotations.NotNull var a: int ->
|
||||
|
||||
var c: int = 1
|
||||
return if (a > 0) a + c else a - c
|
||||
}
|
||||
var lam3: kotlin.jvm.functions.Function1<? super java.lang.Integer,? extends java.lang.Integer> = lbd@ { @org.jetbrains.annotations.NotNull var a: int ->
|
||||
|
||||
var d: int = 1
|
||||
return a + d
|
||||
}
|
||||
var lam4: kotlin.jvm.functions.Function1<? super java.lang.Integer,? extends java.lang.String> = fun (@org.jetbrains.annotations.NotNull var a: int) {
|
||||
if (a < 5) return "5"
|
||||
if (a > 0) return "1" else return "2"
|
||||
}
|
||||
var lam5: kotlin.jvm.functions.Function1<? super java.lang.Integer,? extends java.lang.String> = fun (@org.jetbrains.annotations.NotNull var a: int) {
|
||||
return "a" + a
|
||||
}
|
||||
bar({
|
||||
if (it > 5) return
|
||||
var b: int = 1
|
||||
return it + b
|
||||
})
|
||||
var x: kotlin.jvm.functions.Function0<? extends kotlin.Unit> = {
|
||||
@org.jetbrains.annotations.NotNull var vardbcd0724: <ErrorType> = listOf(1, 2)
|
||||
@org.jetbrains.annotations.NotNull var a: int = vardbcd0724.<ERROR FUNCTION>()
|
||||
@org.jetbrains.annotations.NotNull var b: int = vardbcd0724.<ERROR FUNCTION>()
|
||||
}
|
||||
var y: kotlin.jvm.functions.Function0<? extends kotlin.Unit> = {
|
||||
listOf(1)
|
||||
}
|
||||
}
|
||||
private static final fun bar(@org.jetbrains.annotations.NotNull lmbd: kotlin.jvm.functions.Function1<? super java.lang.Integer,java.lang.Integer>) : void {
|
||||
invoke(1)
|
||||
}
|
||||
}
|
||||
@@ -1,45 +0,0 @@
|
||||
UFile (package = )
|
||||
UClass (name = WhenAndDestructingKt)
|
||||
UMethod (name = getElementsAdditionalResolve)
|
||||
UParameter (name = string)
|
||||
UAnnotation (fqName = org.jetbrains.annotations.NotNull)
|
||||
UBlockExpression
|
||||
UDeclarationsExpression
|
||||
ULocalVariable (name = arr)
|
||||
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 2))
|
||||
UIdentifier (Identifier (listOf))
|
||||
USimpleNameReferenceExpression (identifier = listOf, resolvesTo = null)
|
||||
ULiteralExpression (value = "1")
|
||||
ULiteralExpression (value = "2")
|
||||
USwitchExpression
|
||||
USimpleNameReferenceExpression (identifier = string)
|
||||
UExpressionList (when)
|
||||
USwitchClauseExpressionWithBody
|
||||
ULiteralExpression (value = "aaaa")
|
||||
UExpressionList (when_entry)
|
||||
UReturnExpression
|
||||
ULiteralExpression (value = "bindingContext")
|
||||
UBreakExpression (label = null)
|
||||
USwitchClauseExpressionWithBody
|
||||
UExpressionList (when_entry)
|
||||
UDeclarationsExpression
|
||||
ULocalVariable (name = var837f1e82)
|
||||
UAnnotation (fqName = null)
|
||||
USimpleNameReferenceExpression (identifier = arr)
|
||||
ULocalVariable (name = bindingContext)
|
||||
UAnnotation (fqName = null)
|
||||
UQualifiedReferenceExpression
|
||||
USimpleNameReferenceExpression (identifier = var837f1e82)
|
||||
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 0))
|
||||
UIdentifier (Identifier (component1))
|
||||
USimpleNameReferenceExpression (identifier = <ERROR FUNCTION>, resolvesTo = null)
|
||||
ULocalVariable (name = statementFilter)
|
||||
UAnnotation (fqName = null)
|
||||
UQualifiedReferenceExpression
|
||||
USimpleNameReferenceExpression (identifier = var837f1e82)
|
||||
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 0))
|
||||
UIdentifier (Identifier (component2))
|
||||
USimpleNameReferenceExpression (identifier = <ERROR FUNCTION>, resolvesTo = null)
|
||||
UReturnExpression
|
||||
USimpleNameReferenceExpression (identifier = bindingContext)
|
||||
UBreakExpression (label = null)
|
||||
@@ -1,21 +0,0 @@
|
||||
public final class WhenAndDestructingKt {
|
||||
public static final fun getElementsAdditionalResolve(@org.jetbrains.annotations.NotNull string: java.lang.String) : java.lang.String {
|
||||
var arr: java.util.List<? extends java.lang.String> = listOf("1", "2")
|
||||
switch (string) {
|
||||
"aaaa" -> {
|
||||
return "bindingContext"
|
||||
break
|
||||
}
|
||||
|
||||
-> {
|
||||
@null var var837f1e82: <ErrorType> = arr
|
||||
@null var bindingContext: java.lang.String = var837f1e82.<ERROR FUNCTION>()
|
||||
@null var statementFilter: java.lang.String = var837f1e82.<ERROR FUNCTION>()
|
||||
return bindingContext
|
||||
break
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user