forked from nim-lang/Nim
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix enums, add preexisting bug tests
- Loading branch information
Showing
4 changed files
with
43 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
discard """ | ||
disabled: true | ||
joinable: false | ||
cmd: "nim check $file" | ||
errormsg: "cannot bind another '=destroy' to: Foo; previous declaration was constructed here implicitly: tinvalid_rebind.nim(12, 7)" | ||
line: 14 | ||
""" | ||
|
||
type | ||
Foo[T] = object | ||
x: T | ||
|
||
proc main = | ||
var f: Foo[int] | ||
|
||
proc `=destroy`[T](f: var Foo[T]) = | ||
discard |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
discard """ | ||
disabled: true | ||
""" | ||
|
||
# currently broken | ||
|
||
block: | ||
type | ||
Foo[T] = object of RootObj | ||
x: T | ||
Bar = object of Foo[int] | ||
|
||
proc foo(x: typedesc[Foo]) = discard | ||
|
||
foo(Bar) | ||
|
||
block: | ||
type | ||
Foo[T] = object of RootObj | ||
Bar = object of Foo[int] | ||
|
||
proc foo(x: typedesc[Foo]) = discard | ||
|
||
foo(Bar) |