Comments (6)
I used the past time to re-read everything about generics in dart and experimented a bit. Now I have a better understanding on what's going on.
I learned that this.
is obiviously unnecessary and causes problems (dart loses generics type information when using this
).
I made some changes 700ea4a
Can you verify that it's the way to go?
from supercharged.
Thank you for the information. I will look into that topic and try to fix all code while having implicit-casts: false
from supercharged.
I fixed all analytic errors that happend when having implicit-casts: false
. Changes are pushed to master
branch. Do you have the opportunity to verify it?
from supercharged.
I am afraid this does not solve the problem and I may not have explained it correctly.
I also don't think the changes in 74ff727 are needed.
The problem may only occur with the List<T>
to Map<K, V>
extensions groupBy
and associate*
.
Your extension Iterable_<T, K, V>
declares 3 generics types but only one is known from the source iterable (T
). K
and V
are actually unknown, and if those can not be inferred the compiler will just cast it (with implicit-casts: true
).
Of course one can always cast the results of groupBy
for example but instead the function should have the K
and V
generic type arguments to help the compiler infer the resulting type groupBy<K, V>
.
from supercharged.
This looks good, thanks!
Now we just need a way of calling extensions function on null receivers in Dart for more Kotlin magic. :)
from supercharged.
Great! Thank you for your help :-)
from supercharged.
Related Issues (19)
- Independent from Flutter HOT 4
- [Suggestion] About maintaining supercharged_dart HOT 2
- Missing ability to tween more than two values per tween HOT 1
- How about offset tween HOT 1
- Iterable.pickOne and Iterable.pickSome throws ArgumentError for optional Random parameter HOT 3
- firstOrNull conflict with dart IterableExtensions HOT 3
- Dart adopted extension methods HOT 1
- Parse 8 character hex string color HOT 1
- Add Size and Rect tweenTo extensions HOT 2
- Consider adding actions to analyze/test incoming PRs HOT 6
- can this be combined with darq? HOT 1
- singular aliases of int->Duration extensions HOT 2
- sortedByStringSC, sortedByNumSC, forEachIndexedSC are showing deprecated. HOT 6
- Thanks! HOT 1
- Could you remove the flutter dependency? HOT 3
- Suggest change behavior of String.toInt and String.toDouble HOT 3
- add between for DateTime HOT 3
- add extension for widgets. HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from supercharged.