#1213 Returning null as Java array

vkuzkokov Wed 15 Sep 2010

So we have an interface with method returning an array

package party3;

public interface A {
  Object[] getAll();
}

Then we implement it in Fantom

using [java]party3

class B : A {
  override Obj?[]? getAll() { null }
}

On compiling of pod I receive

/home/vkuzkokov/tmp/check/fan/test.fan(4,30): Cannot return 'null' as
        '[java]java.lang::[Object?'

Changing return type leads to another CE (Return type mismatch). Returning [,] works.

brian Wed 15 Sep 2010

Promoted to ticket #1213 and assigned to brian

brian Wed 22 Sep 2010

Ticket resolved in 1.0.56

Add support for null literal to Java FFI coercion

changeset

Login or Signup to reply.