0
0
Fork 0
mirror of https://git.code.sf.net/p/quake/quakeforge synced 2025-03-12 04:12:13 +00:00
quakeforge/tools/qfcc/test/overload.r

24 lines
307 B
R
Raw Normal View History

typedef enum {
NO = 0,
YES
} BOOL;
@extern BOOL sel_is_mapped (SEL aSel);
BOOL (SEL aSel) sel_is_mapped = #0;
@overload int foo(int x)
{
return 1;
}
@overload int foo(float x)
{
return 2;
}
int main()
{
//FIXME fails on implicit cast of double to float
return !(foo(5) == 1 && foo (5.0f) == 2);
}