What happened with sequences of derived classes?

Consider the Oxygene code:

namespace TestSequenceNet;

uses
  RemObjects.Elements.RTL;

type
  BaseClass = public class end;
  DerivedClass = public class(BaseClass);

type
  Program = class
  public

    class var fList: List<DerivedClass>;

    class method GetSequence: sequence of BaseClass; virtual; iterator;
    begin
      yield fList;  /java under Elements 2331: Type mismatch, expected BaseClass
    end;

    class method Main(args: array of String): Int32;
    begin
      fList := new List<DerivedClass>;
      for each El in GetSequence do;
    end;

  end;

end.

The problem:

Until Elements 2289, this code compiled and run well under both .NET and java.

With Elements 2331:

Under .NET: Everything remains fine, as before.

Under java: Does not compile, giving the error as indicated in the code.

So, what happened between 2289 and 2331? The error message is pretty clear, but this change breaks a lot of my code.

Thanks, logged as bugs://81366

You can cast safely in java. but I’ll check to see why it’s not compiling anymore.

bugs://81366 got closed with status fixed.