diff --git a/compiler/semdata.nim b/compiler/semdata.nim index 3abfeac218..8f2c802de7 100644 --- a/compiler/semdata.nim +++ b/compiler/semdata.nim @@ -57,7 +57,7 @@ type # but you don't want to trigger a hard error. For example, # you may be in position to supply a better error message # to the user. - efWantStmt, efAllowStmt, efDetermineType, exExplain, + efWantStmt, efAllowStmt, efDetermineType, efExplain, efAllowDestructor, efWantValue, efOperand, efNoSemCheck, efNoProcvarCheck, efNoEvaluateGeneric, efInCall, efFromHlo, diff --git a/compiler/semexprs.nim b/compiler/semexprs.nim index 5a71896ef7..316cf55c8f 100644 --- a/compiler/semexprs.nim +++ b/compiler/semexprs.nim @@ -2097,283 +2097,7 @@ proc isTupleType(n: PNode): bool = return false return true -type - InitStatus = enum - initUnknown - initFull # All of the fields have been initialized - initPartial # Some of the fields have been initialized - initNone # None of the fields have been initialized - initConflict # Fields from different branches have been initialized - -proc mergeInitStatus(existing: var InitStatus, newStatus: InitStatus) = - case newStatus - of initConflict: - existing = newStatus - of initPartial: - if existing in {initUnknown, initFull, initNone}: - existing = initPartial - of initNone: - if existing == initUnknown: - existing = initNone - elif existing == initFull: - existing = initPartial - of initFull: - if existing == initUnknown: - existing = initFull - elif existing == initNone: - existing = initPartial - of initUnknown: - discard - -proc locateFieldInInitExpr(field: PSym, initExpr: PNode): PNode = - # Returns the assignment nkExprColonExpr node or nil - let fieldId = field.name.id - for i in 1 ..