-
- Notifications
You must be signed in to change notification settings - Fork 1.5k
Closed
Labels
Description
Example:
block: type Foo = object bar: bool var f1: Foo block: type Foo = object baz: int var f2: Foo echo f2.bazLeads to incorrect code generation:
Error: execution of an external compiler program 'gcc -c -w -I/home/nigredo/dev/nim/lib -o /home/nigredo/dev/tmp/nimcache/test_block_types.o /home/nigredo/dev/tmp/nimcache/test_block_types.c' failed with exit code: 1 /home/nigredo/dev/tmp/nimcache/test_block_types.c: In function ‘NimMainModule’: /home/nigredo/dev/tmp/nimcache/test_block_types.c:113:47: error: ‘Foo_ERzUuJDwNMfy52HTAAjijQ {aka struct Foo_ERzUuJDwNMfy52HTAAjijQ}’ has no member named ‘baz’; did you mean ‘bar’? LOC3 = nimIntToStr(f2_lLsGauUAFcJDvAdQ34YRQA.baz); ^ timotheecour