Parcourir la source

Merge pull request #294 from junwen12221/master

Supports parsing 'byte[] a = new byte[]{};'.  Only parsing is supported.  Javassist reports a not-supported error.
tags/rel_3_27_0_ga
Shigeru Chiba il y a 4 ans
Parent
révision
afe124ffa5
Aucun compte lié à l'adresse e-mail de l'auteur
1 fichiers modifiés avec 4 ajouts et 0 suppressions
  1. 4
    0
      src/main/javassist/compiler/Parser.java

+ 4
- 0
src/main/javassist/compiler/Parser.java Voir le fichier

@@ -681,6 +681,10 @@ public final class Parser implements TokenId {
throws CompileError
{
lex.get(); // '{'
if(lex.lookAhead() == '}'){
lex.get();
return new ArrayInit(new IntConst(0,TokenId.IntConstant));
}
ASTree expr = parseExpression(tbl);
ArrayInit init = new ArrayInit(expr);
while (lex.lookAhead() == ',') {

Chargement…
Annuler
Enregistrer