blob: 11bd3778ed1c14c9e9b09cf381e986a1bc1e8a98 [file] [log] [blame]
// Copyright (c) 2011, 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 file.
/// @assertion The [Null] class extends the [Object] class and declares no
/// methods except those also declared by [Object].
/// @description Checks that invoking a method on [null] yields error if class
/// [Null] does not explicitly implement it.
/// @author hlodvig
import '../../../Utils/expect.dart';
class A {
void aMethodWithAFancyName() {}
}
dynamic getNull() => null;
main() {
Expect.throws(() {
A a = getNull();
a.aMethodWithAFancyName();
});
}