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: 4673 Reporter: avaron Assigned to:@xclerc Status: closed (set by @xavierleroy on 2012-09-25T18:06:17Z) Resolution: fixed Priority: normal Severity: minor Version: 3.11.0+beta Fixed in version: 3.12.1+dev Category: -for Camlp4 use https://github.com/ocaml/camlp4/issues Duplicate of:#5144 Monitored by: delroth avaron @ygrek@yallop@hcarty "Richard Jones"
Bug description
The following tiny file:
(* test.ml *)
class test (x : int) = object
val a = x;
val b = x;
method clone = ({< a = x; b = x>})
end
compiles correctly with OCaml 3.10.2, OCaml 3.11.0, and when the preprocessor is camlp4 3.10.2.
However, when the preprocessors is camlp4 3.11.0 it fails:
samson:~ andres$ ocamlc -pp 'camlp4orf pa_extend.cmo' test.ml
File "test.ml", line 4, characters 27-28:
Warning S: this expression should have type unit.
File "test.ml", line 4, characters 30-35:
Error: This expression has type bool but is here used with type int
The problem is the {< ...; .... >} which is valid. A single assignment as in {< x = 4 >} would be preprocessed correctly.
Original bug ID: 4673
Reporter: avaron
Assigned to: @xclerc
Status: closed (set by @xavierleroy on 2012-09-25T18:06:17Z)
Resolution: fixed
Priority: normal
Severity: minor
Version: 3.11.0+beta
Fixed in version: 3.12.1+dev
Category: -for Camlp4 use https://github.com/ocaml/camlp4/issues
Duplicate of: #5144
Monitored by: delroth avaron @ygrek @yallop @hcarty "Richard Jones"
Bug description
The following tiny file:
(* test.ml *)
class test (x : int) = object
val a = x;
val b = x;
method clone = ({< a = x; b = x>})
end
compiles correctly with OCaml 3.10.2, OCaml 3.11.0, and when the preprocessor is camlp4 3.10.2.
However, when the preprocessors is camlp4 3.11.0 it fails:
samson:~ andres$ ocamlc -pp 'camlp4orf pa_extend.cmo' test.ml
File "test.ml", line 4, characters 27-28:
Warning S: this expression should have type unit.
File "test.ml", line 4, characters 30-35:
Error: This expression has type bool but is here used with type int
The problem is the {< ...; .... >} which is valid. A single assignment as in {< x = 4 >} would be preprocessed correctly.
File attachments
The text was updated successfully, but these errors were encountered: