We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b4c67af commit c5b0b52Copy full SHA for c5b0b52
src/gdcompiler/subcompilers/EnumCompiler.hx
@@ -93,10 +93,7 @@ class EnumCompiler {
93
case AsInt: {
94
Std.string(enumField.index);
95
}
96
- case AsDictionary if(!providedArgs): {
97
- "{ \"_index\": " + enumField.index + " }";
98
- }
99
- case AsDictionary: {
+ case AsDictionary if(exprArgsPassed != null && providedArgs): { // Redundant null-check for null-safety
100
final result = new StringBuf();
101
final enumFieldArgs = switch(enumField.type) {
102
case TFun(args, _): args;
@@ -116,6 +113,9 @@ class EnumCompiler {
116
113
result.add(" }");
117
114
result.toString();
118
115
+ case AsDictionary: {
+ "{ \"_index\": " + enumField.index + " }";
+ }
119
120
121
0 commit comments