summary refs log tree commit diff stats
path: root/tests/compile
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2013-06-04 21:58:39 +0200
committerAraq <rumpf_a@web.de>2013-06-04 21:58:39 +0200
commit2aaa8f7909e51eb3d971e197f152e247c64362e9 (patch)
treedef61be7039f3154d61efca75f996c7e1ccdf1cf /tests/compile
parentf7c0cc976ddb4e86e2341352b0674b9787005a4a (diff)
downloadNim-2aaa8f7909e51eb3d971e197f152e247c64362e9.tar.gz
implemented dataflow analysis; activate via --warning[Uninit]:on
Diffstat (limited to 'tests/compile')
-rw-r--r--tests/compile/toverprc.nim4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/compile/toverprc.nim b/tests/compile/toverprc.nim
index 467dd36c3..96b851fc1 100644
--- a/tests/compile/toverprc.nim
+++ b/tests/compile/toverprc.nim
@@ -9,6 +9,8 @@ proc parseInt(x: int8): int {.noSideEffect.} = nil
 proc parseInt(x: TFile): int {.noSideEffect.} = nil

 proc parseInt(x: char): int {.noSideEffect.} = nil

 proc parseInt(x: int16): int {.noSideEffect.} = nil

+
+proc parseInt[T](x: T): int = echo x; 34
 

 type

   TParseInt = proc (x: string): int {.noSideEffect.}

@@ -33,3 +35,5 @@ type
 
 proc bar[a,b](f: TFoo[a,b], x: a) = echo(x, " ", f.lorem, f.ipsum)
 proc bar[a,b](f: TFoo[a,b], x: b) = echo(x, " ", f.lorem, f.ipsum)
+
+discard parseInt[string]("yay")