[m-dev.] diff: polymorphism.m bug fix

Thomas Charles CONWAY conway at cs.mu.oz.au
Fri Jul 25 08:02:31 AEST 1997


Fergus Henderson, you write:
> Hi,
> 
> compiler/polymorphism.m:
> 	Fix a bug: it was over-approximating the non-locals, which
> 	caused the generated HLDS to be mode-incorrect, because it
> 	could contain a construction for a type_info variable which was
> 	(spuriously) non-local to the condition of the if-then-else in
> 	which it occurred.  That's not legal because you can't bind
> 	non-local variables in the condition of an if-then-else.
> 

The fix is fine.

The bug could cause mode incorrectness in any branched structure though -
If a type-info occured in only one branch of an disjunction it would be
made nonlocal to the disjunction which is also mode incorrect.

Thomas
-- 
ZZ:wq!
^X^C
Thomas Conway               				      conway at cs.mu.oz.au
AD DEUM ET VINUM	  			      Every sword has two edges.



More information about the developers mailing list