quakeforge/tools/qfcc/test/nilparamret.r
Bill Currie 9c556c07bb [qfcc] Add failing nil return through @param bug
I suspect it's general for struts, but nil really is a troubling
character sometimes.
2020-03-27 20:32:52 +09:00

26 lines
375 B
R

typedef struct bar {
float x, y, z, w;
} bar;
bar set_return();
@param foo()
{
set_return();
return nil;
}
bar set_return()
{
return {1, 2, 3, 4};
}
void printf (string fmt, ...) = #0;
int main()
{
@param r = foo();
printf("%q\n", r);
return !(r.quaternion_val.x == 0
&& r.quaternion_val.y == 0
&& r.quaternion_val.z == 0
&& r.quaternion_val.w == 0);
}