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
Not a bug, but what I think should be the proper priority of error reporting.
The real issue comes from a large codebase where a x := y operation def is declared.
If the user accidentally forgets to use :, then the compiler goes on ahead and typechecks x = y, even if x is a val, where it can know ahead of time and just report the reassignment to val error instead. The typecheck error can be very confusing where := relies on a typeclass argument.
Compiler version
v3.2.0
Minimized code
valx="MyString"
x =5
Output
Found: (5:Int)
Required:String
Expectation
I expect the error to be Reassignment to val x.
The text was updated successfully, but these errors were encountered:
Not a bug, but what I think should be the proper priority of error reporting.
The real issue comes from a large codebase where a
x := y
operation def is declared.If the user accidentally forgets to use
:
, then the compiler goes on ahead and typechecksx = y
, even ifx
is a val, where it can know ahead of time and just report thereassignment to val
error instead. The typecheck error can be very confusing where:=
relies on a typeclass argument.Compiler version
v3.2.0
Minimized code
Output
Expectation
I expect the error to be
Reassignment to val x
.The text was updated successfully, but these errors were encountered: