* fix the usage of unresolved static[T] parameters in proc signatures * fix tsametype and tmacrogenerics * Allow creating composite type classes with concepts and using them in type signatures * Allow integers to be used in ident concatenations * Support using imported C++ generic types in proc signatures * fixes #7230 * closes #7379 * re-enable some metatype tests
21 lines
360 B
Nim
21 lines
360 B
Nim
discard """
|
|
errormsg: "type mismatch: got <string> but expected 'ptr'"
|
|
line: 20
|
|
"""
|
|
|
|
import typetraits
|
|
|
|
type
|
|
Vec[N: static[int]; T] = distinct array[N, T]
|
|
|
|
var x = Vec([1, 2, 3])
|
|
|
|
static:
|
|
assert x.type.name == "Vec[3, system.int]"
|
|
|
|
var str1: string = "hello, world!"
|
|
var ptr1: ptr = addr(str1)
|
|
|
|
var str2: string = "hello, world!"
|
|
var ptr2: ptr = str2
|
|
|