When a user-defined functions shadows a built-in one, the built-in one is chosen in compile-time expression evaluation, while a user-defined one is chosen to compile non-constant expressions:
param a = 90; // Prevents compile-time evaluation
def sin(x)
x * x;
end;
begin
println(sin(90));
println(sin(a));
printflush(message1);
end;
produces
The issue won't be fixed until modules and namespaces are introduced, at which time some mechanism for accessing shadowed built-in functions gets implemented.
The workaround is to avoid functions that shadow existing built-in functions.
When a user-defined functions shadows a built-in one, the built-in one is chosen in compile-time expression evaluation, while a user-defined one is chosen to compile non-constant expressions:
produces
The issue won't be fixed until modules and namespaces are introduced, at which time some mechanism for accessing shadowed built-in functions gets implemented.
The workaround is to avoid functions that shadow existing built-in functions.