[jOOQ/jOOQ#10867] KotlinGenerator should quote identifiers containing $

This commit is contained in:
Lukas Eder 2020-11-05 17:20:09 +01:00
parent b904956211
commit 41e1949d27

View File

@ -385,6 +385,10 @@ class GenerationUtil {
return "`" + literal + "`";
else if (language == KOTLIN && i == 0 && !Character.isJavaIdentifierStart(c))
return "`" + literal + "`";
// [#10867] The $ character is not allowed in Kotlin unquoted identifiers
else if (language == KOTLIN && c == '$')
return "`" + literal + "`";
else
sb.append(c);
}