mirror of
https://github.com/dart-lang/sdk
synced 2024-10-02 23:59:16 +00:00
CHANGELOG entry for noSuchMethod change
Change-Id: Idf8ea6252aba97b4a29a3d0acaa530e8c0cb59eb Reviewed-on: https://dart-review.googlesource.com/55843 Reviewed-by: Jenny Messerly <jmesserly@google.com>
This commit is contained in:
parent
d49af06ce0
commit
a5d4195b0b
25
CHANGELOG.md
25
CHANGELOG.md
|
@ -4,6 +4,31 @@
|
|||
|
||||
### Language
|
||||
|
||||
* Invocations of noSuchMethod receive default values for optional args.
|
||||
* The following program used to print "No arguments passed", and now prints
|
||||
"First argument is 3".
|
||||
|
||||
```dart
|
||||
abstract class B {
|
||||
void m([int x = 3]);
|
||||
}
|
||||
|
||||
class A implements B {
|
||||
noSuchMethod(Invocation i) {
|
||||
if (i.positionalArguments.length == 0) {
|
||||
print("No arguments passed");
|
||||
} else {
|
||||
print("First argument is ${i.positionalArguments[0]}");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void main() {
|
||||
A().m();
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
#### Strong Mode
|
||||
|
||||
### Core library changes
|
||||
|
|
Loading…
Reference in a new issue