updated some tests

This commit is contained in:
Araq 2014-10-04 14:23:17 +02:00
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) checkMinSonsLen(a, 1)
var length = sonsLen(a) var length = sonsLen(a)
if a.kind == nkExceptBranch: 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: if length == 2 and a.sons[0].kind == nkBracket:
a.sons[0..0] = a.sons[0].sons a.sons[0..0] = a.sons[0].sons
length = a.sonsLen length = a.sonsLen

View file

@ -19,7 +19,7 @@ Guards and the locks section
Protecting global variables 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 .. code-block:: nim
var glock: TLock 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 .. code-block:: nim
template multilock(a, b: ptr TLock; body: stmt) = template multilock(a, b: ptr TLock; body: stmt) =

View file

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

View file

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

View file

@ -1,6 +1,7 @@
version 0.10 version 0.10
============ ============
- fix the bug that keeps 'defer' template from working
- Test nimfix on various babel packages - Test nimfix on various babel packages
@ -27,7 +28,6 @@ Low priority:
Misc Misc
---- ----
- fix the bug that keeps 'defer' template from working
- make '--implicitStatic:on' the default - make '--implicitStatic:on' the default
- make tuple unpacking work in a non-var/let context - make tuple unpacking work in a non-var/let context
- special rule for ``[]=``, items, pairs - special rule for ``[]=``, items, pairs
@ -62,7 +62,6 @@ version 0.9.x
- memory manager: add a measure of fragmentation - memory manager: add a measure of fragmentation
- implement 'bits' pragmas - implement 'bits' pragmas
- we need a magic thisModule symbol - we need a magic thisModule symbol
- provide --nilChecks:on|off
- ensure (ref T)(a, b) works as a type conversion and type constructor - ensure (ref T)(a, b) works as a type conversion and type constructor
- optimize 'genericReset'; 'newException' leads to code bloat - optimize 'genericReset'; 'newException' leads to code bloat