Files
sdk/pkg/front_end/testcases/general/function_bad_use.dart.weak.expect
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

33 lines
1.2 KiB
Plaintext

library /*isNonNullableByDefault*/;
//
// Problems in library:
//
// pkg/front_end/testcases/general/function_bad_use.dart:1:7: Error: 'Function' is a built-in identifier, could not used as a class name.
// class Function {}
// ^^^^^^^^
//
// pkg/front_end/testcases/general/function_bad_use.dart:3:9: Error: 'Function' is a built-in identifier, could not used as a type identifier.
// class C<Function> {}
// ^^^^^^^^
//
// pkg/front_end/testcases/general/function_bad_use.dart:5:9: Error: 'Function' is a built-in identifier, could not used as a type identifier.
// mixin M<Function> implements List<Function> {}
// ^^^^^^^^
//
import self as self;
import "dart:core" as core;
class Function extends core::Object {
synthetic constructor •() → self::Function
: super core::Object::•()
;
}
class C<Function extends core::Object? = dynamic> extends core::Object {
synthetic constructor •() → self::C<self::C::Function%>
: super core::Object::•()
;
}
abstract class M<Function extends core::Object? = dynamic> extends core::Object implements core::List<self::M::Function%> /*isMixinDeclaration*/ {
}
static method main() → dynamic {}