aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/javassist/expr/NewExpr.java
diff options
context:
space:
mode:
authorchiba <chiba@30ef5769-5b8d-40dd-aea6-55b5d6557bb3>2003-11-27 05:33:16 +0000
committerchiba <chiba@30ef5769-5b8d-40dd-aea6-55b5d6557bb3>2003-11-27 05:33:16 +0000
commitcdca9771599b4c3337aaf42cf7460a27dc1719d5 (patch)
tree9617dfa2aa53d78c6bd2d3cf4428137d355faa76 /src/main/javassist/expr/NewExpr.java
parentced4ae1f0e2130b36cb51faf6345d5b8e036585e (diff)
downloadjavassist-cdca9771599b4c3337aaf42cf7460a27dc1719d5.tar.gz
javassist-cdca9771599b4c3337aaf42cf7460a27dc1719d5.zip
I implemented a type checker for better code generation.
git-svn-id: http://anonsvn.jboss.org/repos/javassist/trunk@55 30ef5769-5b8d-40dd-aea6-55b5d6557bb3
Diffstat (limited to 'src/main/javassist/expr/NewExpr.java')
-rw-r--r--src/main/javassist/expr/NewExpr.java11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/main/javassist/expr/NewExpr.java b/src/main/javassist/expr/NewExpr.java
index 423a5d72..62f25ad6 100644
--- a/src/main/javassist/expr/NewExpr.java
+++ b/src/main/javassist/expr/NewExpr.java
@@ -205,9 +205,16 @@ public class NewExpr extends Expr {
bytecode.addOpcode(NEW);
bytecode.addIndex(newIndex);
bytecode.addOpcode(DUP);
- gen.atMethodCall2(newType, MethodInfo.nameInit,
- args, false, true, -1);
+ gen.atMethodCallCore(newType, MethodInfo.nameInit, args,
+ false, true, -1, null);
gen.setType(newType);
}
+
+ public void setReturnType(JvstTypeChecker c, ASTList args)
+ throws CompileError
+ {
+ c.atMethodCallCore(newType, MethodInfo.nameInit, args);
+ c.setType(newType);
+ }
}
}