Order of field declaration in classes

The documentation says explicitly that “Fields can be defined at any place within the declaration of a class or record. And “…the field or, for backwards compatibility, var keywords can be used to start an explicit field section, but it is not required.
However if I declare some constants, I can not follow them with field declarations, unless preceded with key word ‘var’. I vaguely remember a discussion by Marc on words meaning appropriate things in the language, hence it is better to use field rather than var in declaring a field.
Am I missing something, such that this is expected behaviour, or is something amiss.

There is no difference using the keywords individually either, as expected.

Could I see a concrete full file/project that fails for the first test case? This looks like it should be fine, ut its hard to say w/o the full context.

Your issue in the second screenshot is that because you started a const section first, all subsequent items are consts unless you use var or field.

Logged as bugs://E27671.

Update: i was able to reproduce this; this looks like a compiler bug with the new field keyword, it somehow doesn’t work after const. (var is fine, as your last screenshiot shows). We’ll get that fixed ASAP.

Yep cool.

bugs://E27671 was closed as fixed.