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: 5650 Reporter: kyoDralliam Assigned to:@bobzhang Status: closed (set by @xavierleroy on 2015-12-11T18:21:27Z) Resolution: fixed Priority: normal Severity: feature Version: 3.12.1 Category: -for Camlp4 use https://github.com/ocaml/camlp4/issues Tags: junior_job
Bug description
When using Camlp4FoldGenerator to create a map or fold class for a type t, you can't have not basic types without representation, for instance Num.num type.
A simple way to solve it would be for example to generate virtual method for such type and let the user have an abstract class i.e. accept
class virtual map = Camlp4MapGenerator.generated;;
(Until OCaml 4.00beta2 only the following form is accepted, without the virtual keyword)
class map = Camlp4MapGenerator.generated;;
Steps to reproduce
type t = A of in_channel
class map = Camlp4MapGenerator.generated;;
-->
File "ghost-location", line 1, characters 0-0:
Warning 17: the virtual method in_channel is not declared.
File "ghost-location", line 1, characters 0-0:
Error: This class should be virtual.
The following methods are undefined : in_channel
The text was updated successfully, but these errors were encountered:
Original bug ID: 5650
Reporter: kyoDralliam
Assigned to: @bobzhang
Status: closed (set by @xavierleroy on 2015-12-11T18:21:27Z)
Resolution: fixed
Priority: normal
Severity: feature
Version: 3.12.1
Category: -for Camlp4 use https://github.com/ocaml/camlp4/issues
Tags: junior_job
Bug description
When using Camlp4FoldGenerator to create a map or fold class for a type t, you can't have not basic types without representation, for instance Num.num type.
A simple way to solve it would be for example to generate virtual method for such type and let the user have an abstract class i.e. accept
class virtual map = Camlp4MapGenerator.generated;;
(Until OCaml 4.00beta2 only the following form is accepted, without the virtual keyword)
class map = Camlp4MapGenerator.generated;;
Steps to reproduce
type t = A of in_channel
class map = Camlp4MapGenerator.generated;;
-->
File "ghost-location", line 1, characters 0-0:
Warning 17: the virtual method in_channel is not declared.
File "ghost-location", line 1, characters 0-0:
Error: This class should be virtual.
The following methods are undefined : in_channel
The text was updated successfully, but these errors were encountered: