-
Notifications
You must be signed in to change notification settings - Fork 58
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
UIP-2024 Add support for covariant prop / state fields #76
UIP-2024 Add support for covariant prop / state fields #76
Conversation
RavenNumber of Findings: 0 |
7ce7ca3
to
036a2db
Compare
@@ -328,6 +328,19 @@ main() { | |||
'''); | |||
}); | |||
|
|||
test('covariant keyword', () { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indentation is off here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
facepalm
You'll also want to bump the travis.yaml dart SDK version |
pubspec.yaml
Outdated
platform_detect: "^1.1.1" | ||
quiver: ">=0.21.4 <0.25.0" | ||
dev_dependencies: | ||
browser_detect: "^1.0.4" | ||
matcher: ">=0.11.0 <0.13.0" | ||
coverage: "^0.7.2" | ||
dart_dev: "^1.0.5" | ||
dart_dev: "^1.7.6" | ||
dart_style: ">=1.0.6 <2.0.0" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why was this added?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mmm... must've added it when i was trying to get past the version solver issues w/ analyzer - which ended up being the w_flux
package... will remove.
@jacehensley-wf I already updated the travis config file dart version. |
036a2db
to
0d87d3e
Compare
@jacehensley-wf @greglittlefield-wf feedback addressed. |
@@ -296,7 +296,7 @@ class ImplGenerator { | |||
!member.isSynthetic && | |||
member.isAbstract && | |||
member.name.name == name && | |||
member.returnType?.name?.name == type | |||
member.returnType == type |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
member.returnType
is a TypeAnnotation
, and type
is a String
... Not sure how this works.
For better future-proofing, can we change this to the following?
member.returnType?.toSource() == type
0d87d3e
to
1f7d2f2
Compare
1f7d2f2
to
329f2b6
Compare
+1 |
Codecov Report
@@ Coverage Diff @@
## master #76 +/- ##
=========================================
+ Coverage 97.7% 97.7% +0.01%
=========================================
Files 28 28
Lines 1387 1389 +2
=========================================
+ Hits 1355 1357 +2
Misses 32 32 |
QA +10
Merging. |
Ultimate problem:
The
over_react
transformer did not support thecovariant
keyword added to the Dart SDK in1.22.0
.How it was fixed:
The transformer was updated to detect the presence of the keyword, and place it within the setter parameter only.
Testing suggestions:
Potential areas of regression:
Transformed code