Skip to content

Commit

Permalink
fixup! fixup! Prevent None and All members in flags enums
Browse files Browse the repository at this point in the history
  • Loading branch information
RX14 committed May 10, 2017
1 parent 667ea60 commit add508c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/compiler/crystal/semantic/top_level_visitor.cr
Original file line number Diff line number Diff line change
Expand Up @@ -551,7 +551,7 @@ class Crystal::TopLevelVisitor < Crystal::SemanticVisitor
end

if is_flags && !@in_lib && {"None", "All"}.includes?(member.name)
member.raise "flags enum can't contain None or All members"
member.raise "flags enum can't contain None or All members, they are autogenerated"
end

if default_value = member.default_value
Expand Down

0 comments on commit add508c

Please sign in to comment.