Skip to content

Commit 23c44da

Browse files
committed
Fix variable fields w/ function type issue
1 parent b69bfaf commit 23c44da

1 file changed

Lines changed: 12 additions & 3 deletions

File tree

src/gdcompiler/GDCompiler.hx

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1142,9 +1142,14 @@ ${exitTreeLines.length > 0 ? exitTreeLines.join("\n").tab() : "\tpass"}
11421142
}
11431143
// Replace pad nulls with default values
11441144
case FInstance(clsRef, _, cfRef) | FStatic(clsRef, cfRef): {
1145-
final funcData = cfRef.get().findFuncData(clsRef.get());
1146-
if(funcData != null) {
1147-
arguments = funcData.replacePadNullsWithDefaults(arguments, ":noNullPad", generateInjectionExpression);
1145+
switch(cfRef.get().kind) {
1146+
case FMethod(_): {
1147+
final funcData = cfRef.get().findFuncData(clsRef.get());
1148+
if(funcData != null) {
1149+
arguments = funcData.replacePadNullsWithDefaults(arguments, ":noNullPad", generateInjectionExpression);
1150+
}
1151+
}
1152+
case _:
11481153
}
11491154
null;
11501155
}
@@ -1172,6 +1177,10 @@ ${exitTreeLines.length > 0 ? exitTreeLines.join("\n").tab() : "\tpass"}
11721177
return result;
11731178
}
11741179

1180+
function compileCalledFieldAccess(calledExpr: TypedExpr, fieldAccess: FieldAccess) {
1181+
1182+
}
1183+
11751184
function newToGDScript(classTypeRef: Ref<ClassType>, originalExpr: TypedExpr, el: Array<TypedExpr>): String {
11761185
final nfc = this.compileNativeFunctionCodeMeta(originalExpr, el);
11771186
return if(nfc != null) {

0 commit comments

Comments
 (0)