| Anonymous | Login | Signup for a new account | 2013-05-20 16:52 CEST | ![]() |
| Main | My View | View Issues | Change Log | Roadmap |
| View Issue Details [ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||
| ID | Project | Category | View Status | Date Submitted | Last Update | |||
| 0004673 | OCaml | Camlp4 | public | 2008-12-16 19:55 | 2012-09-25 20:06 | |||
| Reporter | avaron | |||||||
| Assigned To | xclerc | |||||||
| Priority | normal | Severity | minor | Reproducibility | always | |||
| Status | closed | Resolution | fixed | |||||
| Platform | OS | OS Version | ||||||
| Product Version | 3.11.0+beta | |||||||
| Target Version | Fixed in Version | 3.12.1+dev | ||||||
| Summary | 0004673: camlp4 fails to preprocess correctly valid object oriented OCaml | |||||||
| 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. | |||||||
| Tags | No tags attached. | |||||||
| Attached Files | ||||||||
Notes |
|
|
(0004802) avaron (reporter) 2008-12-16 20:03 |
The following is the way camlp4 is interpreting the class definition: samson:~ andres$ camlp4orf pr_r.cmo test.ml class test (x : int) = object value a = x; value b = x; method clone = {< a = (x; b = x); >}; end; |
|
(0004978) bluestorm (reporter) 2009-06-01 16:20 |
I attached a tentative bugfix, wich I also uploaded at http://bluestorm.info/camlp4/objcopy-fix/Camlp4OCamlRevisedParser.ml.diff [^] I also wrote a small extension for a quick workaround : http://bluestorm.info/camlp4/objcopy-fix/list.php [^] |
|
(0005805) xclerc (developer) 2011-02-15 11:56 |
Provided patch tested and applied -- thanks. |
Issue History |
|||
| Date Modified | Username | Field | Change |
| 2008-12-16 19:55 | avaron | New Issue | |
| 2008-12-16 20:03 | avaron | Note Added: 0004802 | |
| 2009-03-31 13:41 | xleroy | Status | new => assigned |
| 2009-03-31 13:41 | xleroy | Assigned To | => ertai |
| 2009-06-01 16:20 | bluestorm | Note Added: 0004978 | |
| 2009-06-01 16:21 | bluestorm | File Added: Camlp4OCamlRevisedParser.ml.diff | |
| 2011-02-15 11:43 | xclerc | Relationship added | duplicate of 0005144 |
| 2011-02-15 11:55 | xclerc | Assigned To | ertai => xclerc |
| 2011-02-15 11:56 | xclerc | Note Added: 0005805 | |
| 2011-02-15 11:56 | xclerc | Status | assigned => resolved |
| 2011-02-15 11:56 | xclerc | Fixed in Version | => 3.12.1+dev |
| 2011-02-15 11:56 | xclerc | Resolution | open => fixed |
| 2012-09-25 20:06 | xleroy | Status | resolved => closed |
| Copyright © 2000 - 2011 MantisBT Group |