Open user202729 opened 5 months ago
for(int i=0; i<10; ++i){ struct A{int x;} A f(A a, int y){ a.x+=i; return a; } A a; A b=f(a,1); }
Error message:
A b=f(a,1); ^ a.asy: 5.7: cannot cast 'A' to 'A' success
Why is the f function not redefined anyway?
f
For the record, here's a more minimal example:
while(true) { struct A { int x; } A f(A a){ return a; } A a; a=f(a); }
Error message:
Why is the
f
function not redefined anyway?