Closed persn closed 2 months ago
This also fails with the same error message, might be related, or might be a different issue
[Zomp.SyncMethodGenerator.CreateSyncVersion(OmitNullableDirective = true)]
public async Task FooAsync()
{
await Task.Delay(100);
var bar =
#if DEBUG
true;
#else
false;
#endif
}
Looking at this on the weekend. Thanks so much for all the issues! Makes the project better.
Fixed in version 1.4.13
Actually, the second test hasn't been fixed
Second test is a different issue now tracked in #85
Consider the following code
Foo2Async and Foo3Async generates and compiles fine, however Foo1Async crashes with the message
1>CSC : warning CS8785: Generator 'SyncMethodSourceGenerator' failed to generate source. It will not contribute to the output and compilation errors may occur as a result. Exception was of type 'InvalidOperationException' with message 'Stack empty.'.