diff --git a/src/NexusMods.MnemonicDB.SourceGenerator/ModelAnalyzer.cs b/src/NexusMods.MnemonicDB.SourceGenerator/ModelAnalyzer.cs index 41029492..7a11de80 100644 --- a/src/NexusMods.MnemonicDB.SourceGenerator/ModelAnalyzer.cs +++ b/src/NexusMods.MnemonicDB.SourceGenerator/ModelAnalyzer.cs @@ -123,8 +123,8 @@ private void AnalyzeAttributes() var analyzedAttribute = new AnalyzedBackReferenceAttribute { Name = fieldSymbol.Name, - OtherModel = otherModel, - OtherAttribute = otherAttribute, + OtherModel = otherModel!, + OtherAttribute = otherAttribute!, Comments = comments }; BackReferences.Add(analyzedAttribute); @@ -139,8 +139,8 @@ private void AnalyzeAttributes() FieldName = fieldSymbol.ToDisplayString(), Flags = flags, AttributeType = (fieldSymbol.Type as INamedTypeSymbol)!, - HighLevelType = highLevel, - LowLevelType = lowLevel, + HighLevelType = highLevel!, + LowLevelType = lowLevel!, Markers = markers, Comments = comments }; @@ -160,7 +160,7 @@ private void AnalyzeAttributes() } } - private bool TryGetBackReference(IFieldSymbol fieldSymbol, [NotNullWhen(true)] out INamedTypeSymbol? otherModel, [NotNullWhen(true)] out IFieldSymbol? otherAttribute) + private bool TryGetBackReference(IFieldSymbol fieldSymbol, out INamedTypeSymbol? otherModel, out IFieldSymbol? otherAttribute) { otherModel = null; otherAttribute = null; @@ -243,8 +243,8 @@ private HashSet GetInitializerData(IFieldSymbol fieldSymbol) } private bool TryGetAttributeTypes(IFieldSymbol fieldSymbol, - [NotNullWhen(true)] out INamedTypeSymbol? highLevel, - [NotNullWhen(true)] out INamedTypeSymbol? lowLevel, + out INamedTypeSymbol? highLevel, + out INamedTypeSymbol? lowLevel, out AttributeFlags flags) { var type = fieldSymbol.Type; diff --git a/src/NexusMods.MnemonicDB.SourceGenerator/NexusMods.MnemonicDB.SourceGenerator.csproj b/src/NexusMods.MnemonicDB.SourceGenerator/NexusMods.MnemonicDB.SourceGenerator.csproj index 062324f4..147a2b5f 100644 --- a/src/NexusMods.MnemonicDB.SourceGenerator/NexusMods.MnemonicDB.SourceGenerator.csproj +++ b/src/NexusMods.MnemonicDB.SourceGenerator/NexusMods.MnemonicDB.SourceGenerator.csproj @@ -2,7 +2,7 @@ NexusMods.MnemonicDB.SourceGenerator true - netstandard2.1 + netstandard2.0 true