Skip to content

Commit eb27045

Browse files
committed
chore: update langversion to 14
1 parent d2be797 commit eb27045

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

build/common.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
</PropertyGroup>
4242

4343
<PropertyGroup Condition=" '$(IsVisualBasic)' != 'true' AND '$(IsFsharp)' != 'true' ">
44-
<LangVersion>12.0</LangVersion>
44+
<LangVersion>14.0</LangVersion>
4545
</PropertyGroup>
4646

4747
<PropertyGroup Condition=" '$(VersionPrefix)' == '' ">

src/BenchmarkDotNet/Code/DeclarationsProvider.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -86,15 +86,15 @@ internal class NonVoidDeclarationsProvider : DeclarationsProvider
8686
public NonVoidDeclarationsProvider(Descriptor descriptor) : base(descriptor) { }
8787

8888
public override string ConsumeField
89-
=> !Consumer.IsConsumable(WorkloadMethodReturnType) && Consumer.HasConsumableField(WorkloadMethodReturnType, out var field)
90-
? $".{field.Name}"
89+
=> !Consumer.IsConsumable(WorkloadMethodReturnType) && Consumer.HasConsumableField(WorkloadMethodReturnType, out var fieldInfo)
90+
? $".{fieldInfo.Name}"
9191
: null;
9292

9393
protected override Type OverheadMethodReturnType
9494
=> Consumer.IsConsumable(WorkloadMethodReturnType)
9595
? WorkloadMethodReturnType
96-
: (Consumer.HasConsumableField(WorkloadMethodReturnType, out var field)
97-
? field.FieldType
96+
: (Consumer.HasConsumableField(WorkloadMethodReturnType, out var fieldInfo)
97+
? fieldInfo.FieldType
9898
: typeof(int)); // we return this simple type because creating bigger ValueType could take longer than benchmarked method itself
9999

100100
public override string OverheadImplementation

0 commit comments

Comments
 (0)