updated some tests
This commit is contained in:
parent
e65c296bcc
commit
4616a1e006
5 changed files with 14 additions and 5 deletions
|
|
@ -268,7 +268,7 @@ proc semTry(c: PContext, n: PNode): PNode =
|
|||
checkMinSonsLen(a, 1)
|
||||
var length = sonsLen(a)
|
||||
if a.kind == nkExceptBranch:
|
||||
# XXX what does this do? so that ``except [a, b, c]`` is supported?
|
||||
# so that ``except [a, b, c]`` is supported:
|
||||
if length == 2 and a.sons[0].kind == nkBracket:
|
||||
a.sons[0..0] = a.sons[0].sons
|
||||
length = a.sonsLen
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ Guards and the locks section
|
|||
Protecting global variables
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Global variables and object fields can be annotated via an ``guard`` pragma:
|
||||
Object fields and global variables can be annotated via a ``guard`` pragma:
|
||||
|
||||
.. code-block:: nim
|
||||
var glock: TLock
|
||||
|
|
@ -161,7 +161,9 @@ single ``locks`` section:
|
|||
...
|
||||
|
||||
|
||||
So here is how a typical multilock statement can be implemented in Nim:
|
||||
Here is how a typical multilock statement can be implemented in Nim. Note how
|
||||
the runtime check is required to ensure a global ordering for two locks ``a``
|
||||
and ``b`` of the same lock level:
|
||||
|
||||
.. code-block:: nim
|
||||
template multilock(a, b: ptr TLock; body: stmt) =
|
||||
|
|
|
|||
|
|
@ -1,3 +1,7 @@
|
|||
discard """
|
||||
errormsg: "illegal recursion in type 'TNode'"
|
||||
line: 8
|
||||
"""
|
||||
|
||||
type
|
||||
PNode = ref TNode
|
||||
|
|
|
|||
|
|
@ -1,3 +1,7 @@
|
|||
discard """
|
||||
errormsg: "illegal recursion in type 'Node'"
|
||||
line: 6
|
||||
"""
|
||||
|
||||
type Node = tuple[left: ref Node]
|
||||
|
||||
|
|
|
|||
3
todo.txt
3
todo.txt
|
|
@ -1,6 +1,7 @@
|
|||
version 0.10
|
||||
============
|
||||
|
||||
- fix the bug that keeps 'defer' template from working
|
||||
- Test nimfix on various babel packages
|
||||
|
||||
|
||||
|
|
@ -27,7 +28,6 @@ Low priority:
|
|||
Misc
|
||||
----
|
||||
|
||||
- fix the bug that keeps 'defer' template from working
|
||||
- make '--implicitStatic:on' the default
|
||||
- make tuple unpacking work in a non-var/let context
|
||||
- special rule for ``[]=``, items, pairs
|
||||
|
|
@ -62,7 +62,6 @@ version 0.9.x
|
|||
- memory manager: add a measure of fragmentation
|
||||
- implement 'bits' pragmas
|
||||
- we need a magic thisModule symbol
|
||||
- provide --nilChecks:on|off
|
||||
- ensure (ref T)(a, b) works as a type conversion and type constructor
|
||||
- optimize 'genericReset'; 'newException' leads to code bloat
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue