Skip to content

Commit f25188b

Browse files
committed
Merge tag '0.35.3'
2 parents 07ebad8 + f56be94 commit f25188b

File tree

6 files changed

+61
-4
lines changed

6 files changed

+61
-4
lines changed

.github/workflows/.NET-Framework.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ on:
44
push:
55
branches: [ main ]
66
pull_request:
7-
branches: [ main ]
87

98
jobs:
109
dotnet-framework:

.github/workflows/create-release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,6 @@ jobs:
2222
uses: gittools/actions/gitversion/execute@v4
2323

2424
- name: Create Release
25-
run: gh release create ${{ steps.gitversion.outputs.majorMinorPatch }} --generate-notes
25+
run: gh release create ${{ steps.gitversion.outputs.majorMinorPatch }} --generate-notes --target $GITHUB_SHA
2626
env:
2727
GH_TOKEN: ${{ secrets.GH_TOKEN }}

.github/workflows/dotnet-linux.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ on:
44
push:
55
branches: [ main ]
66
pull_request:
7-
branches: [ main ]
87
workflow_dispatch:
98

109
jobs:

.github/workflows/dotnet-windows.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ on:
44
push:
55
branches: [ main ]
66
pull_request:
7-
branches: [ main ]
87
workflow_dispatch:
98

109
jobs:
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
using System;
2+
using NUnit.Framework;
3+
4+
namespace DelegateDecompiler.Tests;
5+
6+
[TestFixture]
7+
public class Issue308 : DecompilerTestsBase
8+
{
9+
[Test]
10+
public void TestIsValidAt1()
11+
{
12+
static bool Actual<TEntity>(TEntity entity, DateTime dateTime) where TEntity : ITimeValidity =>
13+
entity.IsValidAt(dateTime);
14+
15+
Test(Actual<Entity>, (entity, dateTime) => entity.IsValidAt(dateTime));
16+
}
17+
18+
[Test]
19+
public void TestIsValidAt2()
20+
{
21+
static bool Actual<TEntity>(TEntity entity, IDateTimeProvider dateTimeProvider)
22+
where TEntity : ITimeValidity => entity.IsValidAt(dateTimeProvider.Now);
23+
24+
Test(Actual<Entity>, (entity, dateTimeProvider) => entity.IsValidAt(dateTimeProvider.Now));
25+
}
26+
27+
[Test]
28+
public void TestIsValidAt3()
29+
{
30+
static bool Actual<TEntity>(TEntity entity, DateTime dateTime) where TEntity : ITimeValidity =>
31+
entity.IsValidAt(DateTime.Now);
32+
33+
Test(Actual<Entity>, (entity, dateTime) => entity.IsValidAt(DateTime.Now));
34+
}
35+
36+
[Test]
37+
public void TestIsValidAt4()
38+
{
39+
static bool Actual<TEntity>(TEntity entity) where TEntity : ITimeValidity =>
40+
entity.IsValidAt(DateTime.Now);
41+
42+
Test(Actual<Entity>, entity => entity.IsValidAt(DateTime.Now));
43+
}
44+
45+
interface IDateTimeProvider
46+
{
47+
public DateTime Now { get; }
48+
}
49+
50+
interface ITimeValidity
51+
{
52+
public bool IsValidAt(DateTime time);
53+
}
54+
55+
class Entity : ITimeValidity
56+
{
57+
public bool IsValidAt(DateTime time) => default;
58+
}
59+
}

src/DelegateDecompiler/Processor.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,7 @@ static int ProcessInstruction(ProcessorState state, Instruction instruction)
148148
if (instruction.OpCode == OpCodes.Nop ||
149149
instruction.OpCode == OpCodes.Break ||
150150
instruction.OpCode == OpCodes.Ret ||
151+
instruction.OpCode == OpCodes.Ldobj ||
151152
instruction.OpCode.OpCodeType == OpCodeType.Prefix ||
152153
instruction.OpCode.FlowControl == FlowControl.Branch)
153154
{

0 commit comments

Comments
 (0)