Preserve sources properly for coroutine parts
Otherwise incremental reporting leads to exception when inlining into coroutine body happens
Original commit: 07592398c1
This commit is contained in:
+6
@@ -1124,6 +1124,12 @@ public class ExperimentalIncrementalJpsTestGenerated extends AbstractExperimenta
|
|||||||
doTest(fileName);
|
doTest(fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("coroutine")
|
||||||
|
public void testCoroutine() throws Exception {
|
||||||
|
String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/inlineFunCallSite/coroutine/");
|
||||||
|
doTest(fileName);
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("function")
|
@TestMetadata("function")
|
||||||
public void testFunction() throws Exception {
|
public void testFunction() throws Exception {
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/inlineFunCallSite/function/");
|
String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/inlineFunCallSite/function/");
|
||||||
|
|||||||
+6
@@ -1124,6 +1124,12 @@ public class IncrementalJpsTestGenerated extends AbstractIncrementalJpsTest {
|
|||||||
doTest(fileName);
|
doTest(fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("coroutine")
|
||||||
|
public void testCoroutine() throws Exception {
|
||||||
|
String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/inlineFunCallSite/coroutine/");
|
||||||
|
doTest(fileName);
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("function")
|
@TestMetadata("function")
|
||||||
public void testFunction() throws Exception {
|
public void testFunction() throws Exception {
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/inlineFunCallSite/function/");
|
String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/inlineFunCallSite/function/");
|
||||||
|
|||||||
@@ -0,0 +1,24 @@
|
|||||||
|
================ Step #1 =================
|
||||||
|
|
||||||
|
Cleaning output files:
|
||||||
|
out/production/module/META-INF/module.kotlin_module
|
||||||
|
out/production/module/inline/InlineKt.class
|
||||||
|
End of files
|
||||||
|
Compiling files:
|
||||||
|
src/inline.kt
|
||||||
|
End of files
|
||||||
|
Marked as dirty by Kotlin:
|
||||||
|
src/usage.kt
|
||||||
|
Exit code: ADDITIONAL_PASS_REQUIRED
|
||||||
|
------------------------------------------
|
||||||
|
Cleaning output files:
|
||||||
|
out/production/module/META-INF/module.kotlin_module
|
||||||
|
out/production/module/usage/Controller.class
|
||||||
|
out/production/module/usage/UsageKt$bar$1.class
|
||||||
|
out/production/module/usage/UsageKt.class
|
||||||
|
End of files
|
||||||
|
Compiling files:
|
||||||
|
src/usage.kt
|
||||||
|
End of files
|
||||||
|
Exit code: OK
|
||||||
|
------------------------------------------
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
package inline
|
||||||
|
|
||||||
|
inline fun f(x: Int): Int {
|
||||||
|
return x - 1
|
||||||
|
}
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
package inline
|
||||||
|
|
||||||
|
inline fun f(x: Int): Int {
|
||||||
|
return x + 1
|
||||||
|
}
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
package usage
|
||||||
|
|
||||||
|
fun async(coroutine x: Controller.() -> Continuation<Unit>) {
|
||||||
|
x(Controller()).resume(Unit)
|
||||||
|
}
|
||||||
|
|
||||||
|
class Controller {
|
||||||
|
suspend fun step(param: Int, next: Continuation<Int>) {
|
||||||
|
next.resume(param + 1)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fun bar() {
|
||||||
|
async {
|
||||||
|
val result = step(1)
|
||||||
|
inline.f(result)
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user