[FIR] Carefully process constructors of inner and nested classes in the tower

If there is an expression receiver, we should process constructors only
  of inner classes. Constructors of nested classes can be called only
  on classifier

^KT-65333 Fixed
This commit is contained in:
Dmitriy Novozhilov
2024-02-27 12:36:29 +02:00
committed by Space Team
parent 67557ce731
commit 5b01396a11
15 changed files with 182 additions and 25 deletions
@@ -53,13 +53,13 @@ object I : BaseInterface {
fun test() {
A().<!UNRESOLVED_REFERENCE!>Inner<!>().box()
A().Inner().box()
A.<!UNRESOLVED_REFERENCE!>Inner<!>().box() // should be an error
B().<!UNRESOLVED_REFERENCE!>Inner<!>().box() // should be an error
B.Inner().box()
C().Inner().box()
C.<!INNER_CLASS_CONSTRUCTOR_NO_RECEIVER!>Inner<!>().<!UNRESOLVED_REFERENCE!>box<!>() // should be an error
D.<!UNRESOLVED_REFERENCE!>Inner<!>().box()
D.Inner().box()
E.Inner().box()
F.Inner().box()
G.Inner().box()