Closed eseidel closed 1 year ago
Amusingly if you leave off the ..body for Method it just produces '(a)' which is probably a separate bug. Also Code('') produces '{ }', note the space, which may also be a bug. 🤷
I have no ability to merge, please do. :)
if you leave off the ..body for Method it just produces '(a)' which is probably a separate bug
Yeah I do think we should fallback to an empty body. I'm not sure if there are other values that result in invalid code when omitted - we probably only cover the very common omissions.
note the space, which may also be a bug.
We don't make guarantees about whitespace in the output, but I can check it that's an easy space to omit.
Thanks!
This fixes https://github.com/dart-lang/code_builder/issues/381.