diff options
author | dos-reis <gdr@axiomatics.org> | 2008-01-16 21:35:55 +0000 |
---|---|---|
committer | dos-reis <gdr@axiomatics.org> | 2008-01-16 21:35:55 +0000 |
commit | 71e48772bf2d5d0f12b221b62f851eca77c2ae7d (patch) | |
tree | f8538b4242d4e3ec77fbdd13f6f35951feae1d06 /src | |
parent | ed82a24534ef85fddfabadb3a3f9fca47ce63fda (diff) | |
download | open-axiom-71e48772bf2d5d0f12b221b62f851eca77c2ae7d.tar.gz |
Fix SF/1872564
* interp/compiler.boot (compPretend): Don't check for `new'
compiler semantics.
(compColonInside): Likewise.
* testsuite/compiler/1872564.spad: New.
Diffstat (limited to 'src')
-rw-r--r-- | src/ChangeLog | 8 | ||||
-rw-r--r-- | src/interp/compiler.boot | 6 | ||||
-rw-r--r-- | src/testsuite/compiler/1872564.spad | 7 |
3 files changed, 15 insertions, 6 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 55fb4d2b..4f404627 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,11 @@ +2008-01-16 Gabriel Dos Reis <gdr@cs.tamu.edu> + + Fix SF/1872564 + * interp/compiler.boot (compPretend): Don't check for `new' + compiler semantics. + (compColonInside): Likewise. + * testsuite/compiler/1872564.spad: New. + 2008-01-15 Gabriel Dos Reis <gdr@cs.tamu.edu> Fix SF/1850071 diff --git a/src/interp/compiler.boot b/src/interp/compiler.boot index 8915a10b..283b8868 100644 --- a/src/interp/compiler.boot +++ b/src/interp/compiler.boot @@ -1147,8 +1147,6 @@ compPretend(["pretend",x,t],m,e) == e:= addDomain(t,e) T:= comp(x,t,e) or comp(x,$EmptyMode,e) or return nil if T.mode=t then warningMessage:= ["pretend",t," -- should replace by @"] - $newCompilerUnionFlag and opOf(T.mode) = 'Union and opOf(m) ^= 'Union => - stackSemanticError(["cannot pretend ",x," of mode ",T.mode," to mode ",m],nil) T:= [T.expr,t,T.env] T':= coerce(T,m) => (if warningMessage then stackWarning warningMessage; T') @@ -1161,10 +1159,6 @@ compColonInside(x,m,e,m') == if warningMessage then stackWarning warningMessage else - $newCompilerUnionFlag and opOf(m'') = 'Union => - return - stackSemanticError(["cannot pretend ",x," of mode ",m''," to mode ",m'],nil) - stackWarning [":",m'," -- should replace by pretend"] T' diff --git a/src/testsuite/compiler/1872564.spad b/src/testsuite/compiler/1872564.spad new file mode 100644 index 00000000..505a10b3 --- /dev/null +++ b/src/testsuite/compiler/1872564.spad @@ -0,0 +1,7 @@ +++ Contributed by Luke Wagner +++ Issue: The compiler should allow pretend from Union types. +)abbrev package TEST Test +Test() : with + foo : Union(Integer, Float) -> SExpression + == add + foo u == u pretend SExpression |