Give error for calling a user-defined function at global scope.
This commit is contained in:
parent
894c1c109f
commit
820a22fcc8
5 changed files with 32 additions and 6 deletions
|
|
@ -31,7 +31,7 @@ bool radians(bool x) // okay, can overload built-in functions
|
|||
return true;
|
||||
}
|
||||
|
||||
|
||||
int gi = f(1,2,3); // ERROR, can't call user-defined function from global scope
|
||||
|
||||
void main()
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue