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

Case issue with Transparent? #28

Open
nedtwigg opened this issue Jul 5, 2024 · 0 comments
Open

Case issue with Transparent? #28

nedtwigg opened this issue Jul 5, 2024 · 0 comments

Comments

@nedtwigg
Copy link
Member

nedtwigg commented Jul 5, 2024

It seems like Kotlin has a case-insensitivity bug.

/** Creates a ControlWrapper which wraps the given control. */
class Transparent<T : Control>(
override val rootControl: T
) : ControlWrapper
companion object {
/** Most-efficient way to transparently pass a Control to a ControlWrapper API. */
@JvmStatic
fun <T : Control> transparent(control: T): Transparent<T> {
return Transparent(control)
}
}

This code used to be java, and it had the same bug. I switched it to Kotlin to try to fix it.

When called from a Kotlin compiler, I get this error: Unresolved reference 'transparent'. Interestingly, I get this error with both transparent and Transparent, and it's an accident that both methods exist at all.

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