summary refs log tree commit diff stats
path: root/tests/errmsgs/undeclared_routime4.nim
diff options
context:
space:
mode:
authorTimothee Cour <timothee.cour2@gmail.com>2018-10-13 16:16:04 -0700
committerAndreas Rumpf <rumpf_a@web.de>2018-10-14 01:16:04 +0200
commiteb946f37a7c56fb64703357a67ed098ac8dfd936 (patch)
tree87c87454fad5a77a13b8db7d05a37222bdb030ec /tests/errmsgs/undeclared_routime4.nim
parent8232bd04f9edc4b3accb114c9bd6e60190b68396 (diff)
downloadNim-eb946f37a7c56fb64703357a67ed098ac8dfd936.tar.gz
fixes #8671; show helpful msg (lookup symbol, eg iterator) on 'attempting to call undeclared routine' error (#8786)
Diffstat (limited to 'tests/errmsgs/undeclared_routime4.nim')
-rw-r--r--tests/errmsgs/undeclared_routime4.nim10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/errmsgs/undeclared_routime4.nim b/tests/errmsgs/undeclared_routime4.nim
new file mode 100644
index 000000000..674caa421
--- /dev/null
+++ b/tests/errmsgs/undeclared_routime4.nim
@@ -0,0 +1,10 @@
+discard """
+cmd: '''nim c --hints:off $file'''
+errormsg: "undeclared field: 'bar'"
+nimout: '''undeclared_routime4.nim(10, 10) Error: undeclared field: 'bar'
+'''
+"""
+
+type Foo = object
+var a = Foo()
+let a = a.bar