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

Improve name escaping logic #701

Closed
Egorand opened this issue Jun 4, 2019 · 0 comments · Fixed by #794
Closed

Improve name escaping logic #701

Egorand opened this issue Jun 4, 2019 · 0 comments · Fixed by #794
Milestone

Comments

@Egorand
Copy link
Collaborator

Egorand commented Jun 4, 2019

As demonstrated by #698, we incorrectly assume that any characters escaped by backticks form a correct name. This is not true, e.g. this will not compile:

class `My.Class` // dots are illegal, even after escaping

We should fix name validation logic and throw if the name contains characters that can't be escaped.

@Egorand Egorand added this to the 1.4 milestone Jun 22, 2019
Wasabi375 added a commit to Wasabi375/kotlinpoet that referenced this issue Sep 21, 2019
Egorand pushed a commit that referenced this issue Sep 24, 2019
…rs (#794)

* Throw IllegalArgumentException when trying to escape illegal characters

fixes #701

* small cleanup
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant