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: 7696 Reporter:@yallop Status: new Resolution: open Priority: normal Severity: minor Category: typing Related to:#6608 Monitored by:@nojb@gasche
Bug description
In 4.03.0 the record expression in an field update was always evaluated:
{ (assert false) with contents = 1 } ;;
Characters 0-36:
{ (assert false) with contents = 1 } ;;
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Warning 23: all the fields are explicitly listed in this record:
the 'with' clause is useless.
Exception: Assert_failure ("//toplevel//", 1, 2).
In more recent versions (4.04.2, 4.05.0, 4.06.0) the record expression is removed if all the fields are specified:
{ (assert false) with contents = 1 } ;;
Characters 0-36:
{ (assert false) with contents = 1 } ;;
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Warning 23: all the fields are explicitly listed in this record:
the 'with' clause is useless.
…edefined (#9432)
This commit reverts c1a7ace (originally c545e04), which was a
temporary fix that is no longer needed because it was superseded by
#6608.
The temporary fix caused `{expr with lbl1 = e1; ... }` to not evaluate
`expr` if all labels of its type are overriden. As reported in #7696
this is not desirable. Reverting the temporary fix causes `expr` to
be evaluated always.
As a consequence, a corner case of value "let rec" is no longer accepted.
The corresponding test was updated.
Closes: #7696
Original bug ID: 7696
Reporter: @yallop
Status: new
Resolution: open
Priority: normal
Severity: minor
Category: typing
Related to: #6608
Monitored by: @nojb @gasche
Bug description
In 4.03.0 the record expression in an field update was always evaluated:
{ (assert false) with contents = 1 } ;;
Characters 0-36:
{ (assert false) with contents = 1 } ;;
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Warning 23: all the fields are explicitly listed in this record:
the 'with' clause is useless.
Exception: Assert_failure ("//toplevel//", 1, 2).
In more recent versions (4.04.2, 4.05.0, 4.06.0) the record expression is removed if all the fields are specified:
{ (assert false) with contents = 1 } ;;
Characters 0-36:
{ (assert false) with contents = 1 } ;;
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Warning 23: all the fields are explicitly listed in this record:
the 'with' clause is useless.
There's previous discussion on Mantis and GitHub:
#6608#c16416
#901 (comment)
The text was updated successfully, but these errors were encountered: