Allow capturing non-public functions as values.

This commit is contained in:
David Anderson
2015-03-06 10:51:46 -08:00
parent ac4f594063
commit 8216097b2c
11 changed files with 134 additions and 28 deletions
@@ -0,0 +1,16 @@
String:MyFunction()
{
new String:egg[10] = "egg";
return egg;
}
public crab()
{
new String:egg[10];
egg = MyFunction();
}
public Function:main()
{
return MyFunction;
}
@@ -0,0 +1 @@
(15) : error 182: functions that return arrays cannot be used as callbacks
+1 -1
View File
@@ -2,4 +2,4 @@
(2) : error 141: natives, forwards, and public functions cannot return arrays
(3) : error 143: new-style declarations should not have "new"
(5) : error 121: cannot specify array dimensions on both type and name
(11) : error 025: function heading differs from prototype
(11) : error 180: function return type differs from prototype. expected 'void', but got 'int'