JADE Environment Development Ideas

What's new in the JADE 2025 release?

IMPROVED DEVELOPER EFFICIENCY. ENHANCED INTEGRATIONS. NEW WEB DEVELOPMENT FRAMEWORK

The Jade 2025 release focuses on modernising the developer experience and helping you build faster, smarter, and more scalable applications.


Start your update to JADE's latest release

Remove Error 6085 When Working With Array As Return Value

I want to create my own "addAll" for an array that deletes the array passed in, a one-shot "Add Range And Delete Child Collection" deal.

A line of code would look something like: emailArray.addRangeAndGC(someMethodThatReturnsTheSameArrayWithItems());

This method is declared on the (sub) array class:

addRangeAndGC(v_AdditionalItems : EmailArray io) updating;

Basically loop through the additional items adding to 'self', with the last line deleting said v_AdditionalItems array.

Currently this line throws a "6085" during compile.

I can work around this with a 2 line solution (assign the return value to a local variable and then call above addRangeAndGC method).

For the sake of streamlining the code it would be nice if I could do this on the one line and not have to create a "worker" variable to work around the compiler error.

  • Damian Brede
  • Feb 18 2026
  • Needs review
  • Attach files
  • William Cameron commented
    23 Feb 22:49
    I am not sure why your getting 6085

    I was not getting the 6085 compile error because in my example v_AdditionalItems is of type Collection, rather than the return type of someMethodThatReturnsTheSameArrayWithItems which is EmailArray. io parameters need to be of identical type.


  • William Cameron commented
    23 Feb 03:52

    I am not sure why your getting 6085 "Cannot assign to method" with that code.

    If v_AdditionalItems is marked IO, you have to give it a variable rather than a value returned from a function because it expects to update v_AdditionalItems with its new state if its reassigned.

    Changing addRangeAndGC to have v_AdditionalItems be constant like below should work for you:

    addRangeAndGC(v_AdditionalItems : Collection) updating;
    vars
    collectionToCopyFrom : Collection;
    begin
    collectionToCopyFrom := v_AdditionalItems;
    collectionToCopyFrom.copy(self);
    delete collectionToCopyFrom;
    end;

    Now the following jadescript will compile and work correctly:

    m1();
    vars
    ea : EmailArray;
    begin
    create ea transient;
    ea.addRangeAndGC(someMethodThatReturnsTheSameArrayWithItems());
    end;

    I have attached an example schema