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
#! /usr/bin/env encorec -run
passive class X
x:int
class Main
def main() : void {
let x = new X in {
print x.x
}
}
But this one doesn't:
#! /usr/bin/env encorec -run
class Main
def main() : void {
let x = new X in {
print x.x
}
}
passive class X
x:int
The only difference is the order of declaration. This is due to the fact that sizeof(X) doesn't work in C, if X is only forward declared. Tobias already suggested compiling each file to its own C-file. This would fix this issue, so I recommend we do not address this other than refactoring the backend (which was the plan anyway)
The text was updated successfully, but these errors were encountered:
The following program works:
But this one doesn't:
The only difference is the order of declaration. This is due to the fact that
sizeof(X)
doesn't work in C, if X is only forward declared. Tobias already suggested compiling each file to its own C-file. This would fix this issue, so I recommend we do not address this other than refactoring the backend (which was the plan anyway)The text was updated successfully, but these errors were encountered: