Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add test-cases to some fixed issues to close them #14795

Merged
merged 5 commits into from
Jun 25, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions tests/async/tasync_misc.nim
Original file line number Diff line number Diff line change
Expand Up @@ -74,3 +74,10 @@ block: # issue #13899
result = true
doAssert waitFor testFooSucceed()
doAssert waitFor testFooFails()

block: # issue #9313
doAssert compiles(block:
proc a() {.async.} =
echo "Hi"
quit(0)
)
18 changes: 18 additions & 0 deletions tests/generics/tgenerics_issues.nim
Original file line number Diff line number Diff line change
Expand Up @@ -762,3 +762,21 @@ block t3717:

var f: Foo[Foo[int]]
discard foo(f)



block: # issue #9458
type
Option[T] = object
val: T
has: bool

Bar = object

proc none(T: typedesc): Option[T] =
discard

proc foo[T](self: T; x: Option[Bar] = Bar.none) =
discard

foo(1)
6 changes: 6 additions & 0 deletions tests/metatype/ttypedesc1.nim
Original file line number Diff line number Diff line change
Expand Up @@ -60,3 +60,9 @@ reject:
reject:
foo seq[int], ss

# issue #12398
reject:
let xs = [int, float, string]

reject:
let data = @[int, typedesc]
4 changes: 4 additions & 0 deletions tests/misc/tints.nim
Original file line number Diff line number Diff line change
Expand Up @@ -77,5 +77,9 @@ block: # Casts to uint

testCast(-5'i32, uint8, 251'u8)

# issue #7174
let c = 1'u
let val = c > 0
doAssert val

echo("Success") #OUT Success