mirror of
https://github.com/roc-lang/roc.git
synced 2024-09-20 23:37:56 +03:00
Reproduce malformed argument bug
This commit is contained in:
parent
1e8423a368
commit
60ee53080a
@ -789,6 +789,17 @@ mod test_parse {
|
||||
assert_eq!(Ok(expected), actual);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn malformed_ident_due_to_underscore() {
|
||||
// This is a regression test against a bug where if you included an
|
||||
// underscore in an argument name, it would parse as three arguments
|
||||
// (and would ignore the underscore as if it had been blank space).
|
||||
let arena = Bump::new();
|
||||
let actual = parse_with(&arena, "\\the_answer -> 42");
|
||||
|
||||
assert_eq!(Ok(MalformedClosure), actual);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn two_arg_closure() {
|
||||
let arena = Bump::new();
|
||||
|
Loading…
Reference in New Issue
Block a user