diff options
author | Araq <rumpf_a@web.de> | 2011-04-11 00:25:24 +0200 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2011-04-11 00:25:24 +0200 |
commit | fc6cc79273f75983e57c43c2a19016e5881ee2b7 (patch) | |
tree | bf114b3c33683250359005d64c325b150f8989c7 /tests/accept/compile | |
parent | c96aaecfb439cda648e780e0686b02c5f99e0c60 (diff) | |
download | Nim-fc6cc79273f75983e57c43c2a19016e5881ee2b7.tar.gz |
some tests cleaned up; some bugfixes
Diffstat (limited to 'tests/accept/compile')
-rwxr-xr-x | tests/accept/compile/tambsym2.nim | 8 | ||||
-rwxr-xr-x | tests/accept/compile/trectuple.nim (renamed from tests/accept/compile/tbug538751.nim) | 0 | ||||
-rw-r--r-- | tests/accept/compile/tshadow_magic_type.nim | 24 |
3 files changed, 32 insertions, 0 deletions
diff --git a/tests/accept/compile/tambsym2.nim b/tests/accept/compile/tambsym2.nim new file mode 100755 index 000000000..ecd9a4784 --- /dev/null +++ b/tests/accept/compile/tambsym2.nim @@ -0,0 +1,8 @@ + +from sdl import PSurface + +discard SDL.CreateRGBSurface(SDL.SWSURFACE, 23, 34, + 32, 0x00FF0000, 0x0000FF00, 0x000000FF, 0xff000000'i32) + + + diff --git a/tests/accept/compile/tbug538751.nim b/tests/accept/compile/trectuple.nim index c9ac45797..c9ac45797 100755 --- a/tests/accept/compile/tbug538751.nim +++ b/tests/accept/compile/trectuple.nim diff --git a/tests/accept/compile/tshadow_magic_type.nim b/tests/accept/compile/tshadow_magic_type.nim new file mode 100644 index 000000000..5cd27435e --- /dev/null +++ b/tests/accept/compile/tshadow_magic_type.nim @@ -0,0 +1,24 @@ +type + TListItemType* = enum + RedisNil, RedisString + + TListItem* = object + case kind*: TListItemType + of RedisString: + str*: string + else: nil + TRedisList* = seq[TListItem] + +# Caused by this. +proc seq*() = + nil + +proc lrange*(key: string): TRedisList = + var foo: TListItem + foo.kind = RedisNil + result = @[foo] + +when isMainModule: + var p = lrange("mylist") + for i in items(p): + echo(i.str) |