diff options
author | Zahary Karadjov <zahary@gmail.com> | 2017-03-18 01:44:51 +0200 |
---|---|---|
committer | Zahary Karadjov <zahary@gmail.com> | 2017-04-06 00:45:12 +0300 |
commit | 6edb07091dafd4f0214c4aa2df8fc862d03e0a99 (patch) | |
tree | 71e9711e457c1179c83e19778e3cfc592fca9379 /web | |
parent | 88c4d6aabed415150068b440ce8860644aa56152 (diff) | |
download | Nim-6edb07091dafd4f0214c4aa2df8fc862d03e0a99.tar.gz |
fix #4556
This implements a number of new safety checks and error messages when object constructors are used: In case objects: * the compiler will prevent you from initializing fields in conflicting branches * When a field from a particular branch is initialized, the compiler will demand that the discriminator field is also supplied with a maching compile-time value In all objects: * When the "requiresInit" pragma is applied to a type, all fields of the type must be initialized when object construction is used. The code will be simplified in a follow up commit.
Diffstat (limited to 'web')
0 files changed, 0 insertions, 0 deletions