From 7bd473c59b9c54aca18b85efd78d484e0306c7be Mon Sep 17 00:00:00 2001 From: Andreas Rumpf Date: Thu, 22 Dec 2016 09:13:22 +0100 Subject: fixes #5137 --- tests/ccgbugs/tcodegenbug1.nim | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'tests/ccgbugs') diff --git a/tests/ccgbugs/tcodegenbug1.nim b/tests/ccgbugs/tcodegenbug1.nim index a5cfc77cc..671974087 100644 --- a/tests/ccgbugs/tcodegenbug1.nim +++ b/tests/ccgbugs/tcodegenbug1.nim @@ -65,3 +65,12 @@ type # have a proc taking TFlags as param and returning object having TFlags field proc foo(flags: TFlags): TObj = nil + + +# bug #5137 +type + MyInt {.importc: "int".} = object + MyIntDistinct = distinct MyInt + +proc bug5137(d: MyIntDistinct) = + discard d.MyInt -- cgit 1.4.1-2-gfad0