Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Anyway, I can reproduce this with the following snippet [in a simple data field]:
- import Toybox.Activity;
- import Toybox.Position;
- //... (note that Toybox.Sensor is not imported)
- class TestDataFieldView extends WatchUi.SimpleDataField {
- //...
- var _posInfo as Null or Position.Info;
- function compute(info) as Numeric or Duration or String or Null {
- var altitude = (_posInfo as Position.Info).altitude; // <=====
- If I build the project normally, the line with "var altitude" does not produce the error mentioned above. If I then make a change to that line and revert the change [without rebuilding the project], I get the following error:
- fr165: 'Info' is ambiguious and exists in multiple imported modules [$.Toybox.Position.Info, $.Toybox.Activity.Info].
- This does suggest that the regular build process and the language server build process work slightly differently.
- Not to state the obvious, but "ambiguious" is a misspelling of "ambiguous".
Advertisement
Add Comment
Please, Sign In to add comment