apl-cornell / fabric

Distributed persistent programming language with secure information flow types
http://www.cs.cornell.edu/projects/fabric/
Other
28 stars 4 forks source link

Broken array literal initialization #30

Open tmagrino opened 6 years ago

tmagrino commented 6 years ago

Currently the following will not compile to valid Java code from FabIL:

public class Test {
  public void foo() {
    int[] foobar = {1, 2, 3};
  }
}

The array declaration and initializer will be compiled into the following line of Java: fabric.lang.arrays.intArray foobar = fabric.lang.WrappedJavaInlineable.$wrap({1, 2, 3}); which is invalid Java code.

tmagrino commented 6 years ago

Credit to @karannewatia for notifying me of this bug.