Skip to content

Commit

Permalink
case instead of is_a
Browse files Browse the repository at this point in the history
  • Loading branch information
GregoryTravis committed Nov 5, 2024
1 parent 2aefd64 commit 5cb0fc2
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -169,8 +169,11 @@ type Dictionary key value
insert : Any -> Any -> Boolean -> Dictionary
insert self key=(Missing_Argument.throw "key") value=(Missing_Argument.throw "value") no_warning:Boolean=False =
new_dict = self.insert_builtin key value
if (key.is_a Float . not) || no_warning then new_dict else
Warning.attach (Float_Used_As_Dictionary_Key.Warning key) new_dict
case key of
_ : Float ->
if no_warning then new_dict else
Warning.attach (Float_Used_As_Dictionary_Key.Warning key) new_dict
_ -> new_dict

## GROUP Selections
ICON table_clean
Expand Down

0 comments on commit 5cb0fc2

Please sign in to comment.