[nem-bug] [Nemerle 0001021]: ICE: ForceUnify failed to unify
feedback at nemerle.org
feedback at nemerle.org
Sat Jun 2 01:26:00 CEST 2007
A NOTE has been added to this issue.
======================================================================
<http://nemerle.org/bugs/view.php?id=1021>
======================================================================
Reported By: Evin Robertson
Assigned To:
======================================================================
Project: Nemerle
Issue ID: 1021
Category: Compiler (type engine)
Reproducibility: always
Severity: crash
Priority: normal
Status: new
======================================================================
Date Submitted: 05-28-2007 05:11 CEST
Last Modified: 06-02-2007 01:25 CEST
======================================================================
Summary: ICE: ForceUnify failed to unify
Description:
The following program gives an ICE with Nemerle 0.9.3.99.7691:
public class M['S]
{
}
public class P['M, 'S] where 'M : M['S]
{
}
public abstract class A['S]
{
public abstract I['M](_ : P['M, 'S]) : void
where 'M : M['S];
}
public class B['S] : A['S]
{
public override I['M](_ : P['M, 'S]) : void
where 'M : M['S]
{
}
}
======================================================================
----------------------------------------------------------------------
Evin Robertson - 06-02-07 01:25
----------------------------------------------------------------------
I managed to work around the problem by moving the function type parameter
to being a class type parameter. Clutters the code, but at least it
compiles.
Here's another program giving a different ICE for a function type
parameter (same work-around applies):
public class M['M, 'S] where 'M : M['M, 'S]
{
}
public class F['S]
{
public I['M](m : 'M) : void
where 'M : M['M, 'S]
{
}
}
error: internal compiler error: assertion ``constraints != null'' failed
in file typing/StaticTyVar.n, line 73
at Nemerle.Compiler.StaticTyVar.get_LowerBound () [0x000d1] in
/home/evin/nemerle-0.9.3.99.7691/ncc/typing/StaticTyVar.n:81
at Nemerle.Compiler.MType.Require (Nemerle.Compiler.MType t) [0x00c4b]
in /home/evin/nemerle-0.9.3.99.7691/ncc/typing/MType.n:379
at Nemerle.Compiler.MType.Require (Nemerle.Compiler.TyVar t) [0x0000c]
in /home/evin/nemerle-0.9.3.99.7691/ncc/typing/MType.n:1032
at Nemerle.Compiler.TypeInfo+_N__N_l29583_29630.apply_void
(Nemerle.Compiler.StaticTyVar _N_29628, Nemerle.Compiler.TyVar _N_29629)
[0x00000]
at
Nemerle.Builtins.FunctionVoid`2[Nemerle.Compiler.StaticTyVar,Nemerle.Compiler.TyVar].apply_void
(Tuple`2 ) [0x00001] in
/home/evin/nemerle-0.9.3.99.7691/lib/internal-numbered.n:124
at Nemerle.Collections.List.Iter2[StaticTyVar,TyVar]
(Nemerle.Core.list`1 a, Nemerle.Core.list`1 b,
Nemerle.Builtins.FunctionVoid`2 f) [0x000cd] in
/home/evin/nemerle-0.9.3.99.7691/lib/list.n:977
at Nemerle.Compiler.TypeInfo.ConstructSubst (Nemerle.Compiler.TypeInfo
tc, Nemerle.Core.list`1 typarms, Nemerle.Core.list`1 args, Boolean
check_parms) [0x0007f] in
/home/evin/nemerle-0.9.3.99.7691/ncc/hierarchy/TypeInfo.n:657
at Nemerle.Compiler.TypeInfo.MakeSubst (Nemerle.Core.list`1 parms)
[0x00001] in /home/evin/nemerle-0.9.3.99.7691/ncc/hierarchy/TypeInfo.n:685
at Nemerle.Compiler.TyVarEnv._N_type_class81409
(Nemerle.Compiler._N_closure81374 _N_Bind_cp81408,
Nemerle.Compiler.Parsetree.PExpr tyexpr) [0x003a4] in
/home/evin/nemerle-0.9.3.99.7691/ncc/typing/TyVarEnv.n:372
at Nemerle.Compiler.TyVarEnv._N_f281403
(Nemerle.Compiler._N_closure81374 _N_Bind_cp81402,
Nemerle.Compiler.Parsetree.PExpr t, Boolean allow_ref) [0x0074d] in
/home/evin/nemerle-0.9.3.99.7691/ncc/typing/TyVarEnv.n:300
at Nemerle.Compiler.TyVarEnv+_N_f_81394.apply
(Nemerle.Compiler.Parsetree.PExpr _N_81393) [0x00000]
at Nemerle.Compiler.TyVarEnv.Bind (Nemerle.Compiler.GlobalEnv env,
Nemerle.Compiler.TypeBuilder curtc, Nemerle.Compiler.Parsetree.PExpr t,
Boolean allow_tyvars, Boolean check_parms) [0x0003f] in
/home/evin/nemerle-0.9.3.99.7691/ncc/typing/TyVarEnv.n:379
at Nemerle.Compiler.TyVarEnv.MonoBind (Nemerle.Compiler.GlobalEnv env,
Nemerle.Compiler.TypeBuilder curtc, Nemerle.Compiler.Parsetree.PExpr t,
Boolean check_parms) [0x00001] in
/home/evin/nemerle-0.9.3.99.7691/ncc/typing/TyVarEnv.n:74
at Nemerle.Compiler.TyVarEnv.AddTyparms (Nemerle.Compiler.GlobalEnv env,
Nemerle.Compiler.Parsetree.Typarms tp, Nemerle.Compiler.TypeBuilder curtc,
Boolean check_parms) [0x002d2] in
/home/evin/nemerle-0.9.3.99.7691/ncc/typing/TyVarEnv.n:428
at Nemerle.Compiler.TypeBuilder.BindTyparms (Nemerle.Compiler.TyVarEnv
other_tenv, Nemerle.Compiler.Parsetree.Typarms tp) [0x00001] in
/home/evin/nemerle-0.9.3.99.7691/ncc/hierarchy/TypeBuilder.n:1437
at Nemerle.Compiler.TypeBuilder.BindTyparms
(Nemerle.Compiler.Parsetree.Typarms tp) [0x00001] in
/home/evin/nemerle-0.9.3.99.7691/ncc/hierarchy/TypeBuilder.n:1431
at Nemerle.Compiler.MethodBuilder..ctor (Nemerle.Compiler.TypeBuilder
par, Nemerle.Compiler.Parsetree.Function functionAst, Boolean is_property)
[0x00162] in
/home/evin/nemerle-0.9.3.99.7691/ncc/hierarchy/ClassMembers.n:977
Issue History
Date Modified Username Field Change
======================================================================
05-28-07 05:11 Evin Robertson New Issue
06-02-07 01:25 Evin Robertson Note Added: 0001913
======================================================================
More information about the bugs
mailing list