Synthetic fields parsed from classfile are not treated as synthetic

Issue #297 resolved
Jesper Öqvist created an issue

ExtendJ 8.1.1 Java SE 6

ExtendJ allows synthetic fields like $assertionsDisabled to be accessed in source code. For example:

public class Bar {
  public static void main(String[] a) {
    assert args.length > 0;

public class Test {
  public static void main(String[] a) {

The interesting case happens if is compiled first with JavaC (or ExtendJ), then is compiled with ExtendJ:

Σ 13:59:25 ~/git/regression-tests $ javac -version                                                                                                                                                                                                            
javac 1.6.0_41
Σ 13:59:31 ~/git/regression-tests $ javac                                                                                                                                                                                                            
Σ 13:59:33 ~/git/regression-tests $ java -jar extendj.jar
Σ 13:59:37 ~/git/regression-tests $ java Test

Expected: ExtendJ should fail to compile

Actual: ExtendJ does not complain about if is compiled separately before compiling with ExtendJ.

Comments (3)

  1. Log in to comment