]> source.dussan.org Git - javassist.git/commitdiff
$type support by CtBehavior#insertBefore: JIRA JASSIST-62
authorchiba <chiba@30ef5769-5b8d-40dd-aea6-55b5d6557bb3>
Tue, 3 Jun 2008 08:46:36 +0000 (08:46 +0000)
committerchiba <chiba@30ef5769-5b8d-40dd-aea6-55b5d6557bb3>
Tue, 3 Jun 2008 08:46:36 +0000 (08:46 +0000)
git-svn-id: http://anonsvn.jboss.org/repos/javassist/trunk@442 30ef5769-5b8d-40dd-aea6-55b5d6557bb3

src/main/javassist/CtBehavior.java
src/main/javassist/compiler/JvstCodeGen.java

index 3539fd5fa79fc5c85a86f87d791e35ae8bcc7b09..4a699a90859ad5457c780a490c03d48752db5756 100644 (file)
@@ -654,6 +654,7 @@ public abstract class CtBehavior extends CtMember {
                                         Modifier.isStatic(getModifiers()));
             jv.recordParamNames(ca, nvars);
             jv.recordLocalVariables(ca, 0);
+            jv.recordType(getReturnType0());
             jv.compileStmnt(src);
             Bytecode b = jv.getBytecode();
             int stack = b.getMaxStack();
index b9574c8349619d3e2e8366e9f4594c2601f92bdf..47188504b507edbed713a33298a2eafae037dc18 100644 (file)
@@ -95,7 +95,7 @@ public class JvstCodeGen extends MemberCodeGen {
         }
         else if (name.equals(dollarTypeName)) {
             if (dollarType == null)
-                throw new CompileError(dollarType + " is not available");
+                throw new CompileError(dollarTypeName + " is not available");
 
             bytecode.addLdc(Descriptor.of(dollarType));
             callGetType("getType");