Skip to content

Commit

Permalink
Add clarification about when instance_vars can be called
Browse files Browse the repository at this point in the history
  • Loading branch information
willhbr committed Sep 5, 2021
1 parent cadc4b3 commit eb6f645
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/compiler/crystal/macros.cr
Original file line number Diff line number Diff line change
Expand Up @@ -1752,6 +1752,7 @@ module Crystal::Macros
end

# Returns the instance variables of this type.
# Can only be called from methods, it will return an empty list if called from top-level code.
def instance_vars : ArrayLiteral(MetaVar)
end

Expand Down

0 comments on commit eb6f645

Please sign in to comment.