fixes #880
This commit is contained in:
parent
3afb42496b
commit
6a94ca3187
2 changed files with 31 additions and 14 deletions
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue