2018-10-16 17:43 AEDT

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0000027mercuryBugpublic2007-11-14 15:02
Reporterrafe 
Assigned Tojuliensf 
PrioritynormalSeveritycrashReproducibilityalways
StatusresolvedResolutionfixed 
Product Version 
Target VersionFixed in Version 
Summary0000027: Type var in instance declaration can cause compiler to crash
DescriptionThe 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.
TagsNo tags attached.
Attached Files

-Relationships
+Relationships

-Notes

~0000048

juliensf (administrator)

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.

~0000051

juliensf (administrator)

Fixed. See r1.116 of compiler/check_typeclass.m for details.
+Notes

-Issue History
Date Modified Username Field Change
2007-11-12 15:35 rafe 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
+Issue History