File tree Expand file tree Collapse file tree 3 files changed +15
-5
lines changed Expand file tree Collapse file tree 3 files changed +15
-5
lines changed Original file line number Diff line number Diff line change @@ -3682,11 +3682,7 @@ static void funcstub(int fnative)
3682
3682
* for a native function, this is optional
3683
3683
*/
3684
3684
if (fnative ) {
3685
- if (opertok != 0 ) {
3686
- needtoken ('=' );
3687
- lexpush (); /* push back, for matchtoken() to retrieve again */
3688
- } /* if */
3689
- if (matchtoken ('=' )) {
3685
+ if ((opertok != 0 ) ? needtoken ('=' ) : matchtoken ('=' )) {
3690
3686
/* allow number or symbol */
3691
3687
if (matchtoken (tSYMBOL )) {
3692
3688
tokeninfo (& val ,& str );
Original file line number Diff line number Diff line change
1
+ {
2
+ ' test_type ' : ' output_check' ,
3
+ ' errors ' : " " "
4
+ gh_525.pwn(1) : error 001: expected token: " =", but found ";"
5
+ " " "
6
+ }
Original file line number Diff line number Diff line change
1
+ native Tag: operator+ (Tag: a, Tag: b); // error 001: expected token: "=", but found ";"
2
+
3
+ // Make sure that valid native operator and function declarations aren't affected
4
+ native Tag2: operator+ (Tag2: a, Tag2: b) = NativeFunc;
5
+ native Tag2: NativeFunc (Tag2: a, Tag2: b);
6
+ native NativeFunc2 (a,b) = NativeFunc;
7
+
8
+ main (){}
You can’t perform that action at this time.
0 commit comments