Skip to content

Fixes to lints and fuzzy arrows #39

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

Merged
merged 3 commits into from
Sep 25, 2017
Merged

Fixes to lints and fuzzy arrows #39

merged 3 commits into from
Sep 25, 2017

Conversation

kevmoo
Copy link
Collaborator

@kevmoo kevmoo commented Sep 25, 2017

No description provided.

@kevmoo kevmoo requested a review from jakemac53 September 25, 2017 17:16
@@ -54,21 +54,21 @@ String _jsonLiteralAsDart(dynamic value, bool asConst) {
return '${asConst ? 'const' : ''}[$listItems]';
}

if (value is Map) return _jsonMapAsDart(value, asConst);
if (value is Map<String, dynamic>) return _jsonMapAsDart(value, asConst);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Are these types of checks any more sane than they used to be (won't this return true for Map<dynamic, dynamic>)?

I guess you are just trying to avoid the explicit cast given the tighter type on _jsonMapAsDart, but this sends a bit of the wrong signal imo... I would rather see the cast when you pass the value in to _jsonMapAsDart as its a bit more obvious that you are explicitly casting it and it could technically fail.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants