From d68d655abaef0d14652e07608c633b1ff1feefda Mon Sep 17 00:00:00 2001 From: dos-reis Date: Fri, 17 Oct 2008 23:51:50 +0000 Subject: Fix AW/271 * interp/sys-constants.boot ($Field): New. * interp/i-coerce.boot (retract2Specialization): Ignore expressions whose types do no belong to Field. --- src/interp/i-coerce.boot | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src/interp/i-coerce.boot') diff --git a/src/interp/i-coerce.boot b/src/interp/i-coerce.boot index 35a0e23b..4a145952 100644 --- a/src/interp/i-coerce.boot +++ b/src/interp/i-coerce.boot @@ -214,10 +214,12 @@ retract2Specialization object == type is ['Expression,D] => atom val' => nil -- certainly not a fraction [num,:den] := val' - -- coerceRetract already handles case where den = 1 - num isnt [0,:num] => NIL - den isnt [0,:den] => NIL - objNewWrap([num,:den],[$QuotientField, D]) + ofCategory(type,$Field) => + -- coerceRetract already handles case where den = 1 + num isnt [0,:num] => NIL + den isnt [0,:den] => NIL + objNewWrap([num,:den],[$QuotientField, D]) + nil type is ['SimpleAlgebraicExtension,k,rep,.] => -- try to retract as an element of rep and see if we can get an -- element of k -- cgit v1.2.3