aboutsummaryrefslogtreecommitdiff
path: root/compiler/tests/parser/def_linkflags.bad
blob: 260d57733387cc36ffd14e6954bdba79ad22b441 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24

/* ERRORS - Multiple flags */
local export int mf1;
export local int mf2;
local import int mf3;
import local int mf4;
export import int mf5;
import export int mf6;
local export import int mf7;
declonly import int mf8;
declonly export int mf9;
declonly local int mf10;

/* ERRORS - Wrong order of flags */
linkname "xx" export int wo1;

/* ERRORS - Only data, functions and types can have linkage flags */
export namespace nodf1 {}
export typedef nodf2 = (int x, int y);

/* ERRORS - Imported and declonly data/functions can't have values or function bodies */
import int impinitval = 123;
import int impwithbody() { }
declonly int dinitval = 123;
declonly int dwithbody() { }