This module contains 'typeAllowed' and friends which check for invalid types like openArray[var int].
openArray[var int]
TTypeAllowedFlag = enum taField, taHeap, taConcept, taIsOpenArray, taNoUntyped, taIsTemplateOrMacro, taProcContextIsNotMacro, taIsCastable, taIsDefaultField, taVoid
TTypeAllowedFlags = set[TTypeAllowedFlag]
ViewTypeKind = enum noView, immutableView, mutableView
proc classifyViewType(t: PType): ViewTypeKind {....raises: [Exception], tags: [RootEffect], forbids: [].}
proc directViewType(t: PType): ViewTypeKind {....raises: [], tags: [], forbids: [].}
proc requiresInit(t: PType): bool {....raises: [Exception], tags: [RootEffect], forbids: [].}
proc typeAllowed(t: PType; kind: TSymKind; c: PContext; flags: TTypeAllowedFlags = {}): PType {....raises: [Exception], tags: [RootEffect], forbids: [].}
© 2006–2024 Andreas RumpfLicensed under the MIT License. https://nim-lang.org/docs/compiler/typeallowed.html