diff options
author | LemonBoy <LemonBoy@users.noreply.github.com> | 2018-06-27 17:21:53 +0200 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2018-06-27 17:21:53 +0200 |
commit | bb23d903b6741c1697ac55f8ee54ff30a9b2cc49 (patch) | |
tree | f796a0e29f60fc4b82a42b505fd3558ac78eea99 /tests/concepts/tmisc_issues.nim | |
parent | a85493610cb49ca087084fa6f285f3834db5c1b1 (diff) | |
download | Nim-bb23d903b6741c1697ac55f8ee54ff30a9b2cc49.tar.gz |
Don't consider concept types as non-complex during codegen (#8119)
Fixes #7125
Diffstat (limited to 'tests/concepts/tmisc_issues.nim')
-rw-r--r-- | tests/concepts/tmisc_issues.nim | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/tests/concepts/tmisc_issues.nim b/tests/concepts/tmisc_issues.nim index 662eba380..e21988c73 100644 --- a/tests/concepts/tmisc_issues.nim +++ b/tests/concepts/tmisc_issues.nim @@ -9,7 +9,8 @@ implicit generic generic false true --1''' +-1 +Meow''' """ # https://github.com/nim-lang/Nim/issues/1147 @@ -98,3 +99,15 @@ let b = B() echo b is A echo b.size() +# https://github.com/nim-lang/Nim/issues/7125 +type + Thing = concept x + x.hello is string + Cat = object + +proc hello(d: Cat): string = "Meow" + +proc sayHello(c: Thing) = echo(c.hello) + +var a: Thing = Cat() +a.sayHello() |