[Analysis API] KTIJ-24527 Properly handle typealiased functional types

Use expanded ConeTypes to get correct parameters and return types

Also, fix the order of rendering modifiers in `KtFunctionalTypeRenderer`

^KTIJ-24527 Fixed
This commit is contained in:
Roman Golyshev
2023-02-08 21:41:28 +01:00
committed by teamcity
parent b931868d41
commit ac8d5a0ea8
9 changed files with 105 additions and 31 deletions
@@ -0,0 +1,17 @@
class A
class B
typealias WithGeneric<T> = (T) -> String
fun withGeneric(f: WithGeneric<Double>) {}
typealias WithReceiver = String.() -> Unit
fun withReceiver(f: WithReceiver) {}
typealias WithContextReceiver = context(String) () -> Unit
fun withContextReceiver(f: WithContextReceiver) {}
typealias WithSuspend = suspend (String) -> Int
fun withContextReceiver(f: WithSuspend) {}
typealias WithEverything<T> = suspend context(T, B) String.(Int, T) -> String
fun withEverything(f: WithEverything<A>) {}
@@ -0,0 +1,24 @@
class A
class B
typealias WithGeneric<T> = (T) -> String
fun withGeneric(f: (Double) -> String)
typealias WithReceiver = String.() -> Unit
fun withReceiver(f: String.() -> Unit)
typealias WithContextReceiver = context(String) () -> Unit
fun withContextReceiver(f: context(String) () -> Unit)
typealias WithSuspend = suspend (String) -> Int
fun withContextReceiver(f: suspend (String) -> Int)
typealias WithEverything<T> = suspend context(T, B) String.(Int, T) -> String
fun withEverything(f: suspend context(A, B) String.(Int, A) -> String)