Version Used:
C# 7 using .net framework 4.5.2
Steps to Reproduce:
- Create a custom async method builder
[AsyncMethodBuilder(typeof(CustomMethodBuilder<>))]
Implement AwaitOnCompleted, AwaitUnsafeOnCompleted with a custom interface like
where TAwaiter : IFoo
3.
try to await an awaiter that doesn't implement IFoo
Expected Behavior:
Compile error
Actual Behavior:
---- System.Security.VerificationException : Method Eff.Core.CustomMethodBuilder1[System.Int32].AwaitUnsafeOnCompleted: type argument 'MyTestType1[System.Int32]' violates the constraint of type parameter 'TAwaiter'.
Version Used:
C# 7 using .net framework 4.5.2
Steps to Reproduce:
[AsyncMethodBuilder(typeof(CustomMethodBuilder<>))]
Implement AwaitOnCompleted, AwaitUnsafeOnCompleted with a custom interface like
where TAwaiter : IFoo
3.
try to await an awaiter that doesn't implement IFoo
Expected Behavior:
Compile error
Actual Behavior:
---- System.Security.VerificationException : Method Eff.Core.CustomMethodBuilder
1[System.Int32].AwaitUnsafeOnCompleted: type argument 'MyTestType1[System.Int32]' violates the constraint of type parameter 'TAwaiter'.