KT-64186 [LL] Correctly handle anonymous objects' headers in ContextCollector
This bug spilled into reference shortener, and then to "redundant qualifier inspection" and code completion from there; it caused KTIJ-26024 to reproduce again (but only for anonymous objects) ^KT-64186 Fixed
This commit is contained in:
committed by
Space Team
parent
2eb1e65bbf
commit
78f492394c
+10
@@ -0,0 +1,10 @@
|
||||
// FILE: main.kt
|
||||
|
||||
abstract class Outer {
|
||||
abstract class Nested(a: Any) : Outer()
|
||||
|
||||
class OtherNested
|
||||
|
||||
val foo = object : Outer.Nested(<expr>Outer.OtherNested()</expr>) {}
|
||||
}
|
||||
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
Before shortening: Outer.OtherNested()
|
||||
with DO_NOT_SHORTEN:
|
||||
with SHORTEN_IF_ALREADY_IMPORTED:
|
||||
[qualifier] Outer.OtherNested()
|
||||
with SHORTEN_AND_IMPORT:
|
||||
[qualifier] Outer.OtherNested()
|
||||
with SHORTEN_AND_STAR_IMPORT:
|
||||
[qualifier] Outer.OtherNested()
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
// FILE: main.kt
|
||||
|
||||
abstract class Outer {
|
||||
abstract class Nested(a: Any) : Outer()
|
||||
|
||||
class OtherNested
|
||||
}
|
||||
|
||||
val foo = object : Outer.Nested(<expr>Outer.OtherNested()</expr>) {}
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
Before shortening: Outer.OtherNested()
|
||||
with DO_NOT_SHORTEN:
|
||||
with SHORTEN_IF_ALREADY_IMPORTED:
|
||||
[qualifier] Outer.OtherNested()
|
||||
with SHORTEN_AND_IMPORT:
|
||||
[qualifier] Outer.OtherNested()
|
||||
with SHORTEN_AND_STAR_IMPORT:
|
||||
[qualifier] Outer.OtherNested()
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
// FILE: main.kt
|
||||
|
||||
abstract class Outer {
|
||||
abstract class Nested : Outer()
|
||||
|
||||
<expr>val foo = object : Outer.Nested() {}</expr>
|
||||
}
|
||||
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
Before shortening: val foo = object : Outer.Nested() {}
|
||||
with DO_NOT_SHORTEN:
|
||||
with SHORTEN_IF_ALREADY_IMPORTED:
|
||||
[type] Outer.Nested
|
||||
with SHORTEN_AND_IMPORT:
|
||||
[type] Outer.Nested
|
||||
with SHORTEN_AND_STAR_IMPORT:
|
||||
[type] Outer.Nested
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
// FILE: main.kt
|
||||
|
||||
abstract class Outer {
|
||||
abstract class Nested : Outer()
|
||||
}
|
||||
|
||||
<expr>val foo = object : Outer.Nested() {}</expr>
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
Before shortening: val foo = object : Outer.Nested() {}
|
||||
with DO_NOT_SHORTEN:
|
||||
with SHORTEN_IF_ALREADY_IMPORTED:
|
||||
with SHORTEN_AND_IMPORT:
|
||||
[type] Outer.Nested
|
||||
with SHORTEN_AND_STAR_IMPORT:
|
||||
[type] Outer.Nested
|
||||
Reference in New Issue
Block a user