Skip to content
This repository was archived by the owner on Apr 8, 2025. It is now read-only.

Conversation

@eseidel
Copy link
Contributor

@eseidel eseidel commented Dec 6, 2022

This fixes dart-lang/tools#1123.

@eseidel
Copy link
Contributor Author

eseidel commented Dec 6, 2022

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. 🤷

@eseidel
Copy link
Contributor Author

eseidel commented Dec 6, 2022

I have no ability to merge, please do. :)

@natebosch
Copy link
Contributor

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.

@natebosch natebosch merged commit 0f3f943 into dart-archive:master Dec 6, 2022
@natebosch
Copy link
Contributor

Thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Unclear how to generate an anonymous function

2 participants