[Analysis API] Unwrap anonymous function expressions in reference shortener
Anonymous functions are additionally wrapped into an expression ^KTIJ-26629 Fixed ^KTIJ-26597 Fixed
This commit is contained in:
+9
@@ -0,0 +1,9 @@
|
||||
// FILE: main.kt
|
||||
package test
|
||||
|
||||
val anonymous = <expr>@dependency.Ann</expr> fun() {}
|
||||
|
||||
// FILE: dependency.kt
|
||||
package dependency
|
||||
|
||||
annotation class Ann
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
Before shortening: @dependency.Ann
|
||||
with DO_NOT_SHORTEN:
|
||||
with SHORTEN_IF_ALREADY_IMPORTED:
|
||||
with SHORTEN_AND_IMPORT:
|
||||
[type] dependency.Ann
|
||||
with SHORTEN_AND_STAR_IMPORT:
|
||||
[type] dependency.Ann
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
// FILE: main.kt
|
||||
package test
|
||||
|
||||
val anonymous = fun <expr>dependency.Type</expr>.() {}
|
||||
|
||||
// FILE: dependency.kt
|
||||
package dependency
|
||||
|
||||
class Type
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
Before shortening: dependency.Type
|
||||
with DO_NOT_SHORTEN:
|
||||
with SHORTEN_IF_ALREADY_IMPORTED:
|
||||
with SHORTEN_AND_IMPORT:
|
||||
[type] dependency.Type
|
||||
with SHORTEN_AND_STAR_IMPORT:
|
||||
[type] dependency.Type
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
// FILE: main.kt
|
||||
package test
|
||||
|
||||
val anonymous = fun(): <expr>dependency.Type</expr> = dependency.Type()
|
||||
|
||||
// FILE: dependency.kt
|
||||
package dependency
|
||||
|
||||
class Type
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
Before shortening: dependency.Type
|
||||
with DO_NOT_SHORTEN:
|
||||
with SHORTEN_IF_ALREADY_IMPORTED:
|
||||
with SHORTEN_AND_IMPORT:
|
||||
[type] dependency.Type
|
||||
with SHORTEN_AND_STAR_IMPORT:
|
||||
[type] dependency.Type
|
||||
Reference in New Issue
Block a user