-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Commit
Incorrect builder was used at line 269, which led to non-sensible type in `IrClass.thisReceiver` for function types, such as `SuspendFunction1<SuspendFunction1, SuspendFunction1>` in the linked issue. Avoid creating types manually completely to simplify this code and fix the bug. #KT-49168 Fixed
- Loading branch information
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
// WITH_RUNTIME | ||
// WITH_COROUTINES | ||
// IGNORE_BACKEND: JVM | ||
// IGNORE_LIGHT_ANALYSIS | ||
|
||
import helpers.* | ||
import kotlin.coroutines.* | ||
|
||
fun interface Print { | ||
suspend fun print(msg: String): String | ||
} | ||
|
||
object Context : Print by Print(::id) | ||
|
||
fun id(x: String): String = x | ||
|
||
fun builder(c: suspend () -> Unit) { | ||
c.startCoroutine(EmptyContinuation) | ||
} | ||
|
||
fun box(): String { | ||
var result = "Fail" | ||
builder { | ||
result = Context.print("OK") | ||
} | ||
return result | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.