First steps, the compiler can boot with enforced requiresInit

This commit is contained in:
Zahary Karadjov 2020-03-27 15:47:49 +02:00 • committed by Andreas Rumpf
commit a8b6222c86
7 changed files with 26 additions and 29 deletions

View file

@ -75,16 +75,16 @@ varargso("foo", "bar", "baz")
type
Flago = enum
tfNeedsInit, tfNotNil
tfRequiresInit, tfNotNil
var s: set[Flago] = {tfNeedsInit}
var s: set[Flago] = {tfRequiresInit}
if {tfNeedsInit, tfNotNil} * s != {}:
if {tfRequiresInit, tfNotNil} * s != {}:
echo "yes"
else:
echo "no"
if {tfNeedsInit, tfNotNil} * s <= {tfNotNil}:
if {tfRequiresInit, tfNotNil} * s <= {tfNotNil}:
echo "yes"
else:
echo "no"