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
Original bug ID: 6381 Reporter:@dbuenzli Status: feedback (set by @mshinwell on 2014-05-30T12:29:06Z) Resolution: open Priority: normal Severity: feature Version: 4.01.0 Target version: later Category: typing Monitored by:@hcarty
Bug description
Would it be possible to always report unbound variable error before other errors ? Sometimes with optional arguments we get misleading errors. Here is an example:
#letf?(opt = 2)xy= x + y;;
# f 2 zorglub 3;;
Error: Thefunctionappliedtothisargumenthastype?opt:int ->intThis argument cannot be applied without label
Thanks.
The text was updated successfully, but these errors were encountered:
Would it be possible to always report unbound variable error before other errors ?
I don't see how this could be done (easily). Knowing which variable is in scope depends quite a bit on the rest of the type-checking process (think about local open, includes, inherit), so as long as the type-checker fails on the first error, I don't see how this could be implemented in general.
Original bug ID: 6381
Reporter: @dbuenzli
Status: feedback (set by @mshinwell on 2014-05-30T12:29:06Z)
Resolution: open
Priority: normal
Severity: feature
Version: 4.01.0
Target version: later
Category: typing
Monitored by: @hcarty
Bug description
Would it be possible to always report unbound variable error before other errors ? Sometimes with optional arguments we get misleading errors. Here is an example:
Thanks.
The text was updated successfully, but these errors were encountered: