summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/parse/pattern.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/parse/pattern.cpp b/src/parse/pattern.cpp
index 12f35aa7..2d3a0615 100644
--- a/src/parse/pattern.cpp
+++ b/src/parse/pattern.cpp
@@ -233,7 +233,7 @@ AST::Pattern Parse_PatternReal_Slice(TokenStream& lex, bool is_refutable)
bool is_trailing = false;
while(GET_TOK(tok, lex) != TOK_SQUARE_CLOSE)
{
- if( tok.type() == TOK_IDENT && lex.lookahead(1) == TOK_DOUBLE_DOT) {
+ if( tok.type() == TOK_IDENT && lex.lookahead(0) == TOK_DOUBLE_DOT) {
if(is_trailing)
ERROR(lex.end_span(sp), E0000, "Multiple instances of .. in a slice pattern");
rv_array.extra_bind = mv$(tok.str());