Urgent : with VSC version systematic compilation error

I use VSC version.
Try to create a new appli and rename Unit1.pas form to Name = MainForm and file to MainForm.pas.
the application won't strat any more because of compilation failed with this error.

e:\tms\test.dpr (13, 37) Error: Incompatible type arg no. 2: Got "TPasModule MainForm", expected "TJSHTMLElement"

I've tried plenty of times and I even uninstall and reinstall TMS Web Core
but it doesn't change.

In fact we can't call a form with ANAME and source pas file ANAME too.

Thanks.

Gilles

Hello,
That operation is not permitted, you cannot have a form named ANAME, and a unit named ANAME because the idenfiers collide. In RAD Studio that operation is not permitted, and in VSC we are checking when a form is renamed to prevent that operation. I will add that check also when a unit is renamed. In short, you need to use different identifiers for form names and unit names, they cannot collide.

Hello,
I understand better. But wouldn't it be more efficient to do the renaming test before the compilation which gives an unrelated error message?

As my colleague mentioned, a check will done upon renaming, i.e. before compilation.

You say "will done", in next version ?
Because in the actual is not check.
Try to create new Project go to the end of this process.
Rename default form name to "MainForm" and run one time your project.
Return to your source code and rename unit1.pas to MainForm nothing happens
just an inappropiate compilation error :

d:\TMS\test\test.dpr (13, 37) Error: Incompatible type arg no. 2: Got "TPasModule FormMain", expected "TJSHTMLElement"

Well, of course I refer to a future update!
We can't change a behavior unless we create a new version!

thank you.