compiler/sem/typeallowed

  Source   Edit

This module contains 'typeAllowed' and friends which check for invalid types like 'openArray[var int]'.

Procs

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