GetHashCode should not reference mutable fields (#5331)

This commit is contained in:
Marco Carvalho 2023-06-22 13:36:07 -03:00 committed by GitHub
parent 649d372f7d
commit 58907e2c29
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 9 additions and 9 deletions

View file

@ -5,7 +5,7 @@ namespace Spv.Generator
{
internal struct ConstantKey : IEquatable<ConstantKey>
{
private Instruction _constant;
private readonly Instruction _constant;
public ConstantKey(Instruction constant)
{

View file

@ -5,7 +5,7 @@ namespace Spv.Generator
{
internal class DeterministicStringKey : IEquatable<DeterministicStringKey>
{
private string _value;
private readonly string _value;
public DeterministicStringKey(string value)
{

View file

@ -8,7 +8,7 @@ namespace Spv.Generator
{
public OperandType Type => OperandType.String;
private string _value;
private readonly string _value;
public LiteralString(string value)
{

View file

@ -5,7 +5,7 @@ namespace Spv.Generator
{
internal struct TypeDeclarationKey : IEquatable<TypeDeclarationKey>
{
private Instruction _typeDeclaration;
private readonly Instruction _typeDeclaration;
public TypeDeclarationKey(Instruction typeDeclaration)
{