Acknowledged

SDK 8.0.0. BETA Language Server reports Info object as ambiguous even when properly qualified

Because of the quirkiness of the null checking with the Monkey C compiler, there are instances where I need to help the compiler. In the example below, the compiler thinks that the variable _posInfo is a polytype of either an Position.Info or Null. To clarify that it is indeed not null, I specify the type as Position.Info.

var altitude = (_posInfo as Position.Info).altitude;

However, when I do this, I get the following error:

fenix7: 'Info' is ambiguious and exists in multiple imported modules [$.Toybox.Position.Info, $.Toybox.Sensor.Info, $.Toybox.Activity.Info].

I have imported the three modules mentioned, but compiler seems to be ignoring the fact that I qualified the Info object as "Position.Info". Even if I completely qualify it as "$.Toybox.Position.Info" the error persists.