Constant fields
This update adds constant fields, along with some bug fixes from the last update.
C#:
public const myField: integer
public static const myField: integer = 5
Constant fields can only be set as default values, or in the
new instance section. Meaning they can't be changed after creation.
Changes included in this release
- added
const keyword for fields
- the variable toString for class instances no longer uses it's field contents for the hash code, meaning
{var::%{_myClass}%} should produce consistent results
- registered a comparator for typed and untyped instances so now
%typedinstance% is %classinstance% should consistently be true
- the typed wrapper of a specific instance is now only created once so that comparing typed instances works as intended
- reworded access errors to be more helpful and specific
- changed pattern to support
new ClassName as a shortened version of
new instance of ClassName
- fixed nested sections in the new instance expression to properly get the source expression before checking if it can be a section