-
Notifications
You must be signed in to change notification settings - Fork 281
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
ClassName.bestGuess() fails for classes starting with a lowercase character #978
Comments
Java also allows this and JavaPoet will fail in the same way. If you're inside a Kotlin compiler plugin you shouldn't need to use |
What exactly do you mean with "normally"? Do you mean the constructor? The compiler often works with full qualified names and then it's very convenient to rely on |
Yes, because The compiler API should give you a way to break apart a qualified reference into component parts. Otherwise I don't see how it would know how to emit bytecode where these cases are all defined differently since |
Sounds reasonable. Thanks for clarifying. |
Calling
ClassName.bestGuess("abc.MyClass.asg")
fails:One could argue that classes should start with an uppercase letter, but Kotlin allows it and it's the input of another program that internally uses Kotlin Poet.
The text was updated successfully, but these errors were encountered: