aboutsummaryrefslogtreecommitdiff
path: root/compiler/tests/parser/def_type_quals.bad
blob: c84afeca00c3ab661cb908a77fd8b19892a0298f (plain)
1
2
3
4
5
6
7
8
9
10
11
12

// Typedefs usually shouldn't have "var" since "var" is the default in type definitions.
// For this reason it's forbidden.
/* ERRORS */
typedef a = var int;
typedef b = var (int a, int b);
typedef c = var enum(yes, no);
typedef d = var int enum(yes, no);

// Also, multiple "var" qualifiers on nested types make no sense
/* ERRORS */
typedef nested = (var (var int x) y, int z);