1 2 3 4 5 6 7 8 9 10 11 12 13 14
discard """ errormsg: "fields not initialized: bar" line: "13" """ # bug #2355 type Foo = object foo: string not nil bar: string not nil # Create instance without initializaing the `bar` field var f = Foo(foo: "foo") echo f.bar.isNil # true