Odd: Bug or feature?

I discovered something odd today.

Create a new web core project, add a button to the main form so that we have something to see.

Now create the following record in the main form unit:

  TRecord = record
     x1, x2 : array[0..4] of string;

Run the app and you'll get a blank page, comment out the fields:

  TRecord = record
     //x1, x2 : array[0..4] of string;

and the form with the button is displayed. declaring the field separately gets round the issue:

  TRecord = record
     x1 : array[0..4] of string;
     x2 : array[0..4] of string;

Also if you declare this record in the implementation section (removing it from the interface section) you get a runtime error (delcare x1 and x2 separately the error goes away).

Uncaught duplicate type "TRecord.x2$a" | 0::d 1::u 2::p 3::l 4::i 5::c 6::a 7::t 8::e 9:: 10::t 11::y 12::p 13::e 14:: 15::" 16::T 17::R 18::e 19::c 20::o 21::r 22::d 23::. 24::x 25::2 26::$ 27::a 28::"
at http://localhost:8000/Project1/Project1.js [1333:26]

We'll check this with the compiler team.

We cannot reproduce this.
Test code in a new project


{$R *.dfm}
 TRecord = record
     x1, x2 : array[0..4] of string;

procedure TForm1.WebButton1Click(Sender: TObject);
  r: TRecord;
  r.x1[0] := 'abc';

If a problem persists, please provide a project with which we can reproduce the issue here.

Sure, here is a link to the source code that gives the runtime error. 


Using the current stable 1.3 series of TMW Web Core using Delphi 10.3 Update 2

// Running on Chrome version:
// Version 83.0.4103.61 (Official Build) (64-bit)

We could see the runtime error.
The compiler team will investigate this.

Compiler team confirms the bug and is looking at fixing this issue.

Great, its easy to get round so its not a show stopper.

I can confirm the compiler team solved this issue.
The next update will address this.