Give error for calling a user-defined function at global scope.

This commit is contained in:
John Kessenich
2015-10-06 13:11:38 -06:00
parent 894c1c109f
commit 820a22fcc8
5 changed files with 32 additions and 6 deletions

View File

@@ -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()
{