#2739 Lists of Lists

SlimerDude Tue 19 Feb 2019

If I have this class in podA then everything is fine, and podA compiles and runs:

class Lists1 {
    Obj[]?[] objs

    new make() {
        objs = Obj[]?[,] { it.size = 3 }
    }
}

But if I then make a podB and reference the above class:

using podA::Lists1

class Lists2 {
    Void main() {
        Lists1().toStr
    }
}

Then I get a compilation error:

compile [podB]
  Compile [podB]
    FindSourceFiles [1 files]
ERR: Internal compiler error
sys::ArgErr: Invalid type signature 'sys::Obj[]?[]'
  compiler::TypeParser.err (TypeParser.fan:214)
  compiler::TypeParser.loadTop (TypeParser.fan:72)
  compiler::TypeParser.resolve (TypeParser.fan:48)
  compiler::CNamespace.resolveType (CNamespace.fan:257)
  compiler::ReflectNamespace.importType (ReflectNamespace.fan:63)
  compiler::ReflectField.make$ (ReflectSlot.fan:43)
  compiler::ReflectField.make (ReflectSlot.fan:38)
  compiler::ReflectNamespace.importField (ReflectNamespace.fan:90)
  compiler::ReflectNamespace.importSlot (ReflectNamespace.fan:82)
  compiler::ReflectType.slots (ReflectType.fan:73)
  fan.sys.List.each (List.java:588)
  compiler::ReflectType.slots (ReflectType.fan:70)
  compiler::ResolveExpr.findCtorMatches (ResolveExpr.fan:586)
  compiler::ResolveExpr.resolveConstruction (ResolveExpr.fan:545)
  compiler::ResolveExpr.resolveExpr (ResolveExpr.fan:165)
  compiler::ResolveExpr.visitExpr (ResolveExpr.fan:123)
  compiler::Expr.walk (Expr.fan:267)
  compiler::Expr.walkExpr (Expr.fan:277)
  compiler::NameExpr.walkChildren (Expr.fan:762)
  compiler::Expr.walk (Expr.fan:266)
  compiler::Stmt.walkExpr (Stmt.fan:61)
  compiler::ExprStmt.walkChildren (Stmt.fan:117)
  compiler::Stmt.walk (Stmt.fan:48)
  compiler::Block.walk (Block.fan:89)
  fan.sys.List.each (List.java:588)
  39 More...
BUILD FAILED [12ms]!

brian Tue 19 Feb 2019

Ticket promoted to #2739 and assigned to brian

I think that is because of differences in compiler vs runtime type signature parser

brian Thu 14 Mar 2019

Ticket resolved in 1.0.72

Login or Signup to reply.