@Warfley,
Do you ever have something actually useful to the topic ? or you have some uncontrollable need to pretend you know way more than you actually do ?
but, anyway, thank you so much for exposing the obvious and trivial... we all needed that.
I answered something very specific you said:
It must not take tens of lines of various compiler construct to accomplish something so simple.
And I said that it does require introduction of a new kind of type, because the current ordinal types are designed to be compatible. Note not just assignment compatible as you claim, they are fully compatible.
This thing that you want does not yet exist as a concept in the language. So what would it take to include it in the compiler? First it requires the introduction of a new type kind, which in the fpc source is introduction of a new TDef including all the serialization and de-serialization into the PPUs.
Then this must be included in the typechecker, introduction of type conversions etc. Not to mention that when you introduce a completely new concept to the compiler you must verify that it works with the other features of the compiler as well. Like ordinals can be used for set slices, array indices, case labels, etc. Those all need to be extended for the new kind of type thats introduced.
When doing a simple text search for "orddef" which is the type identifier for ordinal types in the fpc sources, I get 2309 results. Which all need to be checked an many of those need to be amended for handling the new type.
Thats going to be more than "tens of lines". It's a very deep change to the whole compiler infrastructure
There would be a quick and dirty solution though, it could generate a dummy record type, and automatically generate the explicit cast operators for that type. But at that point you can also just define your own record types like Martin pointed out, which works perfectly well.