[Nice-commit] Nice/src/nice/tools/code EnsureTypeProc.java,1.4,1.5
Brought to you by:
bonniot
|
From: <bo...@us...> - 2003-04-02 16:44:53
|
Update of /cvsroot/nice/Nice/src/nice/tools/code
In directory sc8-pr-cvs1:/tmp/cvs-serv18474/src/nice/tools/code
Modified Files:
EnsureTypeProc.java
Log Message:
A simpler fix for OptionOr, when the first argument has an optional primitive
type.
Index: EnsureTypeProc.java
===================================================================
RCS file: /cvsroot/nice/Nice/src/nice/tools/code/EnsureTypeProc.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** EnsureTypeProc.java 30 Mar 2003 21:49:53 -0000 1.4
--- EnsureTypeProc.java 2 Apr 2003 16:44:50 -0000 1.5
***************
*** 63,76 ****
exp.getArgs()[0].compile(comp, target);
- // A nasty rare case
- if ((oldTarget != null) &&
- (oldTarget.getType() instanceof PrimType) &&
- (exp.getArgs()[0] instanceof ApplyExp) &&
- (((ApplyExp)exp.getArgs()[0]).getFunction() instanceof QuoteExp) &&
- (((QuoteExp)((ApplyExp)exp.getArgs()[0]).getFunction()).getValue() instanceof OptionOr))
- {
- type.emitCoerceFromObject(code);
- return;
- }
/*
If we changed the target, we also have to use the old one.
--- 63,66 ----
|