| View Issue Details [ Jump to Notes ] | [ Issue History ] [ Print ] | ||||||||
| ID | Project | Category | View Status | Date Submitted | Last Update | ||||
|---|---|---|---|---|---|---|---|---|---|
| 0000027 | mercury | Bug | public | 2007-11-12 15:35 | 2007-11-14 15:02 | ||||
| Reporter | rafe | ||||||||
| Assigned To | juliensf | ||||||||
| Priority | normal | Severity | crash | Reproducibility | always | ||||
| Status | resolved | Resolution | fixed | ||||||
| Product Version | |||||||||
| Target Version | Fixed in Version | ||||||||
| Summary | 0000027: Type var in instance declaration can cause compiler to crash | ||||||||
| Description | The compiler crashes when compiling the following code: :- module instance_var_bug. :- interface. :- typeclass tc(T) where [ pred p(T::in) is semidet ]. :- implementation. :- instance tc(V) where [ p(_) :- semidet_true ]. The bug is that the instance argument is a variable, but this is not being caught. | ||||||||
| Tags | No tags attached. | ||||||||
| Attached Files |
| ||||||||
Notes |
|
|
juliensf (administrator) 2007-11-12 16:11 |
The compiler is checking that the instance declarations don't contain type variables. The problem is that it doesn't do this check until *after* the code that causing this abort is executed. Fixing this should just be a matter of either re-ordering some of the checks in compiler/check_typeclass.m. |
|
juliensf (administrator) 2007-11-14 15:02 |
Fixed. See r1.116 of compiler/check_typeclass.m for details. |
Issue History |
|||
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2007-11-12 15:35 |
|
New Issue | |
| 2007-11-12 16:11 | juliensf | Note Added: 0000048 | |
| 2007-11-12 16:11 | juliensf | Assigned To | => juliensf |
| 2007-11-12 16:11 | juliensf | Status | new => assigned |
| 2007-11-14 15:02 | juliensf | Status | assigned => resolved |
| 2007-11-14 15:02 | juliensf | Resolution | open => fixed |
| 2007-11-14 15:02 | juliensf | Note Added: 0000051 | |


