Commit f47c54d
committed
Fix AwaitResolver for real async Task<T> subtypes
The runtime type of async Task<T> is often a subclass like
AsyncStateMachineBox<TResult, TStateMachine>, not Task<T> itself.
Walk up the BaseType chain to find Task<T> so that await on real
async .NET operations (e.g. HttpClient.GetStringAsync) correctly
returns the result instead of None.1 parent 5a09b4d commit f47c54d
1 file changed
Lines changed: 9 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
980 | 980 | | |
981 | 981 | | |
982 | 982 | | |
983 | | - | |
| 983 | + | |
| 984 | + | |
| 985 | + | |
| 986 | + | |
| 987 | + | |
| 988 | + | |
| 989 | + | |
984 | 990 | | |
985 | 991 | | |
986 | 992 | | |
987 | | - | |
| 993 | + | |
988 | 994 | | |
989 | 995 | | |
990 | 996 | | |
991 | | - | |
| 997 | + | |
992 | 998 | | |
993 | 999 | | |
994 | 1000 | | |
| |||
0 commit comments