diff options
author | akuznetsov <akuznetsov@tradingview.com> | 2023-09-26 15:57:53 +0400 |
---|---|---|
committer | akuznetsov <akuznetsov@tradingview.com> | 2023-10-04 14:06:05 +0400 |
commit | d5a7881381080fa4953b24c069675ca435598b95 (patch) | |
tree | 7a94b14981dde07f72068b1bb0704e7b4c2f3fc8 /src/main/javassist/compiler/ast/NewExpr.java | |
parent | 700be6f6f9546e8af049b1a763ce27f1fde5955d (diff) | |
download | javassist-d5a7881381080fa4953b24c069675ca435598b95.tar.gz javassist-d5a7881381080fa4953b24c069675ca435598b95.zip |
add line numbers and test
Diffstat (limited to 'src/main/javassist/compiler/ast/NewExpr.java')
-rw-r--r-- | src/main/javassist/compiler/ast/NewExpr.java | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/main/javassist/compiler/ast/NewExpr.java b/src/main/javassist/compiler/ast/NewExpr.java index 44b264c0..d4f7f475 100644 --- a/src/main/javassist/compiler/ast/NewExpr.java +++ b/src/main/javassist/compiler/ast/NewExpr.java @@ -28,26 +28,26 @@ public class NewExpr extends ASTList implements TokenId { protected boolean newArray; protected int arrayType; - public NewExpr(ASTList className, ASTList args) { - super(className, new ASTList(args)); + public NewExpr(ASTList className, ASTList args, int lineNumber) { + super(className, new ASTList(args, lineNumber), lineNumber); newArray = false; arrayType = CLASS; } - public NewExpr(int type, ASTList arraySize, ArrayInit init) { - super(null, new ASTList(arraySize)); + public NewExpr(int type, ASTList arraySize, ArrayInit init, int lineNumber) { + super(null, new ASTList(arraySize, lineNumber), lineNumber); newArray = true; arrayType = type; if (init != null) - append(this, init); + append(this, init, lineNumber); } public static NewExpr makeObjectArray(ASTList className, - ASTList arraySize, ArrayInit init) { - NewExpr e = new NewExpr(className, arraySize); + ASTList arraySize, ArrayInit init, int lineNumber) { + NewExpr e = new NewExpr(className, arraySize, lineNumber); e.newArray = true; if (init != null) - append(e, init); + append(e, init, lineNumber); return e; } |