Closed seankain closed 4 years ago
Sorry, just now saw this.
So, yeah, commenting out the line 40 would definitely break a lot of other functionality. The codegen model just needs to understand that if there's a virtual method with no Frames, it should be skipped in the code gen instead of blowing up.
It's not a scenario I envisioned or tested for obviously.
Finally got this today.
I was thinking of generating AspNetCore.Mvc Controllers. I got an exception thrown from line 135 of GeneratedMethod.cs when the GeneratedMethod.Frames is empty. I found that it appeared to be related to virtual methods. To test:
As a test hack I commented out line 40 of ReflectionExtensions regarding virtual and final access modifiers. It allowed me to get past the issue but would probably cause severe issues with overrides. I am new to Lamar and just wanted to check if this is truly a bug or if it is just something that I am missing.