From 78acf1becb20a26637d0ac03bd8fcc6296aaa0f8 Mon Sep 17 00:00:00 2001 From: flywind <43030857+xflywind@users.noreply.github.com> Date: Fri, 18 Dec 2020 09:29:36 -0600 Subject: fix cmpIgnoreStyle bug (#16392) --- tests/stdlib/ttypeinfo.nim | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'tests/stdlib') diff --git a/tests/stdlib/ttypeinfo.nim b/tests/stdlib/ttypeinfo.nim index 3155a0f88..fc0bd3e53 100644 --- a/tests/stdlib/ttypeinfo.nim +++ b/tests/stdlib/ttypeinfo.nim @@ -58,3 +58,14 @@ block: for i in 0 .. m.len-1: for j in 0 .. m[i].len-1: doAssert getString(m[i][j]) == myArr[i][j] + +block: + type + Test = enum + Hello, he_llo + + var x = hello + var y = x.toAny + + doAssert getEnumOrdinal(y, "Hello") == 0 + doAssert getEnumOrdinal(y, "hello") == 1 -- cgit 1.4.1-2-gfad0