You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
from Standard.Base import all
foo : Standard.Base.Data.Numbers.Integer
foo = 1
bar (x : Standard.Base.Data.Numbers.Integer) = 10+x
main =
bar foo
This seems like a completely valid program, but it fails to compile with:
X:\NBO\repr\test3.enso:3:7: error: The name `Standard.Base.Data.Numbers.Integer` could not be found.
3 | foo : Standard.Base.Data.Numbers.Integer
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
X:\NBO\repr\test3.enso:6:10: error: The name `Standard.Base.Data.Numbers.Integer` could not be found.
6 | bar (x : Standard.Base.Data.Numbers.Integer) = 10+x
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Aborting due to 2 errors and 0 warnings.
Execution finished with an error: Compilation aborted due to errors.
If I replace the FQNs with just Integer it runs all fine.
I don't see any reason why FQNs should not be allowed in type signatures. In fact it is rather confusing.
Note that the exact same FQN used as value works all fine:
from Standard.Base import all
main =
IO.println Standard.Base.Data.Numbers.Integer
IO.println (42.is_a Standard.Base.Data.Numbers.Integer)
printing
Integer
True
The text was updated successfully, but these errors were encountered:
Repro:
This seems like a completely valid program, but it fails to compile with:
If I replace the FQNs with just
Integer
it runs all fine.I don't see any reason why FQNs should not be allowed in type signatures. In fact it is rather confusing.
Note that the exact same FQN used as value works all fine:
printing
The text was updated successfully, but these errors were encountered: