Skip to content

Conversation

@aardvark179
Copy link
Contributor

Ensure that functions names that reach the class compiler are turned into legal JVM method names.

@aardvark179
Copy link
Contributor Author

This should fix part of #2239.

result = "script";
}
return result;
return illegalChars.matcher(result).replaceAll("_");
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure how the method name construction works. But maybe this simple replacement might lead to duplicate names if the source names are only differ in invalid cars.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Luckily they get a unique numerical component added.

@gbrail
Copy link
Collaborator

gbrail commented Dec 27, 2025

OK, makes sense to me, thanks!

@gbrail gbrail merged commit 702a54d into mozilla:master Dec 27, 2025
11 checks passed
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

Successfully merging this pull request may close these issues.

3 participants