typeallowed

Source   Edit  

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

Types

TTypeAllowedFlag = enum
  taTupField, taObjField, taHeap, taConcept, taIsOpenArray, taNoUntyped,
  taIsTemplateOrMacro, taProcContextIsNotMacro, taIsCastable, taIsDefaultField,
  taVoid
Source   Edit  
ViewTypeKind = enum
  noView, immutableView, mutableView
Source   Edit  

Procs

proc classifyViewType(t: PType): ViewTypeKind {.
    ...raises: [Exception, OSError, KeyError, ValueError, IOError], tags: [
    RootEffect, WriteIOEffect, ReadEnvEffect, ReadIOEffect, ReadDirEffect],
    forbids: [].}
Source   Edit  
proc directViewType(t: PType): ViewTypeKind {.
    ...raises: [Exception, OSError, KeyError, ValueError, IOError], tags: [
    RootEffect, WriteIOEffect, ReadEnvEffect, ReadIOEffect, ReadDirEffect],
    forbids: [].}
Source   Edit  
proc requiresInit(t: PType): bool {....raises: [Exception, OSError, KeyError,
    ValueError, IOError], tags: [RootEffect, WriteIOEffect, ReadEnvEffect,
                                 ReadIOEffect, ReadDirEffect], forbids: [].}
Source   Edit  
proc typeAllowed(t: PType; kind: TSymKind; c: PContext;
                 flags: TTypeAllowedFlags = {}): PType {.
    ...raises: [Exception, OSError, KeyError, ValueError, IOError], tags: [
    RootEffect, WriteIOEffect, ReadEnvEffect, ReadIOEffect, ReadDirEffect],
    forbids: [].}
Source   Edit