This module contains 'typeAllowed' and friends which check for invalid types like 'openArray[var int]'.
Types
ViewTypeKind = enum noView, immutableView, mutableView
- Source Edit
Procs
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
proc typeAllowed(t: PType; kind: TSymKind; c: PContext; flags: TTypeAllowedFlags = {}): PType {....raises: [Exception], tags: [RootEffect].}
- returns 'nil' on success and otherwise the part of the type that is wrong! Source Edit
proc typeAllowedOrError(t: PType; kind: TSymKind; c: PContext; def: PNode; flags: TTypeAllowedFlags = {}): PType {. ...raises: [Exception], tags: [RootEffect].}
- returns the original t if allowed, otherwise a type not allowed error Source Edit