Merge branch 'devel' into bugfix-2858-testament-sources-system-wide
This commit is contained in:
commit
f0b6c03b26
46 changed files with 344 additions and 1226 deletions
|
|
@ -1,6 +1,6 @@
|
|||
discard """
|
||||
line: 7
|
||||
errormsg: "undeclared identifier: 'items'"
|
||||
errormsg: "attempting to call undeclared routine: 'items'"
|
||||
"""
|
||||
|
||||
type a = enum b,c,d
|
||||
|
|
|
|||
|
|
@ -1,10 +1,7 @@
|
|||
discard """
|
||||
disabled: "true"
|
||||
output: '''[OK] >:)'''
|
||||
"""
|
||||
|
||||
# Unittest uses lambdalifting at compile-time which we disable for the JS
|
||||
# codegen! So this cannot and will not work for quite some time.
|
||||
|
||||
import unittest
|
||||
|
||||
suite "Bacon":
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
discard """
|
||||
file: "tissue710.nim"
|
||||
line: 8
|
||||
errorMsg: "undeclared identifier: '||'"
|
||||
errorMsg: "attempting to call undeclared routine: '||'"
|
||||
"""
|
||||
var sum = 0
|
||||
for x in 3..1000:
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
discard """
|
||||
file: "tnoop.nim"
|
||||
line: 11
|
||||
errormsg: "undeclared identifier: 'a'"
|
||||
errormsg: "attempting to call undeclared routine: 'a'"
|
||||
"""
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,16 +1,16 @@
|
|||
discard """
|
||||
file: "topaque.nim"
|
||||
line: 16
|
||||
errormsg: "undeclared identifier: \'buffer\'"
|
||||
errormsg: "undeclared field: \'buffer\'"
|
||||
"""
|
||||
# Test the new opaque types
|
||||
|
||||
import
|
||||
import
|
||||
mopaque
|
||||
|
||||
|
||||
var
|
||||
L: TLexer
|
||||
|
||||
|
||||
L.filename = "ha"
|
||||
L.line = 34
|
||||
L.buffer[0] = '\0' #ERROR_MSG undeclared field: 'buffer'
|
||||
|
|
|
|||
26
tests/parallel/tptr_to_ref.nim
Normal file
26
tests/parallel/tptr_to_ref.nim
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
# bug #2854
|
||||
|
||||
import locks, threadpool, osproc
|
||||
|
||||
const MAX_WORKERS = 10
|
||||
|
||||
type
|
||||
Killer = object
|
||||
lock: Lock
|
||||
bailed {.guard: lock.}: bool
|
||||
processes {.guard: lock.}: array[0..MAX_WORKERS-1, foreign ptr Process]
|
||||
|
||||
template hold(lock: Lock, body: stmt) =
|
||||
lock.acquire
|
||||
defer: lock.release
|
||||
{.locks: [lock].}:
|
||||
body
|
||||
|
||||
proc initKiller*(): Killer =
|
||||
initLock(result.lock)
|
||||
result.lock.hold:
|
||||
result.bailed = false
|
||||
for i, _ in result.processes:
|
||||
result.processes[i] = nil
|
||||
|
||||
var killer = initKiller()
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
discard """
|
||||
file: "twrongtupleaccess.nim"
|
||||
line: 9
|
||||
errormsg: "undeclared identifier: \'setBLAH\'"
|
||||
errormsg: "attempting to call undeclared routine: \'setBLAH\'"
|
||||
"""
|
||||
# Bugfix
|
||||
|
||||
|
|
|
|||
14
tests/vm/tconstobj.nim
Normal file
14
tests/vm/tconstobj.nim
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
discard """
|
||||
output: '''(name: hello)'''
|
||||
"""
|
||||
|
||||
# bug #2774
|
||||
|
||||
type Foo = object
|
||||
name: string
|
||||
|
||||
const fooArray = [
|
||||
Foo(name: "hello")
|
||||
]
|
||||
|
||||
echo fooArray[0]
|
||||
Loading…
Add table
Add a link
Reference in a new issue