You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Uncertain if intentional, spcomp doesn't warn upon use of ES function without parenthesis. Not sure if it would ever be useful in any manner to call function without parenthesis. Tested with 1.10.0-git6380 and 1.11.0-git6460
#include <sourcemod>
enum struct Whatever {
int x;
char whatever[32];
int test() {
return sizeof Whatever::whatever;
}
}
public void OnPluginStart() {
RegAdminCmd("sm_test", cmdTest, ADMFLAG_ROOT);
}
public Action cmdTest(int client, int args) {
Whatever w;
ReplyToCommand(client, "%i %i", w.test, w.test()); // 0 32
return Plugin_Handled;
}
The text was updated successfully, but these errors were encountered:
This is indeed a bug. The new expression parser is much more flexible, and effectively evaluates "w.test" to a bound function. The old parser did not support this at all, and since the semantic checks are mostly the same, we're missing type checks for this situation.
Uncertain if intentional, spcomp doesn't warn upon use of ES function without parenthesis. Not sure if it would ever be useful in any manner to call function without parenthesis. Tested with
1.10.0-git6380
and1.11.0-git6460
The text was updated successfully, but these errors were encountered: