Skip to content

Commit 06d89d2

Browse files
Implement InstantiateSignature on AsyncMethodVariant/EcmaMethod (#121948)
We left this as NYI but I hit this. The correct implementation for anything that represents a definition should be `return this`. Since I was looking at this, I'm doing the same for `EcmaMethod` too since the base `MethodDesc.InstantiateSignature` does a lot of work for nothing on a definition. Cc @dotnet/ilc-contrib
1 parent 722de45 commit 06d89d2

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

src/coreclr/tools/Common/Compiler/AsyncMethodVariant.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ public override MethodDesc GetTypicalMethodDefinition()
5858

5959
public override MethodDesc InstantiateSignature(Instantiation typeInstantiation, Instantiation methodInstantiation)
6060
{
61-
throw new NotImplementedException();
61+
return this;
6262
}
6363

6464
public override string ToString() => $"Async variant: " + _wrappedMethod.ToString();

src/coreclr/tools/Common/TypeSystem/Ecma/EcmaMethod.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -599,5 +599,7 @@ private MarshalAsDescriptor GetMarshalAsDescriptor(Parameter parameter)
599599
public override EcmaMethod GetMethodDefinition() => this;
600600

601601
public override EcmaMethod GetTypicalMethodDefinition() => this;
602+
603+
public override MethodDesc InstantiateSignature(Instantiation typeInstantiation, Instantiation methodInstantiation) => this;
602604
}
603605
}

0 commit comments

Comments
 (0)