diff options
Diffstat (limited to 'tests/accept')
-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 | ||||
-rwxr-xr-x | tests/accept/run/tgenerics1.nim | 2 | ||||
-rwxr-xr-x | tests/accept/run/titer2.nim | 2 |
5 files changed, 34 insertions, 2 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) diff --git a/tests/accept/run/tgenerics1.nim b/tests/accept/run/tgenerics1.nim index e9ccd6917..cb310f552 100755 --- a/tests/accept/run/tgenerics1.nim +++ b/tests/accept/run/tgenerics1.nim @@ -1,5 +1,5 @@ discard """ - output: "256 100" + output: "100 0" """ # A min-heap. diff --git a/tests/accept/run/titer2.nim b/tests/accept/run/titer2.nim index 1e70ce247..5253d2576 100755 --- a/tests/accept/run/titer2.nim +++ b/tests/accept/run/titer2.nim @@ -1,6 +1,6 @@ discard """ file: "titer2.nim" - output: "123" + msg: "internal error: not implemented: pass to var parameter" """ # Try to break the transformation pass: iterator iterAndZero(a: var openArray[int]): int = |