blob: 21c855e245e5c86aa97f6600b8a154367fc496b6 [file] [log] [blame]
# Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
# for details. All rights reserved. Use of this source code is governed by a
# BSD-style license that can be found in the LICENSE.md file.
main.dart.patch: |
// Test that deleting an instance method with optional parameters works, even if
// stored in a tear-off
class C {
<<<< ["closure is null","v1","v1"]
m([a = "a"]) {
print('v1');
}
==== ["threw", "threw"]
>>>>
}
var closure;
main() {
if (closure == null) {
print('closure is null');
closure = new C().m;
}
try {
closure();
} catch (e) {
print('threw');
}
try {
closure("b");
} catch (e) {
print('threw');
}
}