aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/javassist/expr/Cast.java
diff options
context:
space:
mode:
authorakuznetsov <akuznetsov@tradingview.com>2023-12-29 17:29:28 +0400
committerakuznetsov <akuznetsov@tradingview.com>2023-12-29 17:29:28 +0400
commit9777bae93cc84249fe08a7e81b2101c415bd55e5 (patch)
tree64fb183df9171cf231e3429fa6248706d2af9105 /src/main/javassist/expr/Cast.java
parent0824a7a04e2f5ca8acc355c2379cf625dadc8943 (diff)
downloadjavassist-9777bae93cc84249fe08a7e81b2101c415bd55e5.tar.gz
javassist-9777bae93cc84249fe08a7e81b2101c415bd55e5.zip
line numbers for undefined ids & more
Diffstat (limited to 'src/main/javassist/expr/Cast.java')
-rw-r--r--src/main/javassist/expr/Cast.java10
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);
}
}
}