#863 Java FFI issue: Failed to assign an value to arrays of Objects through FFI

alena Fri 11 Dec 2009

Hi guys,

I failed to assign any value to arrays of Objects through FFI.

Here's an example of code:

Original Java class:

public static class TypeInfo extends ElementInfo {
  public String[] superclasses;

Inside Fan script:

info := TypeInfo()
info.superclasses = Str["someType"]  // Compiler error on this line: 
                                     // "Left hand side is not assignable"


brian Sat 12 Dec 2009

Promoted to ticket #863 and assigned to brian

It looks like there are two problems here:

  • Str is not implicitly being coerced to java.lang.String (Java FFI should know they are the same type)
  • Assignments to a array field are not working

brian Thu 9 Sep 2010

Ticket resolved in 1.0.55

This bug was caused by auto-coercion of arrays to lists inserted into the AST which didn't make sense during a field set.


Login or Signup to reply.