tobogganSe connecter

louise

The Louise language: compiler, runtime, std, tooling

Clone avec HTTPS, un jeton personnel en mot de passe, ou avec SSH, une clé ajoutée dans vos paramètres.

20 lignes · 533 octetsBrut · Historique
1// An unbraced multi-statement match arm is a syntax error; recovery
2// fabricates arms out of its tokens. Checking them must not panic the
3// exhaustiveness checker, nor cascade: the syntax errors are the report
4// (issue #371).
5
6fn w :: xs: List<a> -> a
7{
8 panic "x"
9}
10
11pub fn main :: -> String
12{
13 match 1
14 { _ ->
15 let d = w ["a"] //~ ERROR E0001 expected an expression
16 //~^ ERROR E0001 expected `->`
17 //~^^ ERROR E0001 expected `->`
18 "z" //~ ERROR E0001 expected `->`
19 } //~ ERROR E0001 expected `->`
20}