[FIR] KT-56212 Fix compilation exception caused by type parameter chain

- `FirTypeResolverImpl.resolveSymbol` cannot simply assert that a type
  parameter only has a single qualifier, because code may be fed to the
  compiler where a type parameter is the start of a type chain (see for
  example the added `typeParameterChainInReturnType` test).
- The fix assumes that any multi-qualifier type parameter trivially
  resolves to `null`, because such a chained type cannot exist.

^KT-56212 fixed
^KTIJ-24083 fixed
This commit is contained in:
Marco Pennekamp
2023-01-26 14:08:13 +01:00
committed by Space Team
parent 70ace38788
commit d8671422b1
11 changed files with 63 additions and 4 deletions
@@ -0,0 +1,2 @@
// ISSUE: KT-56212
fun <F> <!UNRESOLVED_REFERENCE!>F.X<!>.f(): Boolean = false
@@ -0,0 +1,2 @@
// ISSUE: KT-56212
fun <F> F.<!UNRESOLVED_REFERENCE!>X<!>.f(): Boolean = false
@@ -0,0 +1,3 @@
package
public fun </*0*/ F> [Error type: Unresolved type for F.X].f(): kotlin.Boolean
@@ -0,0 +1,2 @@
// ISSUE: KT-56212
fun <F> foo(): <!UNRESOLVED_REFERENCE!>F.X<!> = TODO()
@@ -0,0 +1,2 @@
// ISSUE: KT-56212
fun <F> foo(): F.<!UNRESOLVED_REFERENCE!>X<!> = TODO()
@@ -0,0 +1,3 @@
package
public fun </*0*/ F> foo(): [Error type: Unresolved type for F.X]