Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix several problems with anonymous functions and type parameters #1651

Merged
merged 10 commits into from
Mar 29, 2018

Conversation

jcollins-g
Copy link
Contributor

Fixes #1643. @bergwerf

Anonymous functions as part of type parameters haven't worked very well in dartdoc at times, and an interesting case in #1643 actually led to crashes. Fix that and a few other related problems:

  • Not everything has libraries, so refactor ModelElement.from to require both a library and package graph, and assert if at least one isn't null (root cause of Crash handling anonymous functions as keys to a Map with inferred types #1643)
  • Show anonymous functions when they are type parameters
  • Shift style so that we don't line break between parameters of an anonymous function used as a type parameter.

@googlebot googlebot added the cla: yes Google CLA check succeeded. label Mar 28, 2018
@jcollins-g
Copy link
Contributor Author

jcollins-g commented Mar 28, 2018

Some screenshots:

The case from #1643 in summary view:

screenshot from 2018-03-28 11-25-09

The case from #1643 when viewing the symbol:

screenshot from 2018-03-28 10-55-06

Another related case, summary view:

screenshot from 2018-03-28 11-16-17

And when viewing the symbol:

screenshot from 2018-03-28 11-22-07

@jcollins-g jcollins-g requested review from devoncarew and pq March 28, 2018 20:30

.multi-line-signature .type-parameter .parameter {
margin-left: 0px;
display: unset;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@jcollins-g jcollins-g merged commit 865b502 into master Mar 29, 2018
@jcollins-g jcollins-g deleted the crash-debug branch March 29, 2018 16:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes Google CLA check succeeded.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants