mirror of
https://github.com/roc-lang/roc.git
synced 2025-11-01 21:40:58 +00:00
Disallow implements even with spaces around it
This commit is contained in:
parent
787fec6b3f
commit
9499dcec4b
4 changed files with 7 additions and 2 deletions
|
|
@ -1,4 +1,4 @@
|
|||
use crate::ast::{Collection, Implements, Pattern, PatternAs, Spaceable};
|
||||
use crate::ast::{Collection, ExtractSpaces, Implements, Pattern, PatternAs, Spaceable};
|
||||
use crate::blankspace::{space0_e, spaces, spaces_before};
|
||||
use crate::ident::{lowercase_ident, parse_ident, Accessor, Ident};
|
||||
use crate::keyword;
|
||||
|
|
@ -150,7 +150,7 @@ fn loc_tag_pattern_arg<'a>(
|
|||
|
||||
if stop_on_has_kw
|
||||
&& matches!(
|
||||
value,
|
||||
value.extract_spaces().item,
|
||||
Pattern::Identifier {
|
||||
ident: crate::keyword::IMPLEMENTS,
|
||||
..
|
||||
|
|
|
|||
|
|
@ -0,0 +1 @@
|
|||
Expr(BackpassArrow(@3), @0)
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
n,U(implements
|
||||
)<-t
|
||||
9
|
||||
|
|
@ -209,6 +209,7 @@ mod test_snapshots {
|
|||
fail/if_outdented_else_branch.expr,
|
||||
fail/if_outdented_then.expr,
|
||||
fail/ifbang_eqeq.expr,
|
||||
fail/implements_in_multibackpassing_parens.expr,
|
||||
fail/import_with_lowercase_alias.moduledefs,
|
||||
fail/imports_missing_comma.header,
|
||||
fail/inline_hastype.expr,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue