diff options
author | Shigeru Chiba <chibash@users.noreply.github.com> | 2024-05-03 19:01:47 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-03 19:01:47 +0900 |
commit | bb261b443831e52409eeed6e49ddfb24db2c4d08 (patch) | |
tree | 3f8189ef73984d71ad0b8fe595c0e3a2a425e6bb /src/main/javassist/expr/Cast.java | |
parent | 204d67844433c9b781054154695eeb14c2291847 (diff) | |
parent | 9777bae93cc84249fe08a7e81b2101c415bd55e5 (diff) | |
download | javassist-bb261b443831e52409eeed6e49ddfb24db2c4d08.tar.gz javassist-bb261b443831e52409eeed6e49ddfb24db2c4d08.zip |
Merge pull request #484 from kuznet1/master
Line numbers support
Diffstat (limited to 'src/main/javassist/expr/Cast.java')
-rw-r--r-- | src/main/javassist/expr/Cast.java | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/main/javassist/expr/Cast.java b/src/main/javassist/expr/Cast.java index 31522e5a..29f91f3e 100644 --- a/src/main/javassist/expr/Cast.java +++ b/src/main/javassist/expr/Cast.java @@ -163,26 +163,26 @@ public class Cast extends Expr { } @Override - public void doit(JvstCodeGen gen, Bytecode bytecode, ASTList args) + public void doit(JvstCodeGen gen, Bytecode bytecode, ASTList args, int lineNumber) throws CompileError { if (gen.getMethodArgsLength(args) != 1) throw new CompileError(Javac.proceedName + "() cannot take more than one parameter " - + "for cast"); + + "for cast", lineNumber); gen.atMethodArgs(args, new int[1], new int[1], new String[1]); bytecode.addOpcode(Opcode.CHECKCAST); bytecode.addIndex(index); - gen.setType(retType); + gen.setType(retType, lineNumber); } @Override - public void setReturnType(JvstTypeChecker c, ASTList args) + public void setReturnType(JvstTypeChecker c, ASTList args, int lineNumber) throws CompileError { c.atMethodArgs(args, new int[1], new int[1], new String[1]); - c.setType(retType); + c.setType(retType, lineNumber); } } } |