From f6dd90ce64880297f0372eefe4aa1fef2ccd0e93 Mon Sep 17 00:00:00 2001 From: Timothee Cour Date: Tue, 14 Apr 2020 03:58:57 -0700 Subject: [PATCH] also fixes #12713; added test case --- tests/statictypes/tstatictypes.nim | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/tests/statictypes/tstatictypes.nim b/tests/statictypes/tstatictypes.nim index d09048b56091..1aab6e1241d0 100644 --- a/tests/statictypes/tstatictypes.nim +++ b/tests/statictypes/tstatictypes.nim @@ -202,3 +202,17 @@ block: #13529 proc fun[T](a: static[T]) = (const a2 = a) fun(1) fun(1.2) + +block: # #12713 + block: + type Cell = object + c: int + proc test(c: static string) = discard #Remove this and it compiles + proc test(c: Cell) = discard + test Cell(c: 0) + block: + type Cell = object + c: int + proc test(c: static string) = discard #Remove this and it compiles + proc test(c: Cell) = discard + test Cell()