This commit is contained in:
Araq 2014-04-01 08:17:23 +02:00
commit 6a94ca3187
2 changed files with 31 additions and 14 deletions

View file

@ -16,3 +16,14 @@ get_next_ident()
#identifier expected, but found '(open|open|open)'
#bug #880 (also example in the manual!)
template typedef(name: expr, typ: typedesc) {.immediate.} =
type
`T name`* {.inject.} = typ
`P name`* {.inject.} = ref `T name`
typedef(myint, int)
var x: PMyInt