Beef icon indicating copy to clipboard operation
Beef copied to clipboard

[BUG] Enum payload arguments expected in comptime generated code

Open Fusioon opened this issue 3 years ago • 0 comments

For this error to occur the method generating the code has to be in separate project from the type we are generating the code based off. Then any attempt to get tagged union fields fail with these errors:

ERROR: Enum payload arguments expected at line 10:10 in $Emit$test2:test2.Helper
case .Bye(let _0): 
         ^
ERROR: Method 'Invoke' does not exist in type 'Tests.Program.Bar'
  while specializing method 'test2.Helper.Serialize<Tests.Program.Bar>(System.String name, Tests.Program.Bar val)' at line 10:7 in $Emit$test2:test2.Helper
case .Bye(let _0): 
      ^^^

Repro project: Test.zip

Tested with: Nightly 11/10/2022

Fusioon avatar Nov 17 '22 09:11 Fusioon