diff options
Diffstat (limited to 'tests/notnil/tnotnil_in_objconstr.nim')
-rw-r--r-- | tests/notnil/tnotnil_in_objconstr.nim | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/tests/notnil/tnotnil_in_objconstr.nim b/tests/notnil/tnotnil_in_objconstr.nim index fb8ac8d6f..471150f44 100644 --- a/tests/notnil/tnotnil_in_objconstr.nim +++ b/tests/notnil/tnotnil_in_objconstr.nim @@ -1,13 +1,17 @@ discard """ - errormsg: "fields not initialized: bar" - line: "13" + errormsg: "The Foo type requires the following fields to be initialized: bar, baz" + line: "17" """ {.experimental: "notnil".} # bug #2355 type - Foo = object + Base = object of RootObj + baz: ref int not nil + + Foo = object of Base foo: ref int bar: ref int not nil + var x: ref int = new(int) # Create instance without initializing the `bar` field var f = Foo(foo: x) |