Skip to content

Commit

Permalink
Merge pull request #259 from GeVa2072/patch-1
Browse files Browse the repository at this point in the history
Fix issue with constructor
  • Loading branch information
hypfvieh authored Jul 5, 2024
2 parents 283a5cf + 19ee9dc commit 6d4b4cb
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -494,8 +494,8 @@ public static class MemberOrArgument {
private final List<String> annotations = new ArrayList<>();

public MemberOrArgument(String _name, String _type, boolean _finalMember) {
// repair reserved words by adding 'Param' as appendix
name = IdentifierMangler.isReservedWord(_name) ? _name + "param" : _name;
// repair reserved words by adding 'Param' as appendix, and when start with _ too
name = (IdentifierMangler.isReservedWord(_name) || IdentifierMangler.isReservedWord(_name.replaceFirst("^_(.+)", "$1"))) ? _name + "param" : _name;
type = _type;
finalArg = _finalMember;
}
Expand Down

0 comments on commit 6d4b4cb

Please sign in to comment.