improvements to get code size down for programs that don't use GC
This commit is contained in:
parent
c9d21164be
commit
e25384db89
18 changed files with 642 additions and 181 deletions
14
tests/reject/temptycaseobj.nim
Normal file
14
tests/reject/temptycaseobj.nim
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
discard """
|
||||
line: 11
|
||||
errormsg: "identifier expected, but found '[same indentation]'"
|
||||
"""
|
||||
|
||||
type
|
||||
TMyEnum = enum enA, enU, enO
|
||||
TMyCase = object
|
||||
case e: TMyEnum
|
||||
of enA:
|
||||
of enU: x, y: int
|
||||
of enO: a, b: string
|
||||
|
||||
|
||||
18
tests/reject/tprocvar.nim
Normal file
18
tests/reject/tprocvar.nim
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
discard """
|
||||
errormsg: "type mismatch"
|
||||
line: 17
|
||||
file: "tprocvar.nim"
|
||||
"""
|
||||
|
||||
type
|
||||
TCallback = proc (a, b: int)
|
||||
|
||||
proc huh(x, y: var int) =
|
||||
x = 0
|
||||
y = x+1
|
||||
|
||||
proc so(c: TCallback) =
|
||||
c(2, 4)
|
||||
|
||||
so(huh)
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue