Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[foundation] fragment() helper function definition and handling #101

Open
toth-istvan-zoltan opened this issue Jan 22, 2025 · 0 comments
Open
Assignees

Comments

@toth-istvan-zoltan
Copy link
Contributor

This code produces wrong result because fragment() is translated into the fragment parameter of patchDescendant by StateAccessTransform.

@Adaptive
fun tc(vararg instructions : AdaptiveInstruction) {
    T1(fragment().instructions.firstOrNullIfInstance<Test>()?.i ?: 999)
}

The basic solution would be to use the declaring fragment.

However, what does fragment() mean in this code.

@Adaptive
fun a() {
    row {
        fragment().also { println(it) }
    }
}
@toth-istvan-zoltan toth-istvan-zoltan self-assigned this Jan 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant