-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Eliminate fuzzy arrows #29630
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
Labels
area-language
Dart language related items (some items might be better tracked at github.com/dart-lang/language).
language-strong-mode-polish
soundness
Comments
Filed dart-lang/test#674 |
This was referenced Aug 30, 2017
This was referenced Oct 3, 2017
This was referenced Oct 3, 2017
This was referenced Oct 30, 2017
munificent
added a commit
to dart-archive/bazel_worker
that referenced
this issue
Nov 3, 2017
Context: dart-lang/sdk#29630 I also fixed a few places to use the real generic method syntax while I was at it. I bumped the version to 0.2.0-dev since my change is technically breaking -- it changes the return type of TestStdinAsync.controller. If you don't feel that will actually break any real users, I can do 0.1.5-dev instead. This needs to roll into Google after I land it. If you'd like me to publish this, let me know and I'll do 0.1.5 instead.
This was referenced Nov 3, 2017
jakemac53
pushed a commit
to dart-archive/bazel_worker
that referenced
this issue
Nov 3, 2017
Context: dart-lang/sdk#29630 - fixes a few places to use the real generic method syntax - bumps version to 0.1.5
munificent
added a commit
to dart-archive/coverage
that referenced
this issue
Nov 8, 2017
These will become an arrow in Dart 2.0. See this bug for more context: dart-lang/sdk#29630 I also fixed a couple of unused variable warnings while I was at it. I bumped the version number in the pubspec. This is technically a potentially breaking change because the signatures of createHitmap() and mergeHitmaps() are more precise now. The only code I could find calling that was in flutter_tools and that seems to be happy with the change. If you'd rather I keep the old version, let me know.
munificent
added a commit
to dart-archive/observe
that referenced
this issue
Nov 8, 2017
These will become an error in Dart 2.0. Context here: dart-lang/sdk#29630 I also went ahead and fixed a few other minor warnings while I was in here.
cbracken
pushed a commit
to dart-archive/coverage
that referenced
this issue
Nov 9, 2017
These will become an arrow in Dart 2.0. See this bug for more context: dart-lang/sdk#29630 I also fixed a couple of unused variable warnings while I was at it. I bumped the version number in the pubspec. This is technically a potentially breaking change because the signatures of createHitmap() and mergeHitmaps() are more precise now. The only code I could find calling that was in flutter_tools and that seems to be happy with the change. If you'd rather I keep the old version, let me know.
10 tasks
This was referenced Jan 11, 2018
alorenzen
pushed a commit
to angulardart/angular
that referenced
this issue
Jan 17, 2018
…row purposes. Using dynamic as bottom ("fuzzy arrow") will become an error in Dart 2.0. dart-lang/sdk#29630 PiperOrigin-RevId: 182127013
alorenzen
pushed a commit
to angulardart/angular
that referenced
this issue
Jan 17, 2018
…row purposes. Using dynamic as bottom ("fuzzy arrow") will become an error in Dart 2.0. dart-lang/sdk#29630 PiperOrigin-RevId: 182127013
alorenzen
pushed a commit
to angulardart/angular
that referenced
this issue
Jan 17, 2018
…row purposes. Using dynamic as bottom ("fuzzy arrow") will become an error in Dart 2.0. dart-lang/sdk#29630 PiperOrigin-RevId: 182127013
nshahan
pushed a commit
to angulardart/angular_components
that referenced
this issue
Jan 18, 2018
…ries. Using dynamic as bottom will become an error in Dart 2.0. dart-lang/sdk#29630 PiperOrigin-RevId: 182013886
nshahan
pushed a commit
to angulardart/angular_components
that referenced
this issue
Jan 18, 2018
Using dynamic as bottom will become an error in Dart 2.0. dart-lang/sdk#29630 PiperOrigin-RevId: 182020806
nshahan
pushed a commit
to angulardart/angular_components
that referenced
this issue
Jan 19, 2018
…ries. Using dynamic as bottom will become an error in Dart 2.0. dart-lang/sdk#29630 PiperOrigin-RevId: 182013886
nshahan
pushed a commit
to angulardart/angular_components
that referenced
this issue
Jan 19, 2018
Using dynamic as bottom will become an error in Dart 2.0. dart-lang/sdk#29630 PiperOrigin-RevId: 182020806
alorenzen
pushed a commit
to angulardart/angular
that referenced
this issue
Jan 26, 2018
…e argument of [callback]. Generated template.dart files fill in a type for the argument of [callback], so using dynamic here results in a "uses dynamic as bottom" error. See discussion here: dart-lang/sdk#29630 PiperOrigin-RevId: 183131552
alorenzen
pushed a commit
to angulardart/angular
that referenced
this issue
Jan 26, 2018
…e argument of [callback]. Generated template.dart files fill in a type for the argument of [callback], so using dynamic here results in a "uses dynamic as bottom" error. See discussion here: dart-lang/sdk#29630 PiperOrigin-RevId: 183131552
alorenzen
pushed a commit
to angulardart/angular
that referenced
this issue
Jan 29, 2018
…e argument of [callback]. Generated template.dart files fill in a type for the argument of [callback], so using dynamic here results in a "uses dynamic as bottom" error. See discussion here: dart-lang/sdk#29630 PiperOrigin-RevId: 183131552
alorenzen
pushed a commit
to angulardart/angular
that referenced
this issue
Jan 29, 2018
…e argument of [callback]. Generated template.dart files fill in a type for the argument of [callback], so using dynamic here results in a "uses dynamic as bottom" error. See discussion here: dart-lang/sdk#29630 PiperOrigin-RevId: 183131552
alorenzen
pushed a commit
to angulardart/angular
that referenced
this issue
Jan 29, 2018
…e argument of [callback]. Generated template.dart files fill in a type for the argument of [callback], so using dynamic here results in a "uses dynamic as bottom" error. See discussion here: dart-lang/sdk#29630 PiperOrigin-RevId: 183131552
alorenzen
pushed a commit
to angulardart/angular
that referenced
this issue
Jan 30, 2018
…e argument of [callback]. Generated template.dart files fill in a type for the argument of [callback], so using dynamic here results in a "uses dynamic as bottom" error. See discussion here: dart-lang/sdk#29630 PiperOrigin-RevId: 183131552
This was referenced Feb 12, 2018
This is done. |
mosuem
pushed a commit
to mosuem/tools_fork
that referenced
this issue
Aug 9, 2024
These will become an arrow in Dart 2.0. See this bug for more context: dart-lang/sdk#29630 I also fixed a couple of unused variable warnings while I was at it. I bumped the version number in the pubspec. This is technically a potentially breaking change because the signatures of createHitmap() and mergeHitmaps() are more precise now. The only code I could find calling that was in flutter_tools and that seems to be happy with the change. If you'd rather I keep the old version, let me know.
mosuem
pushed a commit
to dart-lang/tools
that referenced
this issue
Aug 28, 2024
These will become an arrow in Dart 2.0. See this bug for more context: dart-lang/sdk#29630 I also fixed a couple of unused variable warnings while I was at it. I bumped the version number in the pubspec. This is technically a potentially breaking change because the signatures of createHitmap() and mergeHitmaps() are more precise now. The only code I could find calling that was in flutter_tools and that seems to be happy with the change. If you'd rather I keep the old version, let me know.
mosuem
pushed a commit
to dart-lang/tools
that referenced
this issue
Oct 25, 2024
…er#12) Context: dart-lang/sdk#29630 - fixes a few places to use the real generic method syntax - bumps version to 0.1.5
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
area-language
Dart language related items (some items might be better tracked at github.com/dart-lang/language).
language-strong-mode-polish
soundness
In Dart 1.0, dynamic is used as both top and bottom. In strong mode, we made it top almost everywhere, except that for function typed variables (only) we made dynamic on parameter types mean bottom in order to enable certain code patterns:
Since we how have a name for bottom in the language (Null), we can support this pattern directly:
The original motivation for fuzzy arrows is gone, and it continues to cause user confusion and soundness difficulties. This is a tracking bug for the elimination of all remaining uses of them, following by the deprecation and elimination of the feature.
A hint has been added to the analyzer to warn on uses of this feature:
This hint will become an error once code is fixed up appropriately.
An example:
This code will now cause a hint, since it uses a function taking two integer arguments in a context that might provide it with anything.
You can fix code like this by removing the types on the function or moving them into the body:
but it is often better to change the API to make the original call site valid:
Related:
#29299
#29295
The text was updated successfully, but these errors were encountered: