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: 5301 Reporter: Dmitry Grebeniuk Assigned to:@xclerc Status: closed (set by @xavierleroy on 2012-09-25T18:06:17Z) Resolution: fixed Priority: normal Severity: minor Version: 3.13.0+dev Category: -for Camlp4 use https://github.com/ocaml/camlp4/issues
Bug description
Maybe I'm trying to use the wrong syntax, but the error message should be more readable.
$ ocaml
OCaml version 3.13.0+dev3
#use "topfind";;
[..]
#camlp4r;;
[..]
module A = struct exception E of int; end;
module A : sig exception E of int; end
exception Q of int = A.E;
Assertion failed, file "camlp4/Camlp4/Struct/Camlp4Ast2OCamlAst.ml", line 948, char 21
The text was updated successfully, but these errors were encountered:
The fix is temporary because it drops the type information provided at aliasing site.
The actual type is taken from the original exception without checking that it is the
same that is provided by the alias.
After consultation of the AST for the original grammar,
and discussion with Nicolas Pouillard, it turns out that
the syntactic construct has to be disallowed.
Indeed, when aliasing an exception in the original syntax,
there is not way to "repeat" its type. As camlp4 has no type
information, it cannot do more than the original syntax.
Hence, the decision to forbid the syntactic construct.
However, you will now be presented a (hopefully) much
nicer error message.
Original bug ID: 5301
Reporter: Dmitry Grebeniuk
Assigned to: @xclerc
Status: closed (set by @xavierleroy on 2012-09-25T18:06:17Z)
Resolution: fixed
Priority: normal
Severity: minor
Version: 3.13.0+dev
Category: -for Camlp4 use https://github.com/ocaml/camlp4/issues
Bug description
Maybe I'm trying to use the wrong syntax, but the error message should be more readable.
$ ocaml
OCaml version 3.13.0+dev3
#use "topfind";;
[..]
#camlp4r;;
[..]
module A = struct exception E of int; end;
module A : sig exception E of int; end
exception Q of int = A.E;
Assertion failed, file "camlp4/Camlp4/Struct/Camlp4Ast2OCamlAst.ml", line 948, char 21
The text was updated successfully, but these errors were encountered: