diff options
author | Gabriel Dos Reis <gdr@axiomatics.org> | 2016-01-09 21:09:22 -0800 |
---|---|---|
committer | Gabriel Dos Reis <gdr@axiomatics.org> | 2016-01-09 21:09:22 -0800 |
commit | ea62b3a837416bea218f7a52db80505b8d271dc3 (patch) | |
tree | f447656c1c397b881e6114cddb5ff0e3c020d473 /src/interp/i-funsel.boot | |
parent | 313768fe3869da54aadd7317179bd35a44f95de3 (diff) | |
download | open-axiom-ea62b3a837416bea218f7a52db80505b8d271dc3.tar.gz |
Every use of getDualSignature that does not ensure that builtin
constructors are handled before the call is a bug.
This patch fixes most the obvious and glaring places. Hopefully, the
remaining cases will be exercised when getDualSignature bypasses the
on-disk database mamouth.
Diffstat (limited to 'src/interp/i-funsel.boot')
-rw-r--r-- | src/interp/i-funsel.boot | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/interp/i-funsel.boot b/src/interp/i-funsel.boot index 3ece2464..4d1675e7 100644 --- a/src/interp/i-funsel.boot +++ b/src/interp/i-funsel.boot @@ -1251,12 +1251,18 @@ coerceTypeArgs(t1, t2, SL) == -- if needed. t1 isnt [con1, :args1] or t2 isnt [con2, :args2] => t2 con1 ~= con2 => t2 - coSig := rest getDualSignature first t1 + con1 = ":" => + second args1 ~= second args2 => t2 + [con1,second args1,coerceTypeArgs(third args1,third args2,SL)] + con1 = 'Mapping => t2 + builtinConstructor? con1 => + [con1,:[coerceTypeArgs(u,v,SL) for u in args1 for v in args2]] + coSig := getDualSignature(con1).source and/coSig => t2 csub1 := constructSubst t1 csub2 := constructSubst t2 - cs1 := rest getConstructorSignature con1 - cs2 := rest getConstructorSignature con2 + cs1 := getConstructorSignature(con1).source + cs2 := getConstructorSignature(con2).source [con1, : [makeConstrArg(arg1, arg2, constrArg(c1,csub1,SL), constrArg(c2,csub2,SL), cs) |