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