diff options
author | Andreas Rumpf <rumpf_a@web.de> | 2017-04-04 13:38:41 +0200 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2017-04-04 13:38:41 +0200 |
commit | bfaa32968049aed6925e53def094b8135fed328a (patch) | |
tree | 6bf125c29121eb5c010ba0e93c95ee7988e790eb /tests | |
parent | 0b79a2b02e2b6fac5245aba5eceb25234b921fc5 (diff) | |
parent | 87732f797c634b9c3ee1fbb77c0ed0c416d16db6 (diff) | |
download | Nim-bfaa32968049aed6925e53def094b8135fed328a.tar.gz |
Merge branch 'devel' into araq
Diffstat (limited to 'tests')
-rw-r--r-- | tests/metatype/tcompilesregression.nim | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/metatype/tcompilesregression.nim b/tests/metatype/tcompilesregression.nim new file mode 100644 index 000000000..489cd06d6 --- /dev/null +++ b/tests/metatype/tcompilesregression.nim @@ -0,0 +1,18 @@ +discard """ + output: '''ok''' +""" + +# bug #5638 + +type X = object + a_impl: int + +proc a(x: X): int = + x.a_impl + +var x: X +assert(not compiles((block: + x.a = 1 +))) + +echo "ok" |