summary refs log tree commit diff stats
path: root/tests/parser
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2018-11-08 08:15:10 +0100
committerAndreas Rumpf <rumpf_a@web.de>2018-11-08 09:15:15 +0100
commit05683e3aab430abdaeefba144a07f468d33aa8ee (patch)
tree6b86062ec6ddea7a96ca39d5fe94be6475f85376 /tests/parser
parentd0a02fe66bb01ef49645a11562c72fa585170b8e (diff)
downloadNim-05683e3aab430abdaeefba144a07f468d33aa8ee.tar.gz
fixes #9633
Diffstat (limited to 'tests/parser')
-rw-r--r--tests/parser/tprecedence.nim18
1 files changed, 17 insertions, 1 deletions
diff --git a/tests/parser/tprecedence.nim b/tests/parser/tprecedence.nim
index cdf4ad3ee..aff7c6aca 100644
--- a/tests/parser/tprecedence.nim
+++ b/tests/parser/tprecedence.nim
@@ -1,7 +1,8 @@
 discard """
   output: '''holla
 true
-defabc 4'''
+defabc 4
+0'''
 """
 
 # Test top level semicolon works properly:
@@ -24,3 +25,18 @@ echo "def".foo[:string, string]("abc"), " ", 4.bar[:int]
 proc isFalse(a: int): bool = false
 
 assert not isFalse(3)
+
+# bug #9633
+
+type
+  MyField = object
+    b: seq[string]
+
+  MyObject = object
+    f: MyField
+
+proc getX(x: MyObject): lent MyField {.inline.} =
+  x.f
+
+let a = MyObject()
+echo a.getX.b.len