Acknowledged
CIQQA-3455

Linter expects a Number (only) as argument for the Dict.hasKey() method for -l1 and above

Looks like I can't post code, nor images, nor anything. So you will have to live with my description:
When retrieving a dictionary from the storage:
var foo = Toybox.Application.Storage.getValue("foo")
and using
foo.hasKey("bar")
on said dictionary, the linter expects a number only as argument and the code fails to compile.
Error message:
Invalid '$.Toybox.Lang.String' passed as parameter 1 of type '$.Toybox.Lang.Number'.
Parents
  • WARNING: Cannot find symbol ':hasKey' on type 'Null'.
    WARNING: Cannot find symbol ':hasKey' on type '$.Toybox.Lang.Array<Null or $.Toybox.Lang.Array<$.Toybox.Application.PropertyValueType> or $.Toybox.Lang.Dictionary<$.Toybox.Application.PropertyKeyType,$.Toybox.Application.PropertyValueType> or $.Toybox.WatchUi.BitmapResource or $.Toybox.Lang.Boolean or $.Toybox.Lang.Char or $.Toybox.Lang.Double or $.Toybox.Lang.Float or $.Toybox.Lang.Long or $.Toybox.Lang.Number or $.Toybox.Lang.String>'.
    WARNING: Cannot find symbol ':hasKey' on type '$.Toybox.WatchUi.BitmapResource'.
    WARNING: Cannot find symbol ':hasKey' on type '$.Toybox.Lang.Char'.
    WARNING: Cannot find symbol ':hasKey' on type '$.Toybox.Lang.Double'.
    WARNING: Cannot find symbol ':hasKey' on type '$.Toybox.Lang.Boolean'.
    WARNING: Cannot find symbol ':hasKey' on type '$.Toybox.Lang.Float'.
    WARNING: Cannot find symbol ':hasKey' on type '$.Toybox.Lang.Long'.
    WARNING: Cannot find symbol ':hasKey' on type '$.Toybox.Lang.Number'.
    WARNING: Cannot find symbol ':hasKey' on type '$.Toybox.Lang.String'.
    ERROR Invalid '$.Toybox.Lang.String' passed as parameter 1 of type '$.Toybox.Lang.Number'.
    [2/x]
Comment
  • WARNING: Cannot find symbol ':hasKey' on type 'Null'.
    WARNING: Cannot find symbol ':hasKey' on type '$.Toybox.Lang.Array<Null or $.Toybox.Lang.Array<$.Toybox.Application.PropertyValueType> or $.Toybox.Lang.Dictionary<$.Toybox.Application.PropertyKeyType,$.Toybox.Application.PropertyValueType> or $.Toybox.WatchUi.BitmapResource or $.Toybox.Lang.Boolean or $.Toybox.Lang.Char or $.Toybox.Lang.Double or $.Toybox.Lang.Float or $.Toybox.Lang.Long or $.Toybox.Lang.Number or $.Toybox.Lang.String>'.
    WARNING: Cannot find symbol ':hasKey' on type '$.Toybox.WatchUi.BitmapResource'.
    WARNING: Cannot find symbol ':hasKey' on type '$.Toybox.Lang.Char'.
    WARNING: Cannot find symbol ':hasKey' on type '$.Toybox.Lang.Double'.
    WARNING: Cannot find symbol ':hasKey' on type '$.Toybox.Lang.Boolean'.
    WARNING: Cannot find symbol ':hasKey' on type '$.Toybox.Lang.Float'.
    WARNING: Cannot find symbol ':hasKey' on type '$.Toybox.Lang.Long'.
    WARNING: Cannot find symbol ':hasKey' on type '$.Toybox.Lang.Number'.
    WARNING: Cannot find symbol ':hasKey' on type '$.Toybox.Lang.String'.
    ERROR Invalid '$.Toybox.Lang.String' passed as parameter 1 of type '$.Toybox.Lang.Number'.
    [2/x]
Children
No Data