Skip to content

Commit

Permalink
Bump AnalysisLevel
Browse files Browse the repository at this point in the history
  • Loading branch information
ltrzesniewski committed Apr 20, 2024
1 parent 3a5d32d commit b257467
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion src/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@

<PropertyGroup>
<LangVersion>12.0</LangVersion>
<AnalysisLevel>5.0</AnalysisLevel>
<AnalysisLevel>8.0</AnalysisLevel>
<AnalysisModeStyle>None</AnalysisModeStyle>
<Nullable>enable</Nullable>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
Expand Down
2 changes: 1 addition & 1 deletion src/InlineIL.Fody/Model/MethodRefBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public static MethodRefBuilder MethodFromDelegateReference(ModuleWeavingContext
return new MethodRefBuilder(context, methodRef);
}

private static MethodReference FindMethod(ModuleWeavingContext context, TypeReference typeRef, string methodName, int? genericArity, TypeRefBuilder? returnType, IReadOnlyList<TypeRefBuilder>? paramTypes)
private static MethodDefinition FindMethod(ModuleWeavingContext context, TypeReference typeRef, string methodName, int? genericArity, TypeRefBuilder? returnType, IReadOnlyList<TypeRefBuilder>? paramTypes)
{
var typeDef = typeRef.ResolveRequiredType(context);

Expand Down
2 changes: 1 addition & 1 deletion src/InlineIL.Fody/Processing/LabelMapper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public void PostProcess()
private class LabelInfo
{
public Instruction PlaceholderTarget { get; } = Instruction.Create(OpCodes.Nop);
public ICollection<Instruction> References { get; } = new List<Instruction>();
public List<Instruction> References { get; } = new List<Instruction>();
public SequencePoint? SequencePoint { get; set; }

public bool IsDefined => PlaceholderTarget.Next != null;
Expand Down
2 changes: 1 addition & 1 deletion src/InlineIL.Fody/Processing/MethodWeaver.cs
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ private void ValidateAfterProcessing()
throw new InstructionWeavingException(libReferencingInstruction, "Unconsumed reference to InlineIL");

var invalidRefs = _il.GetAllReferencedInstructions().Except(Instructions).ToList();
if (invalidRefs.Any())
if (invalidRefs.Count != 0)
throw new WeavingException($"Found invalid references to instructions: {string.Join(", ", invalidRefs)}");
}

Expand Down

0 comments on commit b257467

Please sign in to comment.