blob: cddafb7445ee3c160aa053b308a0dad006f927e2 [file] [log] [blame]
// 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.
// @dart = 2.9
import "legacy_upper_bound_helper.dart" show LegacyUpperBoundTest;
import "package:kernel/ast.dart" show DartType, Library;
import "package:kernel/class_hierarchy.dart" show ClassHierarchy;
class KernelLegacyUpperBoundTest extends LegacyUpperBoundTest {
ClassHierarchy hierarchy;
bool get isNonNullableByDefault => true;
Future<void> parseComponent(String source) {
hierarchy = new ClassHierarchy(env.component, env.coreTypes);
return null;
DartType getLegacyLeastUpperBound(
DartType a, DartType b, Library clientLibrary) {
return hierarchy.getLegacyLeastUpperBound(a, b, clientLibrary);
main() {
new KernelLegacyUpperBoundTest().test();