Files
sdk/pkg/front_end/testcases/general/ignore_function.dart
T
JustWe 5787ad0381 [CFE] add 'Function' as type identifier check in CFE
try resolve https://github.com/dart-lang/sdk/issues/45705 @eernstg

Closes https://github.com/dart-lang/sdk/pull/45736
https://github.com/dart-lang/sdk/pull/45736

GitOrigin-RevId: 2d91c32a34260014bbd5720e48a713eee180e65b
Change-Id: Ic416287137495926efe1d03da7d484202bd11272
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/195761
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2021-04-21 04:43:48 +00:00

22 lines
663 B
Dart

// 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 "dart:core" as core;
class A implements core.Function {
// No error here: core.Function is ignored.
operator ==(other) => false;
}
class B implements Function {
// Error here Object.== and Function.== disagree on the type of other.
operator ==(other) => false;
}
// CFE Error here: Function is built-in id, could not used as type id.
class Function {
core.bool operator ==(core.Object other) => false;
}
main() {}