Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/prism.c
Original file line number Diff line number Diff line change
Expand Up @@ -1740,9 +1740,10 @@ char_is_global_name_punctuation(const uint8_t b) {
static inline bool
token_is_setter_name(pm_token_t *token) {
return (
(token->type == PM_TOKEN_IDENTIFIER) &&
(token->type == PM_TOKEN_BRACKET_LEFT_RIGHT_EQUAL) ||
((token->type == PM_TOKEN_IDENTIFIER) &&
(token->end - token->start >= 2) &&
(token->end[-1] == '=')
(token->end[-1] == '='))
);
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
def a=() = 42
^~ invalid method name; a setter method cannot be defined in an endless method definition

def []=() = 42
^~~ invalid method name; a setter method cannot be defined in an endless method definition

Loading