diff options
author | LemonBoy <thatlemon@gmail.com> | 2017-04-21 22:28:34 +0200 |
---|---|---|
committer | zah <zahary@gmail.com> | 2018-06-10 14:25:40 +0300 |
commit | 03653ab61e6eed6811c5df0677a2bf2aa722ef9c (patch) | |
tree | b2a0c9389fba4fdb116530c8df53226b548cea0d /tests | |
parent | ae342f84de7d7b6101f766e3b3d08671a9f98d0e (diff) | |
download | Nim-03653ab61e6eed6811c5df0677a2bf2aa722ef9c.tar.gz |
Fix type inference with static literals.
Fixes #3977
Diffstat (limited to 'tests')
-rw-r--r-- | tests/generics/t3977.nim | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/generics/t3977.nim b/tests/generics/t3977.nim new file mode 100644 index 000000000..314017744 --- /dev/null +++ b/tests/generics/t3977.nim @@ -0,0 +1,12 @@ +discard """ + output: '''42''' +""" + +type + Foo[N: static[int]] = object + +proc foo[N](x: Foo[N]) = + echo N + +var f1: Foo[42] +f1.foo |