You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: Fetch virtual table dependencies in resolver (#1535)
Previously, when visiting the virtual-table pointer of a class or function block,
the resolver added a dependency on the intrinsic `VOID` type but not on the
concrete `__vtable_*` struct and its members. Codegen then failed with
“unknown type” when expanding opaque types that reference vtable members.
This commit fixes that, such that the members of the virtual table are fetched and
added as dependencies in the resolver module.
A minimal reproducible example would be
```
// file: main.st
FUNCTION main
VAR
baseInstance: base;
baseRef: POINTER TO base;
END_VAR
baseRef := ADR(baseInstance);
baseRef^.foo();
END_FUNCTION
// file: base.st
FUNCTION_BLOCK base
METHOD foo
printf('base::foo$N');
END_METHOD
END_FUNCTION_BLOCK
```
@str = global [81 x i8] c"hello\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00"
0 commit comments