'Leaf Petersen' via Dart Misc
2018-02-21 23:06:56 UTC
TLDR: If you don't have code that implements or mixes in the `Invocation`
class, you can stop reading.
We (the Dart team) are making some small breaking changes to the
`Invocation` class to reflect the addition of generic methods to Dart 2.
See below for a summary of the change and its impact.
*What is changing*
We are adding the following getter to `Invocation`:
List<Type> get typeArguments;
The method is added as non-abstract and returning an empty list, so all
classes that currently extend Invocation will remain valid.
The Invocation class now has constructors that can create all instances
with any valid state, so many classes implementing Invocation are probably
now unnecessary. As a result however, the Invocation class can no longer
be used as a mixin.
*What will break?*
*All classes that implement `Invocation` need to add a corresponding
getter: @override List<Type> get typeArguments { throw new
UnimplementedError("typeArguments"); }*
Classes that use `Invocation` as a mixin will no longer work. We are not
aware of any such uses.
*Why is this change being made?*
Dart 2 adds generic methods to the language, and so method invocations may
include type arguments which may need to be passed on to a noSuchMethod
invocation. There is currently no place in the `Invocation` class to
record these type arguments.
I will update here when this change lands. Please reach out to me here or
offline with any concerns, and/or with help resolving any issues after this
change has landed.
thanks,
-leaf
class, you can stop reading.
We (the Dart team) are making some small breaking changes to the
`Invocation` class to reflect the addition of generic methods to Dart 2.
See below for a summary of the change and its impact.
*What is changing*
We are adding the following getter to `Invocation`:
List<Type> get typeArguments;
The method is added as non-abstract and returning an empty list, so all
classes that currently extend Invocation will remain valid.
The Invocation class now has constructors that can create all instances
with any valid state, so many classes implementing Invocation are probably
now unnecessary. As a result however, the Invocation class can no longer
be used as a mixin.
*What will break?*
*All classes that implement `Invocation` need to add a corresponding
getter: @override List<Type> get typeArguments { throw new
UnimplementedError("typeArguments"); }*
Classes that use `Invocation` as a mixin will no longer work. We are not
aware of any such uses.
*Why is this change being made?*
Dart 2 adds generic methods to the language, and so method invocations may
include type arguments which may need to be passed on to a noSuchMethod
invocation. There is currently no place in the `Invocation` class to
record these type arguments.
I will update here when this change lands. Please reach out to me here or
offline with any concerns, and/or with help resolving any issues after this
change has landed.
thanks,
-leaf
--
For other discussions, see https://groups.google.com/a/dartlang.org/
For HOWTO questions, visit http://stackoverflow.com/tags/dart
To file a bug report or feature request, go to http://www.dartbug.com/new
---
You received this message because you are subscribed to the Google Groups "Dart Misc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to misc+***@dartlang.org.
For other discussions, see https://groups.google.com/a/dartlang.org/
For HOWTO questions, visit http://stackoverflow.com/tags/dart
To file a bug report or feature request, go to http://www.dartbug.com/new
---
You received this message because you are subscribed to the Google Groups "Dart Misc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to misc+***@dartlang.org.