We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sum
If you substitute an expression with a dependent type to the argument of sum, the return type will be wrong.
s: {2, 1} = sum [1, 2]
TypeError: sum([1, 2]): Nat (or {3})
sum([1, 2]): Nat (or {3})
passed
Here is the type definition of sum:
|A <: Add(A)| (iterable: Iterable(A), start: A or Int := Int) -> A
0.6.32
None
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Describe the bug?
If you substitute an expression with a dependent type to the argument of
sum
, the return type will be wrong.Reproducible code
Expected result
TypeError:
sum([1, 2]): Nat (or {3})
Actual result
passed
Additional context
Here is the type definition of
sum
:Erg version
0.6.32
Python version
None
OS
None
The text was updated successfully, but these errors were encountered: