diff options
Diffstat (limited to 'compiler')
-rw-r--r-- | compiler/types.nim | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/compiler/types.nim b/compiler/types.nim index 372637827..e5ce0aea1 100644 --- a/compiler/types.nim +++ b/compiler/types.nim @@ -809,12 +809,12 @@ proc firstOrd*(conf: ConfigRef; t: PType): Int128 = if t.hasElementType: result = firstOrd(conf, skipModifier(t)) else: result = Zero - internalError(conf, "invalid kind for firstOrd(" & $t.kind & ')') + fatal(conf, unknownLineInfo, "invalid kind for firstOrd(" & $t.kind & ')') of tyUncheckedArray, tyCstring: result = Zero else: result = Zero - internalError(conf, "invalid kind for firstOrd(" & $t.kind & ')') + fatal(conf, unknownLineInfo, "invalid kind for firstOrd(" & $t.kind & ')') proc firstFloat*(t: PType): BiggestFloat = case t.kind @@ -905,12 +905,12 @@ proc lastOrd*(conf: ConfigRef; t: PType): Int128 = if t.hasElementType: result = lastOrd(conf, skipModifier(t)) else: result = Zero - internalError(conf, "invalid kind for lastOrd(" & $t.kind & ')') + fatal(conf, unknownLineInfo, "invalid kind for lastOrd(" & $t.kind & ')') of tyUncheckedArray: result = Zero else: result = Zero - internalError(conf, "invalid kind for lastOrd(" & $t.kind & ')') + fatal(conf, unknownLineInfo, "invalid kind for lastOrd(" & $t.kind & ')') proc lastFloat*(t: PType): BiggestFloat = case t.kind |