blob: bf408f651a77bae14040140e905fe0495e7b3060 [file] [log] [blame]
// Copyright (c) 2013, 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.
// @dart = 2.9
import "package:expect/expect.dart";
class A {
foo() => 42;
class B implements A {
noSuchMethod(im) => 84;
main() {
var a = [new A(), new B()];
var b = a[1];
if (b is A) {
// `` will create a typed selector whose receiver type is a
// subtype of `A`. Because not all subtypes of `A` implement
// `foo`, dart2js must generate a `noSuchMethod` stub for `foo` in
// the top Object class.
}'Should not be here');