From 677969f6eaac108fc5fda776095a710c1b3b197a Mon Sep 17 00:00:00 2001 From: flywind Date: Thu, 30 Sep 2021 22:57:06 +0800 Subject: alternative to #18918 (#18927) * fix #16558 * add testcase --- tests/arc/t16558.nim | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 tests/arc/t16558.nim (limited to 'tests/arc/t16558.nim') diff --git a/tests/arc/t16558.nim b/tests/arc/t16558.nim new file mode 100644 index 000000000..7b6eb4669 --- /dev/null +++ b/tests/arc/t16558.nim @@ -0,0 +1,9 @@ +discard """ + matrix: "--gc:arc" + errormsg: "expression cannot be cast to int" +""" + +block: # bug #16558 + var value = "hi there" + var keepInt: int + keepInt = cast[int](value) -- cgit 1.4.1-2-gfad0