Guest User

wowgarmin

a guest
Jan 16th, 2025
29
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.95 KB | None | 0 0
  1. Anyway, I can reproduce this with the following snippet [in a simple data field]:
  2. import Toybox.Activity;
  3. import Toybox.Position;
  4. //... (note that Toybox.Sensor is not imported)
  5.  
  6. class TestDataFieldView extends WatchUi.SimpleDataField {
  7. //...
  8. var _posInfo as Null or Position.Info;
  9. function compute(info) as Numeric or Duration or String or Null {
  10. var altitude = (_posInfo as Position.Info).altitude; // <=====
  11.  
  12. 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:
  13.  
  14. fr165: 'Info' is ambiguious and exists in multiple imported modules [$.Toybox.Position.Info, $.Toybox.Activity.Info].
  15.  
  16. This does suggest that the regular build process and the language server build process work slightly differently.
  17.  
  18. Not to state the obvious, but "ambiguious" is a misspelling of "ambiguous".
Advertisement
Add Comment
Please, Sign In to add comment