-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
DurableFunctionKeyTransformer: Fix non-composable functions stopping …
…the 'realizeKeyMetaAnnotations' transformation ^KT-75159 fixed
- Loading branch information
Showing
4 changed files
with
90 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
...ctionKeyMetaAnnotationsTests/testCapturingComposableLambda_entryPoint[useFir = false].txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
// | ||
// Source | ||
// ------------------------------------------ | ||
|
||
import androidx.compose.runtime.* | ||
|
||
fun runApplication(child: @Composable () -> Unit) { | ||
/* Pretend to be an entry point */ | ||
} | ||
|
||
fun Foo() { | ||
var state = 255 | ||
runApplication { | ||
println("$state") | ||
} | ||
} | ||
|
||
|
||
// | ||
// Transformed IR | ||
// ------------------------------------------ | ||
|
||
TestKt { | ||
runApplication (Lkotlin/jvm/functions/Function2;)V null | ||
Foo ()V null | ||
} | ||
|
||
TestKt$Foo$1 { | ||
<init> (Lkotlin/jvm/internal/Ref$IntRef;)V null | ||
invoke (Landroidx/compose/runtime/Composer;I)V [key=2066003522, startOffset=180, endOffset=213] | ||
invoke (Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object; null | ||
} |
32 changes: 32 additions & 0 deletions
32
...nctionKeyMetaAnnotationsTests/testCapturingComposableLambda_entryPoint[useFir = true].txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
// | ||
// Source | ||
// ------------------------------------------ | ||
|
||
import androidx.compose.runtime.* | ||
|
||
fun runApplication(child: @Composable () -> Unit) { | ||
/* Pretend to be an entry point */ | ||
} | ||
|
||
fun Foo() { | ||
var state = 255 | ||
runApplication { | ||
println("$state") | ||
} | ||
} | ||
|
||
|
||
// | ||
// Transformed IR | ||
// ------------------------------------------ | ||
|
||
TestKt { | ||
runApplication (Lkotlin/jvm/functions/Function2;)V null | ||
Foo ()V null | ||
} | ||
|
||
TestKt$Foo$1 { | ||
<init> (Lkotlin/jvm/internal/Ref$IntRef;)V null | ||
invoke (Landroidx/compose/runtime/Composer;I)V [key=2066003522, startOffset=180, endOffset=213] | ||
invoke (Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object; null | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters