Explorar el Código

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 hace 4 años
padre
commit
afe124ffa5
No account linked to committer's email address
Se han modificado 1 ficheros con 4 adiciones y 0 borrados
  1. 4
    0
      src/main/javassist/compiler/Parser.java

+ 4
- 0
src/main/javassist/compiler/Parser.java Ver fichero

@@ -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() == ',') {

Cargando…
Cancelar
Guardar