// Copyright (c) 2019, 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. // dart2jsOptions=--experiment-new-rti --no-minify import 'dart:_rti' as rti; import "package:expect/expect.dart"; class Thingy {} class Generic { checkMethod(o) => o is AA; } @pragma('dart2js:noInline') void check(o) { Expect.isTrue(o is T); Expect.isFalse(o is! T); } main() { check(Thingy()); check>(Generic()); check>(Generic()); check>(Generic()); check>(Generic()); check>(Generic()); Expect.isTrue(Generic().checkMethod(Thingy())); Expect.isTrue(Generic().checkMethod(Object())); Expect.isTrue(Generic().checkMethod(Thingy())); Expect.isFalse(Generic().checkMethod(Object())); Expect.isTrue(Generic().checkMethod(Object())); Expect.isFalse(Generic().checkMethod(123)); Expect.isFalse(Generic().checkMethod(Object())); }