From 20b5f31c03fb556ec0aa2428a40adbac004d8987 Mon Sep 17 00:00:00 2001 From: Araq Date: Mon, 13 Jan 2014 02:10:03 +0100 Subject: new tester; all tests categorized --- tests/casestmt/tcaseoverlaprange2.nim | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 tests/casestmt/tcaseoverlaprange2.nim (limited to 'tests/casestmt/tcaseoverlaprange2.nim') diff --git a/tests/casestmt/tcaseoverlaprange2.nim b/tests/casestmt/tcaseoverlaprange2.nim new file mode 100644 index 000000000..d6e301508 --- /dev/null +++ b/tests/casestmt/tcaseoverlaprange2.nim @@ -0,0 +1,18 @@ +discard """ + line: 13 + errormsg: "duplicate case label" +""" + + + + +proc checkDuplicates(myval: int32): bool = + case myval + of 0x7B: + echo "this should not compile" + of 0x78 .. 0x7D: + result = true + else: + nil + +echo checkDuplicates(0x7B) -- cgit 1.4.1-2-gfad0 pe='submit' value='switch'/> This repository contains the Nim compiler, Nim's stdlib, tools, and documentation. (mirror)ahoang <ahoang@tilde.institute>
summary refs log tree commit diff stats
path: root/.gitignore
blob: d804fb8f54976466b0f5523d0c45359c2c84bb52 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44