Skip to content

Commit

Permalink
Null coalescing in copy constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
martin-strecker-sonarsource committed Mar 28, 2023
1 parent a7ae301 commit 7225bab
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,12 @@ private ProgramState(ProgramState original) // Custom record override construc
captureOperation = original?.captureOperation ?? ImmutableDictionary<CaptureId, IOperation>.Empty;
preservedSymbols = original?.preservedSymbols ?? ImmutableHashSet<ISymbol>.Empty;
exceptions = original?.exceptions ?? ImmutableStack<ExceptionState>.Empty;
operationValueHashCode = original.operationValueHashCode;
symbolValueHashCode = original.symbolValueHashCode;
captureOperationHashCode = original.captureOperationHashCode;
preservedSymbolsHashCode = original.preservedSymbolsHashCode;
exceptionsHashCode = original.exceptionsHashCode;
hashCode = original.hashCode;
operationValueHashCode = original?.operationValueHashCode;
symbolValueHashCode = original?.symbolValueHashCode;
captureOperationHashCode = original?.captureOperationHashCode;
preservedSymbolsHashCode = original?.preservedSymbolsHashCode;
exceptionsHashCode = original?.exceptionsHashCode;
hashCode = original?.hashCode;
}

public ProgramState SetOperationValue(IOperationWrapper operation, SymbolicValue value) =>
Expand Down

0 comments on commit 7225bab

Please sign in to comment.