Java compiler Internal error in .2885 with multi dim alias arrays

Hi

We have a problem with the new compiler and Java project that worked fine with .2867.
The issue seems to be related to

  • E26748: Cooper: multi-dimensional arrays

consoleapplication3.zip (4.3 KB)

E: Internal error: System.NullReferenceException: Object reference not set to an instance of an object.
   at h.VisitResolvedNewExpression(ResolvedNewExpression a)
   at h.VisitExpression(Expression a)
   at h.VisitAssignmentStatement(AssignmentStatement a)
   at h.VisitStatement(Statement a)
   at h.VisitWhileStatement(WhileStatement a)
   at h.VisitStatement(Statement a)
   at h.VisitBeginStatement(BeginStatement a)
   at h.VisitStatement(Statement a)
   at h.VisitStatementExpression(StatementExpression a)
   at h.VisitExpression(Expression a)
   at h.VisitAssignmentStatement(AssignmentStatement a)
   at h.VisitStatement(Statement a)
   at h.VisitBeginStatement(BeginStatement a)
   at h.VisitStatement(Statement a)
   at RemObjects.Elements.Code.BaseVisitor.VisitScopeStatement(ScopeStatement element)
   at h.VisitScopeStatement(ScopeStatement a)
   at h.VisitStatement(Statement a)
   at e.a(IMethodInfo a)
   at RemObjects.Elements.Code.CombinedParsedType.ForAllMethods(Func`2 action)
   at e.a(IParsedType a)
   at e.f()
   at e.GenerateExecutable()
   at RemObjects.Elements.Code.Compiler.CompilerOuput.GenerateExecutable__$mapped(Compiler self)
   at RemObjects.Elements.Code.Compiler.Compiler.Compile()

The problem is creating arrays using aliases.

type
  obf_TDesKey       = array[0..5]  of Byte ;
  obf_TDesSchedule  = array[0..15] of obf_TDesKey ;
  obf_TDesSchedule3 = array[0..2]  of obf_TDesSchedule ;

result := new obf_TDesKey[16] ;
result := new obf_TDesSchedule[3] ;

Resolving aliases to a full declaration solves the compiler issue

type
  obf_TDesKey       = array[0..5]  of Byte ;
  obf_TDesSchedule  = array[0..15] of array[0..5] of Byte;
  obf_TDesSchedule3 = array[0..2]  of array[0..15] of array[0..5] of Byte;

Is it possible to have both versions compiling and fix the Internal error?

Artur

Logged as bugs://E26826.

bugs://E26826 was closed as fixed.

1 Like