summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--lib/system.nim4
-rw-r--r--tests/template/ttempl2.nim8
-rw-r--r--todo.txt2
-rw-r--r--web/news.txt4
4 files changed, 12 insertions, 6 deletions
diff --git a/lib/system.nim b/lib/system.nim
index d1f910715..b8e91f668 100644
--- a/lib/system.nim
+++ b/lib/system.nim
@@ -76,6 +76,10 @@ type
   void* {.magic: "VoidType".}   ## meta type to denote the absence of any type
   auto* = expr
   any* = distinct auto
+  untyped* {.magic: Expr.} ## meta type to denote an expression that
+                           ## is not resolved (for templates)
+  typed* {.magic: Stmt.}   ## meta type to denote an expression that
+                           ## is resolved (for templates)
 
   SomeSignedInt* = int|int8|int16|int32|int64
     ## type class matching all signed integer types
diff --git a/tests/template/ttempl2.nim b/tests/template/ttempl2.nim
index 142bbb8c7..aaa2f1344 100644
--- a/tests/template/ttempl2.nim
+++ b/tests/template/ttempl2.nim
@@ -3,12 +3,12 @@ discard """
   line: 18
   errormsg: "undeclared identifier: \'b\'"
 """
-template declareInScope(x: expr, t: typeDesc): stmt {.immediate.} =
+template declareInScope(x: untyped, t: typeDesc): untyped {.immediate.} =
   var x: t
-  
-template declareInNewScope(x: expr, t: typeDesc): stmt {.immediate.} =
+
+template declareInNewScope(x: untyped, t: typeDesc): untyped {.immediate.} =
   # open a new scope:
-  block: 
+  block:
     var x: t
 
 declareInScope(a, int)
diff --git a/todo.txt b/todo.txt
index ad36947d6..a61f932a9 100644
--- a/todo.txt
+++ b/todo.txt
@@ -2,8 +2,6 @@ version 0.10.4
 ==============
 
 - make 'nil' work for 'add' and 'len'
-- introduce typed/untyped types
-
 
 version 1.0
 ===========
diff --git a/web/news.txt b/web/news.txt
index 54867036a..9fd7c31b3 100644
--- a/web/news.txt
+++ b/web/news.txt
@@ -69,6 +69,10 @@ News
     spacing around binary operators. Later versions of the language will parse
     these as unary operators instead so that ``echo $foo`` finally can do what
     people expect it to do.
+  - ``system.untyped`` and ``system.typed`` have been introduced as aliases
+    for ``expr`` and ``stmt``. The new names capture the semantics much better
+    and most likely  ``expr`` and ``stmt`` will be deprecated in favor of the
+    new names.
 
 
   Language Additions