updated some tests

This commit is contained in:
Araq
2014-10-04 14:23:17 +02:00
parent e65c296bcc
commit 4616a1e006
5 changed files with 14 additions and 5 deletions

View File

@@ -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

View File

@@ -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) =

View File

@@ -1,3 +1,7 @@
discard """
errormsg: "illegal recursion in type 'TNode'"
line: 8
"""
type
PNode = ref TNode

View File

@@ -1,3 +1,7 @@
discard """
errormsg: "illegal recursion in type 'Node'"
line: 6
"""
type Node = tuple[left: ref Node]

View File

@@ -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