|
|
Bugzilla Link |
631 |
Created on |
Dec 19, 2009 14:55 |
Resolution |
FIXED |
Resolved on |
Dec 19, 2009 20:36 |
Version |
svn |
OS |
Linux |
Architecture |
PC |
Extended Description
If I compile this (taken from ArrayFormat.sac in the stdlib):
module crud;
export {format};
use Array: {modarray,++, prod,take, drop, genarray, sel};
char[+] format(bool[+] y)
{ /* Default format on Boolean non-scalars */
z = with {
(. <= iv <= .) : ['1',' '];
} : genarray(_shape_A_( y));
zs = drop([_sub_SxS_(0,2)],
_shape_A_( z)) ++ [prod( take([_sub_SxS_(0,2)], _shape_A_( z)))];
z = _reshape_VxA_( zs, z);
lastcol = genarray([_dim_A_(z)], 0);
lastcol = modarray( lastcol, 0 , 0);
z = drop(lastcol, z);
return( z);
}
with my local version of tree_utils with a working version of TULSisFullGenerator(),
WLSIMP complains about removing the last partition of a zero-trip WL,
because the LHS is not AKV.
The WL became zero-trip after the last typechecker run, so this is not
unexpected.
I'm going to fix this by making WLSIMP avoid removing the last partition if LHS is not AKV and the partition count is == 1. Presumably, on the next trip around,
the WL will now be AKV, and removal will proceed as expected.