@@ -787,7 +787,7 @@ proc addFn(c: var SemContext; fn: FnCandidate; fnOrig: Cursor; m: var Match): Ma
787787 c.dest.add n
788788 inc n
789789 if n.kind != ParRi :
790- error " broken `magic`: expected ')', but got: " , n
790+ bug " broken `magic`: expected ')', but got: " , n
791791 if result == NonMagicCall :
792792 c.dest.add symToken (fn.sym, fnOrig.info)
793793 else :
@@ -1112,7 +1112,7 @@ proc semBaseobj(c: var SemContext; it: var Item) =
11121112 # we will recompute it via `typematch` below:
11131113 inc it.n
11141114 else :
1115- error (" expected integer literal in `baseobj` construct" )
1115+ bug (" expected integer literal in `baseobj` construct" )
11161116 var m = createMatch (addr c)
11171117
11181118 var arg = Item (n: it.n, typ: c.types.autoType)
@@ -2696,7 +2696,7 @@ proc semConceptType(c: var SemContext; n: var Cursor) =
26962696 declareConceptSelf c, n.info
26972697 skip n # skip dot or previous `Self` declaration
26982698 if n.stmtKind != StmtsS :
2699- error " (stmts) expected, but got: " , n
2699+ bug " (stmts) expected, but got: " , n
27002700 takeToken c, n
27012701 let oldScopeKind = c.currentScope.kind
27022702 withNewScope c:
@@ -3481,7 +3481,7 @@ proc semLocal(c: var SemContext; n: var Cursor; kind: SymKind) =
34813481 n = it.n
34823482 patchType c, it.typ, beforeType
34833483 else :
3484- assert false , " bug "
3484+ bug " semLocal "
34853485 c.addSym delayed
34863486 takeParRi c, n
34873487 if kind == LetY :
@@ -3957,7 +3957,7 @@ proc semProc(c: var SemContext; it: var Item; kind: SymKind; pass: PassKind) =
39573957 case pass
39583958 of checkGenericInst:
39593959 if it.n.stmtKind != StmtsS :
3960- error " (stmts) expected, but got " , it.n
3960+ bug " (stmts) expected, but got " , it.n
39613961 c.openScope () # open body scope
39623962 takeToken c, it.n
39633963 var resId = SymId (0 )
@@ -3978,7 +3978,7 @@ proc semProc(c: var SemContext; it: var Item; kind: SymKind; pass: PassKind) =
39783978
39793979 of checkBody:
39803980 if it.n.stmtKind != StmtsS :
3981- error " (stmts) expected, but got " , it.n
3981+ bug " (stmts) expected, but got " , it.n
39823982 c.openScope () # open body scope
39833983 var resId = SymId (0 )
39843984 if UntypedP in crucial.flags and c.routine.inGeneric > 0 : # includes templates
0 commit comments