[AA] getExpectedType should not calculate expression type
if property doesn't specify explicit type, property's return type would be calculated by provided initializer ^KT-62588 fixed Merge-request: KT-MR-12564 Merged-by: Anna Kozlova <Anna.Kozlova@jetbrains.com>
This commit is contained in:
+1
-4
@@ -1,5 +1,2 @@
|
||||
expression: av
|
||||
expected type: KtUsualClassType:
|
||||
annotationsList: []
|
||||
ownTypeArguments: []
|
||||
type: kotlin/String
|
||||
expected type: null
|
||||
|
||||
+1
-13
@@ -2,16 +2,4 @@ expression: { a: Int ->
|
||||
val b = 1
|
||||
a + b
|
||||
}
|
||||
expected type: KtFunctionalType:
|
||||
annotationsList: []
|
||||
ownTypeArguments: [
|
||||
KtUsualClassType:
|
||||
annotationsList: []
|
||||
ownTypeArguments: []
|
||||
type: kotlin/Int
|
||||
KtUsualClassType:
|
||||
annotationsList: []
|
||||
ownTypeArguments: []
|
||||
type: kotlin/Int
|
||||
]
|
||||
type: kotlin/Function1<kotlin/Int, kotlin/Int>
|
||||
expected type: null
|
||||
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
class C {
|
||||
var y = "<caret>"
|
||||
}
|
||||
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
expression: ""
|
||||
expected type: null
|
||||
+1
-4
@@ -1,5 +1,2 @@
|
||||
expression: av
|
||||
expected type: KtUsualClassType:
|
||||
annotationsList: []
|
||||
ownTypeArguments: []
|
||||
type: kotlin/String
|
||||
expected type: null
|
||||
|
||||
+2
-3
@@ -1,5 +1,4 @@
|
||||
expression: av
|
||||
expected type: KtUsualClassType:
|
||||
expected type: KtIntersectionType:
|
||||
annotationsList: []
|
||||
ownTypeArguments: []
|
||||
type: kotlin/Any
|
||||
type: it(kotlin/Int & kotlin/String)
|
||||
|
||||
Reference in New Issue
Block a user