* fixes #5170

* make tests green
This commit is contained in:
Andreas Rumpf 2020-03-05 16:02:34 +01:00 • committed by GitHub
commit 83e715c5b6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 46 additions and 15 deletions

View file

@ -8,6 +8,8 @@ ptr Foo
(member: 123.456)
(member: "hello world", x: ...)
(member: 123.456, x: ...)
0
false
'''
joinable: false
"""
@ -78,3 +80,31 @@ block t7905:
foobarRec("hello world")
foobarRec(123.456'f64)
# bug #5170
when true:
type Foo = object
bar: bool
type Bar = object
sameBody: string
var b0: Bar
b0.sameBody = "abc"
block:
type Foo = object
baz: int
type Bar = object
sameBody: string
var b1: Bar
b1.sameBody = "def"
var f2: Foo
echo f2.baz
var f1: Foo
echo f1.bar