diff options
| author | 2022-08-04 16:34:55 +0200 | |
|---|---|---|
| committer | 2022-08-04 16:34:55 +0200 | |
| commit | 4b2451500b8f085321a041ebc13761a5102f0e6d (patch) | |
| tree | b44d3c80a76aa309881383edda0a56958805d7bf | |
| parent | d104761e3c213504f5a6dfb63059fc905fe6799f (diff) | |
case ;
| -rw-r--r-- | bootstrap/parse.c | 2 | ||||
| -rw-r--r-- | bootstrap/test.cff | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/bootstrap/parse.c b/bootstrap/parse.c index 0804a73..71e2a74 100644 --- a/bootstrap/parse.c +++ b/bootstrap/parse.c @@ -1295,7 +1295,7 @@ pstiswitch(struct parser *P, const struct expr *test) { fatal(P, ex.span, "case expression has incorrect type"); vec_push(&es, ex); if (!lexmatch(P, &tok, ',')) { - lexexpect(P, TKkw_do); + lexexpect(P, ';'); break; } } while (!lexmatch(P, &tok, TKkw_do)) ; diff --git a/bootstrap/test.cff b/bootstrap/test.cff index d962b16..89a21eb 100644 --- a/bootstrap/test.cff +++ b/bootstrap/test.cff @@ -1,4 +1,4 @@ -typedef v3f ["!"[~-1] - as(int)30.0]f32; +typedef v3f ["!"[~-1] - as(i16)30.4f64]f32; enum Color { Red = 7, @@ -12,9 +12,9 @@ fn best() Color { fn hex(c Color) u32 { switch (c) { - case :Red do return 0xFF0000; - case :Green do return 0x00FF00; - case :Blue do return 0x0000FF; + case :Red; return 0xFF0000; + case :Green; return 0x00FF00; + case :Blue; return 0x0000FF; } } |