diff --git a/pkg/_js_interop_checks/lib/src/transformations/static_interop_class_eraser.dart b/pkg/_js_interop_checks/lib/src/transformations/static_interop_class_eraser.dart index 324a97d1642..e4ede990dff 100644 --- a/pkg/_js_interop_checks/lib/src/transformations/static_interop_class_eraser.dart +++ b/pkg/_js_interop_checks/lib/src/transformations/static_interop_class_eraser.dart @@ -120,8 +120,7 @@ class StaticInteropClassEraser extends Transformer { signatureType.declaredNullability, namedParameters: signatureType.namedParameters, typeParameters: signatureType.typeParameters, - requiredParameterCount: signatureType.requiredParameterCount, - typedefType: signatureType.typedefType); + requiredParameterCount: signatureType.requiredParameterCount); } return newProcedure; } diff --git a/pkg/compiler/lib/src/serialization/helpers.dart b/pkg/compiler/lib/src/serialization/helpers.dart index 46791baac2c..2e395b78f57 100644 --- a/pkg/compiler/lib/src/serialization/helpers.dart +++ b/pkg/compiler/lib/src/serialization/helpers.dart @@ -133,8 +133,6 @@ class DartTypeNodeWriter _sink.writeBool(parameter.isRequired); _sink._writeDartTypeNode(parameter.type, functionTypeVariables); } - _sink._writeDartTypeNode(node.typedefType, functionTypeVariables, - allowNull: true); _sink.end(functionTypeNodeTag); } diff --git a/pkg/compiler/lib/src/serialization/source.dart b/pkg/compiler/lib/src/serialization/source.dart index efe65120d6f..b09e7801ed9 100644 --- a/pkg/compiler/lib/src/serialization/source.dart +++ b/pkg/compiler/lib/src/serialization/source.dart @@ -767,13 +767,11 @@ class DataSourceReader implements migrated.DataSourceReader { namedParameters[index] = ir.NamedType(name, type, isRequired: isRequired); } - ir.TypedefType typedefType = _readDartTypeNode(functionTypeVariables); end(functionTypeNodeTag); return ir.FunctionType(positionalParameters, returnType, nullability, namedParameters: namedParameters, typeParameters: typeParameters, - requiredParameterCount: requiredParameterCount, - typedefType: typedefType); + requiredParameterCount: requiredParameterCount); case DartTypeNodeKind.interfaceType: ir.Class cls = readClassNode(); diff --git a/pkg/front_end/lib/src/fasta/builder/builtin_type_declaration_builder.dart b/pkg/front_end/lib/src/fasta/builder/builtin_type_declaration_builder.dart index ce5ed5bfd77..02c6b57a508 100644 --- a/pkg/front_end/lib/src/fasta/builder/builtin_type_declaration_builder.dart +++ b/pkg/front_end/lib/src/fasta/builder/builtin_type_declaration_builder.dart @@ -25,14 +25,26 @@ abstract class BuiltinTypeDeclarationBuilder super(null, 0, name, compilationUnit, charOffset); @override - DartType buildType(LibraryBuilder library, - NullabilityBuilder nullabilityBuilder, List? arguments) { + DartType buildAliasedType( + LibraryBuilder library, + NullabilityBuilder nullabilityBuilder, + List? arguments, + TypeUse typeUse, + Uri fileUri, + int charOffset, + {required bool hasExplicitTypeArguments}) { return type.withDeclaredNullability(nullabilityBuilder.build(library)); } @override - DartType buildTypeWithBuiltArguments(LibraryBuilder library, - Nullability nullability, List arguments) { + DartType buildAliasedTypeWithBuiltArguments( + LibraryBuilder library, + Nullability nullability, + List arguments, + TypeUse typeUse, + Uri fileUri, + int charOffset, + {required bool hasExplicitTypeArguments}) { return type.withDeclaredNullability(nullability); } diff --git a/pkg/front_end/lib/src/fasta/builder/class_builder.dart b/pkg/front_end/lib/src/fasta/builder/class_builder.dart index 4ecde967336..8f483a099a5 100644 --- a/pkg/front_end/lib/src/fasta/builder/class_builder.dart +++ b/pkg/front_end/lib/src/fasta/builder/class_builder.dart @@ -18,13 +18,14 @@ import 'package:kernel/ast.dart' Supertype, getAsTypeArguments; import 'package:kernel/class_hierarchy.dart' show ClassHierarchy; -import 'package:kernel/src/legacy_erasure.dart'; +import 'package:kernel/src/unaliasing.dart'; import 'package:kernel/text/text_serialization_verifier.dart'; import '../fasta_codes.dart'; import '../modifier.dart'; import '../problems.dart' show internalProblem, unhandled; import '../scope.dart'; +import '../source/source_library_builder.dart'; import '../type_inference/type_schema.dart' show UnknownType; import 'builder.dart'; import 'declaration_builder.dart'; @@ -98,10 +99,7 @@ abstract class ClassBuilder implements DeclarationBuilder { InterfaceType rawType(Nullability nullability); - List buildTypeArguments( - LibraryBuilder library, List? arguments); - - Supertype buildSupertype( + List buildAliasedTypeArguments( LibraryBuilder library, List? arguments); Supertype buildMixedInType( @@ -310,8 +308,14 @@ abstract class ClassBuilderImpl extends DeclarationBuilderImpl } @override - DartType buildTypeWithBuiltArguments(LibraryBuilder library, - Nullability nullability, List? arguments) { + DartType buildAliasedTypeWithBuiltArguments( + LibraryBuilder library, + Nullability nullability, + List? arguments, + TypeUse typeUse, + Uri fileUri, + int charOffset, + {required bool hasExplicitTypeArguments}) { assert(arguments == null || cls.typeParameters.length == arguments.length); if (isNullClass) { return const NullType(); @@ -324,31 +328,33 @@ abstract class ClassBuilderImpl extends DeclarationBuilderImpl return new FutureOrType(arguments!.single, nullability); } } - return arguments == null + DartType type = arguments == null ? rawType(nullability) : new InterfaceType(cls, nullability, arguments); + if (typeVariablesCount != 0 && library is SourceLibraryBuilder) { + library.registerBoundsCheck(type, fileUri, charOffset, typeUse, + inferred: !hasExplicitTypeArguments); + } + return type; } @override - DartType buildType(LibraryBuilder library, - NullabilityBuilder nullabilityBuilder, List? arguments) { - return buildTypeWithBuiltArguments( + DartType buildAliasedType( + LibraryBuilder library, + NullabilityBuilder nullabilityBuilder, + List? arguments, + TypeUse typeUse, + Uri fileUri, + int charOffset, + {required bool hasExplicitTypeArguments}) { + return buildAliasedTypeWithBuiltArguments( library, nullabilityBuilder.build(library), - buildTypeArguments(library, arguments)); - } - - @override - Supertype buildSupertype( - LibraryBuilder library, List? arguments) { - Class cls = isPatch ? origin.cls : this.cls; - List typeArguments = buildTypeArguments(library, arguments); - if (!library.isNonNullableByDefault) { - for (int i = 0; i < typeArguments.length; ++i) { - typeArguments[i] = legacyErasure(typeArguments[i]); - } - } - return new Supertype(cls, typeArguments); + buildAliasedTypeArguments(library, arguments), + typeUse, + fileUri, + charOffset, + hasExplicitTypeArguments: hasExplicitTypeArguments); } @override @@ -356,7 +362,11 @@ abstract class ClassBuilderImpl extends DeclarationBuilderImpl LibraryBuilder library, List? arguments) { Class cls = isPatch ? origin.cls : this.cls; if (arguments != null) { - return new Supertype(cls, buildTypeArguments(library, arguments)); + List typeArguments = + buildAliasedTypeArguments(library, arguments); + typeArguments = unaliasTypes(typeArguments, + legacyEraseAliases: !library.isNonNullableByDefault)!; + return new Supertype(cls, typeArguments); } else { return new Supertype( cls, diff --git a/pkg/front_end/lib/src/fasta/builder/extension_builder.dart b/pkg/front_end/lib/src/fasta/builder/extension_builder.dart index f0deb8084f6..5272f5369fd 100644 --- a/pkg/front_end/lib/src/fasta/builder/extension_builder.dart +++ b/pkg/front_end/lib/src/fasta/builder/extension_builder.dart @@ -72,14 +72,24 @@ abstract class ExtensionBuilderImpl extends DeclarationBuilderImpl } @override - DartType buildType(LibraryBuilder library, - NullabilityBuilder nullabilityBuilder, List? arguments) { + DartType buildAliasedType( + LibraryBuilder library, + NullabilityBuilder nullabilityBuilder, + List? arguments, + TypeUse typeUse, + Uri fileUri, + int charOffset, + {required bool hasExplicitTypeArguments}) { if (library is SourceLibraryBuilder && library.libraryFeatures.extensionTypes.isEnabled) { - return buildTypeWithBuiltArguments( + return buildAliasedTypeWithBuiltArguments( library, nullabilityBuilder.build(library), - _buildTypeArguments(library, arguments)); + _buildAliasedTypeArguments(library, arguments), + typeUse, + fileUri, + charOffset, + hasExplicitTypeArguments: hasExplicitTypeArguments); } else { throw new UnsupportedError("ExtensionBuilder.buildType is not supported" "in library '${library.importUri}'."); @@ -87,8 +97,14 @@ abstract class ExtensionBuilderImpl extends DeclarationBuilderImpl } @override - DartType buildTypeWithBuiltArguments(LibraryBuilder library, - Nullability nullability, List arguments) { + DartType buildAliasedTypeWithBuiltArguments( + LibraryBuilder library, + Nullability nullability, + List arguments, + TypeUse typeUse, + Uri fileUri, + int charOffset, + {required bool hasExplicitTypeArguments}) { if (library is SourceLibraryBuilder && library.libraryFeatures.extensionTypes.isEnabled) { return new ExtensionType(extension, nullability, arguments); @@ -102,7 +118,7 @@ abstract class ExtensionBuilderImpl extends DeclarationBuilderImpl @override int get typeVariablesCount => typeParameters?.length ?? 0; - List _buildTypeArguments( + List _buildAliasedTypeArguments( LibraryBuilder library, List? arguments) { if (arguments == null && typeParameters == null) { return []; @@ -111,7 +127,9 @@ abstract class ExtensionBuilderImpl extends DeclarationBuilderImpl if (arguments == null && typeParameters != null) { List result = new List.generate(typeParameters!.length, (int i) { - return typeParameters![i].defaultType!.build(library); + return typeParameters![i] + .defaultType! + .buildAliased(library, TypeUse.defaultTypeAsTypeArgument); }, growable: true); if (library is SourceLibraryBuilder) { library.inferredTypes.addAll(result); @@ -133,7 +151,7 @@ abstract class ExtensionBuilderImpl extends DeclarationBuilderImpl assert(arguments!.length == typeVariablesCount); List result = new List.generate(arguments!.length, (int i) { - return arguments[i].build(library); + return arguments[i].buildAliased(library, TypeUse.typeArgument); }, growable: true); return result; } diff --git a/pkg/front_end/lib/src/fasta/builder/fixed_type_builder.dart b/pkg/front_end/lib/src/fasta/builder/fixed_type_builder.dart index 44e408fc314..92bcd1d04f1 100644 --- a/pkg/front_end/lib/src/fasta/builder/fixed_type_builder.dart +++ b/pkg/front_end/lib/src/fasta/builder/fixed_type_builder.dart @@ -48,7 +48,12 @@ class FixedTypeBuilder extends TypeBuilder { } @override - DartType build(LibraryBuilder library) { + DartType build(LibraryBuilder library, TypeUse typeUse) { + return type; + } + + @override + DartType buildAliased(LibraryBuilder library, TypeUse typeUse) { return type; } diff --git a/pkg/front_end/lib/src/fasta/builder/formal_parameter_builder.dart b/pkg/front_end/lib/src/fasta/builder/formal_parameter_builder.dart index 68f16e3e29f..283204969d4 100644 --- a/pkg/front_end/lib/src/fasta/builder/formal_parameter_builder.dart +++ b/pkg/front_end/lib/src/fasta/builder/formal_parameter_builder.dart @@ -145,7 +145,7 @@ class FormalParameterBuilder extends ModifierBuilderImpl VariableDeclaration build( SourceLibraryBuilder library, int functionNestingLevel) { if (variable == null) { - DartType? builtType = type?.build(library); + DartType? builtType = type?.build(library, TypeUse.parameterType); variable = new VariableDeclarationImpl( name == noNameSentinel ? null : name, functionNestingLevel, type: builtType, diff --git a/pkg/front_end/lib/src/fasta/builder/function_type_builder.dart b/pkg/front_end/lib/src/fasta/builder/function_type_builder.dart index f972a4d0ad8..30493a80c19 100644 --- a/pkg/front_end/lib/src/fasta/builder/function_type_builder.dart +++ b/pkg/front_end/lib/src/fasta/builder/function_type_builder.dart @@ -12,6 +12,7 @@ import 'package:kernel/ast.dart' NamedType, Supertype, TypeParameter; +import 'package:kernel/src/unaliasing.dart'; import '../fasta_codes.dart' show messageSupertypeIsFunction, noLength; @@ -84,19 +85,29 @@ class FunctionTypeBuilder extends TypeBuilder { } @override - FunctionType build(LibraryBuilder library) { - return _type ??= _buildInternal(library); + FunctionType build(LibraryBuilder library, TypeUse typeUse) { + return _type ??= _buildInternal(library, typeUse) as FunctionType; } - FunctionType _buildInternal(LibraryBuilder library) { + DartType _buildInternal(LibraryBuilder library, TypeUse typeUse) { + DartType aliasedType = buildAliased(library, typeUse); + return unalias(aliasedType, + legacyEraseAliases: !library.isNonNullableByDefault); + } + + @override + DartType buildAliased(LibraryBuilder library, TypeUse typeUse) { DartType builtReturnType = - returnType?.build(library) ?? const DynamicType(); + returnType?.buildAliased(library, TypeUse.returnType) ?? + const DynamicType(); List positionalParameters = []; List? namedParameters; int requiredParameterCount = 0; if (formals != null) { for (ParameterBuilder formal in formals!) { - DartType type = formal.type?.build(library) ?? const DynamicType(); + DartType type = + formal.type?.buildAliased(library, TypeUse.parameterType) ?? + const DynamicType(); if (formal.isPositional) { positionalParameters.add(type); if (formal.isRequiredPositional) requiredParameterCount++; @@ -116,7 +127,7 @@ class FunctionTypeBuilder extends TypeBuilder { for (TypeVariableBuilder t in typeVariables!) { typeParameters.add(t.parameter); // Build the bound to detect cycles in typedefs. - t.bound?.build(library); + t.bound?.build(library, TypeUse.typeParameterBound); } } return new FunctionType(positionalParameters, builtReturnType, diff --git a/pkg/front_end/lib/src/fasta/builder/future_or_type_declaration_builder.dart b/pkg/front_end/lib/src/fasta/builder/future_or_type_declaration_builder.dart index 277a4005a0c..fb47efbbfb1 100644 --- a/pkg/front_end/lib/src/fasta/builder/future_or_type_declaration_builder.dart +++ b/pkg/front_end/lib/src/fasta/builder/future_or_type_declaration_builder.dart @@ -20,15 +20,28 @@ class FutureOrTypeDeclarationBuilder extends BuiltinTypeDeclarationBuilder { String get debugName => "FutureOrTypeDeclarationBuilder"; @override - DartType buildType(LibraryBuilder library, - NullabilityBuilder nullabilityBuilder, List? arguments) { + DartType buildAliasedType( + LibraryBuilder library, + NullabilityBuilder nullabilityBuilder, + List? arguments, + TypeUse typeUse, + Uri fileUri, + int charOffset, + {required bool hasExplicitTypeArguments}) { return new FutureOrType( - arguments!.single.build(library), nullabilityBuilder.build(library)); + arguments!.single.buildAliased(library, TypeUse.typeArgument), + nullabilityBuilder.build(library)); } @override - DartType buildTypeWithBuiltArguments(LibraryBuilder library, - Nullability nullability, List arguments) { + DartType buildAliasedTypeWithBuiltArguments( + LibraryBuilder library, + Nullability nullability, + List arguments, + TypeUse typeUse, + Uri fileUri, + int charOffset, + {required bool hasExplicitTypeArguments}) { return new FutureOrType(arguments.single, nullability); } } diff --git a/pkg/front_end/lib/src/fasta/builder/invalid_type_declaration_builder.dart b/pkg/front_end/lib/src/fasta/builder/invalid_type_declaration_builder.dart index 5f2b68b52cc..82d2ccceece 100644 --- a/pkg/front_end/lib/src/fasta/builder/invalid_type_declaration_builder.dart +++ b/pkg/front_end/lib/src/fasta/builder/invalid_type_declaration_builder.dart @@ -33,15 +33,29 @@ class InvalidTypeDeclarationBuilder extends TypeDeclarationBuilderImpl Uri? get fileUri => message.uri; @override - DartType buildType(LibraryBuilder library, - NullabilityBuilder nullabilityBuilder, List? arguments) { - return buildTypeWithBuiltArguments(library, null, null); + DartType buildAliasedType( + LibraryBuilder library, + NullabilityBuilder nullabilityBuilder, + List? arguments, + TypeUse typeUse, + Uri fileUri, + int charOffset, + {required bool hasExplicitTypeArguments}) { + return buildAliasedTypeWithBuiltArguments( + library, null, null, typeUse, fileUri, charOffset, + hasExplicitTypeArguments: hasExplicitTypeArguments); } /// [Arguments] have already been built. @override - DartType buildTypeWithBuiltArguments(LibraryBuilder library, - Nullability? nullability, List? arguments) { + DartType buildAliasedTypeWithBuiltArguments( + LibraryBuilder library, + Nullability? nullability, + List? arguments, + TypeUse typeUse, + Uri fileUri, + int charOffset, + {required bool hasExplicitTypeArguments}) { if (!suppressMessage) { library.addProblem(message.messageObject, message.charOffset, message.length, message.uri, diff --git a/pkg/front_end/lib/src/fasta/builder/named_type_builder.dart b/pkg/front_end/lib/src/fasta/builder/named_type_builder.dart index f4f08fe95db..036806faae1 100644 --- a/pkg/front_end/lib/src/fasta/builder/named_type_builder.dart +++ b/pkg/front_end/lib/src/fasta/builder/named_type_builder.dart @@ -5,6 +5,8 @@ library fasta.named_type_builder; import 'package:kernel/ast.dart'; +import 'package:kernel/src/legacy_erasure.dart'; +import 'package:kernel/src/unaliasing.dart'; import '../fasta_codes.dart' show @@ -25,15 +27,11 @@ import '../fasta_codes.dart' templateTypeArgumentMismatch, templateTypeArgumentsOnTypeVariable, templateTypeNotFound; - import '../identifiers.dart' show Identifier, QualifiedName, flattenName; - import '../problems.dart' show unhandled; - import '../scope.dart'; - import '../source/source_library_builder.dart'; - +import '../uris.dart'; import 'builder.dart'; import 'builtin_type_declaration_builder.dart'; import 'class_builder.dart'; @@ -114,6 +112,8 @@ class NamedTypeBuilder extends TypeBuilder { DartType? _type; + final bool hasExplicitTypeArguments; + NamedTypeBuilder(this.name, this.nullabilityBuilder, {this.arguments, this.fileUri, @@ -122,7 +122,8 @@ class NamedTypeBuilder extends TypeBuilder { bool forTypeLiteral: false}) : assert(name is String || name is QualifiedName), this._instanceTypeVariableAccess = instanceTypeVariableAccess, - this._forTypeLiteral = forTypeLiteral; + this._forTypeLiteral = forTypeLiteral, + this.hasExplicitTypeArguments = arguments != null; NamedTypeBuilder.forDartType(DartType this._type, TypeDeclarationBuilder this._declaration, this.nullabilityBuilder, @@ -132,7 +133,8 @@ class NamedTypeBuilder extends TypeBuilder { InstanceTypeVariableAccessState.Unexpected, this.fileUri = null, this.charOffset = null, - this._forTypeLiteral = false; + this._forTypeLiteral = false, + this.hasExplicitTypeArguments = arguments != null; NamedTypeBuilder.fromTypeDeclarationBuilder( TypeDeclarationBuilder this._declaration, this.nullabilityBuilder, @@ -144,7 +146,8 @@ class NamedTypeBuilder extends TypeBuilder { : this.name = _declaration.name, this._forTypeLiteral = false, this._instanceTypeVariableAccess = instanceTypeVariableAccess, - this._type = type; + this._type = type, + this.hasExplicitTypeArguments = arguments != null; NamedTypeBuilder.forInvalidType( String this.name, this.nullabilityBuilder, LocatedMessage message, @@ -156,7 +159,8 @@ class NamedTypeBuilder extends TypeBuilder { this._instanceTypeVariableAccess = InstanceTypeVariableAccessState.Unexpected, this._forTypeLiteral = false, - this._type = const InvalidType(); + this._type = const InvalidType(), + this.hasExplicitTypeArguments = false; @override TypeDeclarationBuilder? get declaration => _declaration; @@ -378,55 +382,57 @@ class NamedTypeBuilder extends TypeBuilder { } @override - DartType build(LibraryBuilder library) { - return _type ??= _buildInternal(library); + DartType build(LibraryBuilder library, TypeUse typeUse) { + return _type ??= _buildInternal(library, typeUse); } - DartType _declarationBuildType(LibraryBuilder library) { - if (_forTypeLiteral) { - return declaration! - .buildTypeLiteralType(library, nullabilityBuilder, arguments); - } else { - return declaration!.buildType(library, nullabilityBuilder, arguments); - } + DartType _buildInternal(LibraryBuilder library, TypeUse typeUse) { + DartType aliasedType = _buildAliasedInternal(library, typeUse); + return unalias(aliasedType, + legacyEraseAliases: + !_forTypeLiteral && !library.isNonNullableByDefault); } - DartType _buildInternal(LibraryBuilder library) { + @override + DartType buildAliased(LibraryBuilder library, TypeUse typeUse) { + return _buildAliasedInternal(library, typeUse); + } + + DartType _buildAliasedInternal(LibraryBuilder library, TypeUse typeUse) { assert(declaration != null, "Declaration has not been resolved on $this."); - if (library is SourceLibraryBuilder) { - int uncheckedTypedefTypeCount = library.uncheckedTypedefTypes.length; - DartType builtType = _declarationBuildType(library); - // Set locations for new unchecked TypedefTypes for error reporting. - for (int i = uncheckedTypedefTypeCount; - i < library.uncheckedTypedefTypes.length; - ++i) { - // TODO(johnniwinther): Pass the uri/offset through the build methods - // to avoid this. - library.uncheckedTypedefTypes[i] - ..fileUri ??= fileUri - ..offset ??= charOffset; - } - return builtType; - } else { - return _declarationBuildType(library); - } + return declaration!.buildAliasedType(library, nullabilityBuilder, arguments, + typeUse, fileUri ?? missingUri, charOffset ?? TreeNode.noOffset, + hasExplicitTypeArguments: hasExplicitTypeArguments); } @override Supertype? buildSupertype(LibraryBuilder library) { TypeDeclarationBuilder declaration = this.declaration!; if (declaration is ClassBuilder) { - if (declaration.isNullClass && !library.mayImplementRestrictedTypes) { - library.addProblem( - templateExtendingRestricted.withArguments(declaration.name), - charOffset!, - noLength, - fileUri); + if (declaration.isNullClass) { + if (!library.mayImplementRestrictedTypes) { + library.addProblem( + templateExtendingRestricted.withArguments(declaration.name), + charOffset!, + noLength, + fileUri); + } + } + DartType type = build(library, TypeUse.superType); + if (type is InterfaceType) { + if (!library.isNonNullableByDefault) { + // This "normalizes" type argument `Never*` to `Null`. + type = legacyErasure(type) as InterfaceType; + } + return new Supertype(type.classNode, type.typeArguments); + } else if (type is FutureOrType) { + return new Supertype(declaration.cls, [type.typeArgument]); + } else if (type is NullType) { + return new Supertype(declaration.cls, []); } - return declaration.buildSupertype(library, arguments); } else if (declaration is TypeAliasBuilder) { TypeAliasBuilder aliasBuilder = declaration; - DartType type = build(library); + DartType type = build(library, TypeUse.superType); if (type is InterfaceType && type.nullability != Nullability.nullable) { return new Supertype(type.classNode, type.typeArguments); } else if (type is NullType) { @@ -490,7 +496,7 @@ class NamedTypeBuilder extends TypeBuilder { return declaration.buildMixedInType(library, arguments); } else if (declaration is TypeAliasBuilder) { TypeAliasBuilder aliasBuilder = declaration; - DartType type = build(library); + DartType type = build(library, TypeUse.mixedInType); if (type is InterfaceType && type.nullability != Nullability.nullable) { return new Supertype(type.classNode, type.typeArguments); } diff --git a/pkg/front_end/lib/src/fasta/builder/never_type_declaration_builder.dart b/pkg/front_end/lib/src/fasta/builder/never_type_declaration_builder.dart index 2e2c1b50bca..20389edc3dc 100644 --- a/pkg/front_end/lib/src/fasta/builder/never_type_declaration_builder.dart +++ b/pkg/front_end/lib/src/fasta/builder/never_type_declaration_builder.dart @@ -10,27 +10,40 @@ import 'builtin_type_declaration_builder.dart'; import 'library_builder.dart'; import 'nullability_builder.dart'; import 'type_builder.dart'; +import '../uris.dart'; class NeverTypeDeclarationBuilder extends BuiltinTypeDeclarationBuilder { final LibraryBuilder coreLibrary; NeverTypeDeclarationBuilder(DartType type, this.coreLibrary, int charOffset) : super("Never", type, coreLibrary, charOffset) { - assert(coreLibrary.importUri == Uri.parse('dart:core')); + assert(coreLibrary.importUri == dartCore); } @override String get debugName => "NeverTypeDeclarationBuilder"; @override - DartType buildType(LibraryBuilder library, - NullabilityBuilder nullabilityBuilder, List? arguments) { + DartType buildAliasedType( + LibraryBuilder library, + NullabilityBuilder nullabilityBuilder, + List? arguments, + TypeUse typeUse, + Uri fileUri, + int charOffset, + {required bool hasExplicitTypeArguments}) { return type.withDeclaredNullability(nullabilityBuilder.build(library)); } @override - DartType buildTypeWithBuiltArguments(LibraryBuilder library, - Nullability nullability, List arguments) { + DartType buildAliasedTypeWithBuiltArguments( + LibraryBuilder library, + Nullability nullability, + List arguments, + TypeUse typeUse, + Uri fileUri, + int charOffset, + {required bool hasExplicitTypeArguments}) { return type.withDeclaredNullability(nullability); } } diff --git a/pkg/front_end/lib/src/fasta/builder/null_type_declaration_builder.dart b/pkg/front_end/lib/src/fasta/builder/null_type_declaration_builder.dart index 818c6f05dae..945aa079b17 100644 --- a/pkg/front_end/lib/src/fasta/builder/null_type_declaration_builder.dart +++ b/pkg/front_end/lib/src/fasta/builder/null_type_declaration_builder.dart @@ -20,14 +20,26 @@ class NullTypeDeclarationBuilder extends BuiltinTypeDeclarationBuilder { String get debugName => "NullTypeBuilder"; @override - DartType buildType(LibraryBuilder library, - NullabilityBuilder nullabilityBuilder, List? arguments) { + DartType buildAliasedType( + LibraryBuilder library, + NullabilityBuilder nullabilityBuilder, + List? arguments, + TypeUse typeUse, + Uri fileUri, + int charOffset, + {required bool hasExplicitTypeArguments}) { return type; } @override - DartType buildTypeWithBuiltArguments(LibraryBuilder library, - Nullability nullability, List arguments) { + DartType buildAliasedTypeWithBuiltArguments( + LibraryBuilder library, + Nullability nullability, + List arguments, + TypeUse typeUse, + Uri fileUri, + int charOffset, + {required bool hasExplicitTypeArguments}) { return type; } } diff --git a/pkg/front_end/lib/src/fasta/builder/type_alias_builder.dart b/pkg/front_end/lib/src/fasta/builder/type_alias_builder.dart index ad7bceb640f..3b977bc0672 100644 --- a/pkg/front_end/lib/src/fasta/builder/type_alias_builder.dart +++ b/pkg/front_end/lib/src/fasta/builder/type_alias_builder.dart @@ -5,9 +5,6 @@ library fasta.function_type_alias_builder; import 'package:kernel/ast.dart'; -import 'package:kernel/src/legacy_erasure.dart'; - -import 'package:kernel/type_algebra.dart' show substitute, uniteNullabilities; import '../fasta_codes.dart' show @@ -55,12 +52,7 @@ abstract class TypeAliasBuilder implements TypeDeclarationBuilder { DartType buildThisType(); - /// [arguments] have already been built. - @override - DartType buildTypeWithBuiltArguments(LibraryBuilder library, - Nullability nullability, List? arguments); - - List buildTypeArguments( + List buildAliasedTypeArguments( LibraryBuilder library, List? arguments); /// Returns `true` if this typedef is an alias of the `Null` type. @@ -153,81 +145,50 @@ abstract class TypeAliasBuilderImpl extends TypeDeclarationBuilderImpl /// [arguments] have already been built. @override - DartType buildTypeWithBuiltArguments(LibraryBuilder library, - Nullability nullability, List? arguments) { - DartType thisType = buildThisType(); - if (const DynamicType() == thisType) return thisType; - Nullability adjustedNullability = - isNullAlias ? Nullability.nullable : nullability; - DartType result = thisType.withDeclaredNullability(adjustedNullability); - // TODO(johnniwinther): Couldn't [arguments] be null and - // `typedef.typeParameters` be non-empty? - if (typedef.typeParameters.isEmpty && arguments == null) return result; - Map substitution = {}; - for (int i = 0; i < typedef.typeParameters.length; i++) { - substitution[typedef.typeParameters[i]] = arguments![i]; + DartType buildAliasedTypeWithBuiltArguments( + LibraryBuilder library, + Nullability nullability, + List? arguments, + TypeUse typeUse, + Uri fileUri, + int charOffset, + {required bool hasExplicitTypeArguments}) { + buildThisType(); + TypedefType type = new TypedefType(typedef, nullability, arguments); + if (library is SourceLibraryBuilder) { + if (typeVariablesCount != 0) { + library.registerBoundsCheck(type, fileUri, charOffset, typeUse, + inferred: !hasExplicitTypeArguments); + } + if (!library.libraryFeatures.genericMetadata.isEnabled) { + library.registerGenericFunctionTypeCheck(type, fileUri, charOffset); + } } - // The following adds the built type to the list of unchecked typedef types - // of the client library. It is needed because the type is built unaliased, - // and at the time of the check it wouldn't be possible to see if the type - // arguments to the generic typedef conform to the bounds without preserving - // the TypedefType for the delayed check. - if (library is SourceLibraryBuilder && - arguments!.isNotEmpty && - thisType is! FunctionType) { - library.uncheckedTypedefTypes.add(new UncheckedTypedefType( - new TypedefType(typedef, nullability, arguments))); - } - return substitute(result, substitution); + + return type; } @override - DartType buildType(LibraryBuilder library, - NullabilityBuilder nullabilityBuilder, List? arguments) { - return buildTypeInternal(library, nullabilityBuilder, arguments, - performLegacyErasure: true); - } - - @override - DartType buildTypeLiteralType(LibraryBuilder library, - NullabilityBuilder nullabilityBuilder, List? arguments) { - return buildTypeInternal(library, nullabilityBuilder, arguments, - performLegacyErasure: false); - } - - DartType buildTypeInternal(LibraryBuilder library, - NullabilityBuilder nullabilityBuilder, List? arguments, - {required bool performLegacyErasure}) { + DartType buildAliasedType( + LibraryBuilder library, + NullabilityBuilder nullabilityBuilder, + List? arguments, + TypeUse typeUse, + Uri fileUri, + int charOffset, + {required bool hasExplicitTypeArguments}) { DartType thisType = buildThisType(); if (thisType is InvalidType) return thisType; - // The following won't work if the right-hand side of the typedef is a - // FutureOr. - Nullability nullability; - if (isNullAlias) { - // Null is always nullable. - nullability = Nullability.nullable; - } else if (!parent.isNonNullableByDefault || - !library.isNonNullableByDefault) { - // The typedef is defined or used in an opt-out library so the nullability - // is based on the use site alone. - nullability = nullabilityBuilder.build(library); - } else { - nullability = uniteNullabilities( - thisType.declaredNullability, nullabilityBuilder.build(library)); - } - DartType result; - if (typedef.typeParameters.isEmpty && arguments == null) { - result = thisType.withDeclaredNullability(nullability); - } else { - // Otherwise, substitute. - result = buildTypeWithBuiltArguments( - library, nullability, buildTypeArguments(library, arguments)); - } - if (performLegacyErasure && !library.isNonNullableByDefault) { - result = legacyErasure(result); - } - return result; + Nullability nullability = nullabilityBuilder.build(library); + return buildAliasedTypeWithBuiltArguments( + library, + nullability, + buildAliasedTypeArguments(library, arguments), + typeUse, + fileUri, + charOffset, + hasExplicitTypeArguments: hasExplicitTypeArguments); } TypeDeclarationBuilder? _cachedUnaliasedDeclaration; diff --git a/pkg/front_end/lib/src/fasta/builder/type_builder.dart b/pkg/front_end/lib/src/fasta/builder/type_builder.dart index 72d12fa9fe7..0090e6f7246 100644 --- a/pkg/front_end/lib/src/fasta/builder/type_builder.dart +++ b/pkg/front_end/lib/src/fasta/builder/type_builder.dart @@ -13,6 +13,249 @@ import 'nullability_builder.dart'; import 'type_declaration_builder.dart'; import 'type_variable_builder.dart'; +enum TypeUse { + /// A type used as the type of a parameter. + /// + /// For instance `X` and `Y` in + /// + /// method(X p, {Y q}) {} + /// + parameterType, + + /// A type used as the type of a field. + /// + /// For instance `X` and `Y` in + /// + /// X topLevelField; + /// class Class { + /// Y instanceField; + /// } + /// + fieldType, + + /// A type used as the return type of a function. + /// + /// For instance `X` in + /// + /// X method() { ... } + /// + returnType, + + /// A type used as a type argument to a constructor invocation. + /// + /// For instance `X` in + /// + /// class Class {} + /// method() => new Class(); + /// + constructorTypeArgument, + + /// A type used as a type argument to a redirecting factory constructor + /// declaration. + /// + /// For instance `X` in + /// + /// class Class { + /// Class(); + /// factory Class.redirect() = Class; + /// } + /// + redirectionTypeArgument, + + /// A type used as the bound of a type parameter. + /// + /// For instance `X` and `Y` in + /// + /// method() {} + /// class Class {} + /// + typeParameterBound, + + /// A type computed as the default type for a type parameter. + /// + /// For instance the type `X` computed for `T` and the type `dynamic` computed + /// for `S`. + /// + /// method() {} + /// class Class {} + /// + typeParameterDefaultType, + + /// A type used as a type argument in the instantiation of a tear off. + /// + /// For instance `X` and `Y` in + /// + /// class Class {} + /// method() { + /// Class.new; + /// method; + /// } + /// + tearOffTypeArgument, + + /// A type used in an extends, with or implements clause. + /// + /// For instance `X`, `Y`, `Z` in + /// + /// class Class extends X with Y implements Z {} + /// + // TODO(johnniwinther): The probably enclosed the mixin on clause. Is this + // a correct handling wrt well-boundedness? + superType, + + /// A type used in a with clause. + /// + /// For instance `X` in + /// + /// class Class extends X {} + /// + /// This type use creates an intermediate type used for mixin inference. The + /// type is not check for well-boundedness and contains [UnknownType] where + /// type arguments are omitted. + mixedInType, + + /// A type used in the on clause of an extension declaration. + /// + /// For instance `X` in + /// + /// extension Extension on X {} + /// + extensionOnType, + + /// A type used as the definition of a typedef. + /// + /// For instance `X`, `void Function()` in + /// + /// typedef Typedef1 = X; + /// typedef void Typedef2(); // The unaliased type is `void Function()`. + /// + typedefAlias, + + /// An internally created function type used when build local functions. + functionSignature, + + /// The this type of an enum. + // TODO(johnniwinther): This is doesn't currently have the correct value + // and/or well-boundedness checking. + enumSelfType, + + /// A type used as a type literal. + /// + /// For instance `X` in + /// + /// method() => X; + /// + /// where `X` is the name of a class. + typeLiteral, + + /// A type used as a type argument to a literal. + /// + /// For instance `X`, `Y`, `Z`, and `W` in + /// + /// method() { + /// []; + /// {}; + /// {}; + /// } + /// + literalTypeArgument, + + /// A type used as a type argument in an invocation. + /// + /// For instance `X`, `Y`, and `Z` in + /// + /// staticMethod(Class c, void Function() f) { + /// staticMethod(c, f); + /// c.instanceMethod(); + /// f(); + /// } + /// class Class { + /// instanceMethod() {} + /// } + invocationTypeArgument, + + /// A type used as the type in an is-test. + /// + /// For instance `X` in + /// + /// method(o) => o is X; + /// + isType, + + /// A type used as the type in an as-cast. + /// + /// For instance `X` in + /// + /// method(o) => o as X; + /// + asType, + + /// A type used as the type of local variable. + /// + /// For instance `X` in + /// + /// method() { + /// X local; + /// } + /// + variableType, + + /// A type used as the catch type in a catch clause. + /// + /// For instance `X` in + /// + /// method() { + /// try { + /// } on X catch (e) { + /// } + /// } + /// + catchType, + + /// A type used as an instantiation argument. + /// + /// For instance `X` in + /// + /// method(void Function() f) { + /// f; + /// } + /// + instantiation, + + /// A type used as a type argument within another type. + /// + /// For instance `X`, `Y`, `Z` and `W` in + /// + /// method(List a, Y Function(Z) f) {} + /// class Class implements List {} + /// + typeArgument, + + /// The default type of a type parameter used as the type argument in a raw + /// type. + /// + /// For instance `X` implicitly inside `Class` in the type of `cls` in + /// + /// class Class {} + /// Class cls; + /// + defaultTypeAsTypeArgument, + + /// A type from a deferred library. This is an error case. + /// + /// For instance `X` in + /// + /// import 'foo.dart' deferred as prefix; + /// + /// prefix.X field; + /// + deferredTypeError, + + /// A type used as a type argument in the construction of a type through the + /// macro API. + macroTypeArgument, +} + abstract class TypeBuilder { const TypeBuilder(); @@ -60,7 +303,23 @@ abstract class TypeBuilder { String get fullNameForErrors => "${printOn(new StringBuffer())}"; - DartType build(LibraryBuilder library); + /// Creates the [DartType] from this [TypeBuilder] that doesn't contain + /// [TypedefType]. + /// + /// [library] is used to determine nullabilities and for registering well- + /// boundedness checks on the created type. [typeUse] describes how the + /// type is used which determine which well-boundedness checks are applied. + DartType build(LibraryBuilder library, TypeUse typeUse); + + /// Creates the [DartType] from this [TypeBuilder] that contains + /// [TypedefType]. This is used to create types internal on which well- + /// boundedness checks can be permit. Calls from outside the [TypeBuilder] + /// subclasses should generally use [build] instead. + /// + /// [library] is used to determine nullabilities and for registering well- + /// boundedness checks on the created type. [typeUse] describes how the + /// type is used which determine which well-boundedness checks are applied. + DartType buildAliased(LibraryBuilder library, TypeUse typeUse); Supertype? buildSupertype(LibraryBuilder library); diff --git a/pkg/front_end/lib/src/fasta/builder/type_declaration_builder.dart b/pkg/front_end/lib/src/fasta/builder/type_declaration_builder.dart index 1e51ffb8ba4..d8df1533497 100644 --- a/pkg/front_end/lib/src/fasta/builder/type_declaration_builder.dart +++ b/pkg/front_end/lib/src/fasta/builder/type_declaration_builder.dart @@ -33,22 +33,32 @@ abstract class TypeDeclarationBuilder implements ModifierBuilder { /// Creates the [DartType] corresponding to this declaration applied with /// [arguments] in [library] with the syntactical nullability defined by - /// [nullabilityBuilder]. + /// [nullabilityBuilder]. The created type will contain [TypedefType] instead + /// of their unaliased type. /// /// For instance, if this declaration is a class declaration `C`, then /// an occurrence of `C?` in a null safe library `lib1` would call /// `buildType(, , [])` to create `C?`, or `C` in a /// legacy library `lib2` call `buildType(, <> []` to create /// `C*`. - DartType buildType(LibraryBuilder library, - NullabilityBuilder nullabilityBuilder, List? arguments); - - DartType buildTypeLiteralType(LibraryBuilder library, - NullabilityBuilder nullabilityBuilder, List? arguments); + DartType buildAliasedType( + LibraryBuilder library, + NullabilityBuilder nullabilityBuilder, + List? arguments, + TypeUse typeUse, + Uri fileUri, + int charOffset, + {required bool hasExplicitTypeArguments}); /// [arguments] have already been built. - DartType buildTypeWithBuiltArguments(LibraryBuilder library, - Nullability nullability, List arguments); + DartType buildAliasedTypeWithBuiltArguments( + LibraryBuilder library, + Nullability nullability, + List arguments, + TypeUse typeUse, + Uri fileUri, + int charOffset, + {required bool hasExplicitTypeArguments}); } abstract class TypeDeclarationBuilderImpl extends ModifierBuilderImpl @@ -85,10 +95,4 @@ abstract class TypeDeclarationBuilderImpl extends ModifierBuilderImpl @override int get typeVariablesCount => 0; - - @override - DartType buildTypeLiteralType(LibraryBuilder library, - NullabilityBuilder nullabilityBuilder, List? arguments) { - return buildType(library, nullabilityBuilder, arguments); - } } diff --git a/pkg/front_end/lib/src/fasta/builder/type_variable_builder.dart b/pkg/front_end/lib/src/fasta/builder/type_variable_builder.dart index 79a2d156f36..3cc96e2c3e3 100644 --- a/pkg/front_end/lib/src/fasta/builder/type_variable_builder.dart +++ b/pkg/front_end/lib/src/fasta/builder/type_variable_builder.dart @@ -15,6 +15,7 @@ import '../fasta_codes.dart' import '../scope.dart'; import '../source/source_library_builder.dart'; +import '../uris.dart'; import '../util/helpers.dart'; import 'builder.dart'; @@ -119,11 +120,15 @@ class TypeVariableBuilder extends TypeDeclarationBuilderImpl { } @override - DartType buildType(LibraryBuilder library, - NullabilityBuilder nullabilityBuilder, List? arguments) { + DartType buildAliasedType( + LibraryBuilder library, + NullabilityBuilder nullabilityBuilder, + List? arguments, + TypeUse typeUse, + Uri fileUri, + int charOffset, + {required bool hasExplicitTypeArguments}) { if (arguments != null) { - int charOffset = -1; // TODO(ahe): Provide these. - Uri? fileUri = null; // TODO(ahe): Provide these. library.addProblem( templateTypeArgumentsOnTypeVariable.withArguments(name), charOffset, @@ -148,26 +153,34 @@ class TypeVariableBuilder extends TypeDeclarationBuilderImpl { } else { nullability = nullabilityBuilder.build(library); } - TypeParameterType type = - buildTypeWithBuiltArguments(library, nullability, null); + TypeParameterType type = buildAliasedTypeWithBuiltArguments( + library, nullability, null, typeUse, fileUri, charOffset, + hasExplicitTypeArguments: hasExplicitTypeArguments); if (needsPostUpdate) { if (library is SourceLibraryBuilder) { - library.registerPendingNullability(fileUri!, charOffset, type); + library.registerPendingNullability( + this.fileUri!, this.charOffset, type); } else { library.addProblem( templateInternalProblemUnfinishedTypeVariable.withArguments( name, library.importUri), - charOffset, + this.charOffset, name.length, - fileUri); + this.fileUri); } } return type; } @override - TypeParameterType buildTypeWithBuiltArguments(LibraryBuilder library, - Nullability nullability, List? arguments) { + TypeParameterType buildAliasedTypeWithBuiltArguments( + LibraryBuilder library, + Nullability nullability, + List? arguments, + TypeUse typeUse, + Uri fileUri, + int charOffset, + {required bool hasExplicitTypeArguments}) { if (arguments != null) { int charOffset = -1; // TODO(ahe): Provide these. Uri? fileUri = null; // TODO(ahe): Provide these. @@ -183,10 +196,17 @@ class TypeVariableBuilder extends TypeDeclarationBuilderImpl { void finish( LibraryBuilder library, ClassBuilder object, TypeBuilder dynamicType) { if (isPatch) return; - DartType objectType = - object.buildType(library, library.nullableBuilder, null); + DartType objectType = object.buildAliasedType( + library, + library.nullableBuilder, + null, + TypeUse.typeParameterBound, + fileUri ?? missingUri, + charOffset, + hasExplicitTypeArguments: false); if (identical(parameter.bound, TypeParameter.unsetBoundSentinel)) { - parameter.bound = bound?.build(library) ?? objectType; + parameter.bound = + bound?.build(library, TypeUse.typeParameterBound) ?? objectType; } // If defaultType is not set, initialize it to dynamic, unless the bound is // explicitly specified as Object, in which case defaultType should also be @@ -194,10 +214,11 @@ class TypeVariableBuilder extends TypeDeclarationBuilderImpl { // explicit Object bound results in Object as the instantiated type. if (identical( parameter.defaultType, TypeParameter.unsetDefaultTypeSentinel)) { - parameter.defaultType = defaultType?.build(library) ?? + parameter.defaultType = defaultType?.build( + library, TypeUse.typeParameterDefaultType) ?? (bound != null && parameter.bound == objectType ? objectType - : dynamicType.build(library)); + : dynamicType.build(library, TypeUse.typeParameterDefaultType)); } } diff --git a/pkg/front_end/lib/src/fasta/dill/dill_class_builder.dart b/pkg/front_end/lib/src/fasta/dill/dill_class_builder.dart index 66976b68c0f..b245233985c 100644 --- a/pkg/front_end/lib/src/fasta/dill/dill_class_builder.dart +++ b/pkg/front_end/lib/src/fasta/dill/dill_class_builder.dart @@ -134,20 +134,21 @@ class DillClassBuilder extends ClassBuilderImpl { int get typeVariablesCount => cls.typeParameters.length; @override - List buildTypeArguments( + List buildAliasedTypeArguments( LibraryBuilder library, List? arguments) { // For performance reasons, [typeVariables] aren't restored from [target]. // So, if [arguments] is null, the default types should be retrieved from // [cls.typeParameters]. if (arguments == null) { + // TODO(johnniwinther): Use i2b here when needed. return new List.generate(cls.typeParameters.length, (int i) => cls.typeParameters[i].defaultType, growable: true); } // [arguments] != null - return new List.generate( - arguments.length, (int i) => arguments[i].build(library), + return new List.generate(arguments.length, + (int i) => arguments[i].buildAliased(library, TypeUse.typeArgument), growable: true); } diff --git a/pkg/front_end/lib/src/fasta/dill/dill_library_builder.dart b/pkg/front_end/lib/src/fasta/dill/dill_library_builder.dart index a1584e39003..7c94a5a9286 100644 --- a/pkg/front_end/lib/src/fasta/dill/dill_library_builder.dart +++ b/pkg/front_end/lib/src/fasta/dill/dill_library_builder.dart @@ -282,10 +282,6 @@ class DillLibraryBuilder extends LibraryBuilderImpl { } void addTypedef(Typedef typedef, Map? tearOffs) { - DartType? type = typedef.type; - if (type is FunctionType && type.typedefType == null) { - unhandled("null", "addTypedef", typedef.fileOffset, typedef.fileUri); - } _addBuilder( typedef.name, new DillTypeAliasBuilder(typedef, tearOffs, this)); } diff --git a/pkg/front_end/lib/src/fasta/dill/dill_loader.dart b/pkg/front_end/lib/src/fasta/dill/dill_loader.dart index 4665e61f7c0..bc0090870bb 100644 --- a/pkg/front_end/lib/src/fasta/dill/dill_loader.dart +++ b/pkg/front_end/lib/src/fasta/dill/dill_loader.dart @@ -38,6 +38,8 @@ import '../source/source_loader.dart' show SourceLoader; import '../ticker.dart' show Ticker; +import '../uris.dart'; + import 'dill_library_builder.dart' show DillLibraryBuilder; import 'dill_target.dart' show DillTarget; @@ -226,6 +228,8 @@ class DillLoader extends Loader { List? context, bool problemOnLibrary: false, List? involvedFiles}) { + assert( + fileUri != missingUri, "Message unexpectedly reported on missing uri."); severity ??= message.code.severity; if (severity == Severity.ignored) return null; String trace = """ diff --git a/pkg/front_end/lib/src/fasta/dill/dill_type_alias_builder.dart b/pkg/front_end/lib/src/fasta/dill/dill_type_alias_builder.dart index e777b52d164..92df2a09801 100644 --- a/pkg/front_end/lib/src/fasta/dill/dill_type_alias_builder.dart +++ b/pkg/front_end/lib/src/fasta/dill/dill_type_alias_builder.dart @@ -73,12 +73,13 @@ class DillTypeAliasBuilder extends TypeAliasBuilderImpl { } @override - List buildTypeArguments( + List buildAliasedTypeArguments( LibraryBuilder library, List? arguments) { // For performance reasons, [typeVariables] aren't restored from [target]. // So, if [arguments] is null, the default types should be retrieved from // [cls.typeParameters]. if (arguments == null) { + // TODO(johnniwinther): Use i2b here when needed. List result = new List.generate(typedef.typeParameters.length, (int i) { return typedef.typeParameters[i].defaultType; @@ -89,7 +90,7 @@ class DillTypeAliasBuilder extends TypeAliasBuilderImpl { // [arguments] != null List result = new List.generate(arguments.length, (int i) { - return arguments[i].build(library); + return arguments[i].buildAliased(library, TypeUse.typeArgument); }, growable: true); return result; } diff --git a/pkg/front_end/lib/src/fasta/fasta_codes_cfe_generated.dart b/pkg/front_end/lib/src/fasta/fasta_codes_cfe_generated.dart index f786f84442d..f97e08ef24f 100644 --- a/pkg/front_end/lib/src/fasta/fasta_codes_cfe_generated.dart +++ b/pkg/front_end/lib/src/fasta/fasta_codes_cfe_generated.dart @@ -1345,6 +1345,46 @@ Message _withArgumentsForInLoopTypeNotIterablePartNullability( }); } +// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. +const Template< + Message Function( + DartType _type, DartType _type2, bool isNonNullableByDefault)> + templateGenericFunctionTypeAsTypeArgumentThroughTypedef = const Template< + Message Function( + DartType _type, DartType _type2, bool isNonNullableByDefault)>( + problemMessageTemplate: + r"""Generic function type '#type' used as a type argument through typedef '#type2'.""", + correctionMessageTemplate: + r"""Try providing a non-generic function type explicitly.""", + withArguments: + _withArgumentsGenericFunctionTypeAsTypeArgumentThroughTypedef); + +// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. +const Code< + Message Function( + DartType _type, DartType _type2, bool isNonNullableByDefault)> + codeGenericFunctionTypeAsTypeArgumentThroughTypedef = const Code< + Message Function( + DartType _type, DartType _type2, bool isNonNullableByDefault)>( + "GenericFunctionTypeAsTypeArgumentThroughTypedef", + analyzerCodes: ["GENERIC_FUNCTION_CANNOT_BE_TYPE_ARGUMENT"]); + +// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. +Message _withArgumentsGenericFunctionTypeAsTypeArgumentThroughTypedef( + DartType _type, DartType _type2, bool isNonNullableByDefault) { + TypeLabeler labeler = new TypeLabeler(isNonNullableByDefault); + List typeParts = labeler.labelType(_type); + List type2Parts = labeler.labelType(_type2); + String type = typeParts.join(); + String type2 = type2Parts.join(); + return new Message(codeGenericFunctionTypeAsTypeArgumentThroughTypedef, + problemMessage: + """Generic function type '${type}' used as a type argument through typedef '${type2}'.""" + + labeler.originMessages, + correctionMessage: """Try providing a non-generic function type explicitly.""", + arguments: {'type': _type, 'type2': _type2}); +} + // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Template templateGenericFunctionTypeInferredAsActualTypeArgument = const Template< @@ -1531,224 +1571,6 @@ Message _withArgumentsIncorrectTypeArgument(DartType _type, DartType _type2, }); } -// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template< - Message Function(DartType _type, DartType _type2, String name, - String name2, bool isNonNullableByDefault)> - templateIncorrectTypeArgumentInReturnType = const Template< - Message Function(DartType _type, DartType _type2, String name, - String name2, bool isNonNullableByDefault)>( - problemMessageTemplate: - r"""Type argument '#type' doesn't conform to the bound '#type2' of the type variable '#name' on '#name2' in the return type.""", - correctionMessageTemplate: - r"""Try changing type arguments so that they conform to the bounds.""", - withArguments: _withArgumentsIncorrectTypeArgumentInReturnType); - -// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Code< - Message Function(DartType _type, DartType _type2, String name, - String name2, bool isNonNullableByDefault)> - codeIncorrectTypeArgumentInReturnType = const Code< - Message Function(DartType _type, DartType _type2, String name, - String name2, bool isNonNullableByDefault)>( - "IncorrectTypeArgumentInReturnType", - analyzerCodes: ["TYPE_ARGUMENT_NOT_MATCHING_BOUNDS"]); - -// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -Message _withArgumentsIncorrectTypeArgumentInReturnType(DartType _type, - DartType _type2, String name, String name2, bool isNonNullableByDefault) { - TypeLabeler labeler = new TypeLabeler(isNonNullableByDefault); - List typeParts = labeler.labelType(_type); - List type2Parts = labeler.labelType(_type2); - if (name.isEmpty) throw 'No name provided'; - name = demangleMixinApplicationName(name); - if (name2.isEmpty) throw 'No name provided'; - name2 = demangleMixinApplicationName(name2); - String type = typeParts.join(); - String type2 = type2Parts.join(); - return new Message(codeIncorrectTypeArgumentInReturnType, - problemMessage: - """Type argument '${type}' doesn't conform to the bound '${type2}' of the type variable '${name}' on '${name2}' in the return type.""" + - labeler.originMessages, - correctionMessage: """Try changing type arguments so that they conform to the bounds.""", - arguments: { - 'type': _type, - 'type2': _type2, - 'name': name, - 'name2': name2 - }); -} - -// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template< - Message Function( - DartType _type, - DartType _type2, - String name, - String name2, - String name3, - String name4, - bool isNonNullableByDefault)> - templateIncorrectTypeArgumentInSupertype = const Template< - Message Function( - DartType _type, - DartType _type2, - String name, - String name2, - String name3, - String name4, - bool isNonNullableByDefault)>( - problemMessageTemplate: - r"""Type argument '#type' doesn't conform to the bound '#type2' of the type variable '#name' on '#name2' in the supertype '#name3' of class '#name4'.""", - correctionMessageTemplate: - r"""Try changing type arguments so that they conform to the bounds.""", - withArguments: _withArgumentsIncorrectTypeArgumentInSupertype); - -// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Code< - Message Function( - DartType _type, - DartType _type2, - String name, - String name2, - String name3, - String name4, - bool isNonNullableByDefault)> codeIncorrectTypeArgumentInSupertype = - const Code< - Message Function( - DartType _type, - DartType _type2, - String name, - String name2, - String name3, - String name4, - bool isNonNullableByDefault)>( - "IncorrectTypeArgumentInSupertype", - analyzerCodes: ["TYPE_ARGUMENT_NOT_MATCHING_BOUNDS"]); - -// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -Message _withArgumentsIncorrectTypeArgumentInSupertype( - DartType _type, - DartType _type2, - String name, - String name2, - String name3, - String name4, - bool isNonNullableByDefault) { - TypeLabeler labeler = new TypeLabeler(isNonNullableByDefault); - List typeParts = labeler.labelType(_type); - List type2Parts = labeler.labelType(_type2); - if (name.isEmpty) throw 'No name provided'; - name = demangleMixinApplicationName(name); - if (name2.isEmpty) throw 'No name provided'; - name2 = demangleMixinApplicationName(name2); - if (name3.isEmpty) throw 'No name provided'; - name3 = demangleMixinApplicationName(name3); - if (name4.isEmpty) throw 'No name provided'; - name4 = demangleMixinApplicationName(name4); - String type = typeParts.join(); - String type2 = type2Parts.join(); - return new Message(codeIncorrectTypeArgumentInSupertype, - problemMessage: - """Type argument '${type}' doesn't conform to the bound '${type2}' of the type variable '${name}' on '${name2}' in the supertype '${name3}' of class '${name4}'.""" + - labeler.originMessages, - correctionMessage: - """Try changing type arguments so that they conform to the bounds.""", - arguments: { - 'type': _type, - 'type2': _type2, - 'name': name, - 'name2': name2, - 'name3': name3, - 'name4': name4 - }); -} - -// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template< - Message Function( - DartType _type, - DartType _type2, - String name, - String name2, - String name3, - String name4, - bool isNonNullableByDefault)> - templateIncorrectTypeArgumentInSupertypeInferred = const Template< - Message Function( - DartType _type, - DartType _type2, - String name, - String name2, - String name3, - String name4, - bool isNonNullableByDefault)>( - problemMessageTemplate: - r"""Inferred type argument '#type' doesn't conform to the bound '#type2' of the type variable '#name' on '#name2' in the supertype '#name3' of class '#name4'.""", - correctionMessageTemplate: - r"""Try specifying type arguments explicitly so that they conform to the bounds.""", - withArguments: _withArgumentsIncorrectTypeArgumentInSupertypeInferred); - -// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Code< - Message Function( - DartType _type, - DartType _type2, - String name, - String name2, - String name3, - String name4, - bool isNonNullableByDefault)> - codeIncorrectTypeArgumentInSupertypeInferred = const Code< - Message Function( - DartType _type, - DartType _type2, - String name, - String name2, - String name3, - String name4, - bool isNonNullableByDefault)>( - "IncorrectTypeArgumentInSupertypeInferred", - analyzerCodes: ["TYPE_ARGUMENT_NOT_MATCHING_BOUNDS"]); - -// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -Message _withArgumentsIncorrectTypeArgumentInSupertypeInferred( - DartType _type, - DartType _type2, - String name, - String name2, - String name3, - String name4, - bool isNonNullableByDefault) { - TypeLabeler labeler = new TypeLabeler(isNonNullableByDefault); - List typeParts = labeler.labelType(_type); - List type2Parts = labeler.labelType(_type2); - if (name.isEmpty) throw 'No name provided'; - name = demangleMixinApplicationName(name); - if (name2.isEmpty) throw 'No name provided'; - name2 = demangleMixinApplicationName(name2); - if (name3.isEmpty) throw 'No name provided'; - name3 = demangleMixinApplicationName(name3); - if (name4.isEmpty) throw 'No name provided'; - name4 = demangleMixinApplicationName(name4); - String type = typeParts.join(); - String type2 = type2Parts.join(); - return new Message(codeIncorrectTypeArgumentInSupertypeInferred, - problemMessage: - """Inferred type argument '${type}' doesn't conform to the bound '${type2}' of the type variable '${name}' on '${name2}' in the supertype '${name3}' of class '${name4}'.""" + - labeler.originMessages, - correctionMessage: - """Try specifying type arguments explicitly so that they conform to the bounds.""", - arguments: { - 'type': _type, - 'type2': _type2, - 'name': name, - 'name2': name2, - 'name3': name3, - 'name4': name4 - }); -} - // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Template< Message Function(DartType _type, DartType _type2, String name, diff --git a/pkg/front_end/lib/src/fasta/incremental_compiler.dart b/pkg/front_end/lib/src/fasta/incremental_compiler.dart index e19356770da..ef54d7092bf 100644 --- a/pkg/front_end/lib/src/fasta/incremental_compiler.dart +++ b/pkg/front_end/lib/src/fasta/incremental_compiler.dart @@ -135,6 +135,8 @@ import 'util/experiment_environment_getter.dart' import 'util/textual_outline.dart' show textualOutline; +import 'uris.dart' show dartCore; + import 'hybrid_file_system.dart' show HybridFileSystem; import 'kernel/hierarchy/hierarchy_builder.dart' show ClassHierarchyBuilder; @@ -655,7 +657,7 @@ class IncrementalCompiler implements IncrementalKernelGenerator { dillLibraryBuilder.exportScope.lookupLocalMember(name, setter: false); if (dillBuilder == null) { if ((name == 'dynamic' || name == 'Never') && - sourceLibraryBuilder.importUri == Uri.parse('dart:core')) { + sourceLibraryBuilder.importUri == dartCore) { // The source library builder for dart:core has synthetically // injected builders for `dynamic` and `Never` which do not have // corresponding classes in the AST. diff --git a/pkg/front_end/lib/src/fasta/kernel/body_builder.dart b/pkg/front_end/lib/src/fasta/kernel/body_builder.dart index a5fac56c8f6..6f25365c5ef 100644 --- a/pkg/front_end/lib/src/fasta/kernel/body_builder.dart +++ b/pkg/front_end/lib/src/fasta/kernel/body_builder.dart @@ -85,7 +85,7 @@ import '../source/source_enum_builder.dart'; import '../source/source_factory_builder.dart'; import '../source/source_field_builder.dart'; import '../source/source_function_builder.dart'; -import '../source/source_library_builder.dart' show SourceLibraryBuilder; +import '../source/source_library_builder.dart'; import '../source/source_procedure_builder.dart'; import '../source/stack_listener_impl.dart' show StackListenerImpl, offsetForToken; @@ -1010,7 +1010,8 @@ class BodyBuilder extends StackListenerImpl // `invalid-type`. TypeBuilder? type = pop() as TypeBuilder?; if (type != null) { - buildDartType(type, allowPotentiallyConstantType: false); + buildDartType(type, TypeUse.fieldType, + allowPotentiallyConstantType: false); } } pop(); // Annotations. @@ -1030,7 +1031,7 @@ class BodyBuilder extends StackListenerImpl _unaliasTypeAliasedConstructorInvocations(); _unaliasTypeAliasedFactoryInvocations(typeAliasedFactoryInvocations); _resolveRedirectingFactoryTargets(redirectingFactoryInvocations); - libraryBuilder.checkUncheckedTypedefTypes(typeEnvironment); + libraryBuilder.checkPendingBoundsChecks(typeEnvironment); if (hasDelayedActions) { assert( delayedActionPerformers != null, @@ -2193,7 +2194,7 @@ class BodyBuilder extends StackListenerImpl assert(forest.argumentsTypeArguments(arguments).isEmpty); forest.argumentsSetTypeArguments( arguments, - buildDartTypeArguments(typeArguments, + buildDartTypeArguments(typeArguments, TypeUse.invocationTypeArgument, allowPotentiallyConstantType: false)); } else { assert(typeArguments == null || @@ -3280,8 +3281,6 @@ class BodyBuilder extends StackListenerImpl ..fileOffset = identifier.charOffset ..fileEqualsOffset = offsetForToken(equalsToken); typeInferrer.assignedVariables.declare(variable); - libraryBuilder.checkBoundsInVariableDeclaration( - variable, typeEnvironment, uri); push(variable); } @@ -3363,7 +3362,8 @@ class BodyBuilder extends StackListenerImpl } TypeBuilder? unresolvedType = pop(NullValue.TypeBuilder) as TypeBuilder?; DartType? type = unresolvedType != null - ? buildDartType(unresolvedType, allowPotentiallyConstantType: false) + ? buildDartType(unresolvedType, TypeUse.variableType, + allowPotentiallyConstantType: false) : null; int modifiers = (lateToken != null ? lateMask : 0) | Modifier.validateVarFinalOrConst(varFinalOrConst?.lexeme); @@ -3805,7 +3805,8 @@ class BodyBuilder extends StackListenerImpl lengthOfSpan(leftBracket, leftBracket.endGroup)); typeArgument = const InvalidType(); } else { - typeArgument = buildDartType(typeArguments.single, + typeArgument = buildDartType( + typeArguments.single, TypeUse.literalTypeArgument, allowPotentiallyConstantType: false); typeArgument = instantiateToBounds( typeArgument, coreTypes.objectClass, libraryBuilder.library); @@ -3822,7 +3823,6 @@ class BodyBuilder extends StackListenerImpl expressions, isConst: constKeyword != null || constantContext == ConstantContext.inferred); - libraryBuilder.checkBoundsInListLiteral(node, typeEnvironment, uri); push(node); } @@ -3830,7 +3830,8 @@ class BodyBuilder extends StackListenerImpl Token leftBrace, List? setOrMapEntries) { DartType typeArgument; if (typeArguments != null) { - typeArgument = buildDartType(typeArguments.single, + typeArgument = buildDartType( + typeArguments.single, TypeUse.literalTypeArgument, allowPotentiallyConstantType: false); typeArgument = instantiateToBounds( typeArgument, coreTypes.objectClass, libraryBuilder.library); @@ -3861,7 +3862,6 @@ class BodyBuilder extends StackListenerImpl expressions, isConst: constKeyword != null || constantContext == ConstantContext.inferred); - libraryBuilder.checkBoundsInSetLiteral(node, typeEnvironment, uri); push(node); } @@ -3971,9 +3971,9 @@ class BodyBuilder extends StackListenerImpl keyType = const InvalidType(); valueType = const InvalidType(); } else { - keyType = buildDartType(typeArguments[0], + keyType = buildDartType(typeArguments[0], TypeUse.literalTypeArgument, allowPotentiallyConstantType: false); - valueType = buildDartType(typeArguments[1], + valueType = buildDartType(typeArguments[1], TypeUse.literalTypeArgument, allowPotentiallyConstantType: false); keyType = instantiateToBounds( keyType, coreTypes.objectClass, libraryBuilder.library); @@ -3995,7 +3995,6 @@ class BodyBuilder extends StackListenerImpl entries, isConst: constKeyword != null || constantContext == ConstantContext.inferred); - libraryBuilder.checkBoundsInMapLiteral(node, typeEnvironment, uri); push(node); } @@ -4222,10 +4221,8 @@ class BodyBuilder extends StackListenerImpl @override void handleAsOperator(Token operator) { debugEvent("AsOperator"); - DartType type = buildDartType(pop() as TypeBuilder, + DartType type = buildDartType(pop() as TypeBuilder, TypeUse.asType, allowPotentiallyConstantType: libraryBuilder.isNonNullableByDefault); - libraryBuilder.checkBoundsInType( - type, typeEnvironment, uri, operator.charOffset); Expression expression = popForValue(); Expression asExpression = forest.createAsExpression( offsetForToken(operator), expression, type, @@ -4246,15 +4243,13 @@ class BodyBuilder extends StackListenerImpl @override void handleIsOperator(Token isOperator, Token? not) { debugEvent("IsOperator"); - DartType type = buildDartType(pop() as TypeBuilder, + DartType type = buildDartType(pop() as TypeBuilder, TypeUse.isType, allowPotentiallyConstantType: libraryBuilder.isNonNullableByDefault); Expression operand = popForValue(); Expression isExpression = forest.createIsExpression( offsetForToken(isOperator), operand, type, forNonNullableByDefault: libraryBuilder.isNonNullableByDefault, notFileOffset: not != null ? offsetForToken(not) : null); - libraryBuilder.checkBoundsInType( - type, typeEnvironment, uri, isOperator.charOffset); push(isExpression); } @@ -4351,16 +4346,6 @@ class BodyBuilder extends StackListenerImpl } Object? nameNode = pop(); TypeBuilder? type = pop() as TypeBuilder?; - if (functionNestingLevel == 0 && type != null) { - // TODO(ahe): The type we compute here may be different from what is - // computed in the outline phase. We should make sure that the outline - // phase computes the same type. See - // pkg/front_end/testcases/deferred_type_annotation.dart for an example - // where not calling [buildDartType] leads to a missing compile-time - // error. Also, notice that the type of the problematic parameter isn't - // `invalid-type`. - buildDartType(type, allowPotentiallyConstantType: false); - } Token? varOrFinalOrConst = pop(NullValue.Token) as Token?; if (superKeyword != null && varOrFinalOrConst != null && @@ -4569,7 +4554,7 @@ class BodyBuilder extends StackListenerImpl popIfNotNull(onKeyword) as TypeBuilder?; DartType exceptionType; if (unresolvedExceptionType != null) { - exceptionType = buildDartType(unresolvedExceptionType, + exceptionType = buildDartType(unresolvedExceptionType, TypeUse.catchType, allowPotentiallyConstantType: false); } else { exceptionType = (libraryBuilder.isNonNullableByDefault @@ -5285,7 +5270,7 @@ class BodyBuilder extends StackListenerImpl receiver = forest.createInstantiation( instantiationOffset, receiver, - buildDartTypeArguments(typeArguments, + buildDartTypeArguments(typeArguments, TypeUse.tearOffTypeArgument, allowPotentiallyConstantType: true)); } return forest.createMethodInvocation(invocationOffset, receiver, @@ -5295,7 +5280,8 @@ class BodyBuilder extends StackListenerImpl assert(forest.argumentsTypeArguments(arguments).isEmpty); forest.argumentsSetTypeArguments( arguments, - buildDartTypeArguments(typeArguments, + buildDartTypeArguments( + typeArguments, TypeUse.constructorTypeArgument, allowPotentiallyConstantType: false)); } return buildUnresolvedError( @@ -5437,7 +5423,8 @@ class BodyBuilder extends StackListenerImpl } List dartTypeArguments = []; for (TypeBuilder typeBuilder in unaliasedTypeArgumentBuilders) { - dartTypeArguments.add(typeBuilder.build(libraryBuilder)); + dartTypeArguments.add(typeBuilder.build( + libraryBuilder, TypeUse.constructorTypeArgument)); } assert(forest.argumentsTypeArguments(arguments).isEmpty); forest.argumentsSetTypeArguments(arguments, dartTypeArguments); @@ -5452,8 +5439,8 @@ class BodyBuilder extends StackListenerImpl typeArgumentBuilders.length, const DynamicType(), growable: false); for (int i = 0; i < typeArgumentsToCheck.length; ++i) { - typeArgumentsToCheck[i] = - typeArgumentBuilders[i].build(libraryBuilder); + typeArgumentsToCheck[i] = typeArgumentBuilders[i] + .build(libraryBuilder, TypeUse.constructorTypeArgument); } } DartType typeToCheck = new TypedefType( @@ -5491,7 +5478,8 @@ class BodyBuilder extends StackListenerImpl } List dartTypeArguments = []; for (TypeBuilder typeBuilder in unaliasedTypeArgumentBuilders) { - dartTypeArguments.add(typeBuilder.build(libraryBuilder)); + dartTypeArguments.add(typeBuilder.build( + libraryBuilder, TypeUse.constructorTypeArgument)); } assert(forest.argumentsTypeArguments(arguments).isEmpty); forest.argumentsSetTypeArguments(arguments, dartTypeArguments); @@ -5505,8 +5493,8 @@ class BodyBuilder extends StackListenerImpl // No type arguments provided to unaliased class, use defaults. List result = new List.generate( cls.typeVariables!.length, - (int i) => cls.typeVariables![i].defaultType! - .build(cls.libraryBuilder), + (int i) => cls.typeVariables![i].defaultType!.build( + cls.libraryBuilder, TypeUse.constructorTypeArgument), growable: true); forest.argumentsSetTypeArguments(arguments, result); } @@ -5518,7 +5506,8 @@ class BodyBuilder extends StackListenerImpl assert(forest.argumentsTypeArguments(arguments).isEmpty); forest.argumentsSetTypeArguments( arguments, - buildDartTypeArguments(typeArguments, + buildDartTypeArguments( + typeArguments, TypeUse.constructorTypeArgument, allowPotentiallyConstantType: false)); } } @@ -7195,7 +7184,7 @@ class BodyBuilder extends StackListenerImpl } else { push(new Instantiation( toValue(operand), - buildDartTypeArguments(typeArguments, + buildDartTypeArguments(typeArguments, TypeUse.tearOffTypeArgument, allowPotentiallyConstantType: true)) ..fileOffset = openAngleBracket.charOffset); } @@ -7425,20 +7414,28 @@ class BodyBuilder extends StackListenerImpl } @override - DartType buildDartType(TypeBuilder typeBuilder, + DartType buildDartType(TypeBuilder typeBuilder, TypeUse typeUse, {required bool allowPotentiallyConstantType}) { return validateTypeVariableUse(typeBuilder, allowPotentiallyConstantType: allowPotentiallyConstantType) - .build(libraryBuilder); + .build(libraryBuilder, typeUse); + } + + DartType buildAliasedDartType(TypeBuilder typeBuilder, TypeUse typeUse, + {required bool allowPotentiallyConstantType}) { + return validateTypeVariableUse(typeBuilder, + allowPotentiallyConstantType: allowPotentiallyConstantType) + .buildAliased(libraryBuilder, typeUse); } @override - List buildDartTypeArguments(List? unresolvedTypes, + List buildDartTypeArguments( + List? unresolvedTypes, TypeUse typeUse, {required bool allowPotentiallyConstantType}) { if (unresolvedTypes == null) return []; return new List.generate( unresolvedTypes.length, - (int i) => buildDartType(unresolvedTypes[i], + (int i) => buildDartType(unresolvedTypes[i], typeUse, allowPotentiallyConstantType: allowPotentiallyConstantType), growable: true); } @@ -7652,9 +7649,12 @@ class FormalParameters { AsyncMarker asyncModifier, Statement body, int fileEndOffset) { + // TODO(johnniwinther): Avoid creating a FunctionTypeBuilder to create + // the function. The function type is not written as a type by the user + // and shouldn't be checked as such. FunctionType type = toFunctionType( returnType, const NullabilityBuilder.omitted(), typeParameters) - .build(library) as FunctionType; + .build(library, TypeUse.functionSignature) as FunctionType; List positionalParameters = []; List namedParameters = []; if (parameters != null) { diff --git a/pkg/front_end/lib/src/fasta/kernel/expression_generator.dart b/pkg/front_end/lib/src/fasta/kernel/expression_generator.dart index 927fca16669..4d0d98c6497 100644 --- a/pkg/front_end/lib/src/fasta/kernel/expression_generator.dart +++ b/pkg/front_end/lib/src/fasta/kernel/expression_generator.dart @@ -11,6 +11,7 @@ import 'package:_fe_analyzer_shared/src/parser/parser.dart' import 'package:_fe_analyzer_shared/src/scanner/token.dart' show Token; import 'package:kernel/ast.dart'; +import 'package:kernel/src/unaliasing.dart'; import 'package:kernel/text/ast_to_text.dart'; import 'package:kernel/type_algebra.dart'; @@ -56,7 +57,6 @@ import '../problems.dart'; import '../scope.dart'; -import '../source/source_library_builder.dart'; import '../source/stack_listener_impl.dart' show offsetForToken; import 'body_builder.dart' show noLocation; @@ -261,7 +261,8 @@ abstract class Generator { int fileOffset, List? typeArguments) { return new Instantiation( buildSimpleRead(), - _helper.buildDartTypeArguments(typeArguments, + _helper.buildDartTypeArguments( + typeArguments, TypeUse.tearOffTypeArgument, allowPotentiallyConstantType: true)) ..fileOffset = fileOffset; } @@ -2920,7 +2921,7 @@ class DeferredAccessGenerator extends Generator { int charOffset = offsetForToken(prefixGenerator.token); message = templateDeferredTypeAnnotation .withArguments( - _helper.buildDartType(type, + _helper.buildDartType(type, TypeUse.deferredTypeError, allowPotentiallyConstantType: allowPotentiallyConstantType), prefixGenerator._plainNameForRead, _helper.libraryBuilder.isNonNullableByDefault) @@ -3084,6 +3085,7 @@ class TypeUseGenerator extends AbstractReadOnlyAccessGenerator { buildTypeWithResolvedArguments( _helper.libraryBuilder.nonNullableBuilder, typeArguments, allowPotentiallyConstantType: true, forTypeLiteral: true), + TypeUse.typeLiteral, allowPotentiallyConstantType: _helper.libraryFeatures.constructorTearoffs.isEnabled)); } @@ -3127,14 +3129,15 @@ class TypeUseGenerator extends AbstractReadOnlyAccessGenerator { } else { if (declarationBuilder is DeclarationBuilder) { if (aliasedTypeArguments != null) { - _helper.libraryBuilder.uncheckedTypedefTypes.add( - new UncheckedTypedefType(new TypedefType( - aliasBuilder.typedef, - _helper.libraryBuilder.nonNullable, - aliasBuilder.buildTypeArguments( - _helper.libraryBuilder, aliasedTypeArguments))) - ..fileUri = _uri - ..offset = fileOffset); + new NamedTypeBuilder( + aliasBuilder.name, const NullabilityBuilder.omitted(), + arguments: aliasedTypeArguments, + fileUri: _uri, + charOffset: fileOffset, + instanceTypeVariableAccess: + _helper.instanceTypeVariableAccessState) + ..bind(_helper.libraryBuilder, aliasBuilder) + ..build(_helper.libraryBuilder, TypeUse.instantiation); } // If the arguments weren't supplied, the tear off is treated as @@ -3225,12 +3228,15 @@ class TypeUseGenerator extends AbstractReadOnlyAccessGenerator { builtTypeArguments.add(typeParameter.defaultType); } } else { - builtTypeArguments = declarationBuilder.buildTypeArguments( - _helper.libraryBuilder, unaliasedTypeArguments); + builtTypeArguments = unaliasTypes( + declarationBuilder.buildAliasedTypeArguments( + _helper.libraryBuilder, unaliasedTypeArguments), + legacyEraseAliases: + !_helper.libraryBuilder.isNonNullableByDefault)!; } } else if (typeArguments != null) { builtTypeArguments = _helper.buildDartTypeArguments( - typeArguments, + typeArguments, TypeUse.tearOffTypeArgument, allowPotentiallyConstantType: true); } if (isGenericTypedefTearOff) { @@ -3262,6 +3268,10 @@ class TypeUseGenerator extends AbstractReadOnlyAccessGenerator { .add(freshTypeParameters.substitute(builtTypeArgument)); } } + substitutedTypeArguments = unaliasTypes( + substitutedTypeArguments, + legacyEraseAliases: + !_helper.libraryBuilder.isNonNullableByDefault); tearOffExpression = _helper.forest.createTypedefTearOff( token.charOffset, @@ -3271,6 +3281,10 @@ class TypeUseGenerator extends AbstractReadOnlyAccessGenerator { } else { if (builtTypeArguments != null && builtTypeArguments.isNotEmpty) { + builtTypeArguments = unaliasTypes(builtTypeArguments, + legacyEraseAliases: + !_helper.libraryBuilder.isNonNullableByDefault)!; + tearOffExpression = _helper.forest.createInstantiation( token.charOffset, tearOffExpression, builtTypeArguments); } @@ -3672,7 +3686,8 @@ abstract class ErroneousExpressionGenerator extends Generator { assert(_forest.argumentsTypeArguments(arguments).isEmpty); _forest.argumentsSetTypeArguments( arguments, - _helper.buildDartTypeArguments(typeArguments, + _helper.buildDartTypeArguments( + typeArguments, TypeUse.constructorTypeArgument, allowPotentiallyConstantType: false)); } return buildError(arguments, kind: UnresolvedKind.Constructor); diff --git a/pkg/front_end/lib/src/fasta/kernel/expression_generator_helper.dart b/pkg/front_end/lib/src/fasta/kernel/expression_generator_helper.dart index 41ab8640175..b10a3ff94eb 100644 --- a/pkg/front_end/lib/src/fasta/kernel/expression_generator_helper.dart +++ b/pkg/front_end/lib/src/fasta/kernel/expression_generator_helper.dart @@ -150,10 +150,11 @@ abstract class ExpressionGeneratorHelper implements InferenceHelper { Expression evaluateArgumentsBefore( Arguments arguments, Expression expression); - DartType buildDartType(TypeBuilder typeBuilder, + DartType buildDartType(TypeBuilder typeBuilder, TypeUse typeUse, {required bool allowPotentiallyConstantType}); - List buildDartTypeArguments(List? typeArguments, + List buildDartTypeArguments( + List? typeArguments, TypeUse typeUse, {required bool allowPotentiallyConstantType}); void reportDuplicatedDeclaration( diff --git a/pkg/front_end/lib/src/fasta/kernel/inference_visitor.dart b/pkg/front_end/lib/src/fasta/kernel/inference_visitor.dart index 6debbc90793..dd68ba0b7cf 100644 --- a/pkg/front_end/lib/src/fasta/kernel/inference_visitor.dart +++ b/pkg/front_end/lib/src/fasta/kernel/inference_visitor.dart @@ -18,7 +18,7 @@ import '../../base/instrumentation.dart' import '../fasta_codes.dart'; import '../names.dart'; import '../problems.dart' show unhandled; -import '../source/source_library_builder.dart' show SourceLibraryBuilder; +import '../source/source_library_builder.dart'; import '../type_inference/type_constraint_gatherer.dart'; import '../type_inference/type_inference_engine.dart'; import '../type_inference/type_inferrer.dart'; @@ -274,8 +274,7 @@ class InferenceVisitor resultType.returnType, resultType.declaredNullability, namedParameters: resultType.namedParameters, typeParameters: freshTypeParameters.freshTypeParameters, - requiredParameterCount: resultType.requiredParameterCount, - typedefType: null); + requiredParameterCount: resultType.requiredParameterCount); ExpressionInferenceResult inferredResult = inferrer.instantiateTearOff(resultType, typeContext, node); return inferrer.ensureAssignableResult(typeContext, inferredResult); @@ -1397,8 +1396,6 @@ class InferenceVisitor inferrer.dataForTesting!.typeInferenceResult.inferredVariableTypes[node] = inferredType.returnType; } - inferrer.libraryBuilder.checkBoundsInFunctionNode(node.function, - inferrer.typeSchemaEnvironment, inferrer.libraryBuilder.fileUri); node.variable.type = inferredType; inferrer.flowAnalysis.functionExpression_end(); return const StatementInferenceResult(); @@ -1414,11 +1411,6 @@ class InferenceVisitor inferrer.dataForTesting!.typeInferenceResult.inferredVariableTypes[node] = inferredType.returnType; } - // In anonymous functions the return type isn't declared, so - // it shouldn't be checked. - inferrer.libraryBuilder.checkBoundsInFunctionNode(node.function, - inferrer.typeSchemaEnvironment, inferrer.libraryBuilder.fileUri, - skipReturnType: true); inferrer.flowAnalysis.functionExpression_end(); return new ExpressionInferenceResult(inferredType, node); } @@ -2088,9 +2080,10 @@ class InferenceVisitor if (!inferrer.isTopLevel) { SourceLibraryBuilder library = inferrer.libraryBuilder; if (inferenceNeeded) { - library.checkBoundsInListLiteral( - node, inferrer.typeSchemaEnvironment, inferrer.helper!.uri, - inferred: true); + if (!library.libraryFeatures.genericMetadata.isEnabled) { + inferrer.checkGenericFunctionTypeArgument( + node.typeArgument, node.fileOffset); + } } } @@ -2885,9 +2878,12 @@ class InferenceVisitor // Either both [_declaredKeyType] and [_declaredValueType] are omitted or // none of them, so we may just check one. if (inferenceNeeded) { - library.checkBoundsInMapLiteral( - node, inferrer.typeSchemaEnvironment, inferrer.helper!.uri, - inferred: true); + if (!library.libraryFeatures.genericMetadata.isEnabled) { + inferrer.checkGenericFunctionTypeArgument( + node.keyType, node.fileOffset); + inferrer.checkGenericFunctionTypeArgument( + node.valueType, node.fileOffset); + } } } return new ExpressionInferenceResult(inferredType, node); @@ -6032,9 +6028,10 @@ class InferenceVisitor if (!inferrer.isTopLevel) { SourceLibraryBuilder library = inferrer.libraryBuilder; if (inferenceNeeded) { - library.checkBoundsInSetLiteral( - node, inferrer.typeSchemaEnvironment, inferrer.helper!.uri, - inferred: true); + if (!library.libraryFeatures.genericMetadata.isEnabled) { + inferrer.checkGenericFunctionTypeArgument( + node.typeArgument, node.fileOffset); + } } if (!library.loader.target.backendTarget.supportsSetLiterals) { @@ -6453,13 +6450,6 @@ class InferenceVisitor TypeLiteral node, DartType typeContext) { DartType inferredType = inferrer.coreTypes.typeRawType(inferrer.libraryBuilder.nonNullable); - if (inferrer.libraryFeatures.constructorTearoffs.isEnabled) { - inferrer.libraryBuilder.checkBoundsInType( - node.type, - inferrer.typeSchemaEnvironment, - inferrer.libraryBuilder.fileUri, - node.fileOffset); - } return new ExpressionInferenceResult(inferredType, node); } @@ -6592,14 +6582,6 @@ class InferenceVisitor Expression initializer = initializerResult.expression; node.initializer = initializer..parent = node; } - if (!inferrer.isTopLevel) { - SourceLibraryBuilder library = inferrer.libraryBuilder; - if (node.isImplicitlyTyped) { - library.checkBoundsInVariableDeclaration( - node, inferrer.typeSchemaEnvironment, inferrer.helper!.uri, - inferred: true); - } - } if (node.isLate && inferrer.libraryBuilder.loader.target.backendTarget .isLateLocalLoweringEnabled( diff --git a/pkg/front_end/lib/src/fasta/kernel/invalid_type.dart b/pkg/front_end/lib/src/fasta/kernel/invalid_type.dart index 0d49a4e4785..c2759d182b0 100644 --- a/pkg/front_end/lib/src/fasta/kernel/invalid_type.dart +++ b/pkg/front_end/lib/src/fasta/kernel/invalid_type.dart @@ -89,9 +89,6 @@ class _InvalidTypeFinder implements DartTypeVisitor1> { for (NamedType parameter in node.namedParameters) { if (parameter.type.accept1(this, visitedTypedefs)) return true; } - if (node.typedefType != null && visitedTypedefs.add(node.typedefType!)) { - if (node.typedefType!.accept1(this, visitedTypedefs)) return true; - } return false; } diff --git a/pkg/front_end/lib/src/fasta/kernel/macro/identifiers.dart b/pkg/front_end/lib/src/fasta/kernel/macro/identifiers.dart index 1ecd8aa7d4d..75daa98d7cb 100644 --- a/pkg/front_end/lib/src/fasta/kernel/macro/identifiers.dart +++ b/pkg/front_end/lib/src/fasta/kernel/macro/identifiers.dart @@ -16,6 +16,7 @@ import '../../builder/nullability_builder.dart'; import '../../builder/type_alias_builder.dart'; import '../../builder/type_builder.dart'; import '../../builder/type_declaration_builder.dart'; +import '../../uris.dart'; import 'macro.dart'; abstract class IdentifierImpl extends macro.IdentifierImpl { @@ -41,7 +42,7 @@ abstract class IdentifierImpl extends macro.IdentifierImpl { } else if (typeDeclarationBuilder is TypeAliasBuilder) { uri = typeDeclarationBuilder.libraryBuilder.importUri; } else if (name == 'dynamic') { - uri = Uri.parse('dart:core'); + uri = dartCore; } return new macro.ResolvedIdentifier( kind: macro.IdentifierKind.topLevelMember, @@ -88,8 +89,16 @@ class TypeBuilderIdentifier extends IdentifierImpl { @override DartType buildType( NullabilityBuilder nullabilityBuilder, List typeArguments) { - return typeBuilder.declaration!.buildTypeWithBuiltArguments(libraryBuilder, - nullabilityBuilder.build(libraryBuilder), typeArguments); + return typeBuilder.declaration!.buildAliasedTypeWithBuiltArguments( + libraryBuilder, + nullabilityBuilder.build(libraryBuilder), + typeArguments, + TypeUse.macroTypeArgument, + // TODO(johnniwinther): How should handle malbounded types here? Should + // we report an error on the annotation? + missingUri, + TreeNode.noOffset, + hasExplicitTypeArguments: true); } @override @@ -124,8 +133,16 @@ class TypeDeclarationBuilderIdentifier extends IdentifierImpl { @override DartType buildType( NullabilityBuilder nullabilityBuilder, List typeArguments) { - return typeDeclarationBuilder.buildTypeWithBuiltArguments(libraryBuilder, - nullabilityBuilder.build(libraryBuilder), typeArguments); + return typeDeclarationBuilder.buildAliasedTypeWithBuiltArguments( + libraryBuilder, + nullabilityBuilder.build(libraryBuilder), + typeArguments, + TypeUse.macroTypeArgument, + // TODO(johnniwinther): How should handle malbounded types here? Should + // we report an error on the annotation? + missingUri, + TreeNode.noOffset, + hasExplicitTypeArguments: true); } } @@ -219,7 +236,7 @@ class OmittedTypeIdentifier extends IdentifierImpl { kind: macro.IdentifierKind.topLevelMember, name: name, staticScope: null, - uri: Uri.parse('dart:core')); + uri: dartCore); } @override diff --git a/pkg/front_end/lib/src/fasta/source/source_class_builder.dart b/pkg/front_end/lib/src/fasta/source/source_class_builder.dart index fda68ec4e5c..9039e6ab579 100644 --- a/pkg/front_end/lib/src/fasta/source/source_class_builder.dart +++ b/pkg/front_end/lib/src/fasta/source/source_class_builder.dart @@ -56,7 +56,7 @@ import '../util/helpers.dart'; import 'source_constructor_builder.dart'; import 'source_factory_builder.dart'; import 'source_field_builder.dart'; -import 'source_library_builder.dart' show SourceLibraryBuilder; +import 'source_library_builder.dart'; import 'source_member_builder.dart'; Class initializeClass( @@ -523,15 +523,22 @@ class SourceClassBuilder extends ClassBuilderImpl int get typeVariablesCount => typeVariables?.length ?? 0; @override - List buildTypeArguments( + List buildAliasedTypeArguments( LibraryBuilder library, List? arguments) { if (arguments == null && typeVariables == null) { return []; } if (arguments == null && typeVariables != null) { - List result = new List.generate(typeVariables!.length, - (int i) => typeVariables![i].defaultType!.build(library), + // TODO(johnniwinther): Use i2b here when needed. + List result = new List.generate( + typeVariables!.length, + (int i) => typeVariables![i] + .defaultType! + // TODO(johnniwinther): Using [libraryBuilder] here instead of + // [library] preserves the nullability of the original + // declaration. Should we legacy erase this? + .buildAliased(libraryBuilder, TypeUse.defaultTypeAsTypeArgument), growable: true); if (library is SourceLibraryBuilder) { library.inferredTypes.addAll(result); @@ -551,8 +558,8 @@ class SourceClassBuilder extends ClassBuilderImpl } assert(arguments!.length == typeVariablesCount); - List result = new List.generate( - arguments!.length, (int i) => arguments[i].build(library), + List result = new List.generate(arguments!.length, + (int i) => arguments[i].buildAliased(library, TypeUse.typeArgument), growable: true); return result; } @@ -1321,99 +1328,7 @@ class SourceClassBuilder extends ClassBuilderImpl } } - void checkBoundsInSupertype( - Supertype supertype, TypeEnvironment typeEnvironment) { - Library library = libraryBuilder.library; - - List issues = findTypeArgumentIssues( - new InterfaceType( - supertype.classNode, library.nonNullable, supertype.typeArguments), - typeEnvironment, - libraryBuilder.isNonNullableByDefault - ? SubtypeCheckMode.withNullabilities - : SubtypeCheckMode.ignoringNullabilities, - allowSuperBounded: false, - isNonNullableByDefault: library.isNonNullableByDefault, - areGenericArgumentsAllowed: - libraryBuilder.libraryFeatures.genericMetadata.isEnabled); - for (TypeArgumentIssue issue in issues) { - DartType argument = issue.argument; - TypeParameter typeParameter = issue.typeParameter; - bool inferred = libraryBuilder.inferredTypes.contains(argument); - if (issue.isGenericTypeAsArgumentIssue) { - if (inferred) { - // Supertype can't be or contain super-bounded types, so null is - // passed for super-bounded hint here. - libraryBuilder.reportTypeArgumentIssue( - templateGenericFunctionTypeInferredAsActualTypeArgument - .withArguments(argument, library.isNonNullableByDefault), - fileUri, - charOffset, - typeParameter: null, - superBoundedAttempt: null, - superBoundedAttemptInverted: null); - } else { - // Supertype can't be or contain super-bounded types, so null is - // passed for super-bounded hint here. - libraryBuilder.reportTypeArgumentIssue( - messageGenericFunctionTypeUsedAsActualTypeArgument, - fileUri, - charOffset, - typeParameter: null, - superBoundedAttempt: null, - superBoundedAttemptInverted: null); - } - } else { - void reportProblem( - Template< - Message Function(DartType, DartType, String, String, String, - String, bool)> - template) { - // Supertype can't be or contain super-bounded types, so null is - // passed for super-bounded hint here. - libraryBuilder.reportTypeArgumentIssue( - template.withArguments( - argument, - typeParameter.bound, - typeParameter.name!, - getGenericTypeName(issue.enclosingType!), - supertype.classNode.name, - name, - library.isNonNullableByDefault), - fileUri, - charOffset, - typeParameter: typeParameter, - superBoundedAttempt: null, - superBoundedAttemptInverted: null); - } - - if (inferred) { - reportProblem(templateIncorrectTypeArgumentInSupertypeInferred); - } else { - reportProblem(templateIncorrectTypeArgumentInSupertype); - } - } - } - } - void checkTypesInOutline(TypeEnvironment typeEnvironment) { - libraryBuilder.checkBoundsInTypeParameters( - typeEnvironment, cls.typeParameters, fileUri); - - // Check in supers. - if (cls.supertype != null) { - checkBoundsInSupertype(cls.supertype!, typeEnvironment); - } - if (cls.mixedInType != null) { - checkBoundsInSupertype(cls.mixedInType!, typeEnvironment); - } - // ignore: unnecessary_null_comparison - if (cls.implementedTypes != null) { - for (Supertype supertype in cls.implementedTypes) { - checkBoundsInSupertype(supertype, typeEnvironment); - } - } - forEach((String name, Builder builder) { if (builder is SourceMemberBuilder) { builder.checkVariance(this, typeEnvironment); diff --git a/pkg/front_end/lib/src/fasta/source/source_enum_builder.dart b/pkg/front_end/lib/src/fasta/source/source_enum_builder.dart index 10a8838e878..f2812d0b74f 100644 --- a/pkg/front_end/lib/src/fasta/source/source_enum_builder.dart +++ b/pkg/front_end/lib/src/fasta/source/source_enum_builder.dart @@ -179,7 +179,9 @@ class SourceEnumBuilder extends SourceClassBuilder { List elementBuilders = []; NamedTypeBuilder selfType = new NamedTypeBuilder( name, const NullabilityBuilder.omitted(), - instanceTypeVariableAccess: InstanceTypeVariableAccessState.Unexpected); + instanceTypeVariableAccess: InstanceTypeVariableAccessState.Unexpected, + fileUri: fileUri, + charOffset: charOffset); NamedTypeBuilder listType = new NamedTypeBuilder( "List", const NullabilityBuilder.omitted(), arguments: [selfType], @@ -628,7 +630,8 @@ class SourceEnumBuilder extends SourceClassBuilder { } DartType buildElement(SourceFieldBuilder fieldBuilder, CoreTypes coreTypes) { - DartType selfType = this.selfType.build(libraryBuilder); + DartType selfType = + this.selfType.build(libraryBuilder, TypeUse.enumSelfType); Builder? builder = firstMemberNamed(fieldBuilder.name); if (builder == null || !builder.isField) return selfType; fieldBuilder = builder as SourceFieldBuilder; @@ -674,7 +677,8 @@ class SourceEnumBuilder extends SourceClassBuilder { if (typeArgumentBuilders != null) { typeArguments = []; for (TypeBuilder typeBuilder in typeArgumentBuilders) { - typeArguments.add(typeBuilder.build(libraryBuilder)); + typeArguments.add( + typeBuilder.build(libraryBuilder, TypeUse.constructorTypeArgument)); } } if (libraryBuilder.libraryFeatures.enhancedEnums.isEnabled) { diff --git a/pkg/front_end/lib/src/fasta/source/source_extension_builder.dart b/pkg/front_end/lib/src/fasta/source/source_extension_builder.dart index 740f9b83ef1..578747e1844 100644 --- a/pkg/front_end/lib/src/fasta/source/source_extension_builder.dart +++ b/pkg/front_end/lib/src/fasta/source/source_extension_builder.dart @@ -91,7 +91,7 @@ class SourceExtensionBuilder extends ExtensionBuilderImpl { /// library. Extension build(LibraryBuilder coreLibrary, {required bool addMembersToLibrary}) { - _extension.onType = onType.build(libraryBuilder); + _extension.onType = onType.build(libraryBuilder, TypeUse.extensionOnType); extensionTypeShowHideClauseBuilder.buildAndStoreTypes( _extension, libraryBuilder); @@ -242,16 +242,6 @@ class SourceExtensionBuilder extends ExtensionBuilderImpl { } void checkTypesInOutline(TypeEnvironment typeEnvironment) { - libraryBuilder.checkBoundsInTypeParameters( - typeEnvironment, extension.typeParameters, fileUri); - - // Check on clause. - // ignore: unnecessary_null_comparison - if (_extension.onType != null) { - libraryBuilder.checkBoundsInType(_extension.onType, typeEnvironment, - onType.fileUri!, onType.charOffset!); - } - forEach((String name, Builder builder) { if (builder is SourceFieldBuilder) { // Check fields. diff --git a/pkg/front_end/lib/src/fasta/source/source_factory_builder.dart b/pkg/front_end/lib/src/fasta/source/source_factory_builder.dart index 09523b6cc6c..7ba09c83372 100644 --- a/pkg/front_end/lib/src/fasta/source/source_factory_builder.dart +++ b/pkg/front_end/lib/src/fasta/source/source_factory_builder.dart @@ -360,7 +360,8 @@ class RedirectingFactoryBuilder extends SourceFactoryBuilder { if (redirectionTarget.typeArguments != null) { typeArguments = new List.generate( redirectionTarget.typeArguments!.length, - (int i) => redirectionTarget.typeArguments![i].build(libraryBuilder), + (int i) => redirectionTarget.typeArguments![i] + .build(libraryBuilder, TypeUse.redirectionTypeArgument), growable: false); } updatePrivateMemberName(_procedureInternal, libraryBuilder); diff --git a/pkg/front_end/lib/src/fasta/source/source_field_builder.dart b/pkg/front_end/lib/src/fasta/source/source_field_builder.dart index e5d89e8773d..cdf803a9bc3 100644 --- a/pkg/front_end/lib/src/fasta/source/source_field_builder.dart +++ b/pkg/front_end/lib/src/fasta/source/source_field_builder.dart @@ -367,7 +367,7 @@ class SourceFieldBuilder extends SourceMemberBuilderImpl /// Builds the core AST structures for this field as needed for the outline. void build() { if (type != null) { - fieldType = type!.build(libraryBuilder); + fieldType = type!.build(libraryBuilder, TypeUse.fieldType); } _fieldEncoding.build(libraryBuilder, this); } diff --git a/pkg/front_end/lib/src/fasta/source/source_function_builder.dart b/pkg/front_end/lib/src/fasta/source/source_function_builder.dart index 141126751d8..e52c6315018 100644 --- a/pkg/front_end/lib/src/fasta/source/source_function_builder.dart +++ b/pkg/front_end/lib/src/fasta/source/source_function_builder.dart @@ -387,7 +387,8 @@ abstract class SourceFunctionBuilderImpl extends SourceMemberBuilderImpl function.requiredParameterCount = 1; } if (returnType != null) { - function.returnType = returnType!.build(libraryBuilder); + function.returnType = + returnType!.build(libraryBuilder, TypeUse.returnType); } if (isExtensionInstanceMember) { ExtensionBuilder extensionBuilder = parent as ExtensionBuilder; diff --git a/pkg/front_end/lib/src/fasta/source/source_library_builder.dart b/pkg/front_end/lib/src/fasta/source/source_library_builder.dart index 53fa58e0b8e..963b623a83b 100644 --- a/pkg/front_end/lib/src/fasta/source/source_library_builder.dart +++ b/pkg/front_end/lib/src/fasta/source/source_library_builder.dart @@ -21,7 +21,8 @@ import 'package:kernel/src/bounds_checks.dart' TypeArgumentIssue, findTypeArgumentIssues, findTypeArgumentIssuesForInvocation, - getGenericTypeName; + getGenericTypeName, + hasGenericFunctionTypeAsTypeArgument; import 'package:kernel/type_algebra.dart' show Substitution, substitute; import 'package:kernel/type_environment.dart' show SubtypeCheckMode, TypeEnvironment; @@ -175,8 +176,8 @@ class SourceLibraryBuilder extends LibraryBuilderImpl { final List unboundTypeVariables = []; - final List uncheckedTypedefTypes = - []; + final List _pendingBoundsChecks = []; + final List _pendingGenericFunctionTypeChecks = []; // A list of alternating forwarders and the procedures they were generated // for. Note that it may not include a forwarder-origin pair in cases when @@ -3953,7 +3954,7 @@ class SourceLibraryBuilder extends LibraryBuilderImpl { addToExportScope(name, member); } - void reportTypeArgumentIssues( + void _reportTypeArgumentIssues( Iterable issues, Uri fileUri, int offset, {bool? inferred, TypeArgumentsInfo? typeArgumentsInfo, @@ -4081,11 +4082,6 @@ class SourceLibraryBuilder extends LibraryBuilderImpl { void checkTypesInField( SourceFieldBuilder fieldBuilder, TypeEnvironment typeEnvironment) { - // Check the bounds in the field's type. - checkBoundsInType(fieldBuilder.fieldType, typeEnvironment, - fieldBuilder.fileUri, fieldBuilder.charOffset, - allowSuperBounded: true); - // Check that the field has an initializer if its type is potentially // non-nullable. if (isNonNullableByDefault) { @@ -4132,133 +4128,8 @@ class SourceLibraryBuilder extends LibraryBuilderImpl { } } - void checkBoundsInTypeParameters(TypeEnvironment typeEnvironment, - List typeParameters, Uri fileUri) { - // Check in bounds of own type variables. - for (TypeParameter parameter in typeParameters) { - List issues = findTypeArgumentIssues( - parameter.bound, - typeEnvironment, - isNonNullableByDefault - ? SubtypeCheckMode.withNullabilities - : SubtypeCheckMode.ignoringNullabilities, - allowSuperBounded: true, - isNonNullableByDefault: library.isNonNullableByDefault, - areGenericArgumentsAllowed: - libraryFeatures.genericMetadata.isEnabled); - for (TypeArgumentIssue issue in issues) { - DartType argument = issue.argument; - TypeParameter typeParameter = issue.typeParameter; - if (inferredTypes.contains(argument)) { - // Inference in type expressions in the supertypes boils down to - // instantiate-to-bound which shouldn't produce anything that breaks - // the bounds after the non-simplicity checks are done. So, any - // violation here is the result of non-simple bounds, and the error - // is reported elsewhere. - continue; - } - - if (issue.isGenericTypeAsArgumentIssue) { - reportTypeArgumentIssue( - messageGenericFunctionTypeUsedAsActualTypeArgument, - fileUri, - parameter.fileOffset, - typeParameter: null); - } else { - reportTypeArgumentIssue( - templateIncorrectTypeArgument.withArguments( - argument, - typeParameter.bound, - typeParameter.name!, - getGenericTypeName(issue.enclosingType!), - library.isNonNullableByDefault), - fileUri, - parameter.fileOffset, - typeParameter: typeParameter, - superBoundedAttempt: issue.enclosingType, - superBoundedAttemptInverted: issue.invertedType); - } - } - } - } - - void checkBoundsInFunctionNodeParts( - TypeEnvironment typeEnvironment, Uri fileUri, int fileOffset, - {List? typeParameters, - List? positionalParameters, - List? namedParameters, - DartType? returnType, - int? requiredParameterCount, - bool skipReturnType = false}) { - if (typeParameters != null) { - for (TypeParameter parameter in typeParameters) { - checkBoundsInType( - parameter.bound, typeEnvironment, fileUri, parameter.fileOffset, - allowSuperBounded: true); - } - } - if (positionalParameters != null) { - for (int i = 0; i < positionalParameters.length; ++i) { - VariableDeclaration parameter = positionalParameters[i]; - checkBoundsInType( - parameter.type, typeEnvironment, fileUri, parameter.fileOffset, - allowSuperBounded: true); - } - } - if (namedParameters != null) { - for (int i = 0; i < namedParameters.length; ++i) { - VariableDeclaration named = namedParameters[i]; - checkBoundsInType( - named.type, typeEnvironment, fileUri, named.fileOffset, - allowSuperBounded: true); - } - } - if (!skipReturnType && returnType != null) { - List issues = findTypeArgumentIssues( - returnType, - typeEnvironment, - isNonNullableByDefault - ? SubtypeCheckMode.withNullabilities - : SubtypeCheckMode.ignoringNullabilities, - allowSuperBounded: true, - isNonNullableByDefault: library.isNonNullableByDefault, - areGenericArgumentsAllowed: - libraryFeatures.genericMetadata.isEnabled); - for (TypeArgumentIssue issue in issues) { - DartType argument = issue.argument; - TypeParameter typeParameter = issue.typeParameter; - - // We don't need to check if [argument] was inferred or specified - // here, because inference in return types boils down to instantiate- - // -to-bound, and it can't provide a type that violates the bound. - if (issue.isGenericTypeAsArgumentIssue) { - reportTypeArgumentIssue( - messageGenericFunctionTypeUsedAsActualTypeArgument, - fileUri, - fileOffset, - typeParameter: null); - } else { - reportTypeArgumentIssue( - templateIncorrectTypeArgumentInReturnType.withArguments( - argument, - typeParameter.bound, - typeParameter.name!, - getGenericTypeName(issue.enclosingType!), - isNonNullableByDefault), - fileUri, - fileOffset, - typeParameter: typeParameter, - superBoundedAttempt: issue.enclosingType, - superBoundedAttemptInverted: issue.invertedType); - } - } - } - } - void checkTypesInFunctionBuilder( SourceFunctionBuilder procedureBuilder, TypeEnvironment typeEnvironment) { - checkBoundsInFunctionNode( - procedureBuilder.function, typeEnvironment, procedureBuilder.fileUri!); if (procedureBuilder.formals != null && !(procedureBuilder.isAbstract || procedureBuilder.isExternal)) { checkInitializersInFormals(procedureBuilder.formals!, typeEnvironment); @@ -4268,8 +4139,6 @@ class SourceLibraryBuilder extends LibraryBuilderImpl { void checkTypesInConstructorBuilder( DeclaredSourceConstructorBuilder constructorBuilder, TypeEnvironment typeEnvironment) { - checkBoundsInFunctionNode( - constructorBuilder.constructor.function, typeEnvironment, fileUri); if (!constructorBuilder.isExternal && constructorBuilder.formals != null) { checkInitializersInFormals(constructorBuilder.formals!, typeEnvironment); } @@ -4278,50 +4147,10 @@ class SourceLibraryBuilder extends LibraryBuilderImpl { void checkTypesInRedirectingFactoryBuilder( RedirectingFactoryBuilder redirectingFactoryBuilder, TypeEnvironment typeEnvironment) { - checkBoundsInFunctionNode(redirectingFactoryBuilder.function, - typeEnvironment, redirectingFactoryBuilder.fileUri); // Default values are not required on redirecting factory constructors so // we don't call [checkInitializersInFormals]. } - void checkBoundsInFunctionNode( - FunctionNode function, TypeEnvironment typeEnvironment, Uri fileUri, - {bool skipReturnType = false}) { - checkBoundsInFunctionNodeParts( - typeEnvironment, fileUri, function.fileOffset, - typeParameters: function.typeParameters, - positionalParameters: function.positionalParameters, - namedParameters: function.namedParameters, - returnType: function.returnType, - requiredParameterCount: function.requiredParameterCount, - skipReturnType: skipReturnType); - } - - void checkBoundsInListLiteral( - ListLiteral node, TypeEnvironment typeEnvironment, Uri fileUri, - {bool inferred = false}) { - checkBoundsInType( - node.typeArgument, typeEnvironment, fileUri, node.fileOffset, - inferred: inferred, allowSuperBounded: true); - } - - void checkBoundsInSetLiteral( - SetLiteral node, TypeEnvironment typeEnvironment, Uri fileUri, - {bool inferred = false}) { - checkBoundsInType( - node.typeArgument, typeEnvironment, fileUri, node.fileOffset, - inferred: inferred, allowSuperBounded: true); - } - - void checkBoundsInMapLiteral( - MapLiteral node, TypeEnvironment typeEnvironment, Uri fileUri, - {bool inferred = false}) { - checkBoundsInType(node.keyType, typeEnvironment, fileUri, node.fileOffset, - inferred: inferred, allowSuperBounded: true); - checkBoundsInType(node.valueType, typeEnvironment, fileUri, node.fileOffset, - inferred: inferred, allowSuperBounded: true); - } - void checkBoundsInType( DartType type, TypeEnvironment typeEnvironment, Uri fileUri, int offset, {bool? inferred, bool allowSuperBounded = true}) { @@ -4334,16 +4163,7 @@ class SourceLibraryBuilder extends LibraryBuilderImpl { allowSuperBounded: allowSuperBounded, isNonNullableByDefault: library.isNonNullableByDefault, areGenericArgumentsAllowed: libraryFeatures.genericMetadata.isEnabled); - reportTypeArgumentIssues(issues, fileUri, offset, inferred: inferred); - } - - void checkBoundsInVariableDeclaration( - VariableDeclaration node, TypeEnvironment typeEnvironment, Uri fileUri, - {bool inferred = false}) { - // ignore: unnecessary_null_comparison - if (node.type == null) return; - checkBoundsInType(node.type, typeEnvironment, fileUri, node.fileOffset, - inferred: inferred, allowSuperBounded: true); + _reportTypeArgumentIssues(issues, fileUri, offset, inferred: inferred); } void checkBoundsInConstructorInvocation( @@ -4408,7 +4228,7 @@ class SourceLibraryBuilder extends LibraryBuilderImpl { new InterfaceType(klass, klass.enclosingLibrary.nonNullable); } String targetName = node.target.name.text; - reportTypeArgumentIssues(issues, fileUri, node.fileOffset, + _reportTypeArgumentIssues(issues, fileUri, node.fileOffset, typeArgumentsInfo: typeArgumentsInfo, targetReceiver: targetReceiver, targetName: targetName); @@ -4487,7 +4307,7 @@ class SourceLibraryBuilder extends LibraryBuilderImpl { bottomType, isNonNullableByDefault: library.isNonNullableByDefault, areGenericArgumentsAllowed: libraryFeatures.genericMetadata.isEnabled); - reportTypeArgumentIssues(issues, fileUri, offset, + _reportTypeArgumentIssues(issues, fileUri, offset, typeArgumentsInfo: getTypeArgumentsInfo(arguments), targetReceiver: receiverType, targetName: name.text); @@ -4520,7 +4340,7 @@ class SourceLibraryBuilder extends LibraryBuilderImpl { bottomType, isNonNullableByDefault: library.isNonNullableByDefault, areGenericArgumentsAllowed: libraryFeatures.genericMetadata.isEnabled); - reportTypeArgumentIssues(issues, fileUri, offset, + _reportTypeArgumentIssues(issues, fileUri, offset, typeArgumentsInfo: getTypeArgumentsInfo(arguments), // TODO(johnniwinther): Special-case messaging on function type // invocation to avoid reference to 'call' and use the function type @@ -4557,7 +4377,7 @@ class SourceLibraryBuilder extends LibraryBuilderImpl { bottomType, isNonNullableByDefault: library.isNonNullableByDefault, areGenericArgumentsAllowed: libraryFeatures.genericMetadata.isEnabled); - reportTypeArgumentIssues(issues, fileUri, offset, + _reportTypeArgumentIssues(issues, fileUri, offset, targetReceiver: functionType, typeArgumentsInfo: inferred ? const AllInferredTypeArgumentsInfo() @@ -4592,7 +4412,7 @@ class SourceLibraryBuilder extends LibraryBuilderImpl { } else if (declaration is SourceExtensionBuilder) { declaration.checkTypesInOutline(typeEnvironment); } else if (declaration is SourceTypeAliasBuilder) { - declaration.checkTypesInOutline(typeEnvironment); + // Do nothing. } else { assert( declaration is! TypeDeclarationBuilder || @@ -4601,7 +4421,7 @@ class SourceLibraryBuilder extends LibraryBuilderImpl { } } inferredTypes.clear(); - checkUncheckedTypedefTypes(typeEnvironment); + checkPendingBoundsChecks(typeEnvironment); } void computeShowHideElements(ClassMembersBuilder membersBuilder) { @@ -4906,19 +4726,113 @@ class SourceLibraryBuilder extends LibraryBuilderImpl { return type; } - /// Performs delayed bounds checks on [TypedefType]s for the library - /// - /// As [TypedefType]s are built, they are eagerly unaliased, making it - /// impossible to perform the bounds checks on them at the time when the - /// checks can be done. To perform the checks, [TypedefType]s are added to - /// [uncheckedTypedefTypes] as they are built. This method performs the - /// checks and clears the list of the types for the delayed check. - void checkUncheckedTypedefTypes(TypeEnvironment typeEnvironment) { - for (UncheckedTypedefType uncheckedTypedefType in uncheckedTypedefTypes) { - checkBoundsInType(uncheckedTypedefType.typeToCheck, typeEnvironment, - uncheckedTypedefType.fileUri!, uncheckedTypedefType.offset!); + void registerBoundsCheck( + DartType type, Uri fileUri, int charOffset, TypeUse typeUse, + {required bool inferred}) { + _pendingBoundsChecks.add(new PendingBoundsCheck( + type, fileUri, charOffset, typeUse, + inferred: inferred)); + } + + void registerGenericFunctionTypeCheck( + TypedefType type, Uri fileUri, int charOffset) { + _pendingGenericFunctionTypeChecks + .add(new GenericFunctionTypeCheck(type, fileUri, charOffset)); + } + + /// Performs delayed bounds checks. + void checkPendingBoundsChecks(TypeEnvironment typeEnvironment) { + for (PendingBoundsCheck pendingBoundsCheck in _pendingBoundsChecks) { + switch (pendingBoundsCheck.typeUse) { + case TypeUse.literalTypeArgument: + case TypeUse.variableType: + case TypeUse.typeParameterBound: + case TypeUse.parameterType: + case TypeUse.fieldType: + case TypeUse.returnType: + case TypeUse.isType: + case TypeUse.asType: + case TypeUse.catchType: + case TypeUse.constructorTypeArgument: + case TypeUse.redirectionTypeArgument: + case TypeUse.tearOffTypeArgument: + case TypeUse.invocationTypeArgument: + case TypeUse.typeLiteral: + case TypeUse.extensionOnType: + case TypeUse.typeArgument: + checkBoundsInType(pendingBoundsCheck.type, typeEnvironment, + pendingBoundsCheck.fileUri, pendingBoundsCheck.charOffset, + inferred: pendingBoundsCheck.inferred, allowSuperBounded: true); + break; + case TypeUse.typedefAlias: + case TypeUse.superType: + case TypeUse.mixedInType: + checkBoundsInType(pendingBoundsCheck.type, typeEnvironment, + pendingBoundsCheck.fileUri, pendingBoundsCheck.charOffset, + inferred: pendingBoundsCheck.inferred, allowSuperBounded: false); + break; + case TypeUse.instantiation: + // TODO(johnniwinther): Should we allow super bounded tear offs of + // non-proper renames? + checkBoundsInType(pendingBoundsCheck.type, typeEnvironment, + pendingBoundsCheck.fileUri, pendingBoundsCheck.charOffset, + inferred: pendingBoundsCheck.inferred, allowSuperBounded: true); + break; + case TypeUse.enumSelfType: + // TODO(johnniwinther): Check/create this type as regular bounded i2b. + /* + checkBoundsInType(pendingBoundsCheck.type, typeEnvironment, + pendingBoundsCheck.fileUri, pendingBoundsCheck.charOffset, + inferred: pendingBoundsCheck.inferred, + allowSuperBounded: false); + */ + break; + case TypeUse.macroTypeArgument: + case TypeUse.typeParameterDefaultType: + case TypeUse.defaultTypeAsTypeArgument: + case TypeUse.deferredTypeError: + case TypeUse.functionSignature: + break; + } + } + _pendingBoundsChecks.clear(); + + for (GenericFunctionTypeCheck genericFunctionTypeCheck + in _pendingGenericFunctionTypeChecks) { + checkGenericFunctionTypeAsTypeArgumentThroughTypedef( + genericFunctionTypeCheck.type, + genericFunctionTypeCheck.fileUri, + genericFunctionTypeCheck.charOffset); + } + _pendingGenericFunctionTypeChecks.clear(); + } + + /// Reports an error if [type] contains is a generic function type used as + /// a type argument through its alias. + /// + /// For instance + /// + /// typedef A = B(T)>; + /// + /// here `A` doesn't use a generic function as type argument directly, but + /// its unaliased value `B(T)>` does. + /// + /// This is used for reporting generic function types used as a type argument, + /// which was disallowed before the 'generic-metadata' feature was enabled. + void checkGenericFunctionTypeAsTypeArgumentThroughTypedef( + TypedefType type, Uri fileUri, int fileOffset) { + assert(!libraryFeatures.genericMetadata.isEnabled); + if (!hasGenericFunctionTypeAsTypeArgument(type)) { + DartType unaliased = type.unalias; + if (hasGenericFunctionTypeAsTypeArgument(unaliased)) { + addProblem( + templateGenericFunctionTypeAsTypeArgumentThroughTypedef + .withArguments(unaliased, type, isNonNullableByDefault), + fileOffset, + noLength, + fileUri); + } } - uncheckedTypedefTypes.clear(); } void installTypedefTearOffs() { @@ -5459,11 +5373,21 @@ class PendingNullability { } } -class UncheckedTypedefType { - final TypedefType typeToCheck; +class PendingBoundsCheck { + final DartType type; + final Uri fileUri; + final int charOffset; + final TypeUse typeUse; + final bool inferred; - int? offset; - Uri? fileUri; - - UncheckedTypedefType(this.typeToCheck); + PendingBoundsCheck(this.type, this.fileUri, this.charOffset, this.typeUse, + {required this.inferred}); +} + +class GenericFunctionTypeCheck { + final TypedefType type; + final Uri fileUri; + final int charOffset; + + GenericFunctionTypeCheck(this.type, this.fileUri, this.charOffset); } diff --git a/pkg/front_end/lib/src/fasta/source/source_loader.dart b/pkg/front_end/lib/src/fasta/source/source_loader.dart index c98f659535e..cf387f53e49 100644 --- a/pkg/front_end/lib/src/fasta/source/source_loader.dart +++ b/pkg/front_end/lib/src/fasta/source/source_loader.dart @@ -84,6 +84,7 @@ import '../ticker.dart' show Ticker; import '../type_inference/type_inference_engine.dart'; import '../type_inference/type_inferrer.dart'; import '../util/helpers.dart'; +import '../uris.dart'; import 'diet_listener.dart' show DietListener; import 'diet_parser.dart' show DietParser, useImplicitCreationExpressionInCfe; import 'name_scheme.dart'; @@ -717,6 +718,8 @@ class SourceLoader extends Loader { List? context, bool problemOnLibrary: false, List? involvedFiles}) { + assert( + fileUri != missingUri, "Message unexpectedly reported on missing uri."); severity ??= message.code.severity; if (severity == Severity.ignored) return null; String trace = """ diff --git a/pkg/front_end/lib/src/fasta/source/source_type_alias_builder.dart b/pkg/front_end/lib/src/fasta/source/source_type_alias_builder.dart index c24455e7370..8cf8c311e8c 100644 --- a/pkg/front_end/lib/src/fasta/source/source_type_alias_builder.dart +++ b/pkg/front_end/lib/src/fasta/source/source_type_alias_builder.dart @@ -6,7 +6,6 @@ library fasta.source_type_alias_builder; import 'package:kernel/ast.dart'; import 'package:kernel/class_hierarchy.dart'; -import 'package:kernel/type_environment.dart'; import '../builder/builder.dart'; import '../builder/class_builder.dart'; @@ -88,7 +87,7 @@ class SourceTypeAliasBuilder extends TypeAliasBuilderImpl { } Typedef build() { - typedef.type ??= buildThisType(); + buildThisType(); TypeBuilder? type = this.type; if (type is FunctionTypeBuilder || @@ -120,38 +119,29 @@ class SourceTypeAliasBuilder extends TypeAliasBuilderImpl { // detect cycles by detecting recursive calls to this method using an // instance of InvalidType that isn't identical to `const InvalidType()`. thisType = pendingTypeAliasMarker; + DartType builtType = const InvalidType(); TypeBuilder? type = this.type; // ignore: unnecessary_null_comparison if (type != null) { - DartType builtType = type.build(libraryBuilder); - if (builtType is FunctionType) { - // Set the `typedefType` if it hasn't already been set. It can already - // be set if this type alias is an alias of another typedef, in which - // we use the existing value. For instance - // - // typedef void F(); // typedefType will be set to `F`. - // typedef G = F; // The typedefType has already been set to `F`. - // - builtType.typedefType ??= thisTypedefType(typedef, libraryBuilder); - } + builtType = type.build(libraryBuilder, TypeUse.typedefAlias); // ignore: unnecessary_null_comparison if (builtType != null) { if (typeVariables != null) { for (TypeVariableBuilder tv in typeVariables!) { // Follow bound in order to find all cycles - tv.bound?.build(libraryBuilder); + tv.bound?.build(libraryBuilder, TypeUse.typeParameterBound); } } if (identical(thisType, cyclicTypeAliasMarker)) { - return thisType = const InvalidType(); + builtType = const InvalidType(); } else { - return thisType = builtType; + builtType = builtType; } } else { - return thisType = const InvalidType(); + builtType = const InvalidType(); } } - return thisType = const InvalidType(); + return thisType = typedef.type ??= builtType; } TypedefType thisTypedefType(Typedef typedef, LibraryBuilder clientLibrary) { @@ -190,15 +180,23 @@ class SourceTypeAliasBuilder extends TypeAliasBuilderImpl { } @override - List buildTypeArguments( + List buildAliasedTypeArguments( LibraryBuilder library, List? arguments) { if (arguments == null && typeVariables == null) { return []; } if (arguments == null && typeVariables != null) { - List result = new List.generate(typeVariables!.length, - (int i) => typeVariables![i].defaultType!.build(library), + // TODO(johnniwinther): Use i2b here when needed. + List result = new List.generate( + typeVariables!.length, + (int i) => typeVariables![i] + .defaultType! + // TODO(johnniwinther): Using [libraryBuilder] here instead of + // [library] preserves the nullability of the original + // declaration. We legacy erase it later, but should we legacy + // erase it now also? + .buildAliased(libraryBuilder, TypeUse.defaultTypeAsTypeArgument), growable: true); if (library is SourceLibraryBuilder) { library.inferredTypes.addAll(result); @@ -218,19 +216,11 @@ class SourceTypeAliasBuilder extends TypeAliasBuilderImpl { } // arguments.length == typeVariables.length - return new List.generate( - arguments!.length, (int i) => arguments[i].build(library), + return new List.generate(arguments!.length, + (int i) => arguments[i].buildAliased(library, TypeUse.typeArgument), growable: true); } - void checkTypesInOutline(TypeEnvironment typeEnvironment) { - libraryBuilder.checkBoundsInTypeParameters( - typeEnvironment, typedef.typeParameters, fileUri); - libraryBuilder.checkBoundsInType( - typedef.type!, typeEnvironment, fileUri, type?.charOffset ?? charOffset, - allowSuperBounded: false); - } - void buildOutlineExpressions( ClassHierarchy classHierarchy, List delayedActionPerformers, diff --git a/pkg/front_end/lib/src/fasta/type_inference/type_demotion.dart b/pkg/front_end/lib/src/fasta/type_inference/type_demotion.dart index 9e4a88b4bae..48a092964e1 100644 --- a/pkg/front_end/lib/src/fasta/type_inference/type_demotion.dart +++ b/pkg/front_end/lib/src/fasta/type_inference/type_demotion.dart @@ -26,10 +26,6 @@ class _HasPromotedTypeVariableVisitor extends DartTypeVisitor { for (NamedType namedParameterType in node.namedParameters) { if (namedParameterType.type.accept(this)) return true; } - TypedefType? typedefType = node.typedefType; - if (typedefType != null && typedefType.accept(this)) { - return true; - } return false; } diff --git a/pkg/front_end/lib/src/fasta/type_inference/type_inferrer.dart b/pkg/front_end/lib/src/fasta/type_inference/type_inferrer.dart index 609515e7360..979bf9dd504 100644 --- a/pkg/front_end/lib/src/fasta/type_inference/type_inferrer.dart +++ b/pkg/front_end/lib/src/fasta/type_inference/type_inferrer.dart @@ -10,7 +10,8 @@ import 'package:kernel/ast.dart'; import 'package:kernel/canonical_name.dart' as kernel; import 'package:kernel/class_hierarchy.dart' show ClassHierarchy; import 'package:kernel/core_types.dart' show CoreTypes; -import 'package:kernel/src/bounds_checks.dart' show calculateBounds; +import 'package:kernel/src/bounds_checks.dart' + show calculateBounds, isGenericFunctionTypeOrAlias; import 'package:kernel/src/future_value_type.dart'; import 'package:kernel/src/legacy_erasure.dart'; import 'package:kernel/type_algebra.dart'; @@ -4875,6 +4876,22 @@ class TypeInferrerImpl implements TypeInferrer { return new EqualsNull(left)..fileOffset = fileOffset; } + /// Reports an error if [typeArgument] is a generic function type. + /// + /// This is use for reporting generic function types used as a type argument, + /// which was disallowed before the 'generic-metadata' feature was enabled. + void checkGenericFunctionTypeArgument(DartType typeArgument, int fileOffset) { + assert(!libraryBuilder.libraryFeatures.genericMetadata.isEnabled); + if (isGenericFunctionTypeOrAlias(typeArgument)) { + libraryBuilder.addProblem( + templateGenericFunctionTypeInferredAsActualTypeArgument.withArguments( + typeArgument, isNonNullableByDefault), + fileOffset, + noLength, + helper!.uri); + } + } + DartType _computeInferredType(ExpressionInferenceResult result) => identical(result.inferredType, noInferredType) || isNonNullableByDefault ? result.inferredType diff --git a/pkg/front_end/lib/src/fasta/type_inference/type_schema.dart b/pkg/front_end/lib/src/fasta/type_inference/type_schema.dart index acd6439c800..54c2b25b3e0 100644 --- a/pkg/front_end/lib/src/fasta/type_inference/type_schema.dart +++ b/pkg/front_end/lib/src/fasta/type_inference/type_schema.dart @@ -13,6 +13,7 @@ import 'package:kernel/ast.dart' NamedType, Nullability, TypedefType, + TypeParameter, Visitor; import 'package:kernel/src/assumptions.dart'; import 'package:kernel/src/printer.dart'; @@ -122,8 +123,9 @@ class _IsKnownVisitor extends DartTypeVisitor { for (NamedType namedParameterType in node.namedParameters) { if (!namedParameterType.type.accept(this)) return false; } - if (node.typedefType != null && !node.typedefType!.accept(this)) { - return false; + for (TypeParameter typeParameter in node.typeParameters) { + if (!typeParameter.bound.accept(this)) return false; + if (!typeParameter.defaultType.accept(this)) return false; } return true; } diff --git a/pkg/front_end/lib/src/fasta/type_inference/type_schema_environment.dart b/pkg/front_end/lib/src/fasta/type_inference/type_schema_environment.dart index dd2f2330af4..aeb70729360 100644 --- a/pkg/front_end/lib/src/fasta/type_inference/type_schema_environment.dart +++ b/pkg/front_end/lib/src/fasta/type_inference/type_schema_environment.dart @@ -49,10 +49,7 @@ FunctionType substituteTypeParams( isRequired: named.isRequired)) .toList(), typeParameters: newTypeParameters, - requiredParameterCount: type.requiredParameterCount, - typedefType: type.typedefType == null - ? null - : substitution.substituteType(type.typedefType!) as TypedefType); + requiredParameterCount: type.requiredParameterCount); } /// Given a [FunctionType], gets the type of the named parameter with the given diff --git a/pkg/front_end/lib/src/fasta/uris.dart b/pkg/front_end/lib/src/fasta/uris.dart new file mode 100644 index 00000000000..28dc2e23188 --- /dev/null +++ b/pkg/front_end/lib/src/fasta/uris.dart @@ -0,0 +1,6 @@ +// Copyright (c) 2022, 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. + +final Uri dartCore = Uri.parse('dart:core'); +final Uri missingUri = Uri.parse('org-dartlang-internal:missing'); diff --git a/pkg/front_end/messages.status b/pkg/front_end/messages.status index dae8e7147f3..125a09dd0a5 100644 --- a/pkg/front_end/messages.status +++ b/pkg/front_end/messages.status @@ -429,6 +429,7 @@ FunctionTypedParameterVar/part_wrapped_script1: Fail FunctionTypedParameterVar/script1: Fail FunctionUsedAsDec/analyzerCode: Fail GeneratorReturnsValue/example: Fail +GenericFunctionTypeAsTypeArgumentThroughTypedef/example: Fail GetterNotFound/example: Fail GetterWithFormals/example: Fail IllegalAssignmentToNonAssignable/part_wrapped_script1: Fail @@ -467,9 +468,6 @@ ImportAfterPart/script1: Fail IncompatibleRedirecteeFunctionType/part_wrapped_script6: Fail IncompatibleRedirecteeFunctionType/script6: Fail # Triggers multiple errors. IncompatibleRedirecteeFunctionTypeWarning/example: Fail -IncorrectTypeArgumentInReturnTypeWarning/example: Fail -IncorrectTypeArgumentInSupertypeInferredWarning/example: Fail -IncorrectTypeArgumentInSupertypeWarning/example: Fail IncorrectTypeArgumentInferredWarning/example: Fail IncorrectTypeArgumentQualifiedInferredWarning/example: Fail IncorrectTypeArgumentQualifiedWarning/example: Fail diff --git a/pkg/front_end/messages.yaml b/pkg/front_end/messages.yaml index abf6263e19c..745eeadae78 100644 --- a/pkg/front_end/messages.yaml +++ b/pkg/front_end/messages.yaml @@ -4453,22 +4453,6 @@ IncorrectTypeArgumentQualified: class C { foo() {} } main() { new C().foo(); } -IncorrectTypeArgumentInSupertype: - problemMessage: "Type argument '#type' doesn't conform to the bound '#type2' of the type variable '#name' on '#name2' in the supertype '#name3' of class '#name4'." - correctionMessage: "Try changing type arguments so that they conform to the bounds." - analyzerCode: TYPE_ARGUMENT_NOT_MATCHING_BOUNDS - script: > - class A {} - class B extends A {} - -IncorrectTypeArgumentInReturnType: - problemMessage: "Type argument '#type' doesn't conform to the bound '#type2' of the type variable '#name' on '#name2' in the return type." - correctionMessage: "Try changing type arguments so that they conform to the bounds." - analyzerCode: TYPE_ARGUMENT_NOT_MATCHING_BOUNDS - script: > - class A {} - A foo() => throw ''; - IncorrectTypeArgumentInferred: problemMessage: "Inferred type argument '#type' doesn't conform to the bound '#type2' of the type variable '#name' on '#name2'." correctionMessage: "Try specifying type arguments explicitly so that they conform to the bounds." @@ -4485,14 +4469,6 @@ IncorrectTypeArgumentQualifiedInferred: class C { foo(U u) {} } main() { new C().foo(""); } -IncorrectTypeArgumentInSupertypeInferred: - problemMessage: "Inferred type argument '#type' doesn't conform to the bound '#type2' of the type variable '#name' on '#name2' in the supertype '#name3' of class '#name4'." - correctionMessage: "Try specifying type arguments explicitly so that they conform to the bounds." - analyzerCode: TYPE_ARGUMENT_NOT_MATCHING_BOUNDS - script: > - class A> {} - class B extends A {} - IncorrectTypeArgumentInstantiation: problemMessage: "Type argument '#type' doesn't conform to the bound '#type2' of the type variable '#name' on '#type3'." correctionMessage: "Try changing type arguments so that they conform to the bounds." @@ -4560,6 +4536,11 @@ GenericFunctionTypeInferredAsActualTypeArgument: bar(Y y) => null; main() { foo(bar); } +GenericFunctionTypeAsTypeArgumentThroughTypedef: + problemMessage: "Generic function type '#type' used as a type argument through typedef '#type2'." + correctionMessage: "Try providing a non-generic function type explicitly." + analyzerCode: GENERIC_FUNCTION_CANNOT_BE_TYPE_ARGUMENT + # These two message templates are used for constructing supplemental text # about the origins of raw interface types in error messages containing types. TypeOrigin: diff --git a/pkg/front_end/test/spell_checking_list_code.txt b/pkg/front_end/test/spell_checking_list_code.txt index b143afe0e50..268a80e0fbc 100644 --- a/pkg/front_end/test/spell_checking_list_code.txt +++ b/pkg/front_end/test/spell_checking_list_code.txt @@ -426,6 +426,7 @@ eof eq equation equivalences +erase erased es establish @@ -765,6 +766,7 @@ macos macro macros maintaining +malbounded mangled manipulation manner diff --git a/pkg/front_end/test/text_representation/data/types.dart b/pkg/front_end/test/text_representation/data/types.dart index 029481c4db9..4145fe9fb3e 100644 --- a/pkg/front_end/test/text_representation/data/types.dart +++ b/pkg/front_end/test/text_representation/data/types.dart @@ -155,51 +155,46 @@ genericFunctionType4( // TODO(johnniwinther): Support interdependent function type variables. //genericFunctionType5(T Function([T, S]) o) {} //genericFunctionType6(T Function([T, S]) o) {} -typedefType1( - Typedef1 /*normal|limited.Typedef1*/ /*verbose.test::Typedef1*/ o) {} +typedefType1(Typedef1 /*void Function()*/ o) {} typedefType2( Typedef2 - /*normal|limited.Typedef2*/ - /*verbose.test::Typedef2*/ + /*void Function(dynamic)*/ o) {} typedefType3( Typedef2 - /*normal|limited.Typedef2*/ - /*verbose.test::Typedef2*/ + /*normal|limited.void Function(int)*/ + /*verbose.void Function(dart.core::int)*/ o1, Typedef2 - /*normal|limited.Typedef2*/ - /*verbose.test::Typedef2*/ + /*normal|limited.void Function(int?)*/ + /*verbose.void Function(dart.core::int?)*/ o2) {} -typedefType4( - Typedef3 /*normal|limited.Typedef3*/ /*verbose.test::Typedef3*/ o) {} +typedefType4(Typedef3 /*void Function()*/ o) {} typedefType5( Typedef4 - /*normal|limited.Typedef4*/ -/*verbose.test::Typedef4*/ + /*void Function(dynamic)*/ o) {} typedefType7( Typedef4 - /*normal|limited.Typedef4*/ - /*verbose.test::Typedef4*/ + /*normal|limited.void Function(int)*/ + /*verbose.void Function(dart.core::int)*/ o1, Typedef4? - /*normal|limited.Typedef4?*/ - /*verbose.test::Typedef4?*/ + /*normal|limited.void Function(int)?*/ + /*verbose.void Function(dart.core::int)?*/ o2) {} typedefType8( Typedef5 - /*normal|limited.Typedef5*/ - /*verbose.test::Typedef5*/ + /*void Function(dynamic, S%)*/ o) {} typedefType9( Typedef5 - /*normal|limited.Typedef5*/ - /*verbose.test::Typedef5*/ + /*normal|limited.void Function(int, S%)*/ + /*verbose.void Function(dart.core::int, S%)*/ o1, Typedef5? - /*normal|limited.Typedef5?*/ - /*verbose.test::Typedef5?*/ + /*normal|limited.void Function(int?, S%)?*/ + /*verbose.void Function(dart.core::int?, S%)?*/ o2) {} method() { diff --git a/pkg/front_end/test/text_representation/data/types_opt_out.dart b/pkg/front_end/test/text_representation/data/types_opt_out.dart index b8643360222..94c86e809d5 100644 --- a/pkg/front_end/test/text_representation/data/types_opt_out.dart +++ b/pkg/front_end/test/text_representation/data/types_opt_out.dart @@ -99,42 +99,37 @@ genericFunctionType4( // TODO(johnniwinther): Support interdependent function type variables. //genericFunctionType5(T Function([T, S]) o) {} //genericFunctionType6(T Function([T, S]) o) {} -typedefType1( - Typedef1 /*normal|limited.Typedef1**/ /*verbose.test::Typedef1**/ o) {} +typedefType1(Typedef1 /*void Function()**/ o) {} typedefType2( Typedef2 - /*normal|limited.Typedef2**/ - /*verbose.test::Typedef2**/ + /*void Function(dynamic)**/ o) {} typedefType3( Typedef2 - /*normal|limited.Typedef2**/ - /*verbose.test::Typedef2**/ + /*normal|limited.void Function(int*)**/ + /*verbose.void Function(dart.core::int*)**/ o) {} typedefType4( Typedef3 - /*normal|limited.Typedef3**/ - /*verbose.test::Typedef3**/ + /*void Function()**/ o) {} typedefType5( Typedef4 - /*normal|limited.Typedef4**/ - /*verbose.test::Typedef4**/ + /*void Function(dynamic)**/ o) {} typedefType7( Typedef4 - /*normal|limited.Typedef4**/ - /*verbose.test::Typedef4**/ + /*normal|limited.void Function(int*)**/ + /*verbose.void Function(dart.core::int*)**/ o) {} typedefType8( Typedef5 - /*normal|limited.Typedef5**/ - /*verbose.test::Typedef5**/ + /*void Function(dynamic, S*)**/ o) {} typedefType9( Typedef5 - /*normal|limited.Typedef5**/ - /*verbose.test::Typedef5**/ + /*normal|limited.void Function(int*, S*)**/ + /*verbose.void Function(dart.core::int*, S*)**/ o) {} method() { diff --git a/pkg/front_end/test/text_representation/text_representation_test.dart b/pkg/front_end/test/text_representation/text_representation_test.dart index 24e5246165a..b92bd42e0dc 100644 --- a/pkg/front_end/test/text_representation/text_representation_test.dart +++ b/pkg/front_end/test/text_representation/text_representation_test.dart @@ -181,11 +181,7 @@ class TextRepresentationDataExtractor extends CfeDataExtractor { return node.constant.toText(strategy); } else if (node is VariableDeclaration) { DartType type = node.type; - if (type is FunctionType && type.typedefType != null) { - return type.typedefType!.toText(strategy); - } else { - return type.toText(strategy); - } + return type.toText(strategy); } return null; } diff --git a/pkg/front_end/testcases/dart2js/generic_usage_type_variable.dart b/pkg/front_end/testcases/dart2js/generic_usage_type_variable.dart new file mode 100644 index 00000000000..05a8ef29c83 --- /dev/null +++ b/pkg/front_end/testcases/dart2js/generic_usage_type_variable.dart @@ -0,0 +1,57 @@ +// Copyright (c) 2021, 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. + +import 'dart:async'; + +// Introduce an aliased type. +typedef T = X; + +// Use the aliased type. + +T? v1; +List> v2 = []; +final T v3 = throw "Anything"; +const List> v4 = []; +const v5 = {T: T}; + +abstract class C { + static T? v1; + static List> v2 = []; + static final T v3 = throw "Anything"; + static const List> v4 = []; + + T? v5; + List> v6 = []; + final T v7; + + C() : v7 = null; + C.name1(this.v5, this.v7); + factory C.name2(T arg1, T arg2) = C1.name1; + + T operator +(T other); + T>> get g; + set g(T>> value); + Map, T> m1(covariant T arg1, [Set>> arg2]); + void m2({T arg1, Map arg2(T Function(T) arg21, T arg22)}); +} + +class C1 implements C { + C1.name1(T arg1, T arg2); + noSuchMethod(Invocation invocation) => throw 0; +} + +class D {} + +extension E on T { + T foo(T t) => t; +} + +main() { + var v8 = >[]; + var v9 = >, Set>>{{}: {}}; + var v10 = {v8}; + v9[{}] = {42}; + Set>> v11 = v10; + v10 = v11; +} diff --git a/pkg/front_end/testcases/dart2js/generic_usage_type_variable.dart.strong.expect b/pkg/front_end/testcases/dart2js/generic_usage_type_variable.dart.strong.expect new file mode 100644 index 00000000000..bc821c962b4 --- /dev/null +++ b/pkg/front_end/testcases/dart2js/generic_usage_type_variable.dart.strong.expect @@ -0,0 +1,99 @@ +library /*isNonNullableByDefault*/; +import self as self; +import "dart:core" as core; + +import "dart:async"; + +typedef T = X%; +abstract class C extends core::Object { + static field self::C? v1 = null; + static field core::List v2 = []; + static final field Null v3 = throw "Anything"; + static const field core::List> v4 = #C1; + field self::D? v5; + field core::List v6 = []; + final field Null v7; + static final field dynamic _redirecting# = [#C2]/*isLegacy*/; + constructor •() → self::C + : self::C::v5 = null, self::C::v7 = null, super core::Object::•() + ; + constructor name1(self::D? v5, Null v7) → self::C + : self::C::v5 = v5, self::C::v7 = v7, super core::Object::•() + ; + static factory name2(self::D arg1, Null arg2) → self::C + return new self::C1::name1(arg1, arg2); + static method _#name2#tearOff(self::D arg1, Null arg2) → self::C + return new self::C1::name1(arg1, arg2); + abstract operator +(core::double other) → core::double; + abstract get g() → FutureOr>?; + abstract set g(FutureOr>? value) → void; + abstract method m1(covariant-by-declaration self::C arg1, [core::Set> arg2 = #C3]) → core::Map; + abstract method m2({dynamic arg1 = #C3, ((dynamic) → dynamic, dynamic) → core::Map arg2 = #C3}) → void; +} +class C1 extends core::Object implements self::C { + constructor name1(self::D arg1, Null arg2) → self::C1 + : super core::Object::•() + ; + static method _#name1#tearOff(self::D arg1, Null arg2) → self::C1 + return new self::C1::name1(arg1, arg2); + method noSuchMethod(core::Invocation invocation) → dynamic + return throw 0; + no-such-method-forwarder get v7() → Null + return this.{self::C1::noSuchMethod}(core::_createInvocationMirror("v7", [], [], #C4, 1)){(core::Invocation) → dynamic} as{TypeError,ForDynamic,ForNonNullableByDefault} Null; + no-such-method-forwarder operator +(core::double other) → core::double + return this.{self::C1::noSuchMethod}(core::_createInvocationMirror("+", [], [other], #C4, 0)){(core::Invocation) → dynamic} as{TypeError,ForDynamic,ForNonNullableByDefault} core::double; + no-such-method-forwarder get v6() → core::List + return this.{self::C1::noSuchMethod}(core::_createInvocationMirror("v6", [], [], #C4, 1)){(core::Invocation) → dynamic} as{TypeError,ForDynamic,ForNonNullableByDefault} core::List; + no-such-method-forwarder get v5() → self::D? + return this.{self::C1::noSuchMethod}(core::_createInvocationMirror("v5", [], [], #C4, 1)){(core::Invocation) → dynamic} as{TypeError,ForDynamic,ForNonNullableByDefault} self::D?; + no-such-method-forwarder method m1(covariant-by-declaration self::C arg1, [core::Set> arg2 = #C3]) → core::Map + return this.{self::C1::noSuchMethod}(core::_createInvocationMirror("m1", [], [arg1, arg2], #C4, 0)){(core::Invocation) → dynamic} as{TypeError,ForDynamic,ForNonNullableByDefault} core::Map; + no-such-method-forwarder method m2({dynamic arg1 = #C3, ((dynamic) → dynamic, dynamic) → core::Map arg2 = #C3}) → void + return this.{self::C1::noSuchMethod}(core::_createInvocationMirror("m2", [], [], {"arg1": arg1, "arg2": arg2}, 0)){(core::Invocation) → dynamic}; + no-such-method-forwarder get g() → FutureOr>? + return this.{self::C1::noSuchMethod}(core::_createInvocationMirror("g", [], [], #C4, 1)){(core::Invocation) → dynamic} as{TypeError,ForDynamic,ForNonNullableByDefault} FutureOr>?; + no-such-method-forwarder set v6(core::List value) → void + return this.{self::C1::noSuchMethod}(core::_createInvocationMirror("v6=", [], [value], #C4, 2)){(core::Invocation) → dynamic}; + no-such-method-forwarder set v5(self::D? value) → void + return this.{self::C1::noSuchMethod}(core::_createInvocationMirror("v5=", [], [value], #C4, 2)){(core::Invocation) → dynamic}; + no-such-method-forwarder set g(FutureOr>? value) → void + return this.{self::C1::noSuchMethod}(core::_createInvocationMirror("g=", [], [value], #C4, 2)){(core::Invocation) → dynamic}; +} +class D extends core::Object { + synthetic constructor •() → self::D + : super core::Object::•() + ; + static method _#new#tearOff() → self::D + return new self::D::•(); +} +extension E on dynamic { + method foo = self::E|foo; + tearoff foo = self::E|get#foo; +} +static field core::int? v1; +static field core::List v2 = []; +static final field core::String v3 = throw "Anything"; +static const field core::List v4 = #C5; +static const field core::Map v5 = #C7; +static method E|foo(lowered final dynamic #this, dynamic t) → dynamic + return t; +static method E|get#foo(lowered final dynamic #this) → (dynamic) → dynamic + return (dynamic t) → dynamic => self::E|foo(#this, t); +static method main() → dynamic { + core::List v8 = []; + core::Map, core::Set> v9 = , core::Set>{{}: {}}; + core::Set> v10 = >{v8}; + v9.{core::Map::[]=}({}, {42}){(core::Set, core::Set) → void}; + core::Set> v11 = v10; + v10 = v11; +} + +constants { + #C1 = >[] + #C2 = constructor-tearoff self::C::name2 + #C3 = null + #C4 = {) + #C5 = [] + #C6 = TypeLiteralConstant(dynamic) + #C7 = {#C6:#C6) +} diff --git a/pkg/front_end/testcases/dart2js/generic_usage_type_variable.dart.strong.transformed.expect b/pkg/front_end/testcases/dart2js/generic_usage_type_variable.dart.strong.transformed.expect new file mode 100644 index 00000000000..bc821c962b4 --- /dev/null +++ b/pkg/front_end/testcases/dart2js/generic_usage_type_variable.dart.strong.transformed.expect @@ -0,0 +1,99 @@ +library /*isNonNullableByDefault*/; +import self as self; +import "dart:core" as core; + +import "dart:async"; + +typedef T = X%; +abstract class C extends core::Object { + static field self::C? v1 = null; + static field core::List v2 = []; + static final field Null v3 = throw "Anything"; + static const field core::List> v4 = #C1; + field self::D? v5; + field core::List v6 = []; + final field Null v7; + static final field dynamic _redirecting# = [#C2]/*isLegacy*/; + constructor •() → self::C + : self::C::v5 = null, self::C::v7 = null, super core::Object::•() + ; + constructor name1(self::D? v5, Null v7) → self::C + : self::C::v5 = v5, self::C::v7 = v7, super core::Object::•() + ; + static factory name2(self::D arg1, Null arg2) → self::C + return new self::C1::name1(arg1, arg2); + static method _#name2#tearOff(self::D arg1, Null arg2) → self::C + return new self::C1::name1(arg1, arg2); + abstract operator +(core::double other) → core::double; + abstract get g() → FutureOr>?; + abstract set g(FutureOr>? value) → void; + abstract method m1(covariant-by-declaration self::C arg1, [core::Set> arg2 = #C3]) → core::Map; + abstract method m2({dynamic arg1 = #C3, ((dynamic) → dynamic, dynamic) → core::Map arg2 = #C3}) → void; +} +class C1 extends core::Object implements self::C { + constructor name1(self::D arg1, Null arg2) → self::C1 + : super core::Object::•() + ; + static method _#name1#tearOff(self::D arg1, Null arg2) → self::C1 + return new self::C1::name1(arg1, arg2); + method noSuchMethod(core::Invocation invocation) → dynamic + return throw 0; + no-such-method-forwarder get v7() → Null + return this.{self::C1::noSuchMethod}(core::_createInvocationMirror("v7", [], [], #C4, 1)){(core::Invocation) → dynamic} as{TypeError,ForDynamic,ForNonNullableByDefault} Null; + no-such-method-forwarder operator +(core::double other) → core::double + return this.{self::C1::noSuchMethod}(core::_createInvocationMirror("+", [], [other], #C4, 0)){(core::Invocation) → dynamic} as{TypeError,ForDynamic,ForNonNullableByDefault} core::double; + no-such-method-forwarder get v6() → core::List + return this.{self::C1::noSuchMethod}(core::_createInvocationMirror("v6", [], [], #C4, 1)){(core::Invocation) → dynamic} as{TypeError,ForDynamic,ForNonNullableByDefault} core::List; + no-such-method-forwarder get v5() → self::D? + return this.{self::C1::noSuchMethod}(core::_createInvocationMirror("v5", [], [], #C4, 1)){(core::Invocation) → dynamic} as{TypeError,ForDynamic,ForNonNullableByDefault} self::D?; + no-such-method-forwarder method m1(covariant-by-declaration self::C arg1, [core::Set> arg2 = #C3]) → core::Map + return this.{self::C1::noSuchMethod}(core::_createInvocationMirror("m1", [], [arg1, arg2], #C4, 0)){(core::Invocation) → dynamic} as{TypeError,ForDynamic,ForNonNullableByDefault} core::Map; + no-such-method-forwarder method m2({dynamic arg1 = #C3, ((dynamic) → dynamic, dynamic) → core::Map arg2 = #C3}) → void + return this.{self::C1::noSuchMethod}(core::_createInvocationMirror("m2", [], [], {"arg1": arg1, "arg2": arg2}, 0)){(core::Invocation) → dynamic}; + no-such-method-forwarder get g() → FutureOr>? + return this.{self::C1::noSuchMethod}(core::_createInvocationMirror("g", [], [], #C4, 1)){(core::Invocation) → dynamic} as{TypeError,ForDynamic,ForNonNullableByDefault} FutureOr>?; + no-such-method-forwarder set v6(core::List value) → void + return this.{self::C1::noSuchMethod}(core::_createInvocationMirror("v6=", [], [value], #C4, 2)){(core::Invocation) → dynamic}; + no-such-method-forwarder set v5(self::D? value) → void + return this.{self::C1::noSuchMethod}(core::_createInvocationMirror("v5=", [], [value], #C4, 2)){(core::Invocation) → dynamic}; + no-such-method-forwarder set g(FutureOr>? value) → void + return this.{self::C1::noSuchMethod}(core::_createInvocationMirror("g=", [], [value], #C4, 2)){(core::Invocation) → dynamic}; +} +class D extends core::Object { + synthetic constructor •() → self::D + : super core::Object::•() + ; + static method _#new#tearOff() → self::D + return new self::D::•(); +} +extension E on dynamic { + method foo = self::E|foo; + tearoff foo = self::E|get#foo; +} +static field core::int? v1; +static field core::List v2 = []; +static final field core::String v3 = throw "Anything"; +static const field core::List v4 = #C5; +static const field core::Map v5 = #C7; +static method E|foo(lowered final dynamic #this, dynamic t) → dynamic + return t; +static method E|get#foo(lowered final dynamic #this) → (dynamic) → dynamic + return (dynamic t) → dynamic => self::E|foo(#this, t); +static method main() → dynamic { + core::List v8 = []; + core::Map, core::Set> v9 = , core::Set>{{}: {}}; + core::Set> v10 = >{v8}; + v9.{core::Map::[]=}({}, {42}){(core::Set, core::Set) → void}; + core::Set> v11 = v10; + v10 = v11; +} + +constants { + #C1 = >[] + #C2 = constructor-tearoff self::C::name2 + #C3 = null + #C4 = {) + #C5 = [] + #C6 = TypeLiteralConstant(dynamic) + #C7 = {#C6:#C6) +} diff --git a/pkg/front_end/testcases/dart2js/generic_usage_type_variable.dart.textual_outline.expect b/pkg/front_end/testcases/dart2js/generic_usage_type_variable.dart.textual_outline.expect new file mode 100644 index 00000000000..7421287cdeb --- /dev/null +++ b/pkg/front_end/testcases/dart2js/generic_usage_type_variable.dart.textual_outline.expect @@ -0,0 +1,39 @@ +import 'dart:async'; + +typedef T = X; +T? v1; +List> v2 = []; +final T v3 = throw "Anything"; +const List> v4 = []; +const v5 = {T: T}; + +abstract class C { + static T? v1; + static List> v2 = []; + static final T v3 = throw "Anything"; + static const List> v4 = []; + T? v5; + List> v6 = []; + final T v7; + C() : v7 = null; + C.name1(this.v5, this.v7); + factory C.name2(T arg1, T arg2) = C1.name1; + T operator +(T other); + T>> get g; + set g(T>> value); + Map, T> m1(covariant T arg1, [Set>> arg2]); + void m2({T arg1, Map arg2(T Function(T) arg21, T arg22)}); +} + +class C1 implements C { + C1.name1(T arg1, T arg2); + noSuchMethod(Invocation invocation) => throw 0; +} + +class D {} + +extension E on T { + T foo(T t) => t; +} + +main() {} diff --git a/pkg/front_end/testcases/dart2js/generic_usage_type_variable.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/dart2js/generic_usage_type_variable.dart.textual_outline_modelled.expect new file mode 100644 index 00000000000..73acea0f160 --- /dev/null +++ b/pkg/front_end/testcases/dart2js/generic_usage_type_variable.dart.textual_outline_modelled.expect @@ -0,0 +1,40 @@ +import 'dart:async'; + +List> v2 = []; +T? v1; + +abstract class C { + C() : v7 = null; + C.name1(this.v5, this.v7); + List> v6 = []; + Map, T> m1(covariant T arg1, [Set>> arg2]); + T? v5; + T>> get g; + T operator +(T other); + factory C.name2(T arg1, T arg2) = C1.name1; + final T v7; + set g(T>> value); + static List> v2 = []; + static T? v1; + static const List> v4 = []; + static final T v3 = throw "Anything"; + void m2({T arg1, Map arg2(T Function(T) arg21, T arg22)}); +} + +class C1 implements C { + C1.name1(T arg1, T arg2); + noSuchMethod(Invocation invocation) => throw 0; +} + +class D {} + +const List> v4 = []; +const v5 = {T: T}; + +extension E on T { + T foo(T t) => t; +} + +final T v3 = throw "Anything"; +main() {} +typedef T = X; diff --git a/pkg/front_end/testcases/dart2js/generic_usage_type_variable.dart.weak.expect b/pkg/front_end/testcases/dart2js/generic_usage_type_variable.dart.weak.expect new file mode 100644 index 00000000000..5e2354d9eb7 --- /dev/null +++ b/pkg/front_end/testcases/dart2js/generic_usage_type_variable.dart.weak.expect @@ -0,0 +1,99 @@ +library /*isNonNullableByDefault*/; +import self as self; +import "dart:core" as core; + +import "dart:async"; + +typedef T = X%; +abstract class C extends core::Object { + static field self::C? v1 = null; + static field core::List v2 = []; + static final field Null v3 = throw "Anything"; + static const field core::List> v4 = #C1; + field self::D? v5; + field core::List v6 = []; + final field Null v7; + static final field dynamic _redirecting# = [#C2]/*isLegacy*/; + constructor •() → self::C + : self::C::v5 = null, self::C::v7 = null, super core::Object::•() + ; + constructor name1(self::D? v5, Null v7) → self::C + : self::C::v5 = v5, self::C::v7 = v7, super core::Object::•() + ; + static factory name2(self::D arg1, Null arg2) → self::C + return new self::C1::name1(arg1, arg2); + static method _#name2#tearOff(self::D arg1, Null arg2) → self::C + return new self::C1::name1(arg1, arg2); + abstract operator +(core::double other) → core::double; + abstract get g() → FutureOr>?; + abstract set g(FutureOr>? value) → void; + abstract method m1(covariant-by-declaration self::C arg1, [core::Set> arg2 = #C3]) → core::Map; + abstract method m2({dynamic arg1 = #C3, ((dynamic) → dynamic, dynamic) → core::Map arg2 = #C3}) → void; +} +class C1 extends core::Object implements self::C { + constructor name1(self::D arg1, Null arg2) → self::C1 + : super core::Object::•() + ; + static method _#name1#tearOff(self::D arg1, Null arg2) → self::C1 + return new self::C1::name1(arg1, arg2); + method noSuchMethod(core::Invocation invocation) → dynamic + return throw 0; + no-such-method-forwarder get v7() → Null + return this.{self::C1::noSuchMethod}(core::_createInvocationMirror("v7", [], [], #C4, 1)){(core::Invocation) → dynamic} as{TypeError,ForDynamic,ForNonNullableByDefault} Null; + no-such-method-forwarder operator +(core::double other) → core::double + return this.{self::C1::noSuchMethod}(core::_createInvocationMirror("+", [], [other], #C4, 0)){(core::Invocation) → dynamic} as{TypeError,ForDynamic,ForNonNullableByDefault} core::double; + no-such-method-forwarder get v6() → core::List + return this.{self::C1::noSuchMethod}(core::_createInvocationMirror("v6", [], [], #C4, 1)){(core::Invocation) → dynamic} as{TypeError,ForDynamic,ForNonNullableByDefault} core::List; + no-such-method-forwarder get v5() → self::D? + return this.{self::C1::noSuchMethod}(core::_createInvocationMirror("v5", [], [], #C4, 1)){(core::Invocation) → dynamic} as{TypeError,ForDynamic,ForNonNullableByDefault} self::D?; + no-such-method-forwarder method m1(covariant-by-declaration self::C arg1, [core::Set> arg2 = #C3]) → core::Map + return this.{self::C1::noSuchMethod}(core::_createInvocationMirror("m1", [], [arg1, arg2], #C4, 0)){(core::Invocation) → dynamic} as{TypeError,ForDynamic,ForNonNullableByDefault} core::Map; + no-such-method-forwarder method m2({dynamic arg1 = #C3, ((dynamic) → dynamic, dynamic) → core::Map arg2 = #C3}) → void + return this.{self::C1::noSuchMethod}(core::_createInvocationMirror("m2", [], [], {"arg1": arg1, "arg2": arg2}, 0)){(core::Invocation) → dynamic}; + no-such-method-forwarder get g() → FutureOr>? + return this.{self::C1::noSuchMethod}(core::_createInvocationMirror("g", [], [], #C4, 1)){(core::Invocation) → dynamic} as{TypeError,ForDynamic,ForNonNullableByDefault} FutureOr>?; + no-such-method-forwarder set v6(core::List value) → void + return this.{self::C1::noSuchMethod}(core::_createInvocationMirror("v6=", [], [value], #C4, 2)){(core::Invocation) → dynamic}; + no-such-method-forwarder set v5(self::D? value) → void + return this.{self::C1::noSuchMethod}(core::_createInvocationMirror("v5=", [], [value], #C4, 2)){(core::Invocation) → dynamic}; + no-such-method-forwarder set g(FutureOr>? value) → void + return this.{self::C1::noSuchMethod}(core::_createInvocationMirror("g=", [], [value], #C4, 2)){(core::Invocation) → dynamic}; +} +class D extends core::Object { + synthetic constructor •() → self::D + : super core::Object::•() + ; + static method _#new#tearOff() → self::D + return new self::D::•(); +} +extension E on dynamic { + method foo = self::E|foo; + tearoff foo = self::E|get#foo; +} +static field core::int? v1; +static field core::List v2 = []; +static final field core::String v3 = throw "Anything"; +static const field core::List v4 = #C5; +static const field core::Map v5 = #C7; +static method E|foo(lowered final dynamic #this, dynamic t) → dynamic + return t; +static method E|get#foo(lowered final dynamic #this) → (dynamic) → dynamic + return (dynamic t) → dynamic => self::E|foo(#this, t); +static method main() → dynamic { + core::List v8 = []; + core::Map, core::Set> v9 = , core::Set>{{}: {}}; + core::Set> v10 = >{v8}; + v9.{core::Map::[]=}({}, {42}){(core::Set, core::Set) → void}; + core::Set> v11 = v10; + v10 = v11; +} + +constants { + #C1 = *>[] + #C2 = constructor-tearoff self::C::name2 + #C3 = null + #C4 = {) + #C5 = [] + #C6 = TypeLiteralConstant(dynamic) + #C7 = {#C6:#C6) +} diff --git a/pkg/front_end/testcases/dart2js/generic_usage_type_variable.dart.weak.modular.expect b/pkg/front_end/testcases/dart2js/generic_usage_type_variable.dart.weak.modular.expect new file mode 100644 index 00000000000..5e2354d9eb7 --- /dev/null +++ b/pkg/front_end/testcases/dart2js/generic_usage_type_variable.dart.weak.modular.expect @@ -0,0 +1,99 @@ +library /*isNonNullableByDefault*/; +import self as self; +import "dart:core" as core; + +import "dart:async"; + +typedef T = X%; +abstract class C extends core::Object { + static field self::C? v1 = null; + static field core::List v2 = []; + static final field Null v3 = throw "Anything"; + static const field core::List> v4 = #C1; + field self::D? v5; + field core::List v6 = []; + final field Null v7; + static final field dynamic _redirecting# = [#C2]/*isLegacy*/; + constructor •() → self::C + : self::C::v5 = null, self::C::v7 = null, super core::Object::•() + ; + constructor name1(self::D? v5, Null v7) → self::C + : self::C::v5 = v5, self::C::v7 = v7, super core::Object::•() + ; + static factory name2(self::D arg1, Null arg2) → self::C + return new self::C1::name1(arg1, arg2); + static method _#name2#tearOff(self::D arg1, Null arg2) → self::C + return new self::C1::name1(arg1, arg2); + abstract operator +(core::double other) → core::double; + abstract get g() → FutureOr>?; + abstract set g(FutureOr>? value) → void; + abstract method m1(covariant-by-declaration self::C arg1, [core::Set> arg2 = #C3]) → core::Map; + abstract method m2({dynamic arg1 = #C3, ((dynamic) → dynamic, dynamic) → core::Map arg2 = #C3}) → void; +} +class C1 extends core::Object implements self::C { + constructor name1(self::D arg1, Null arg2) → self::C1 + : super core::Object::•() + ; + static method _#name1#tearOff(self::D arg1, Null arg2) → self::C1 + return new self::C1::name1(arg1, arg2); + method noSuchMethod(core::Invocation invocation) → dynamic + return throw 0; + no-such-method-forwarder get v7() → Null + return this.{self::C1::noSuchMethod}(core::_createInvocationMirror("v7", [], [], #C4, 1)){(core::Invocation) → dynamic} as{TypeError,ForDynamic,ForNonNullableByDefault} Null; + no-such-method-forwarder operator +(core::double other) → core::double + return this.{self::C1::noSuchMethod}(core::_createInvocationMirror("+", [], [other], #C4, 0)){(core::Invocation) → dynamic} as{TypeError,ForDynamic,ForNonNullableByDefault} core::double; + no-such-method-forwarder get v6() → core::List + return this.{self::C1::noSuchMethod}(core::_createInvocationMirror("v6", [], [], #C4, 1)){(core::Invocation) → dynamic} as{TypeError,ForDynamic,ForNonNullableByDefault} core::List; + no-such-method-forwarder get v5() → self::D? + return this.{self::C1::noSuchMethod}(core::_createInvocationMirror("v5", [], [], #C4, 1)){(core::Invocation) → dynamic} as{TypeError,ForDynamic,ForNonNullableByDefault} self::D?; + no-such-method-forwarder method m1(covariant-by-declaration self::C arg1, [core::Set> arg2 = #C3]) → core::Map + return this.{self::C1::noSuchMethod}(core::_createInvocationMirror("m1", [], [arg1, arg2], #C4, 0)){(core::Invocation) → dynamic} as{TypeError,ForDynamic,ForNonNullableByDefault} core::Map; + no-such-method-forwarder method m2({dynamic arg1 = #C3, ((dynamic) → dynamic, dynamic) → core::Map arg2 = #C3}) → void + return this.{self::C1::noSuchMethod}(core::_createInvocationMirror("m2", [], [], {"arg1": arg1, "arg2": arg2}, 0)){(core::Invocation) → dynamic}; + no-such-method-forwarder get g() → FutureOr>? + return this.{self::C1::noSuchMethod}(core::_createInvocationMirror("g", [], [], #C4, 1)){(core::Invocation) → dynamic} as{TypeError,ForDynamic,ForNonNullableByDefault} FutureOr>?; + no-such-method-forwarder set v6(core::List value) → void + return this.{self::C1::noSuchMethod}(core::_createInvocationMirror("v6=", [], [value], #C4, 2)){(core::Invocation) → dynamic}; + no-such-method-forwarder set v5(self::D? value) → void + return this.{self::C1::noSuchMethod}(core::_createInvocationMirror("v5=", [], [value], #C4, 2)){(core::Invocation) → dynamic}; + no-such-method-forwarder set g(FutureOr>? value) → void + return this.{self::C1::noSuchMethod}(core::_createInvocationMirror("g=", [], [value], #C4, 2)){(core::Invocation) → dynamic}; +} +class D extends core::Object { + synthetic constructor •() → self::D + : super core::Object::•() + ; + static method _#new#tearOff() → self::D + return new self::D::•(); +} +extension E on dynamic { + method foo = self::E|foo; + tearoff foo = self::E|get#foo; +} +static field core::int? v1; +static field core::List v2 = []; +static final field core::String v3 = throw "Anything"; +static const field core::List v4 = #C5; +static const field core::Map v5 = #C7; +static method E|foo(lowered final dynamic #this, dynamic t) → dynamic + return t; +static method E|get#foo(lowered final dynamic #this) → (dynamic) → dynamic + return (dynamic t) → dynamic => self::E|foo(#this, t); +static method main() → dynamic { + core::List v8 = []; + core::Map, core::Set> v9 = , core::Set>{{}: {}}; + core::Set> v10 = >{v8}; + v9.{core::Map::[]=}({}, {42}){(core::Set, core::Set) → void}; + core::Set> v11 = v10; + v10 = v11; +} + +constants { + #C1 = *>[] + #C2 = constructor-tearoff self::C::name2 + #C3 = null + #C4 = {) + #C5 = [] + #C6 = TypeLiteralConstant(dynamic) + #C7 = {#C6:#C6) +} diff --git a/pkg/front_end/testcases/dart2js/generic_usage_type_variable.dart.weak.outline.expect b/pkg/front_end/testcases/dart2js/generic_usage_type_variable.dart.weak.outline.expect new file mode 100644 index 00000000000..5ba3b99cfd9 --- /dev/null +++ b/pkg/front_end/testcases/dart2js/generic_usage_type_variable.dart.weak.outline.expect @@ -0,0 +1,96 @@ +library /*isNonNullableByDefault*/; +import self as self; +import "dart:core" as core; + +import "dart:async"; + +typedef T = X%; +abstract class C extends core::Object { + static field self::C? v1; + static field core::List v2; + static final field Null v3; + static const field core::List> v4 = const >[]; + field self::D? v5; + field core::List v6; + final field Null v7; + static final field dynamic _redirecting# = [self::C::name2]/*isLegacy*/; + constructor •() → self::C + ; + constructor name1(self::D? v5, Null v7) → self::C + ; + static factory name2(self::D arg1, Null arg2) → self::C + return new self::C1::name1(arg1, arg2); + static method _#name2#tearOff(self::D arg1, Null arg2) → self::C + return new self::C1::name1(arg1, arg2); + abstract operator +(core::double other) → core::double; + abstract get g() → FutureOr>?; + abstract set g(FutureOr>? value) → void; + abstract method m1(covariant-by-declaration self::C arg1, [core::Set> arg2 = null]) → core::Map; + abstract method m2({dynamic arg1 = null, ((dynamic) → dynamic, dynamic) → core::Map arg2 = null}) → void; +} +class C1 extends core::Object implements self::C { + constructor name1(self::D arg1, Null arg2) → self::C1 + ; + static method _#name1#tearOff(self::D arg1, Null arg2) → self::C1 + return new self::C1::name1(arg1, arg2); + method noSuchMethod(core::Invocation invocation) → dynamic + ; + no-such-method-forwarder get v7() → Null + return this.{self::C1::noSuchMethod}(core::_createInvocationMirror("v7", [], [], const {}, 1)){(core::Invocation) → dynamic} as{TypeError,ForDynamic,ForNonNullableByDefault} Null; + no-such-method-forwarder operator +(core::double other) → core::double + return this.{self::C1::noSuchMethod}(core::_createInvocationMirror("+", [], [other], const {}, 0)){(core::Invocation) → dynamic} as{TypeError,ForDynamic,ForNonNullableByDefault} core::double; + no-such-method-forwarder get v6() → core::List + return this.{self::C1::noSuchMethod}(core::_createInvocationMirror("v6", [], [], const {}, 1)){(core::Invocation) → dynamic} as{TypeError,ForDynamic,ForNonNullableByDefault} core::List; + no-such-method-forwarder get v5() → self::D? + return this.{self::C1::noSuchMethod}(core::_createInvocationMirror("v5", [], [], const {}, 1)){(core::Invocation) → dynamic} as{TypeError,ForDynamic,ForNonNullableByDefault} self::D?; + no-such-method-forwarder method m1(covariant-by-declaration self::C arg1, [core::Set> arg2]) → core::Map + return this.{self::C1::noSuchMethod}(core::_createInvocationMirror("m1", [], [arg1, arg2], const {}, 0)){(core::Invocation) → dynamic} as{TypeError,ForDynamic,ForNonNullableByDefault} core::Map; + no-such-method-forwarder method m2({dynamic arg1, ((dynamic) → dynamic, dynamic) → core::Map arg2}) → void + return this.{self::C1::noSuchMethod}(core::_createInvocationMirror("m2", [], [], {"arg1": arg1, "arg2": arg2}, 0)){(core::Invocation) → dynamic}; + no-such-method-forwarder get g() → FutureOr>? + return this.{self::C1::noSuchMethod}(core::_createInvocationMirror("g", [], [], const {}, 1)){(core::Invocation) → dynamic} as{TypeError,ForDynamic,ForNonNullableByDefault} FutureOr>?; + no-such-method-forwarder set v6(core::List value) → void + return this.{self::C1::noSuchMethod}(core::_createInvocationMirror("v6=", [], [value], const {}, 2)){(core::Invocation) → dynamic}; + no-such-method-forwarder set v5(self::D? value) → void + return this.{self::C1::noSuchMethod}(core::_createInvocationMirror("v5=", [], [value], const {}, 2)){(core::Invocation) → dynamic}; + no-such-method-forwarder set g(FutureOr>? value) → void + return this.{self::C1::noSuchMethod}(core::_createInvocationMirror("g=", [], [value], const {}, 2)){(core::Invocation) → dynamic}; +} +class D extends core::Object { + synthetic constructor •() → self::D + ; + static method _#new#tearOff() → self::D + return new self::D::•(); +} +extension E on dynamic { + method foo = self::E|foo; + tearoff foo = self::E|get#foo; +} +static field core::int? v1; +static field core::List v2; +static final field core::String v3; +static const field core::List v4 = const []; +static const field core::Map v5 = const {dynamic: dynamic}; +static method E|foo(lowered final dynamic #this, dynamic t) → dynamic + ; +static method E|get#foo(lowered final dynamic #this) → (dynamic) → dynamic + return (dynamic t) → dynamic => self::E|foo(#this, t); +static method main() → dynamic + ; + + +Extra constant evaluation status: +Evaluated: ListLiteral @ org-dartlang-testcase:///generic_usage_type_variable.dart:22:35 -> ListConstant(const *>[]) +Evaluated: ConstructorTearOff @ org-dartlang-testcase:///generic_usage_type_variable.dart:18:16 -> ConstructorTearOffConstant(C.name2) +Evaluated: MapLiteral @ org-dartlang-testcase:///generic_usage_type_variable.dart:26:17 -> MapConstant(const {}) +Evaluated: MapLiteral @ org-dartlang-testcase:///generic_usage_type_variable.dart:32:22 -> MapConstant(const {}) +Evaluated: MapLiteral @ org-dartlang-testcase:///generic_usage_type_variable.dart:25:14 -> MapConstant(const {}) +Evaluated: MapLiteral @ org-dartlang-testcase:///generic_usage_type_variable.dart:24:9 -> MapConstant(const {}) +Evaluated: MapLiteral @ org-dartlang-testcase:///generic_usage_type_variable.dart:35:19 -> MapConstant(const {}) +Evaluated: MapLiteral @ org-dartlang-testcase:///generic_usage_type_variable.dart:33:35 -> MapConstant(const {}) +Evaluated: MapLiteral @ org-dartlang-testcase:///generic_usage_type_variable.dart:25:14 -> MapConstant(const {}) +Evaluated: MapLiteral @ org-dartlang-testcase:///generic_usage_type_variable.dart:24:9 -> MapConstant(const {}) +Evaluated: MapLiteral @ org-dartlang-testcase:///generic_usage_type_variable.dart:34:7 -> MapConstant(const {}) +Evaluated: ListLiteral @ org-dartlang-testcase:///generic_usage_type_variable.dart:15:23 -> ListConstant(const []) +Evaluated: MapLiteral @ org-dartlang-testcase:///generic_usage_type_variable.dart:16:24 -> MapConstant(const {dynamic: dynamic}) +Extra constant evaluation: evaluated: 93, effectively constant: 13 diff --git a/pkg/front_end/testcases/dart2js/generic_usage_type_variable.dart.weak.transformed.expect b/pkg/front_end/testcases/dart2js/generic_usage_type_variable.dart.weak.transformed.expect new file mode 100644 index 00000000000..5e2354d9eb7 --- /dev/null +++ b/pkg/front_end/testcases/dart2js/generic_usage_type_variable.dart.weak.transformed.expect @@ -0,0 +1,99 @@ +library /*isNonNullableByDefault*/; +import self as self; +import "dart:core" as core; + +import "dart:async"; + +typedef T = X%; +abstract class C extends core::Object { + static field self::C? v1 = null; + static field core::List v2 = []; + static final field Null v3 = throw "Anything"; + static const field core::List> v4 = #C1; + field self::D? v5; + field core::List v6 = []; + final field Null v7; + static final field dynamic _redirecting# = [#C2]/*isLegacy*/; + constructor •() → self::C + : self::C::v5 = null, self::C::v7 = null, super core::Object::•() + ; + constructor name1(self::D? v5, Null v7) → self::C + : self::C::v5 = v5, self::C::v7 = v7, super core::Object::•() + ; + static factory name2(self::D arg1, Null arg2) → self::C + return new self::C1::name1(arg1, arg2); + static method _#name2#tearOff(self::D arg1, Null arg2) → self::C + return new self::C1::name1(arg1, arg2); + abstract operator +(core::double other) → core::double; + abstract get g() → FutureOr>?; + abstract set g(FutureOr>? value) → void; + abstract method m1(covariant-by-declaration self::C arg1, [core::Set> arg2 = #C3]) → core::Map; + abstract method m2({dynamic arg1 = #C3, ((dynamic) → dynamic, dynamic) → core::Map arg2 = #C3}) → void; +} +class C1 extends core::Object implements self::C { + constructor name1(self::D arg1, Null arg2) → self::C1 + : super core::Object::•() + ; + static method _#name1#tearOff(self::D arg1, Null arg2) → self::C1 + return new self::C1::name1(arg1, arg2); + method noSuchMethod(core::Invocation invocation) → dynamic + return throw 0; + no-such-method-forwarder get v7() → Null + return this.{self::C1::noSuchMethod}(core::_createInvocationMirror("v7", [], [], #C4, 1)){(core::Invocation) → dynamic} as{TypeError,ForDynamic,ForNonNullableByDefault} Null; + no-such-method-forwarder operator +(core::double other) → core::double + return this.{self::C1::noSuchMethod}(core::_createInvocationMirror("+", [], [other], #C4, 0)){(core::Invocation) → dynamic} as{TypeError,ForDynamic,ForNonNullableByDefault} core::double; + no-such-method-forwarder get v6() → core::List + return this.{self::C1::noSuchMethod}(core::_createInvocationMirror("v6", [], [], #C4, 1)){(core::Invocation) → dynamic} as{TypeError,ForDynamic,ForNonNullableByDefault} core::List; + no-such-method-forwarder get v5() → self::D? + return this.{self::C1::noSuchMethod}(core::_createInvocationMirror("v5", [], [], #C4, 1)){(core::Invocation) → dynamic} as{TypeError,ForDynamic,ForNonNullableByDefault} self::D?; + no-such-method-forwarder method m1(covariant-by-declaration self::C arg1, [core::Set> arg2 = #C3]) → core::Map + return this.{self::C1::noSuchMethod}(core::_createInvocationMirror("m1", [], [arg1, arg2], #C4, 0)){(core::Invocation) → dynamic} as{TypeError,ForDynamic,ForNonNullableByDefault} core::Map; + no-such-method-forwarder method m2({dynamic arg1 = #C3, ((dynamic) → dynamic, dynamic) → core::Map arg2 = #C3}) → void + return this.{self::C1::noSuchMethod}(core::_createInvocationMirror("m2", [], [], {"arg1": arg1, "arg2": arg2}, 0)){(core::Invocation) → dynamic}; + no-such-method-forwarder get g() → FutureOr>? + return this.{self::C1::noSuchMethod}(core::_createInvocationMirror("g", [], [], #C4, 1)){(core::Invocation) → dynamic} as{TypeError,ForDynamic,ForNonNullableByDefault} FutureOr>?; + no-such-method-forwarder set v6(core::List value) → void + return this.{self::C1::noSuchMethod}(core::_createInvocationMirror("v6=", [], [value], #C4, 2)){(core::Invocation) → dynamic}; + no-such-method-forwarder set v5(self::D? value) → void + return this.{self::C1::noSuchMethod}(core::_createInvocationMirror("v5=", [], [value], #C4, 2)){(core::Invocation) → dynamic}; + no-such-method-forwarder set g(FutureOr>? value) → void + return this.{self::C1::noSuchMethod}(core::_createInvocationMirror("g=", [], [value], #C4, 2)){(core::Invocation) → dynamic}; +} +class D extends core::Object { + synthetic constructor •() → self::D + : super core::Object::•() + ; + static method _#new#tearOff() → self::D + return new self::D::•(); +} +extension E on dynamic { + method foo = self::E|foo; + tearoff foo = self::E|get#foo; +} +static field core::int? v1; +static field core::List v2 = []; +static final field core::String v3 = throw "Anything"; +static const field core::List v4 = #C5; +static const field core::Map v5 = #C7; +static method E|foo(lowered final dynamic #this, dynamic t) → dynamic + return t; +static method E|get#foo(lowered final dynamic #this) → (dynamic) → dynamic + return (dynamic t) → dynamic => self::E|foo(#this, t); +static method main() → dynamic { + core::List v8 = []; + core::Map, core::Set> v9 = , core::Set>{{}: {}}; + core::Set> v10 = >{v8}; + v9.{core::Map::[]=}({}, {42}){(core::Set, core::Set) → void}; + core::Set> v11 = v10; + v10 = v11; +} + +constants { + #C1 = *>[] + #C2 = constructor-tearoff self::C::name2 + #C3 = null + #C4 = {) + #C5 = [] + #C6 = TypeLiteralConstant(dynamic) + #C7 = {#C6:#C6) +} diff --git a/pkg/front_end/testcases/general/bounds_as_is.dart b/pkg/front_end/testcases/general/bounds_as_is.dart new file mode 100644 index 00000000000..419c5aeb36f --- /dev/null +++ b/pkg/front_end/testcases/general/bounds_as_is.dart @@ -0,0 +1,47 @@ +// Copyright (c) 2022, 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. + +class Class {} + +class ConcreteClass implements Class {} + +typedef F> = X; + +class G> {} + +t1a(o) => o as F; // Ok +t2a(o) => o as F; // Ok +t3a(o) => o as F; // Ok +t4a(o) => o as F>; // Ok +t5a(o) => o as F; // Ok +t6a(o) => o as F>; // Ok +t7a(o) => o as F; // Error +t8a(o) => o as F; // Error +s1a(o) => o as G; // Ok +s2a(o) => o as G; // Ok +s3a(o) => o as G; // Ok +s4a(o) => o as G>; // Ok +s5a(o) => o as G; // Ok +s6a(o) => o as G>; // Ok +s7a(o) => o as G; // Error +s8a(o) => o as G; // Error + +t1b(o) => o is F; // Ok +t2b(o) => o is F; // Ok +t3b(o) => o is F; // Ok +t4b(o) => o is F>; // Ok +t5b(o) => o is F; // Ok +t6b(o) => o is F>; // Ok +t7b(o) => o is F; // Error +t8b(o) => o is F; // Error +s1b(o) => o is G; // Ok +s2b(o) => o is G; // Ok +s3b(o) => o is G; // Ok +s4b(o) => o is G>; // Ok +s5b(o) => o is G; // Ok +s6b(o) => o is G>; // Ok +s7b(o) => o is G; // Error +s8b(o) => o is G; // Error + +main() {} diff --git a/pkg/front_end/testcases/general/bounds_as_is.dart.textual_outline.expect b/pkg/front_end/testcases/general/bounds_as_is.dart.textual_outline.expect new file mode 100644 index 00000000000..7555a2209df --- /dev/null +++ b/pkg/front_end/testcases/general/bounds_as_is.dart.textual_outline.expect @@ -0,0 +1,41 @@ +class Class {} + +class ConcreteClass implements Class {} + +typedef F> = X; + +class G> {} + +t1a(o) => o as F; +t2a(o) => o as F; +t3a(o) => o as F; +t4a(o) => o as F>; +t5a(o) => o as F; +t6a(o) => o as F>; +t7a(o) => o as F; +t8a(o) => o as F; +s1a(o) => o as G; +s2a(o) => o as G; +s3a(o) => o as G; +s4a(o) => o as G>; +s5a(o) => o as G; +s6a(o) => o as G>; +s7a(o) => o as G; +s8a(o) => o as G; +t1b(o) => o is F; +t2b(o) => o is F; +t3b(o) => o is F; +t4b(o) => o is F>; +t5b(o) => o is F; +t6b(o) => o is F>; +t7b(o) => o is F; +t8b(o) => o is F; +s1b(o) => o is G; +s2b(o) => o is G; +s3b(o) => o is G; +s4b(o) => o is G>; +s5b(o) => o is G; +s6b(o) => o is G>; +s7b(o) => o is G; +s8b(o) => o is G; +main() {} diff --git a/pkg/front_end/testcases/general/bounds_as_is.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/general/bounds_as_is.dart.textual_outline_modelled.expect new file mode 100644 index 00000000000..733c5038f9b --- /dev/null +++ b/pkg/front_end/testcases/general/bounds_as_is.dart.textual_outline_modelled.expect @@ -0,0 +1,40 @@ +class Class {} + +class ConcreteClass implements Class {} + +class G> {} + +main() {} +s1a(o) => o as G; +s1b(o) => o is G; +s2a(o) => o as G; +s2b(o) => o is G; +s3a(o) => o as G; +s3b(o) => o is G; +s4a(o) => o as G>; +s4b(o) => o is G>; +s5a(o) => o as G; +s5b(o) => o is G; +s6a(o) => o as G>; +s6b(o) => o is G>; +s7a(o) => o as G; +s7b(o) => o is G; +s8a(o) => o as G; +s8b(o) => o is G; +t1a(o) => o as F; +t1b(o) => o is F; +t2a(o) => o as F; +t2b(o) => o is F; +t3a(o) => o as F; +t3b(o) => o is F; +t4a(o) => o as F>; +t4b(o) => o is F>; +t5a(o) => o as F; +t5b(o) => o is F; +t6a(o) => o as F>; +t6b(o) => o is F>; +t7a(o) => o as F; +t7b(o) => o is F; +t8a(o) => o as F; +t8b(o) => o is F; +typedef F> = X; diff --git a/pkg/front_end/testcases/general/bounds_as_is.dart.weak.expect b/pkg/front_end/testcases/general/bounds_as_is.dart.weak.expect new file mode 100644 index 00000000000..2156140bc4b --- /dev/null +++ b/pkg/front_end/testcases/general/bounds_as_is.dart.weak.expect @@ -0,0 +1,164 @@ +library /*isNonNullableByDefault*/; +// +// Problems in library: +// +// pkg/front_end/testcases/general/bounds_as_is.dart:19:16: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_as_is.dart'. +// Try changing type arguments so that they conform to the bounds. +// t7a(o) => o as F; // Error +// ^ +// pkg/front_end/testcases/general/bounds_as_is.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_as_is.dart:20:16: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_as_is.dart'. +// Try changing type arguments so that they conform to the bounds. +// t8a(o) => o as F; // Error +// ^ +// pkg/front_end/testcases/general/bounds_as_is.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_as_is.dart:27:16: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_as_is.dart'. +// Try changing type arguments so that they conform to the bounds. +// s7a(o) => o as G; // Error +// ^ +// pkg/front_end/testcases/general/bounds_as_is.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_as_is.dart:28:16: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_as_is.dart'. +// Try changing type arguments so that they conform to the bounds. +// s8a(o) => o as G; // Error +// ^ +// pkg/front_end/testcases/general/bounds_as_is.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_as_is.dart:36:16: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_as_is.dart'. +// Try changing type arguments so that they conform to the bounds. +// t7b(o) => o is F; // Error +// ^ +// pkg/front_end/testcases/general/bounds_as_is.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_as_is.dart:37:16: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_as_is.dart'. +// Try changing type arguments so that they conform to the bounds. +// t8b(o) => o is F; // Error +// ^ +// pkg/front_end/testcases/general/bounds_as_is.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_as_is.dart:44:16: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_as_is.dart'. +// Try changing type arguments so that they conform to the bounds. +// s7b(o) => o is G; // Error +// ^ +// pkg/front_end/testcases/general/bounds_as_is.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_as_is.dart:45:16: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_as_is.dart'. +// Try changing type arguments so that they conform to the bounds. +// s8b(o) => o is G; // Error +// ^ +// pkg/front_end/testcases/general/bounds_as_is.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +import self as self; +import "dart:core" as core; + +typedef F = self::Class> = X; +class Class extends core::Object { + synthetic constructor •() → self::Class + : super core::Object::•() + ; +} +class ConcreteClass extends core::Object implements self::Class { + synthetic constructor •() → self::ConcreteClass + : super core::Object::•() + ; +} +class G = self::Class> extends core::Object { + synthetic constructor •() → self::G + : super core::Object::•() + ; +} +static method t1a(dynamic o) → dynamic + return o as{ForNonNullableByDefault} self::Class; +static method t2a(dynamic o) → dynamic + return o as{ForNonNullableByDefault} dynamic; +static method t3a(dynamic o) → dynamic + return o as{ForNonNullableByDefault} self::Class; +static method t4a(dynamic o) → dynamic + return o as{ForNonNullableByDefault} self::Class; +static method t5a(dynamic o) → dynamic + return o as{ForNonNullableByDefault} self::ConcreteClass; +static method t6a(dynamic o) → dynamic + return o as{ForNonNullableByDefault} self::Class; +static method t7a(dynamic o) → dynamic + return o as{ForNonNullableByDefault} core::Object; +static method t8a(dynamic o) → dynamic + return o as{ForNonNullableByDefault} core::int; +static method s1a(dynamic o) → dynamic + return o as{ForNonNullableByDefault} self::G>; +static method s2a(dynamic o) → dynamic + return o as{ForNonNullableByDefault} self::G; +static method s3a(dynamic o) → dynamic + return o as{ForNonNullableByDefault} self::G>; +static method s4a(dynamic o) → dynamic + return o as{ForNonNullableByDefault} self::G>; +static method s5a(dynamic o) → dynamic + return o as{ForNonNullableByDefault} self::G; +static method s6a(dynamic o) → dynamic + return o as{ForNonNullableByDefault} self::G>; +static method s7a(dynamic o) → dynamic + return o as{ForNonNullableByDefault} self::G; +static method s8a(dynamic o) → dynamic + return o as{ForNonNullableByDefault} self::G; +static method t1b(dynamic o) → dynamic + return o is{ForNonNullableByDefault} self::Class; +static method t2b(dynamic o) → dynamic + return o is{ForNonNullableByDefault} dynamic; +static method t3b(dynamic o) → dynamic + return o is{ForNonNullableByDefault} self::Class; +static method t4b(dynamic o) → dynamic + return o is{ForNonNullableByDefault} self::Class; +static method t5b(dynamic o) → dynamic + return o is{ForNonNullableByDefault} self::ConcreteClass; +static method t6b(dynamic o) → dynamic + return o is{ForNonNullableByDefault} self::Class; +static method t7b(dynamic o) → dynamic + return o is{ForNonNullableByDefault} core::Object; +static method t8b(dynamic o) → dynamic + return o is{ForNonNullableByDefault} core::int; +static method s1b(dynamic o) → dynamic + return o is{ForNonNullableByDefault} self::G>; +static method s2b(dynamic o) → dynamic + return o is{ForNonNullableByDefault} self::G; +static method s3b(dynamic o) → dynamic + return o is{ForNonNullableByDefault} self::G>; +static method s4b(dynamic o) → dynamic + return o is{ForNonNullableByDefault} self::G>; +static method s5b(dynamic o) → dynamic + return o is{ForNonNullableByDefault} self::G; +static method s6b(dynamic o) → dynamic + return o is{ForNonNullableByDefault} self::G>; +static method s7b(dynamic o) → dynamic + return o is{ForNonNullableByDefault} self::G; +static method s8b(dynamic o) → dynamic + return o is{ForNonNullableByDefault} self::G; +static method main() → dynamic {} diff --git a/pkg/front_end/testcases/general/bounds_as_is.dart.weak.modular.expect b/pkg/front_end/testcases/general/bounds_as_is.dart.weak.modular.expect new file mode 100644 index 00000000000..2156140bc4b --- /dev/null +++ b/pkg/front_end/testcases/general/bounds_as_is.dart.weak.modular.expect @@ -0,0 +1,164 @@ +library /*isNonNullableByDefault*/; +// +// Problems in library: +// +// pkg/front_end/testcases/general/bounds_as_is.dart:19:16: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_as_is.dart'. +// Try changing type arguments so that they conform to the bounds. +// t7a(o) => o as F; // Error +// ^ +// pkg/front_end/testcases/general/bounds_as_is.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_as_is.dart:20:16: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_as_is.dart'. +// Try changing type arguments so that they conform to the bounds. +// t8a(o) => o as F; // Error +// ^ +// pkg/front_end/testcases/general/bounds_as_is.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_as_is.dart:27:16: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_as_is.dart'. +// Try changing type arguments so that they conform to the bounds. +// s7a(o) => o as G; // Error +// ^ +// pkg/front_end/testcases/general/bounds_as_is.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_as_is.dart:28:16: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_as_is.dart'. +// Try changing type arguments so that they conform to the bounds. +// s8a(o) => o as G; // Error +// ^ +// pkg/front_end/testcases/general/bounds_as_is.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_as_is.dart:36:16: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_as_is.dart'. +// Try changing type arguments so that they conform to the bounds. +// t7b(o) => o is F; // Error +// ^ +// pkg/front_end/testcases/general/bounds_as_is.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_as_is.dart:37:16: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_as_is.dart'. +// Try changing type arguments so that they conform to the bounds. +// t8b(o) => o is F; // Error +// ^ +// pkg/front_end/testcases/general/bounds_as_is.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_as_is.dart:44:16: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_as_is.dart'. +// Try changing type arguments so that they conform to the bounds. +// s7b(o) => o is G; // Error +// ^ +// pkg/front_end/testcases/general/bounds_as_is.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_as_is.dart:45:16: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_as_is.dart'. +// Try changing type arguments so that they conform to the bounds. +// s8b(o) => o is G; // Error +// ^ +// pkg/front_end/testcases/general/bounds_as_is.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +import self as self; +import "dart:core" as core; + +typedef F = self::Class> = X; +class Class extends core::Object { + synthetic constructor •() → self::Class + : super core::Object::•() + ; +} +class ConcreteClass extends core::Object implements self::Class { + synthetic constructor •() → self::ConcreteClass + : super core::Object::•() + ; +} +class G = self::Class> extends core::Object { + synthetic constructor •() → self::G + : super core::Object::•() + ; +} +static method t1a(dynamic o) → dynamic + return o as{ForNonNullableByDefault} self::Class; +static method t2a(dynamic o) → dynamic + return o as{ForNonNullableByDefault} dynamic; +static method t3a(dynamic o) → dynamic + return o as{ForNonNullableByDefault} self::Class; +static method t4a(dynamic o) → dynamic + return o as{ForNonNullableByDefault} self::Class; +static method t5a(dynamic o) → dynamic + return o as{ForNonNullableByDefault} self::ConcreteClass; +static method t6a(dynamic o) → dynamic + return o as{ForNonNullableByDefault} self::Class; +static method t7a(dynamic o) → dynamic + return o as{ForNonNullableByDefault} core::Object; +static method t8a(dynamic o) → dynamic + return o as{ForNonNullableByDefault} core::int; +static method s1a(dynamic o) → dynamic + return o as{ForNonNullableByDefault} self::G>; +static method s2a(dynamic o) → dynamic + return o as{ForNonNullableByDefault} self::G; +static method s3a(dynamic o) → dynamic + return o as{ForNonNullableByDefault} self::G>; +static method s4a(dynamic o) → dynamic + return o as{ForNonNullableByDefault} self::G>; +static method s5a(dynamic o) → dynamic + return o as{ForNonNullableByDefault} self::G; +static method s6a(dynamic o) → dynamic + return o as{ForNonNullableByDefault} self::G>; +static method s7a(dynamic o) → dynamic + return o as{ForNonNullableByDefault} self::G; +static method s8a(dynamic o) → dynamic + return o as{ForNonNullableByDefault} self::G; +static method t1b(dynamic o) → dynamic + return o is{ForNonNullableByDefault} self::Class; +static method t2b(dynamic o) → dynamic + return o is{ForNonNullableByDefault} dynamic; +static method t3b(dynamic o) → dynamic + return o is{ForNonNullableByDefault} self::Class; +static method t4b(dynamic o) → dynamic + return o is{ForNonNullableByDefault} self::Class; +static method t5b(dynamic o) → dynamic + return o is{ForNonNullableByDefault} self::ConcreteClass; +static method t6b(dynamic o) → dynamic + return o is{ForNonNullableByDefault} self::Class; +static method t7b(dynamic o) → dynamic + return o is{ForNonNullableByDefault} core::Object; +static method t8b(dynamic o) → dynamic + return o is{ForNonNullableByDefault} core::int; +static method s1b(dynamic o) → dynamic + return o is{ForNonNullableByDefault} self::G>; +static method s2b(dynamic o) → dynamic + return o is{ForNonNullableByDefault} self::G; +static method s3b(dynamic o) → dynamic + return o is{ForNonNullableByDefault} self::G>; +static method s4b(dynamic o) → dynamic + return o is{ForNonNullableByDefault} self::G>; +static method s5b(dynamic o) → dynamic + return o is{ForNonNullableByDefault} self::G; +static method s6b(dynamic o) → dynamic + return o is{ForNonNullableByDefault} self::G>; +static method s7b(dynamic o) → dynamic + return o is{ForNonNullableByDefault} self::G; +static method s8b(dynamic o) → dynamic + return o is{ForNonNullableByDefault} self::G; +static method main() → dynamic {} diff --git a/pkg/front_end/testcases/general/bounds_as_is.dart.weak.outline.expect b/pkg/front_end/testcases/general/bounds_as_is.dart.weak.outline.expect new file mode 100644 index 00000000000..1dafbce0316 --- /dev/null +++ b/pkg/front_end/testcases/general/bounds_as_is.dart.weak.outline.expect @@ -0,0 +1,83 @@ +library /*isNonNullableByDefault*/; +import self as self; +import "dart:core" as core; + +typedef F = self::Class> = X; +class Class extends core::Object { + synthetic constructor •() → self::Class + ; +} +class ConcreteClass extends core::Object implements self::Class { + synthetic constructor •() → self::ConcreteClass + ; +} +class G = self::Class> extends core::Object { + synthetic constructor •() → self::G + ; +} +static method t1a(dynamic o) → dynamic + ; +static method t2a(dynamic o) → dynamic + ; +static method t3a(dynamic o) → dynamic + ; +static method t4a(dynamic o) → dynamic + ; +static method t5a(dynamic o) → dynamic + ; +static method t6a(dynamic o) → dynamic + ; +static method t7a(dynamic o) → dynamic + ; +static method t8a(dynamic o) → dynamic + ; +static method s1a(dynamic o) → dynamic + ; +static method s2a(dynamic o) → dynamic + ; +static method s3a(dynamic o) → dynamic + ; +static method s4a(dynamic o) → dynamic + ; +static method s5a(dynamic o) → dynamic + ; +static method s6a(dynamic o) → dynamic + ; +static method s7a(dynamic o) → dynamic + ; +static method s8a(dynamic o) → dynamic + ; +static method t1b(dynamic o) → dynamic + ; +static method t2b(dynamic o) → dynamic + ; +static method t3b(dynamic o) → dynamic + ; +static method t4b(dynamic o) → dynamic + ; +static method t5b(dynamic o) → dynamic + ; +static method t6b(dynamic o) → dynamic + ; +static method t7b(dynamic o) → dynamic + ; +static method t8b(dynamic o) → dynamic + ; +static method s1b(dynamic o) → dynamic + ; +static method s2b(dynamic o) → dynamic + ; +static method s3b(dynamic o) → dynamic + ; +static method s4b(dynamic o) → dynamic + ; +static method s5b(dynamic o) → dynamic + ; +static method s6b(dynamic o) → dynamic + ; +static method s7b(dynamic o) → dynamic + ; +static method s8b(dynamic o) → dynamic + ; +static method main() → dynamic + ; diff --git a/pkg/front_end/testcases/general/bounds_as_is.dart.weak.transformed.expect b/pkg/front_end/testcases/general/bounds_as_is.dart.weak.transformed.expect new file mode 100644 index 00000000000..e45870bd891 --- /dev/null +++ b/pkg/front_end/testcases/general/bounds_as_is.dart.weak.transformed.expect @@ -0,0 +1,164 @@ +library /*isNonNullableByDefault*/; +// +// Problems in library: +// +// pkg/front_end/testcases/general/bounds_as_is.dart:19:16: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_as_is.dart'. +// Try changing type arguments so that they conform to the bounds. +// t7a(o) => o as F; // Error +// ^ +// pkg/front_end/testcases/general/bounds_as_is.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_as_is.dart:20:16: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_as_is.dart'. +// Try changing type arguments so that they conform to the bounds. +// t8a(o) => o as F; // Error +// ^ +// pkg/front_end/testcases/general/bounds_as_is.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_as_is.dart:27:16: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_as_is.dart'. +// Try changing type arguments so that they conform to the bounds. +// s7a(o) => o as G; // Error +// ^ +// pkg/front_end/testcases/general/bounds_as_is.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_as_is.dart:28:16: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_as_is.dart'. +// Try changing type arguments so that they conform to the bounds. +// s8a(o) => o as G; // Error +// ^ +// pkg/front_end/testcases/general/bounds_as_is.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_as_is.dart:36:16: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_as_is.dart'. +// Try changing type arguments so that they conform to the bounds. +// t7b(o) => o is F; // Error +// ^ +// pkg/front_end/testcases/general/bounds_as_is.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_as_is.dart:37:16: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_as_is.dart'. +// Try changing type arguments so that they conform to the bounds. +// t8b(o) => o is F; // Error +// ^ +// pkg/front_end/testcases/general/bounds_as_is.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_as_is.dart:44:16: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_as_is.dart'. +// Try changing type arguments so that they conform to the bounds. +// s7b(o) => o is G; // Error +// ^ +// pkg/front_end/testcases/general/bounds_as_is.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_as_is.dart:45:16: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_as_is.dart'. +// Try changing type arguments so that they conform to the bounds. +// s8b(o) => o is G; // Error +// ^ +// pkg/front_end/testcases/general/bounds_as_is.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +import self as self; +import "dart:core" as core; + +typedef F = self::Class> = X; +class Class extends core::Object { + synthetic constructor •() → self::Class + : super core::Object::•() + ; +} +class ConcreteClass extends core::Object implements self::Class { + synthetic constructor •() → self::ConcreteClass + : super core::Object::•() + ; +} +class G = self::Class> extends core::Object { + synthetic constructor •() → self::G + : super core::Object::•() + ; +} +static method t1a(dynamic o) → dynamic + return o as{ForNonNullableByDefault} self::Class; +static method t2a(dynamic o) → dynamic + return o as{ForNonNullableByDefault} dynamic; +static method t3a(dynamic o) → dynamic + return o as{ForNonNullableByDefault} self::Class; +static method t4a(dynamic o) → dynamic + return o as{ForNonNullableByDefault} self::Class; +static method t5a(dynamic o) → dynamic + return o as{ForNonNullableByDefault} self::ConcreteClass; +static method t6a(dynamic o) → dynamic + return o as{ForNonNullableByDefault} self::Class; +static method t7a(dynamic o) → dynamic + return o; +static method t8a(dynamic o) → dynamic + return o as{ForNonNullableByDefault} core::int; +static method s1a(dynamic o) → dynamic + return o as{ForNonNullableByDefault} self::G>; +static method s2a(dynamic o) → dynamic + return o as{ForNonNullableByDefault} self::G; +static method s3a(dynamic o) → dynamic + return o as{ForNonNullableByDefault} self::G>; +static method s4a(dynamic o) → dynamic + return o as{ForNonNullableByDefault} self::G>; +static method s5a(dynamic o) → dynamic + return o as{ForNonNullableByDefault} self::G; +static method s6a(dynamic o) → dynamic + return o as{ForNonNullableByDefault} self::G>; +static method s7a(dynamic o) → dynamic + return o as{ForNonNullableByDefault} self::G; +static method s8a(dynamic o) → dynamic + return o as{ForNonNullableByDefault} self::G; +static method t1b(dynamic o) → dynamic + return o is{ForNonNullableByDefault} self::Class; +static method t2b(dynamic o) → dynamic + return o is{ForNonNullableByDefault} dynamic; +static method t3b(dynamic o) → dynamic + return o is{ForNonNullableByDefault} self::Class; +static method t4b(dynamic o) → dynamic + return o is{ForNonNullableByDefault} self::Class; +static method t5b(dynamic o) → dynamic + return o is{ForNonNullableByDefault} self::ConcreteClass; +static method t6b(dynamic o) → dynamic + return o is{ForNonNullableByDefault} self::Class; +static method t7b(dynamic o) → dynamic + return o is{ForNonNullableByDefault} core::Object; +static method t8b(dynamic o) → dynamic + return o is{ForNonNullableByDefault} core::int; +static method s1b(dynamic o) → dynamic + return o is{ForNonNullableByDefault} self::G>; +static method s2b(dynamic o) → dynamic + return o is{ForNonNullableByDefault} self::G; +static method s3b(dynamic o) → dynamic + return o is{ForNonNullableByDefault} self::G>; +static method s4b(dynamic o) → dynamic + return o is{ForNonNullableByDefault} self::G>; +static method s5b(dynamic o) → dynamic + return o is{ForNonNullableByDefault} self::G; +static method s6b(dynamic o) → dynamic + return o is{ForNonNullableByDefault} self::G>; +static method s7b(dynamic o) → dynamic + return o is{ForNonNullableByDefault} self::G; +static method s8b(dynamic o) → dynamic + return o is{ForNonNullableByDefault} self::G; +static method main() → dynamic {} diff --git a/pkg/front_end/testcases/general/bounds_catch.dart b/pkg/front_end/testcases/general/bounds_catch.dart new file mode 100644 index 00000000000..84f78bd3fd6 --- /dev/null +++ b/pkg/front_end/testcases/general/bounds_catch.dart @@ -0,0 +1,205 @@ +// Copyright (c) 2022, 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. + +class Class {} + +class ConcreteClass implements Class {} + +typedef F> = X; + +class G> {} + +t1a() { + try {} on F catch (e) { + // Ok + } +} + +t2a() { + try {} on F catch (e) { + // Ok + } +} + +t3a() { + try {} on F catch (e) { + // Ok + } +} + +t4a() { + try {} on F> catch (e) { + // Ok + } +} + +t5a() { + try {} on F catch (e) { + // Ok + } +} + +t6a() { + try {} on F> catch (e) { + // Ok + } +} + +t7a() { + try {} on F catch (e) { + // Error + } +} + +t8a() { + try {} on F catch (e) { + // Error + } +} + +s1a() { + try {} on G catch (e) { + // Ok + } +} + +s2a() { + try {} on G catch (e) { + // Ok + } +} + +s3a() { + try {} on G catch (e) { + // Ok + } +} + +s4a() { + try {} on G> catch (e) { + // Ok + } +} + +s5a() { + try {} on G catch (e) { + // Ok + } +} + +s6a() { + try {} on G> catch (e) { + // Ok + } +} + +s7a() { + try {} on G catch (e) { + // Error + } +} + +s8a() { + try {} on G catch (e) { + // Error + } +} + +t1b() { + try {} on F catch (e) { + // Ok + } +} + +t2b() { + try {} on F catch (e) { + // Ok + } +} + +t3b() { + try {} on F catch (e) { + // Ok + } +} + +t4b() { + try {} on F> catch (e) { + // Ok + } +} + +t5b() { + try {} on F catch (e) { + // Ok + } +} + +t6b() { + try {} on F> catch (e) { + // Ok + } +} + +t7b() { + try {} on F catch (e) { + // Error + } +} + +t8b() { + try {} on F catch (e) { + // Error + } +} + +s1b() { + try {} on G catch (e) { + // Ok + } +} + +s2b() { + try {} on G catch (e) { + // Ok + } +} + +s3b() { + try {} on G catch (e) { + // Ok + } +} + +s4b() { + try {} on G> catch (e) { + // Ok + } +} + +s5b() { + try {} on G catch (e) { + // Ok + } +} + +s6b() { + try {} on G> catch (e) { + // Ok + } +} + +s7b() { + try {} on G catch (e) { + // Error + } +} + +s8b() { + try {} on G catch (e) { + // Error + } +} + +main() {} diff --git a/pkg/front_end/testcases/general/bounds_catch.dart.textual_outline.expect b/pkg/front_end/testcases/general/bounds_catch.dart.textual_outline.expect new file mode 100644 index 00000000000..986be5e0280 --- /dev/null +++ b/pkg/front_end/testcases/general/bounds_catch.dart.textual_outline.expect @@ -0,0 +1,41 @@ +class Class {} + +class ConcreteClass implements Class {} + +typedef F> = X; + +class G> {} + +t1a() {} +t2a() {} +t3a() {} +t4a() {} +t5a() {} +t6a() {} +t7a() {} +t8a() {} +s1a() {} +s2a() {} +s3a() {} +s4a() {} +s5a() {} +s6a() {} +s7a() {} +s8a() {} +t1b() {} +t2b() {} +t3b() {} +t4b() {} +t5b() {} +t6b() {} +t7b() {} +t8b() {} +s1b() {} +s2b() {} +s3b() {} +s4b() {} +s5b() {} +s6b() {} +s7b() {} +s8b() {} +main() {} diff --git a/pkg/front_end/testcases/general/bounds_catch.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/general/bounds_catch.dart.textual_outline_modelled.expect new file mode 100644 index 00000000000..ff62b0a1564 --- /dev/null +++ b/pkg/front_end/testcases/general/bounds_catch.dart.textual_outline_modelled.expect @@ -0,0 +1,40 @@ +class Class {} + +class ConcreteClass implements Class {} + +class G> {} + +main() {} +s1a() {} +s1b() {} +s2a() {} +s2b() {} +s3a() {} +s3b() {} +s4a() {} +s4b() {} +s5a() {} +s5b() {} +s6a() {} +s6b() {} +s7a() {} +s7b() {} +s8a() {} +s8b() {} +t1a() {} +t1b() {} +t2a() {} +t2b() {} +t3a() {} +t3b() {} +t4a() {} +t4b() {} +t5a() {} +t5b() {} +t6a() {} +t6b() {} +t7a() {} +t7b() {} +t8a() {} +t8b() {} +typedef F> = X; diff --git a/pkg/front_end/testcases/general/bounds_catch.dart.weak.expect b/pkg/front_end/testcases/general/bounds_catch.dart.weak.expect new file mode 100644 index 00000000000..d56af178415 --- /dev/null +++ b/pkg/front_end/testcases/general/bounds_catch.dart.weak.expect @@ -0,0 +1,292 @@ +library /*isNonNullableByDefault*/; +// +// Problems in library: +// +// pkg/front_end/testcases/general/bounds_catch.dart:50:13: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_catch.dart'. +// Try changing type arguments so that they conform to the bounds. +// try {} on F catch (e) { +// ^ +// pkg/front_end/testcases/general/bounds_catch.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_catch.dart:56:13: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_catch.dart'. +// Try changing type arguments so that they conform to the bounds. +// try {} on F catch (e) { +// ^ +// pkg/front_end/testcases/general/bounds_catch.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_catch.dart:98:13: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_catch.dart'. +// Try changing type arguments so that they conform to the bounds. +// try {} on G catch (e) { +// ^ +// pkg/front_end/testcases/general/bounds_catch.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_catch.dart:104:13: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_catch.dart'. +// Try changing type arguments so that they conform to the bounds. +// try {} on G catch (e) { +// ^ +// pkg/front_end/testcases/general/bounds_catch.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_catch.dart:146:13: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_catch.dart'. +// Try changing type arguments so that they conform to the bounds. +// try {} on F catch (e) { +// ^ +// pkg/front_end/testcases/general/bounds_catch.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_catch.dart:152:13: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_catch.dart'. +// Try changing type arguments so that they conform to the bounds. +// try {} on F catch (e) { +// ^ +// pkg/front_end/testcases/general/bounds_catch.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_catch.dart:194:13: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_catch.dart'. +// Try changing type arguments so that they conform to the bounds. +// try {} on G catch (e) { +// ^ +// pkg/front_end/testcases/general/bounds_catch.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_catch.dart:200:13: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_catch.dart'. +// Try changing type arguments so that they conform to the bounds. +// try {} on G catch (e) { +// ^ +// pkg/front_end/testcases/general/bounds_catch.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +import self as self; +import "dart:core" as core; + +typedef F = self::Class> = X; +class Class extends core::Object { + synthetic constructor •() → self::Class + : super core::Object::•() + ; +} +class ConcreteClass extends core::Object implements self::Class { + synthetic constructor •() → self::ConcreteClass + : super core::Object::•() + ; +} +class G = self::Class> extends core::Object { + synthetic constructor •() → self::G + : super core::Object::•() + ; +} +static method t1a() → dynamic { + try { + } + on self::Class catch(final self::Class e) { + } +} +static method t2a() → dynamic { + try { + } + on dynamic catch(final dynamic e) { + } +} +static method t3a() → dynamic { + try { + } + on self::Class catch(final self::Class e) { + } +} +static method t4a() → dynamic { + try { + } + on self::Class catch(final self::Class e) { + } +} +static method t5a() → dynamic { + try { + } + on self::ConcreteClass catch(final self::ConcreteClass e) { + } +} +static method t6a() → dynamic { + try { + } + on self::Class catch(final self::Class e) { + } +} +static method t7a() → dynamic { + try { + } + on core::Object catch(final core::Object e) { + } +} +static method t8a() → dynamic { + try { + } + on core::int catch(final core::int e) { + } +} +static method s1a() → dynamic { + try { + } + on self::G> catch(final self::G> e) { + } +} +static method s2a() → dynamic { + try { + } + on self::G catch(final self::G e) { + } +} +static method s3a() → dynamic { + try { + } + on self::G> catch(final self::G> e) { + } +} +static method s4a() → dynamic { + try { + } + on self::G> catch(final self::G> e) { + } +} +static method s5a() → dynamic { + try { + } + on self::G catch(final self::G e) { + } +} +static method s6a() → dynamic { + try { + } + on self::G> catch(final self::G> e) { + } +} +static method s7a() → dynamic { + try { + } + on self::G catch(final self::G e) { + } +} +static method s8a() → dynamic { + try { + } + on self::G catch(final self::G e) { + } +} +static method t1b() → dynamic { + try { + } + on self::Class catch(final self::Class e) { + } +} +static method t2b() → dynamic { + try { + } + on dynamic catch(final dynamic e) { + } +} +static method t3b() → dynamic { + try { + } + on self::Class catch(final self::Class e) { + } +} +static method t4b() → dynamic { + try { + } + on self::Class catch(final self::Class e) { + } +} +static method t5b() → dynamic { + try { + } + on self::ConcreteClass catch(final self::ConcreteClass e) { + } +} +static method t6b() → dynamic { + try { + } + on self::Class catch(final self::Class e) { + } +} +static method t7b() → dynamic { + try { + } + on core::Object catch(final core::Object e) { + } +} +static method t8b() → dynamic { + try { + } + on core::int catch(final core::int e) { + } +} +static method s1b() → dynamic { + try { + } + on self::G> catch(final self::G> e) { + } +} +static method s2b() → dynamic { + try { + } + on self::G catch(final self::G e) { + } +} +static method s3b() → dynamic { + try { + } + on self::G> catch(final self::G> e) { + } +} +static method s4b() → dynamic { + try { + } + on self::G> catch(final self::G> e) { + } +} +static method s5b() → dynamic { + try { + } + on self::G catch(final self::G e) { + } +} +static method s6b() → dynamic { + try { + } + on self::G> catch(final self::G> e) { + } +} +static method s7b() → dynamic { + try { + } + on self::G catch(final self::G e) { + } +} +static method s8b() → dynamic { + try { + } + on self::G catch(final self::G e) { + } +} +static method main() → dynamic {} diff --git a/pkg/front_end/testcases/general/bounds_catch.dart.weak.modular.expect b/pkg/front_end/testcases/general/bounds_catch.dart.weak.modular.expect new file mode 100644 index 00000000000..d56af178415 --- /dev/null +++ b/pkg/front_end/testcases/general/bounds_catch.dart.weak.modular.expect @@ -0,0 +1,292 @@ +library /*isNonNullableByDefault*/; +// +// Problems in library: +// +// pkg/front_end/testcases/general/bounds_catch.dart:50:13: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_catch.dart'. +// Try changing type arguments so that they conform to the bounds. +// try {} on F catch (e) { +// ^ +// pkg/front_end/testcases/general/bounds_catch.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_catch.dart:56:13: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_catch.dart'. +// Try changing type arguments so that they conform to the bounds. +// try {} on F catch (e) { +// ^ +// pkg/front_end/testcases/general/bounds_catch.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_catch.dart:98:13: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_catch.dart'. +// Try changing type arguments so that they conform to the bounds. +// try {} on G catch (e) { +// ^ +// pkg/front_end/testcases/general/bounds_catch.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_catch.dart:104:13: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_catch.dart'. +// Try changing type arguments so that they conform to the bounds. +// try {} on G catch (e) { +// ^ +// pkg/front_end/testcases/general/bounds_catch.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_catch.dart:146:13: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_catch.dart'. +// Try changing type arguments so that they conform to the bounds. +// try {} on F catch (e) { +// ^ +// pkg/front_end/testcases/general/bounds_catch.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_catch.dart:152:13: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_catch.dart'. +// Try changing type arguments so that they conform to the bounds. +// try {} on F catch (e) { +// ^ +// pkg/front_end/testcases/general/bounds_catch.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_catch.dart:194:13: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_catch.dart'. +// Try changing type arguments so that they conform to the bounds. +// try {} on G catch (e) { +// ^ +// pkg/front_end/testcases/general/bounds_catch.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_catch.dart:200:13: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_catch.dart'. +// Try changing type arguments so that they conform to the bounds. +// try {} on G catch (e) { +// ^ +// pkg/front_end/testcases/general/bounds_catch.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +import self as self; +import "dart:core" as core; + +typedef F = self::Class> = X; +class Class extends core::Object { + synthetic constructor •() → self::Class + : super core::Object::•() + ; +} +class ConcreteClass extends core::Object implements self::Class { + synthetic constructor •() → self::ConcreteClass + : super core::Object::•() + ; +} +class G = self::Class> extends core::Object { + synthetic constructor •() → self::G + : super core::Object::•() + ; +} +static method t1a() → dynamic { + try { + } + on self::Class catch(final self::Class e) { + } +} +static method t2a() → dynamic { + try { + } + on dynamic catch(final dynamic e) { + } +} +static method t3a() → dynamic { + try { + } + on self::Class catch(final self::Class e) { + } +} +static method t4a() → dynamic { + try { + } + on self::Class catch(final self::Class e) { + } +} +static method t5a() → dynamic { + try { + } + on self::ConcreteClass catch(final self::ConcreteClass e) { + } +} +static method t6a() → dynamic { + try { + } + on self::Class catch(final self::Class e) { + } +} +static method t7a() → dynamic { + try { + } + on core::Object catch(final core::Object e) { + } +} +static method t8a() → dynamic { + try { + } + on core::int catch(final core::int e) { + } +} +static method s1a() → dynamic { + try { + } + on self::G> catch(final self::G> e) { + } +} +static method s2a() → dynamic { + try { + } + on self::G catch(final self::G e) { + } +} +static method s3a() → dynamic { + try { + } + on self::G> catch(final self::G> e) { + } +} +static method s4a() → dynamic { + try { + } + on self::G> catch(final self::G> e) { + } +} +static method s5a() → dynamic { + try { + } + on self::G catch(final self::G e) { + } +} +static method s6a() → dynamic { + try { + } + on self::G> catch(final self::G> e) { + } +} +static method s7a() → dynamic { + try { + } + on self::G catch(final self::G e) { + } +} +static method s8a() → dynamic { + try { + } + on self::G catch(final self::G e) { + } +} +static method t1b() → dynamic { + try { + } + on self::Class catch(final self::Class e) { + } +} +static method t2b() → dynamic { + try { + } + on dynamic catch(final dynamic e) { + } +} +static method t3b() → dynamic { + try { + } + on self::Class catch(final self::Class e) { + } +} +static method t4b() → dynamic { + try { + } + on self::Class catch(final self::Class e) { + } +} +static method t5b() → dynamic { + try { + } + on self::ConcreteClass catch(final self::ConcreteClass e) { + } +} +static method t6b() → dynamic { + try { + } + on self::Class catch(final self::Class e) { + } +} +static method t7b() → dynamic { + try { + } + on core::Object catch(final core::Object e) { + } +} +static method t8b() → dynamic { + try { + } + on core::int catch(final core::int e) { + } +} +static method s1b() → dynamic { + try { + } + on self::G> catch(final self::G> e) { + } +} +static method s2b() → dynamic { + try { + } + on self::G catch(final self::G e) { + } +} +static method s3b() → dynamic { + try { + } + on self::G> catch(final self::G> e) { + } +} +static method s4b() → dynamic { + try { + } + on self::G> catch(final self::G> e) { + } +} +static method s5b() → dynamic { + try { + } + on self::G catch(final self::G e) { + } +} +static method s6b() → dynamic { + try { + } + on self::G> catch(final self::G> e) { + } +} +static method s7b() → dynamic { + try { + } + on self::G catch(final self::G e) { + } +} +static method s8b() → dynamic { + try { + } + on self::G catch(final self::G e) { + } +} +static method main() → dynamic {} diff --git a/pkg/front_end/testcases/general/bounds_catch.dart.weak.outline.expect b/pkg/front_end/testcases/general/bounds_catch.dart.weak.outline.expect new file mode 100644 index 00000000000..1bd5e4aea25 --- /dev/null +++ b/pkg/front_end/testcases/general/bounds_catch.dart.weak.outline.expect @@ -0,0 +1,83 @@ +library /*isNonNullableByDefault*/; +import self as self; +import "dart:core" as core; + +typedef F = self::Class> = X; +class Class extends core::Object { + synthetic constructor •() → self::Class + ; +} +class ConcreteClass extends core::Object implements self::Class { + synthetic constructor •() → self::ConcreteClass + ; +} +class G = self::Class> extends core::Object { + synthetic constructor •() → self::G + ; +} +static method t1a() → dynamic + ; +static method t2a() → dynamic + ; +static method t3a() → dynamic + ; +static method t4a() → dynamic + ; +static method t5a() → dynamic + ; +static method t6a() → dynamic + ; +static method t7a() → dynamic + ; +static method t8a() → dynamic + ; +static method s1a() → dynamic + ; +static method s2a() → dynamic + ; +static method s3a() → dynamic + ; +static method s4a() → dynamic + ; +static method s5a() → dynamic + ; +static method s6a() → dynamic + ; +static method s7a() → dynamic + ; +static method s8a() → dynamic + ; +static method t1b() → dynamic + ; +static method t2b() → dynamic + ; +static method t3b() → dynamic + ; +static method t4b() → dynamic + ; +static method t5b() → dynamic + ; +static method t6b() → dynamic + ; +static method t7b() → dynamic + ; +static method t8b() → dynamic + ; +static method s1b() → dynamic + ; +static method s2b() → dynamic + ; +static method s3b() → dynamic + ; +static method s4b() → dynamic + ; +static method s5b() → dynamic + ; +static method s6b() → dynamic + ; +static method s7b() → dynamic + ; +static method s8b() → dynamic + ; +static method main() → dynamic + ; diff --git a/pkg/front_end/testcases/general/bounds_catch.dart.weak.transformed.expect b/pkg/front_end/testcases/general/bounds_catch.dart.weak.transformed.expect new file mode 100644 index 00000000000..d56af178415 --- /dev/null +++ b/pkg/front_end/testcases/general/bounds_catch.dart.weak.transformed.expect @@ -0,0 +1,292 @@ +library /*isNonNullableByDefault*/; +// +// Problems in library: +// +// pkg/front_end/testcases/general/bounds_catch.dart:50:13: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_catch.dart'. +// Try changing type arguments so that they conform to the bounds. +// try {} on F catch (e) { +// ^ +// pkg/front_end/testcases/general/bounds_catch.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_catch.dart:56:13: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_catch.dart'. +// Try changing type arguments so that they conform to the bounds. +// try {} on F catch (e) { +// ^ +// pkg/front_end/testcases/general/bounds_catch.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_catch.dart:98:13: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_catch.dart'. +// Try changing type arguments so that they conform to the bounds. +// try {} on G catch (e) { +// ^ +// pkg/front_end/testcases/general/bounds_catch.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_catch.dart:104:13: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_catch.dart'. +// Try changing type arguments so that they conform to the bounds. +// try {} on G catch (e) { +// ^ +// pkg/front_end/testcases/general/bounds_catch.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_catch.dart:146:13: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_catch.dart'. +// Try changing type arguments so that they conform to the bounds. +// try {} on F catch (e) { +// ^ +// pkg/front_end/testcases/general/bounds_catch.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_catch.dart:152:13: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_catch.dart'. +// Try changing type arguments so that they conform to the bounds. +// try {} on F catch (e) { +// ^ +// pkg/front_end/testcases/general/bounds_catch.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_catch.dart:194:13: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_catch.dart'. +// Try changing type arguments so that they conform to the bounds. +// try {} on G catch (e) { +// ^ +// pkg/front_end/testcases/general/bounds_catch.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_catch.dart:200:13: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_catch.dart'. +// Try changing type arguments so that they conform to the bounds. +// try {} on G catch (e) { +// ^ +// pkg/front_end/testcases/general/bounds_catch.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +import self as self; +import "dart:core" as core; + +typedef F = self::Class> = X; +class Class extends core::Object { + synthetic constructor •() → self::Class + : super core::Object::•() + ; +} +class ConcreteClass extends core::Object implements self::Class { + synthetic constructor •() → self::ConcreteClass + : super core::Object::•() + ; +} +class G = self::Class> extends core::Object { + synthetic constructor •() → self::G + : super core::Object::•() + ; +} +static method t1a() → dynamic { + try { + } + on self::Class catch(final self::Class e) { + } +} +static method t2a() → dynamic { + try { + } + on dynamic catch(final dynamic e) { + } +} +static method t3a() → dynamic { + try { + } + on self::Class catch(final self::Class e) { + } +} +static method t4a() → dynamic { + try { + } + on self::Class catch(final self::Class e) { + } +} +static method t5a() → dynamic { + try { + } + on self::ConcreteClass catch(final self::ConcreteClass e) { + } +} +static method t6a() → dynamic { + try { + } + on self::Class catch(final self::Class e) { + } +} +static method t7a() → dynamic { + try { + } + on core::Object catch(final core::Object e) { + } +} +static method t8a() → dynamic { + try { + } + on core::int catch(final core::int e) { + } +} +static method s1a() → dynamic { + try { + } + on self::G> catch(final self::G> e) { + } +} +static method s2a() → dynamic { + try { + } + on self::G catch(final self::G e) { + } +} +static method s3a() → dynamic { + try { + } + on self::G> catch(final self::G> e) { + } +} +static method s4a() → dynamic { + try { + } + on self::G> catch(final self::G> e) { + } +} +static method s5a() → dynamic { + try { + } + on self::G catch(final self::G e) { + } +} +static method s6a() → dynamic { + try { + } + on self::G> catch(final self::G> e) { + } +} +static method s7a() → dynamic { + try { + } + on self::G catch(final self::G e) { + } +} +static method s8a() → dynamic { + try { + } + on self::G catch(final self::G e) { + } +} +static method t1b() → dynamic { + try { + } + on self::Class catch(final self::Class e) { + } +} +static method t2b() → dynamic { + try { + } + on dynamic catch(final dynamic e) { + } +} +static method t3b() → dynamic { + try { + } + on self::Class catch(final self::Class e) { + } +} +static method t4b() → dynamic { + try { + } + on self::Class catch(final self::Class e) { + } +} +static method t5b() → dynamic { + try { + } + on self::ConcreteClass catch(final self::ConcreteClass e) { + } +} +static method t6b() → dynamic { + try { + } + on self::Class catch(final self::Class e) { + } +} +static method t7b() → dynamic { + try { + } + on core::Object catch(final core::Object e) { + } +} +static method t8b() → dynamic { + try { + } + on core::int catch(final core::int e) { + } +} +static method s1b() → dynamic { + try { + } + on self::G> catch(final self::G> e) { + } +} +static method s2b() → dynamic { + try { + } + on self::G catch(final self::G e) { + } +} +static method s3b() → dynamic { + try { + } + on self::G> catch(final self::G> e) { + } +} +static method s4b() → dynamic { + try { + } + on self::G> catch(final self::G> e) { + } +} +static method s5b() → dynamic { + try { + } + on self::G catch(final self::G e) { + } +} +static method s6b() → dynamic { + try { + } + on self::G> catch(final self::G> e) { + } +} +static method s7b() → dynamic { + try { + } + on self::G catch(final self::G e) { + } +} +static method s8b() → dynamic { + try { + } + on self::G catch(final self::G e) { + } +} +static method main() → dynamic {} diff --git a/pkg/front_end/testcases/general/bounds_check_in_typedef.dart.weak.expect b/pkg/front_end/testcases/general/bounds_check_in_typedef.dart.weak.expect index 3cebc8ba3a9..3b587bbae6f 100644 --- a/pkg/front_end/testcases/general/bounds_check_in_typedef.dart.weak.expect +++ b/pkg/front_end/testcases/general/bounds_check_in_typedef.dart.weak.expect @@ -2,18 +2,18 @@ library /*isNonNullableByDefault*/; // // Problems in library: // -// pkg/front_end/testcases/general/bounds_check_in_typedef.dart:7:40: Error: Type argument 'Y' doesn't conform to the bound 'String' of the type variable 'X' on 'A'. +// pkg/front_end/testcases/general/bounds_check_in_typedef.dart:7:32: Error: Type argument 'Y' doesn't conform to the bound 'String' of the type variable 'X' on 'A'. // Try changing type arguments so that they conform to the bounds. // typedef F = Function>() Function(); -// ^ +// ^ // pkg/front_end/testcases/general/bounds_check_in_typedef.dart:5:9: Context: This is the type variable whose bound isn't conformed to. // class A {} // ^ // -// pkg/front_end/testcases/general/bounds_check_in_typedef.dart:8:18: Error: Type argument 'Y' doesn't conform to the bound 'String' of the type variable 'X' on 'A'. +// pkg/front_end/testcases/general/bounds_check_in_typedef.dart:8:61: Error: Type argument 'Y' doesn't conform to the bound 'String' of the type variable 'X' on 'A'. // Try changing type arguments so that they conform to the bounds. // typedef G = void Function(Function>()); -// ^ +// ^ // pkg/front_end/testcases/general/bounds_check_in_typedef.dart:5:9: Context: This is the type variable whose bound isn't conformed to. // class A {} // ^ diff --git a/pkg/front_end/testcases/general/bounds_check_in_typedef.dart.weak.modular.expect b/pkg/front_end/testcases/general/bounds_check_in_typedef.dart.weak.modular.expect index 3cebc8ba3a9..3b587bbae6f 100644 --- a/pkg/front_end/testcases/general/bounds_check_in_typedef.dart.weak.modular.expect +++ b/pkg/front_end/testcases/general/bounds_check_in_typedef.dart.weak.modular.expect @@ -2,18 +2,18 @@ library /*isNonNullableByDefault*/; // // Problems in library: // -// pkg/front_end/testcases/general/bounds_check_in_typedef.dart:7:40: Error: Type argument 'Y' doesn't conform to the bound 'String' of the type variable 'X' on 'A'. +// pkg/front_end/testcases/general/bounds_check_in_typedef.dart:7:32: Error: Type argument 'Y' doesn't conform to the bound 'String' of the type variable 'X' on 'A'. // Try changing type arguments so that they conform to the bounds. // typedef F = Function>() Function(); -// ^ +// ^ // pkg/front_end/testcases/general/bounds_check_in_typedef.dart:5:9: Context: This is the type variable whose bound isn't conformed to. // class A {} // ^ // -// pkg/front_end/testcases/general/bounds_check_in_typedef.dart:8:18: Error: Type argument 'Y' doesn't conform to the bound 'String' of the type variable 'X' on 'A'. +// pkg/front_end/testcases/general/bounds_check_in_typedef.dart:8:61: Error: Type argument 'Y' doesn't conform to the bound 'String' of the type variable 'X' on 'A'. // Try changing type arguments so that they conform to the bounds. // typedef G = void Function(Function>()); -// ^ +// ^ // pkg/front_end/testcases/general/bounds_check_in_typedef.dart:5:9: Context: This is the type variable whose bound isn't conformed to. // class A {} // ^ diff --git a/pkg/front_end/testcases/general/bounds_check_in_typedef.dart.weak.outline.expect b/pkg/front_end/testcases/general/bounds_check_in_typedef.dart.weak.outline.expect index d7788257c9e..9a4c7c15f63 100644 --- a/pkg/front_end/testcases/general/bounds_check_in_typedef.dart.weak.outline.expect +++ b/pkg/front_end/testcases/general/bounds_check_in_typedef.dart.weak.outline.expect @@ -2,18 +2,18 @@ library /*isNonNullableByDefault*/; // // Problems in library: // -// pkg/front_end/testcases/general/bounds_check_in_typedef.dart:7:40: Error: Type argument 'Y' doesn't conform to the bound 'String' of the type variable 'X' on 'A'. +// pkg/front_end/testcases/general/bounds_check_in_typedef.dart:7:32: Error: Type argument 'Y' doesn't conform to the bound 'String' of the type variable 'X' on 'A'. // Try changing type arguments so that they conform to the bounds. // typedef F = Function>() Function(); -// ^ +// ^ // pkg/front_end/testcases/general/bounds_check_in_typedef.dart:5:9: Context: This is the type variable whose bound isn't conformed to. // class A {} // ^ // -// pkg/front_end/testcases/general/bounds_check_in_typedef.dart:8:18: Error: Type argument 'Y' doesn't conform to the bound 'String' of the type variable 'X' on 'A'. +// pkg/front_end/testcases/general/bounds_check_in_typedef.dart:8:61: Error: Type argument 'Y' doesn't conform to the bound 'String' of the type variable 'X' on 'A'. // Try changing type arguments so that they conform to the bounds. // typedef G = void Function(Function>()); -// ^ +// ^ // pkg/front_end/testcases/general/bounds_check_in_typedef.dart:5:9: Context: This is the type variable whose bound isn't conformed to. // class A {} // ^ diff --git a/pkg/front_end/testcases/general/bounds_check_in_typedef.dart.weak.transformed.expect b/pkg/front_end/testcases/general/bounds_check_in_typedef.dart.weak.transformed.expect index 3cebc8ba3a9..3b587bbae6f 100644 --- a/pkg/front_end/testcases/general/bounds_check_in_typedef.dart.weak.transformed.expect +++ b/pkg/front_end/testcases/general/bounds_check_in_typedef.dart.weak.transformed.expect @@ -2,18 +2,18 @@ library /*isNonNullableByDefault*/; // // Problems in library: // -// pkg/front_end/testcases/general/bounds_check_in_typedef.dart:7:40: Error: Type argument 'Y' doesn't conform to the bound 'String' of the type variable 'X' on 'A'. +// pkg/front_end/testcases/general/bounds_check_in_typedef.dart:7:32: Error: Type argument 'Y' doesn't conform to the bound 'String' of the type variable 'X' on 'A'. // Try changing type arguments so that they conform to the bounds. // typedef F = Function>() Function(); -// ^ +// ^ // pkg/front_end/testcases/general/bounds_check_in_typedef.dart:5:9: Context: This is the type variable whose bound isn't conformed to. // class A {} // ^ // -// pkg/front_end/testcases/general/bounds_check_in_typedef.dart:8:18: Error: Type argument 'Y' doesn't conform to the bound 'String' of the type variable 'X' on 'A'. +// pkg/front_end/testcases/general/bounds_check_in_typedef.dart:8:61: Error: Type argument 'Y' doesn't conform to the bound 'String' of the type variable 'X' on 'A'. // Try changing type arguments so that they conform to the bounds. // typedef G = void Function(Function>()); -// ^ +// ^ // pkg/front_end/testcases/general/bounds_check_in_typedef.dart:5:9: Context: This is the type variable whose bound isn't conformed to. // class A {} // ^ diff --git a/pkg/front_end/testcases/general/bounds_enums.dart b/pkg/front_end/testcases/general/bounds_enums.dart new file mode 100644 index 00000000000..d773c424537 --- /dev/null +++ b/pkg/front_end/testcases/general/bounds_enums.dart @@ -0,0 +1,23 @@ +// Copyright (c) 2022, 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. + +// TODO(johnniwinther): Check/create this type as regular bounded i2b. + +typedef A = X Function(X); + +class B {} + +enum E1> /* Error */ { + e1() // Ok +} + +enum E2> /* Error */ { + e2() // Ok +} + +enum E3> /* Error */ { + e3() // Ok +} + +main() {} diff --git a/pkg/front_end/testcases/general/bounds_enums.dart.textual_outline.expect b/pkg/front_end/testcases/general/bounds_enums.dart.textual_outline.expect new file mode 100644 index 00000000000..1fb4a644aaa --- /dev/null +++ b/pkg/front_end/testcases/general/bounds_enums.dart.textual_outline.expect @@ -0,0 +1,11 @@ +typedef A = X Function(X); + +class B {} + +enum E1> { e1() } + +enum E2> { e2() } + +enum E3> { e3() } + +main() {} diff --git a/pkg/front_end/testcases/general/bounds_enums.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/general/bounds_enums.dart.textual_outline_modelled.expect new file mode 100644 index 00000000000..2dba3395ca2 --- /dev/null +++ b/pkg/front_end/testcases/general/bounds_enums.dart.textual_outline_modelled.expect @@ -0,0 +1,10 @@ +class B {} + +enum E1> { e1() } + +enum E2> { e2() } + +enum E3> { e3() } + +main() {} +typedef A = X Function(X); diff --git a/pkg/front_end/testcases/general/bounds_enums.dart.weak.expect b/pkg/front_end/testcases/general/bounds_enums.dart.weak.expect new file mode 100644 index 00000000000..0ac15942ab3 --- /dev/null +++ b/pkg/front_end/testcases/general/bounds_enums.dart.weak.expect @@ -0,0 +1,75 @@ +library /*isNonNullableByDefault*/; +// +// Problems in library: +// +// pkg/front_end/testcases/general/bounds_enums.dart:11:6: Error: Inferred type argument 'A' doesn't conform to the bound 'Y Function(Y)' of the type variable 'Y' on 'E1'. +// Try specifying type arguments explicitly so that they conform to the bounds. +// enum E1> /* Error */ { +// ^ +// pkg/front_end/testcases/general/bounds_enums.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// enum E1> /* Error */ { +// ^ +// pkg/front_end/testcases/general/bounds_enums.dart:11:6: Context: If you want 'E1>' to be a super-bounded type, note that the inverted type 'E1>' must then satisfy its bounds, which it does not. +// - 'E1' is from 'pkg/front_end/testcases/general/bounds_enums.dart'. +// enum E1> /* Error */ { +// ^ +// +import self as self; +import "dart:core" as core; + +typedef A = (X%) → X%; +class B extends core::Object { + synthetic constructor •() → self::B + : super core::Object::•() + ; +} +class E1 extends core::_Enum /*isEnum*/ { + static const field core::List> values = #C4; + static const field self::E1 e1 = #C3; + const constructor •(core::int index, core::String name) → self::E1 + : super core::_Enum::•(index, name) + ; + method toString() → core::String + return "E1.${this.{core::_Enum::_name}{core::String}}"; +} +class E2 = self::B> extends core::_Enum /*isEnum*/ { + static const field core::List>> values = #C7; + static const field self::E2 e2 = #C6; + const constructor •(core::int index, core::String name) → self::E2 + : super core::_Enum::•(index, name) + ; + method toString() → core::String + return "E2.${this.{core::_Enum::_name}{core::String}}"; +} +class E3 = self::E3> extends core::_Enum /*isEnum*/ { + static const field core::List>> values = #C10; + static const field self::E3 e3 = #C9; + const constructor •(core::int index, core::String name) → self::E3 + : super core::_Enum::•(index, name) + ; + method toString() → core::String + return "E3.${this.{core::_Enum::_name}{core::String}}"; +} +static method main() → dynamic {} + +constants { + #C1 = 0 + #C2 = "e1" + #C3 = self::E1 {index:#C1, _name:#C2} + #C4 = *>[#C3] + #C5 = "e2" + #C6 = self::E2 {index:#C1, _name:#C5} + #C7 = *>[#C6] + #C8 = "e3" + #C9 = self::E3 {index:#C1, _name:#C8} + #C10 = *>[#C9] +} + + +Constructor coverage from constants: +org-dartlang-testcase:///bounds_enums.dart: +- E1. (from org-dartlang-testcase:///bounds_enums.dart:11:6) +- _Enum. (from org-dartlang-sdk:///sdk/lib/core/enum.dart:103:9) +- Object. (from org-dartlang-sdk:///sdk/lib/core/object.dart:25:9) +- E2. (from org-dartlang-testcase:///bounds_enums.dart:15:6) +- E3. (from org-dartlang-testcase:///bounds_enums.dart:19:6) diff --git a/pkg/front_end/testcases/general/bounds_enums.dart.weak.modular.expect b/pkg/front_end/testcases/general/bounds_enums.dart.weak.modular.expect new file mode 100644 index 00000000000..0ac15942ab3 --- /dev/null +++ b/pkg/front_end/testcases/general/bounds_enums.dart.weak.modular.expect @@ -0,0 +1,75 @@ +library /*isNonNullableByDefault*/; +// +// Problems in library: +// +// pkg/front_end/testcases/general/bounds_enums.dart:11:6: Error: Inferred type argument 'A' doesn't conform to the bound 'Y Function(Y)' of the type variable 'Y' on 'E1'. +// Try specifying type arguments explicitly so that they conform to the bounds. +// enum E1> /* Error */ { +// ^ +// pkg/front_end/testcases/general/bounds_enums.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// enum E1> /* Error */ { +// ^ +// pkg/front_end/testcases/general/bounds_enums.dart:11:6: Context: If you want 'E1>' to be a super-bounded type, note that the inverted type 'E1>' must then satisfy its bounds, which it does not. +// - 'E1' is from 'pkg/front_end/testcases/general/bounds_enums.dart'. +// enum E1> /* Error */ { +// ^ +// +import self as self; +import "dart:core" as core; + +typedef A = (X%) → X%; +class B extends core::Object { + synthetic constructor •() → self::B + : super core::Object::•() + ; +} +class E1 extends core::_Enum /*isEnum*/ { + static const field core::List> values = #C4; + static const field self::E1 e1 = #C3; + const constructor •(core::int index, core::String name) → self::E1 + : super core::_Enum::•(index, name) + ; + method toString() → core::String + return "E1.${this.{core::_Enum::_name}{core::String}}"; +} +class E2 = self::B> extends core::_Enum /*isEnum*/ { + static const field core::List>> values = #C7; + static const field self::E2 e2 = #C6; + const constructor •(core::int index, core::String name) → self::E2 + : super core::_Enum::•(index, name) + ; + method toString() → core::String + return "E2.${this.{core::_Enum::_name}{core::String}}"; +} +class E3 = self::E3> extends core::_Enum /*isEnum*/ { + static const field core::List>> values = #C10; + static const field self::E3 e3 = #C9; + const constructor •(core::int index, core::String name) → self::E3 + : super core::_Enum::•(index, name) + ; + method toString() → core::String + return "E3.${this.{core::_Enum::_name}{core::String}}"; +} +static method main() → dynamic {} + +constants { + #C1 = 0 + #C2 = "e1" + #C3 = self::E1 {index:#C1, _name:#C2} + #C4 = *>[#C3] + #C5 = "e2" + #C6 = self::E2 {index:#C1, _name:#C5} + #C7 = *>[#C6] + #C8 = "e3" + #C9 = self::E3 {index:#C1, _name:#C8} + #C10 = *>[#C9] +} + + +Constructor coverage from constants: +org-dartlang-testcase:///bounds_enums.dart: +- E1. (from org-dartlang-testcase:///bounds_enums.dart:11:6) +- _Enum. (from org-dartlang-sdk:///sdk/lib/core/enum.dart:103:9) +- Object. (from org-dartlang-sdk:///sdk/lib/core/object.dart:25:9) +- E2. (from org-dartlang-testcase:///bounds_enums.dart:15:6) +- E3. (from org-dartlang-testcase:///bounds_enums.dart:19:6) diff --git a/pkg/front_end/testcases/general/bounds_enums.dart.weak.outline.expect b/pkg/front_end/testcases/general/bounds_enums.dart.weak.outline.expect new file mode 100644 index 00000000000..80346880260 --- /dev/null +++ b/pkg/front_end/testcases/general/bounds_enums.dart.weak.outline.expect @@ -0,0 +1,63 @@ +library /*isNonNullableByDefault*/; +// +// Problems in library: +// +// pkg/front_end/testcases/general/bounds_enums.dart:11:6: Error: Inferred type argument 'A' doesn't conform to the bound 'Y Function(Y)' of the type variable 'Y' on 'E1'. +// Try specifying type arguments explicitly so that they conform to the bounds. +// enum E1> /* Error */ { +// ^ +// pkg/front_end/testcases/general/bounds_enums.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// enum E1> /* Error */ { +// ^ +// pkg/front_end/testcases/general/bounds_enums.dart:11:6: Context: If you want 'E1>' to be a super-bounded type, note that the inverted type 'E1>' must then satisfy its bounds, which it does not. +// - 'E1' is from 'pkg/front_end/testcases/general/bounds_enums.dart'. +// enum E1> /* Error */ { +// ^ +// +import self as self; +import "dart:core" as core; + +typedef A = (X%) → X%; +class B extends core::Object { + synthetic constructor •() → self::B + ; +} +class E1 extends core::_Enum /*isEnum*/ { + static const field core::List> values = const >[self::E1::e1]; + static const field self::E1 e1 = const self::E1::•(0, "e1"); + const constructor •(core::int index, core::String name) → self::E1 + : super core::_Enum::•(index, name) + ; + method toString() → core::String + return "E1.${this.{core::_Enum::_name}{core::String}}"; +} +class E2 = self::B> extends core::_Enum /*isEnum*/ { + static const field core::List>> values = const >[self::E2::e2]; + static const field self::E2 e2 = const self::E2::•(0, "e2"); + const constructor •(core::int index, core::String name) → self::E2 + : super core::_Enum::•(index, name) + ; + method toString() → core::String + return "E2.${this.{core::_Enum::_name}{core::String}}"; +} +class E3 = self::E3> extends core::_Enum /*isEnum*/ { + static const field core::List>> values = const >[self::E3::e3]; + static const field self::E3 e3 = const self::E3::•(0, "e3"); + const constructor •(core::int index, core::String name) → self::E3 + : super core::_Enum::•(index, name) + ; + method toString() → core::String + return "E3.${this.{core::_Enum::_name}{core::String}}"; +} +static method main() → dynamic + ; + + +Extra constant evaluation status: +Evaluated: ListLiteral @ org-dartlang-testcase:///bounds_enums.dart:11:6 -> ListConstant(const *>[const E1{_Enum.index: 0, _Enum._name: "e1"}]) +Evaluated: ConstructorInvocation @ org-dartlang-testcase:///bounds_enums.dart:12:3 -> InstanceConstant(const E1{_Enum.index: 0, _Enum._name: "e1"}) +Evaluated: ListLiteral @ org-dartlang-testcase:///bounds_enums.dart:15:6 -> ListConstant(const *>[const E2{_Enum.index: 0, _Enum._name: "e2"}]) +Evaluated: ConstructorInvocation @ org-dartlang-testcase:///bounds_enums.dart:16:3 -> InstanceConstant(const E2{_Enum.index: 0, _Enum._name: "e2"}) +Evaluated: ListLiteral @ org-dartlang-testcase:///bounds_enums.dart:19:6 -> ListConstant(const *>[const E3{_Enum.index: 0, _Enum._name: "e3"}]) +Evaluated: ConstructorInvocation @ org-dartlang-testcase:///bounds_enums.dart:20:3 -> InstanceConstant(const E3{_Enum.index: 0, _Enum._name: "e3"}) +Extra constant evaluation: evaluated: 21, effectively constant: 6 diff --git a/pkg/front_end/testcases/general/bounds_enums.dart.weak.transformed.expect b/pkg/front_end/testcases/general/bounds_enums.dart.weak.transformed.expect new file mode 100644 index 00000000000..0ac15942ab3 --- /dev/null +++ b/pkg/front_end/testcases/general/bounds_enums.dart.weak.transformed.expect @@ -0,0 +1,75 @@ +library /*isNonNullableByDefault*/; +// +// Problems in library: +// +// pkg/front_end/testcases/general/bounds_enums.dart:11:6: Error: Inferred type argument 'A' doesn't conform to the bound 'Y Function(Y)' of the type variable 'Y' on 'E1'. +// Try specifying type arguments explicitly so that they conform to the bounds. +// enum E1> /* Error */ { +// ^ +// pkg/front_end/testcases/general/bounds_enums.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// enum E1> /* Error */ { +// ^ +// pkg/front_end/testcases/general/bounds_enums.dart:11:6: Context: If you want 'E1>' to be a super-bounded type, note that the inverted type 'E1>' must then satisfy its bounds, which it does not. +// - 'E1' is from 'pkg/front_end/testcases/general/bounds_enums.dart'. +// enum E1> /* Error */ { +// ^ +// +import self as self; +import "dart:core" as core; + +typedef A = (X%) → X%; +class B extends core::Object { + synthetic constructor •() → self::B + : super core::Object::•() + ; +} +class E1 extends core::_Enum /*isEnum*/ { + static const field core::List> values = #C4; + static const field self::E1 e1 = #C3; + const constructor •(core::int index, core::String name) → self::E1 + : super core::_Enum::•(index, name) + ; + method toString() → core::String + return "E1.${this.{core::_Enum::_name}{core::String}}"; +} +class E2 = self::B> extends core::_Enum /*isEnum*/ { + static const field core::List>> values = #C7; + static const field self::E2 e2 = #C6; + const constructor •(core::int index, core::String name) → self::E2 + : super core::_Enum::•(index, name) + ; + method toString() → core::String + return "E2.${this.{core::_Enum::_name}{core::String}}"; +} +class E3 = self::E3> extends core::_Enum /*isEnum*/ { + static const field core::List>> values = #C10; + static const field self::E3 e3 = #C9; + const constructor •(core::int index, core::String name) → self::E3 + : super core::_Enum::•(index, name) + ; + method toString() → core::String + return "E3.${this.{core::_Enum::_name}{core::String}}"; +} +static method main() → dynamic {} + +constants { + #C1 = 0 + #C2 = "e1" + #C3 = self::E1 {index:#C1, _name:#C2} + #C4 = *>[#C3] + #C5 = "e2" + #C6 = self::E2 {index:#C1, _name:#C5} + #C7 = *>[#C6] + #C8 = "e3" + #C9 = self::E3 {index:#C1, _name:#C8} + #C10 = *>[#C9] +} + + +Constructor coverage from constants: +org-dartlang-testcase:///bounds_enums.dart: +- E1. (from org-dartlang-testcase:///bounds_enums.dart:11:6) +- _Enum. (from org-dartlang-sdk:///sdk/lib/core/enum.dart:103:9) +- Object. (from org-dartlang-sdk:///sdk/lib/core/object.dart:25:9) +- E2. (from org-dartlang-testcase:///bounds_enums.dart:15:6) +- E3. (from org-dartlang-testcase:///bounds_enums.dart:19:6) diff --git a/pkg/front_end/testcases/general/bounds_fields.dart b/pkg/front_end/testcases/general/bounds_fields.dart new file mode 100644 index 00000000000..b840fceb1a7 --- /dev/null +++ b/pkg/front_end/testcases/general/bounds_fields.dart @@ -0,0 +1,68 @@ +// Copyright (c) 2022, 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. + +class Class {} + +class ConcreteClass implements Class {} + +typedef F> = X; + +class G> {} + +F? field1a, field1b; // Ok +F? field2a, field2b; // Ok +F? field3a, field3b; // Ok +F>? field4a, field4b; // Ok +F? field5a, field5b; // Ok +F>? field6a, field6b; // Ok +F? field7a, field7b; // Error +F? field8a, field8b; // Error +G? field1c, field1d; // Ok +G? field2c, field2d; // Ok +G? field3c, field3d; // Ok +G>? field4c, field4d; // Ok +G? field5c, field5d; // Ok +G>? field6c, field6d; // Ok +G? field7c, field8d; // Error +G? field8c, field7d; // Error + +class Class1 { + F? field1a, field1b; // Ok + F? field2a, field2b; // Ok + F? field3a, field3b; // Ok + F>? field4a, field4b; // Ok + F? field5a, field5b; // Ok + F>? field6a, field6b; // Ok + F? field7a, field7b; // Error + F? field8a, field8b; // Error + G? field1c, field1d; // Ok + G? field2c, field2d; // Ok + G? field3c, field3d; // Ok + G>? field4c, field4d; // Ok + G? field5c, field5d; // Ok + G>? field6c, field6d; // Ok + G? field7c, field8d; // Error + G? field8c, field7d; // Error +} + +extension Extension1 on int { + static F? field1a, field1b; // Ok + static F? field2a, field2b; // Ok + static F? field3a, field3b; // Ok + static F>? field4a, field4b; // Ok + static F? field5a, field5b; // Ok + static F>? field6a, field6b; // Ok + static F? field7a, field7b; // Error + static F? field8a, field8b; // Error + static G? field1c, field1d; // Ok + static G? field2c, field2d; // Ok + static G? field3c, field3d; // Ok + static G>? field4c, field4d; // Ok + static G? field5c, field5d; // Ok + static G>? field6c, field6d; // Ok + static G? field7c, field8d; // Error + static G? field8c, field7d; // Error +} + +main() {} diff --git a/pkg/front_end/testcases/general/bounds_fields.dart.textual_outline.expect b/pkg/front_end/testcases/general/bounds_fields.dart.textual_outline.expect new file mode 100644 index 00000000000..827a05b3402 --- /dev/null +++ b/pkg/front_end/testcases/general/bounds_fields.dart.textual_outline.expect @@ -0,0 +1,64 @@ +class Class {} + +class ConcreteClass implements Class {} + +typedef F> = X; + +class G> {} + +F? field1a, field1b; +F? field2a, field2b; +F? field3a, field3b; +F>? field4a, field4b; +F? field5a, field5b; +F>? field6a, field6b; +F? field7a, field7b; +F? field8a, field8b; +G? field1c, field1d; +G? field2c, field2d; +G? field3c, field3d; +G>? field4c, field4d; +G? field5c, field5d; +G>? field6c, field6d; +G? field7c, field8d; +G? field8c, field7d; + +class Class1 { + F? field1a, field1b; + F? field2a, field2b; + F? field3a, field3b; + F>? field4a, field4b; + F? field5a, field5b; + F>? field6a, field6b; + F? field7a, field7b; + F? field8a, field8b; + G? field1c, field1d; + G? field2c, field2d; + G? field3c, field3d; + G>? field4c, field4d; + G? field5c, field5d; + G>? field6c, field6d; + G? field7c, field8d; + G? field8c, field7d; +} + +extension Extension1 on int { + static F? field1a, field1b; + static F? field2a, field2b; + static F? field3a, field3b; + static F>? field4a, field4b; + static F? field5a, field5b; + static F>? field6a, field6b; + static F? field7a, field7b; + static F? field8a, field8b; + static G? field1c, field1d; + static G? field2c, field2d; + static G? field3c, field3d; + static G>? field4c, field4d; + static G? field5c, field5d; + static G>? field6c, field6d; + static G? field7c, field8d; + static G? field8c, field7d; +} + +main() {} diff --git a/pkg/front_end/testcases/general/bounds_fields.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/general/bounds_fields.dart.textual_outline_modelled.expect new file mode 100644 index 00000000000..064b48e5998 --- /dev/null +++ b/pkg/front_end/testcases/general/bounds_fields.dart.textual_outline_modelled.expect @@ -0,0 +1,63 @@ +F>? field6a, field6b; +F>? field4a, field4b; +F? field3a, field3b; +F? field5a, field5b; +F? field7a, field7b; +F? field2a, field2b; +F? field8a, field8b; +F? field1a, field1b; +G>? field6c, field6d; +G>? field4c, field4d; +G? field3c, field3d; +G? field5c, field5d; +G? field7c, field8d; +G? field2c, field2d; +G? field8c, field7d; +G? field1c, field1d; + +class Class {} + +class Class1 { + F>? field6a, field6b; + F>? field4a, field4b; + F? field3a, field3b; + F? field5a, field5b; + F? field7a, field7b; + F? field2a, field2b; + F? field8a, field8b; + F? field1a, field1b; + G>? field6c, field6d; + G>? field4c, field4d; + G? field3c, field3d; + G? field5c, field5d; + G? field7c, field8d; + G? field2c, field2d; + G? field8c, field7d; + G? field1c, field1d; +} + +class ConcreteClass implements Class {} + +class G> {} + +extension Extension1 on int { + static F>? field6a, field6b; + static F>? field4a, field4b; + static F? field3a, field3b; + static F? field5a, field5b; + static F? field7a, field7b; + static F? field2a, field2b; + static F? field8a, field8b; + static F? field1a, field1b; + static G>? field6c, field6d; + static G>? field4c, field4d; + static G? field3c, field3d; + static G? field5c, field5d; + static G? field7c, field8d; + static G? field2c, field2d; + static G? field8c, field7d; + static G? field1c, field1d; +} + +main() {} +typedef F> = X; diff --git a/pkg/front_end/testcases/general/bounds_fields.dart.weak.expect b/pkg/front_end/testcases/general/bounds_fields.dart.weak.expect new file mode 100644 index 00000000000..19cb0c75fd3 --- /dev/null +++ b/pkg/front_end/testcases/general/bounds_fields.dart.weak.expect @@ -0,0 +1,273 @@ +library /*isNonNullableByDefault*/; +// +// Problems in library: +// +// pkg/front_end/testcases/general/bounds_fields.dart:19:1: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_fields.dart'. +// Try changing type arguments so that they conform to the bounds. +// F? field7a, field7b; // Error +// ^ +// pkg/front_end/testcases/general/bounds_fields.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_fields.dart:20:1: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_fields.dart'. +// Try changing type arguments so that they conform to the bounds. +// F? field8a, field8b; // Error +// ^ +// pkg/front_end/testcases/general/bounds_fields.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_fields.dart:27:1: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_fields.dart'. +// Try changing type arguments so that they conform to the bounds. +// G? field7c, field8d; // Error +// ^ +// pkg/front_end/testcases/general/bounds_fields.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_fields.dart:28:1: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_fields.dart'. +// Try changing type arguments so that they conform to the bounds. +// G? field8c, field7d; // Error +// ^ +// pkg/front_end/testcases/general/bounds_fields.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_fields.dart:37:3: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_fields.dart'. +// Try changing type arguments so that they conform to the bounds. +// F? field7a, field7b; // Error +// ^ +// pkg/front_end/testcases/general/bounds_fields.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_fields.dart:38:3: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_fields.dart'. +// Try changing type arguments so that they conform to the bounds. +// F? field8a, field8b; // Error +// ^ +// pkg/front_end/testcases/general/bounds_fields.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_fields.dart:45:3: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_fields.dart'. +// Try changing type arguments so that they conform to the bounds. +// G? field7c, field8d; // Error +// ^ +// pkg/front_end/testcases/general/bounds_fields.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_fields.dart:46:3: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_fields.dart'. +// Try changing type arguments so that they conform to the bounds. +// G? field8c, field7d; // Error +// ^ +// pkg/front_end/testcases/general/bounds_fields.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_fields.dart:56:10: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_fields.dart'. +// Try changing type arguments so that they conform to the bounds. +// static F? field7a, field7b; // Error +// ^ +// pkg/front_end/testcases/general/bounds_fields.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_fields.dart:57:10: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_fields.dart'. +// Try changing type arguments so that they conform to the bounds. +// static F? field8a, field8b; // Error +// ^ +// pkg/front_end/testcases/general/bounds_fields.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_fields.dart:64:10: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_fields.dart'. +// Try changing type arguments so that they conform to the bounds. +// static G? field7c, field8d; // Error +// ^ +// pkg/front_end/testcases/general/bounds_fields.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_fields.dart:65:10: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_fields.dart'. +// Try changing type arguments so that they conform to the bounds. +// static G? field8c, field7d; // Error +// ^ +// pkg/front_end/testcases/general/bounds_fields.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +import self as self; +import "dart:core" as core; + +typedef F = self::Class> = X; +class Class extends core::Object { + synthetic constructor •() → self::Class + : super core::Object::•() + ; +} +class ConcreteClass extends core::Object implements self::Class { + synthetic constructor •() → self::ConcreteClass + : super core::Object::•() + ; +} +class G = self::Class> extends core::Object { + synthetic constructor •() → self::G + : super core::Object::•() + ; +} +class Class1 extends core::Object { + field self::Class? field1a = null; + field self::Class? field1b = null; + field dynamic field2a = null; + field dynamic field2b = null; + field self::Class? field3a = null; + field self::Class? field3b = null; + field self::Class? field4a = null; + field self::Class? field4b = null; + field self::ConcreteClass? field5a = null; + field self::ConcreteClass? field5b = null; + field self::Class? field6a = null; + field self::Class? field6b = null; + field core::Object? field7a = null; + field core::Object? field7b = null; + field core::int? field8a = null; + field core::int? field8b = null; + field self::G>? field1c = null; + field self::G>? field1d = null; + field self::G? field2c = null; + field self::G? field2d = null; + field self::G>? field3c = null; + field self::G>? field3d = null; + field self::G>? field4c = null; + field self::G>? field4d = null; + field self::G? field5c = null; + field self::G? field5d = null; + field self::G>? field6c = null; + field self::G>? field6d = null; + field self::G? field7c = null; + field self::G? field8d = null; + field self::G? field8c = null; + field self::G? field7d = null; + synthetic constructor •() → self::Class1 + : super core::Object::•() + ; +} +extension Extension1 on core::int { + static field field1a = self::Extension1|field1a; + static field field1b = self::Extension1|field1b; + static field field2a = self::Extension1|field2a; + static field field2b = self::Extension1|field2b; + static field field3a = self::Extension1|field3a; + static field field3b = self::Extension1|field3b; + static field field4a = self::Extension1|field4a; + static field field4b = self::Extension1|field4b; + static field field5a = self::Extension1|field5a; + static field field5b = self::Extension1|field5b; + static field field6a = self::Extension1|field6a; + static field field6b = self::Extension1|field6b; + static field field7a = self::Extension1|field7a; + static field field7b = self::Extension1|field7b; + static field field8a = self::Extension1|field8a; + static field field8b = self::Extension1|field8b; + static field field1c = self::Extension1|field1c; + static field field1d = self::Extension1|field1d; + static field field2c = self::Extension1|field2c; + static field field2d = self::Extension1|field2d; + static field field3c = self::Extension1|field3c; + static field field3d = self::Extension1|field3d; + static field field4c = self::Extension1|field4c; + static field field4d = self::Extension1|field4d; + static field field5c = self::Extension1|field5c; + static field field5d = self::Extension1|field5d; + static field field6c = self::Extension1|field6c; + static field field6d = self::Extension1|field6d; + static field field7c = self::Extension1|field7c; + static field field8d = self::Extension1|field8d; + static field field8c = self::Extension1|field8c; + static field field7d = self::Extension1|field7d; +} +static field self::Class? field1a; +static field self::Class? field1b; +static field dynamic field2a; +static field dynamic field2b; +static field self::Class? field3a; +static field self::Class? field3b; +static field self::Class? field4a; +static field self::Class? field4b; +static field self::ConcreteClass? field5a; +static field self::ConcreteClass? field5b; +static field self::Class? field6a; +static field self::Class? field6b; +static field core::Object? field7a; +static field core::Object? field7b; +static field core::int? field8a; +static field core::int? field8b; +static field self::G>? field1c; +static field self::G>? field1d; +static field self::G? field2c; +static field self::G? field2d; +static field self::G>? field3c; +static field self::G>? field3d; +static field self::G>? field4c; +static field self::G>? field4d; +static field self::G? field5c; +static field self::G? field5d; +static field self::G>? field6c; +static field self::G>? field6d; +static field self::G? field7c; +static field self::G? field8d; +static field self::G? field8c; +static field self::G? field7d; +static field self::Class? Extension1|field1a; +static field self::Class? Extension1|field1b; +static field dynamic Extension1|field2a; +static field dynamic Extension1|field2b; +static field self::Class? Extension1|field3a; +static field self::Class? Extension1|field3b; +static field self::Class? Extension1|field4a; +static field self::Class? Extension1|field4b; +static field self::ConcreteClass? Extension1|field5a; +static field self::ConcreteClass? Extension1|field5b; +static field self::Class? Extension1|field6a; +static field self::Class? Extension1|field6b; +static field core::Object? Extension1|field7a; +static field core::Object? Extension1|field7b; +static field core::int? Extension1|field8a; +static field core::int? Extension1|field8b; +static field self::G>? Extension1|field1c; +static field self::G>? Extension1|field1d; +static field self::G? Extension1|field2c; +static field self::G? Extension1|field2d; +static field self::G>? Extension1|field3c; +static field self::G>? Extension1|field3d; +static field self::G>? Extension1|field4c; +static field self::G>? Extension1|field4d; +static field self::G? Extension1|field5c; +static field self::G? Extension1|field5d; +static field self::G>? Extension1|field6c; +static field self::G>? Extension1|field6d; +static field self::G? Extension1|field7c; +static field self::G? Extension1|field8d; +static field self::G? Extension1|field8c; +static field self::G? Extension1|field7d; +static method main() → dynamic {} diff --git a/pkg/front_end/testcases/general/bounds_fields.dart.weak.modular.expect b/pkg/front_end/testcases/general/bounds_fields.dart.weak.modular.expect new file mode 100644 index 00000000000..19cb0c75fd3 --- /dev/null +++ b/pkg/front_end/testcases/general/bounds_fields.dart.weak.modular.expect @@ -0,0 +1,273 @@ +library /*isNonNullableByDefault*/; +// +// Problems in library: +// +// pkg/front_end/testcases/general/bounds_fields.dart:19:1: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_fields.dart'. +// Try changing type arguments so that they conform to the bounds. +// F? field7a, field7b; // Error +// ^ +// pkg/front_end/testcases/general/bounds_fields.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_fields.dart:20:1: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_fields.dart'. +// Try changing type arguments so that they conform to the bounds. +// F? field8a, field8b; // Error +// ^ +// pkg/front_end/testcases/general/bounds_fields.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_fields.dart:27:1: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_fields.dart'. +// Try changing type arguments so that they conform to the bounds. +// G? field7c, field8d; // Error +// ^ +// pkg/front_end/testcases/general/bounds_fields.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_fields.dart:28:1: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_fields.dart'. +// Try changing type arguments so that they conform to the bounds. +// G? field8c, field7d; // Error +// ^ +// pkg/front_end/testcases/general/bounds_fields.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_fields.dart:37:3: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_fields.dart'. +// Try changing type arguments so that they conform to the bounds. +// F? field7a, field7b; // Error +// ^ +// pkg/front_end/testcases/general/bounds_fields.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_fields.dart:38:3: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_fields.dart'. +// Try changing type arguments so that they conform to the bounds. +// F? field8a, field8b; // Error +// ^ +// pkg/front_end/testcases/general/bounds_fields.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_fields.dart:45:3: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_fields.dart'. +// Try changing type arguments so that they conform to the bounds. +// G? field7c, field8d; // Error +// ^ +// pkg/front_end/testcases/general/bounds_fields.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_fields.dart:46:3: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_fields.dart'. +// Try changing type arguments so that they conform to the bounds. +// G? field8c, field7d; // Error +// ^ +// pkg/front_end/testcases/general/bounds_fields.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_fields.dart:56:10: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_fields.dart'. +// Try changing type arguments so that they conform to the bounds. +// static F? field7a, field7b; // Error +// ^ +// pkg/front_end/testcases/general/bounds_fields.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_fields.dart:57:10: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_fields.dart'. +// Try changing type arguments so that they conform to the bounds. +// static F? field8a, field8b; // Error +// ^ +// pkg/front_end/testcases/general/bounds_fields.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_fields.dart:64:10: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_fields.dart'. +// Try changing type arguments so that they conform to the bounds. +// static G? field7c, field8d; // Error +// ^ +// pkg/front_end/testcases/general/bounds_fields.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_fields.dart:65:10: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_fields.dart'. +// Try changing type arguments so that they conform to the bounds. +// static G? field8c, field7d; // Error +// ^ +// pkg/front_end/testcases/general/bounds_fields.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +import self as self; +import "dart:core" as core; + +typedef F = self::Class> = X; +class Class extends core::Object { + synthetic constructor •() → self::Class + : super core::Object::•() + ; +} +class ConcreteClass extends core::Object implements self::Class { + synthetic constructor •() → self::ConcreteClass + : super core::Object::•() + ; +} +class G = self::Class> extends core::Object { + synthetic constructor •() → self::G + : super core::Object::•() + ; +} +class Class1 extends core::Object { + field self::Class? field1a = null; + field self::Class? field1b = null; + field dynamic field2a = null; + field dynamic field2b = null; + field self::Class? field3a = null; + field self::Class? field3b = null; + field self::Class? field4a = null; + field self::Class? field4b = null; + field self::ConcreteClass? field5a = null; + field self::ConcreteClass? field5b = null; + field self::Class? field6a = null; + field self::Class? field6b = null; + field core::Object? field7a = null; + field core::Object? field7b = null; + field core::int? field8a = null; + field core::int? field8b = null; + field self::G>? field1c = null; + field self::G>? field1d = null; + field self::G? field2c = null; + field self::G? field2d = null; + field self::G>? field3c = null; + field self::G>? field3d = null; + field self::G>? field4c = null; + field self::G>? field4d = null; + field self::G? field5c = null; + field self::G? field5d = null; + field self::G>? field6c = null; + field self::G>? field6d = null; + field self::G? field7c = null; + field self::G? field8d = null; + field self::G? field8c = null; + field self::G? field7d = null; + synthetic constructor •() → self::Class1 + : super core::Object::•() + ; +} +extension Extension1 on core::int { + static field field1a = self::Extension1|field1a; + static field field1b = self::Extension1|field1b; + static field field2a = self::Extension1|field2a; + static field field2b = self::Extension1|field2b; + static field field3a = self::Extension1|field3a; + static field field3b = self::Extension1|field3b; + static field field4a = self::Extension1|field4a; + static field field4b = self::Extension1|field4b; + static field field5a = self::Extension1|field5a; + static field field5b = self::Extension1|field5b; + static field field6a = self::Extension1|field6a; + static field field6b = self::Extension1|field6b; + static field field7a = self::Extension1|field7a; + static field field7b = self::Extension1|field7b; + static field field8a = self::Extension1|field8a; + static field field8b = self::Extension1|field8b; + static field field1c = self::Extension1|field1c; + static field field1d = self::Extension1|field1d; + static field field2c = self::Extension1|field2c; + static field field2d = self::Extension1|field2d; + static field field3c = self::Extension1|field3c; + static field field3d = self::Extension1|field3d; + static field field4c = self::Extension1|field4c; + static field field4d = self::Extension1|field4d; + static field field5c = self::Extension1|field5c; + static field field5d = self::Extension1|field5d; + static field field6c = self::Extension1|field6c; + static field field6d = self::Extension1|field6d; + static field field7c = self::Extension1|field7c; + static field field8d = self::Extension1|field8d; + static field field8c = self::Extension1|field8c; + static field field7d = self::Extension1|field7d; +} +static field self::Class? field1a; +static field self::Class? field1b; +static field dynamic field2a; +static field dynamic field2b; +static field self::Class? field3a; +static field self::Class? field3b; +static field self::Class? field4a; +static field self::Class? field4b; +static field self::ConcreteClass? field5a; +static field self::ConcreteClass? field5b; +static field self::Class? field6a; +static field self::Class? field6b; +static field core::Object? field7a; +static field core::Object? field7b; +static field core::int? field8a; +static field core::int? field8b; +static field self::G>? field1c; +static field self::G>? field1d; +static field self::G? field2c; +static field self::G? field2d; +static field self::G>? field3c; +static field self::G>? field3d; +static field self::G>? field4c; +static field self::G>? field4d; +static field self::G? field5c; +static field self::G? field5d; +static field self::G>? field6c; +static field self::G>? field6d; +static field self::G? field7c; +static field self::G? field8d; +static field self::G? field8c; +static field self::G? field7d; +static field self::Class? Extension1|field1a; +static field self::Class? Extension1|field1b; +static field dynamic Extension1|field2a; +static field dynamic Extension1|field2b; +static field self::Class? Extension1|field3a; +static field self::Class? Extension1|field3b; +static field self::Class? Extension1|field4a; +static field self::Class? Extension1|field4b; +static field self::ConcreteClass? Extension1|field5a; +static field self::ConcreteClass? Extension1|field5b; +static field self::Class? Extension1|field6a; +static field self::Class? Extension1|field6b; +static field core::Object? Extension1|field7a; +static field core::Object? Extension1|field7b; +static field core::int? Extension1|field8a; +static field core::int? Extension1|field8b; +static field self::G>? Extension1|field1c; +static field self::G>? Extension1|field1d; +static field self::G? Extension1|field2c; +static field self::G? Extension1|field2d; +static field self::G>? Extension1|field3c; +static field self::G>? Extension1|field3d; +static field self::G>? Extension1|field4c; +static field self::G>? Extension1|field4d; +static field self::G? Extension1|field5c; +static field self::G? Extension1|field5d; +static field self::G>? Extension1|field6c; +static field self::G>? Extension1|field6d; +static field self::G? Extension1|field7c; +static field self::G? Extension1|field8d; +static field self::G? Extension1|field8c; +static field self::G? Extension1|field7d; +static method main() → dynamic {} diff --git a/pkg/front_end/testcases/general/bounds_fields.dart.weak.outline.expect b/pkg/front_end/testcases/general/bounds_fields.dart.weak.outline.expect new file mode 100644 index 00000000000..58b2e77ddf1 --- /dev/null +++ b/pkg/front_end/testcases/general/bounds_fields.dart.weak.outline.expect @@ -0,0 +1,270 @@ +library /*isNonNullableByDefault*/; +// +// Problems in library: +// +// pkg/front_end/testcases/general/bounds_fields.dart:19:1: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_fields.dart'. +// Try changing type arguments so that they conform to the bounds. +// F? field7a, field7b; // Error +// ^ +// pkg/front_end/testcases/general/bounds_fields.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_fields.dart:20:1: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_fields.dart'. +// Try changing type arguments so that they conform to the bounds. +// F? field8a, field8b; // Error +// ^ +// pkg/front_end/testcases/general/bounds_fields.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_fields.dart:27:1: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_fields.dart'. +// Try changing type arguments so that they conform to the bounds. +// G? field7c, field8d; // Error +// ^ +// pkg/front_end/testcases/general/bounds_fields.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_fields.dart:28:1: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_fields.dart'. +// Try changing type arguments so that they conform to the bounds. +// G? field8c, field7d; // Error +// ^ +// pkg/front_end/testcases/general/bounds_fields.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_fields.dart:37:3: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_fields.dart'. +// Try changing type arguments so that they conform to the bounds. +// F? field7a, field7b; // Error +// ^ +// pkg/front_end/testcases/general/bounds_fields.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_fields.dart:38:3: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_fields.dart'. +// Try changing type arguments so that they conform to the bounds. +// F? field8a, field8b; // Error +// ^ +// pkg/front_end/testcases/general/bounds_fields.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_fields.dart:45:3: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_fields.dart'. +// Try changing type arguments so that they conform to the bounds. +// G? field7c, field8d; // Error +// ^ +// pkg/front_end/testcases/general/bounds_fields.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_fields.dart:46:3: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_fields.dart'. +// Try changing type arguments so that they conform to the bounds. +// G? field8c, field7d; // Error +// ^ +// pkg/front_end/testcases/general/bounds_fields.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_fields.dart:56:10: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_fields.dart'. +// Try changing type arguments so that they conform to the bounds. +// static F? field7a, field7b; // Error +// ^ +// pkg/front_end/testcases/general/bounds_fields.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_fields.dart:57:10: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_fields.dart'. +// Try changing type arguments so that they conform to the bounds. +// static F? field8a, field8b; // Error +// ^ +// pkg/front_end/testcases/general/bounds_fields.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_fields.dart:64:10: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_fields.dart'. +// Try changing type arguments so that they conform to the bounds. +// static G? field7c, field8d; // Error +// ^ +// pkg/front_end/testcases/general/bounds_fields.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_fields.dart:65:10: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_fields.dart'. +// Try changing type arguments so that they conform to the bounds. +// static G? field8c, field7d; // Error +// ^ +// pkg/front_end/testcases/general/bounds_fields.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +import self as self; +import "dart:core" as core; + +typedef F = self::Class> = X; +class Class extends core::Object { + synthetic constructor •() → self::Class + ; +} +class ConcreteClass extends core::Object implements self::Class { + synthetic constructor •() → self::ConcreteClass + ; +} +class G = self::Class> extends core::Object { + synthetic constructor •() → self::G + ; +} +class Class1 extends core::Object { + field self::Class? field1a; + field self::Class? field1b; + field dynamic field2a; + field dynamic field2b; + field self::Class? field3a; + field self::Class? field3b; + field self::Class? field4a; + field self::Class? field4b; + field self::ConcreteClass? field5a; + field self::ConcreteClass? field5b; + field self::Class? field6a; + field self::Class? field6b; + field core::Object? field7a; + field core::Object? field7b; + field core::int? field8a; + field core::int? field8b; + field self::G>? field1c; + field self::G>? field1d; + field self::G? field2c; + field self::G? field2d; + field self::G>? field3c; + field self::G>? field3d; + field self::G>? field4c; + field self::G>? field4d; + field self::G? field5c; + field self::G? field5d; + field self::G>? field6c; + field self::G>? field6d; + field self::G? field7c; + field self::G? field8d; + field self::G? field8c; + field self::G? field7d; + synthetic constructor •() → self::Class1 + ; +} +extension Extension1 on core::int { + static field field1a = self::Extension1|field1a; + static field field1b = self::Extension1|field1b; + static field field2a = self::Extension1|field2a; + static field field2b = self::Extension1|field2b; + static field field3a = self::Extension1|field3a; + static field field3b = self::Extension1|field3b; + static field field4a = self::Extension1|field4a; + static field field4b = self::Extension1|field4b; + static field field5a = self::Extension1|field5a; + static field field5b = self::Extension1|field5b; + static field field6a = self::Extension1|field6a; + static field field6b = self::Extension1|field6b; + static field field7a = self::Extension1|field7a; + static field field7b = self::Extension1|field7b; + static field field8a = self::Extension1|field8a; + static field field8b = self::Extension1|field8b; + static field field1c = self::Extension1|field1c; + static field field1d = self::Extension1|field1d; + static field field2c = self::Extension1|field2c; + static field field2d = self::Extension1|field2d; + static field field3c = self::Extension1|field3c; + static field field3d = self::Extension1|field3d; + static field field4c = self::Extension1|field4c; + static field field4d = self::Extension1|field4d; + static field field5c = self::Extension1|field5c; + static field field5d = self::Extension1|field5d; + static field field6c = self::Extension1|field6c; + static field field6d = self::Extension1|field6d; + static field field7c = self::Extension1|field7c; + static field field8d = self::Extension1|field8d; + static field field8c = self::Extension1|field8c; + static field field7d = self::Extension1|field7d; +} +static field self::Class? field1a; +static field self::Class? field1b; +static field dynamic field2a; +static field dynamic field2b; +static field self::Class? field3a; +static field self::Class? field3b; +static field self::Class? field4a; +static field self::Class? field4b; +static field self::ConcreteClass? field5a; +static field self::ConcreteClass? field5b; +static field self::Class? field6a; +static field self::Class? field6b; +static field core::Object? field7a; +static field core::Object? field7b; +static field core::int? field8a; +static field core::int? field8b; +static field self::G>? field1c; +static field self::G>? field1d; +static field self::G? field2c; +static field self::G? field2d; +static field self::G>? field3c; +static field self::G>? field3d; +static field self::G>? field4c; +static field self::G>? field4d; +static field self::G? field5c; +static field self::G? field5d; +static field self::G>? field6c; +static field self::G>? field6d; +static field self::G? field7c; +static field self::G? field8d; +static field self::G? field8c; +static field self::G? field7d; +static field self::Class? Extension1|field1a; +static field self::Class? Extension1|field1b; +static field dynamic Extension1|field2a; +static field dynamic Extension1|field2b; +static field self::Class? Extension1|field3a; +static field self::Class? Extension1|field3b; +static field self::Class? Extension1|field4a; +static field self::Class? Extension1|field4b; +static field self::ConcreteClass? Extension1|field5a; +static field self::ConcreteClass? Extension1|field5b; +static field self::Class? Extension1|field6a; +static field self::Class? Extension1|field6b; +static field core::Object? Extension1|field7a; +static field core::Object? Extension1|field7b; +static field core::int? Extension1|field8a; +static field core::int? Extension1|field8b; +static field self::G>? Extension1|field1c; +static field self::G>? Extension1|field1d; +static field self::G? Extension1|field2c; +static field self::G? Extension1|field2d; +static field self::G>? Extension1|field3c; +static field self::G>? Extension1|field3d; +static field self::G>? Extension1|field4c; +static field self::G>? Extension1|field4d; +static field self::G? Extension1|field5c; +static field self::G? Extension1|field5d; +static field self::G>? Extension1|field6c; +static field self::G>? Extension1|field6d; +static field self::G? Extension1|field7c; +static field self::G? Extension1|field8d; +static field self::G? Extension1|field8c; +static field self::G? Extension1|field7d; +static method main() → dynamic + ; diff --git a/pkg/front_end/testcases/general/bounds_fields.dart.weak.transformed.expect b/pkg/front_end/testcases/general/bounds_fields.dart.weak.transformed.expect new file mode 100644 index 00000000000..19cb0c75fd3 --- /dev/null +++ b/pkg/front_end/testcases/general/bounds_fields.dart.weak.transformed.expect @@ -0,0 +1,273 @@ +library /*isNonNullableByDefault*/; +// +// Problems in library: +// +// pkg/front_end/testcases/general/bounds_fields.dart:19:1: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_fields.dart'. +// Try changing type arguments so that they conform to the bounds. +// F? field7a, field7b; // Error +// ^ +// pkg/front_end/testcases/general/bounds_fields.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_fields.dart:20:1: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_fields.dart'. +// Try changing type arguments so that they conform to the bounds. +// F? field8a, field8b; // Error +// ^ +// pkg/front_end/testcases/general/bounds_fields.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_fields.dart:27:1: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_fields.dart'. +// Try changing type arguments so that they conform to the bounds. +// G? field7c, field8d; // Error +// ^ +// pkg/front_end/testcases/general/bounds_fields.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_fields.dart:28:1: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_fields.dart'. +// Try changing type arguments so that they conform to the bounds. +// G? field8c, field7d; // Error +// ^ +// pkg/front_end/testcases/general/bounds_fields.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_fields.dart:37:3: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_fields.dart'. +// Try changing type arguments so that they conform to the bounds. +// F? field7a, field7b; // Error +// ^ +// pkg/front_end/testcases/general/bounds_fields.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_fields.dart:38:3: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_fields.dart'. +// Try changing type arguments so that they conform to the bounds. +// F? field8a, field8b; // Error +// ^ +// pkg/front_end/testcases/general/bounds_fields.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_fields.dart:45:3: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_fields.dart'. +// Try changing type arguments so that they conform to the bounds. +// G? field7c, field8d; // Error +// ^ +// pkg/front_end/testcases/general/bounds_fields.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_fields.dart:46:3: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_fields.dart'. +// Try changing type arguments so that they conform to the bounds. +// G? field8c, field7d; // Error +// ^ +// pkg/front_end/testcases/general/bounds_fields.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_fields.dart:56:10: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_fields.dart'. +// Try changing type arguments so that they conform to the bounds. +// static F? field7a, field7b; // Error +// ^ +// pkg/front_end/testcases/general/bounds_fields.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_fields.dart:57:10: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_fields.dart'. +// Try changing type arguments so that they conform to the bounds. +// static F? field8a, field8b; // Error +// ^ +// pkg/front_end/testcases/general/bounds_fields.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_fields.dart:64:10: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_fields.dart'. +// Try changing type arguments so that they conform to the bounds. +// static G? field7c, field8d; // Error +// ^ +// pkg/front_end/testcases/general/bounds_fields.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_fields.dart:65:10: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_fields.dart'. +// Try changing type arguments so that they conform to the bounds. +// static G? field8c, field7d; // Error +// ^ +// pkg/front_end/testcases/general/bounds_fields.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +import self as self; +import "dart:core" as core; + +typedef F = self::Class> = X; +class Class extends core::Object { + synthetic constructor •() → self::Class + : super core::Object::•() + ; +} +class ConcreteClass extends core::Object implements self::Class { + synthetic constructor •() → self::ConcreteClass + : super core::Object::•() + ; +} +class G = self::Class> extends core::Object { + synthetic constructor •() → self::G + : super core::Object::•() + ; +} +class Class1 extends core::Object { + field self::Class? field1a = null; + field self::Class? field1b = null; + field dynamic field2a = null; + field dynamic field2b = null; + field self::Class? field3a = null; + field self::Class? field3b = null; + field self::Class? field4a = null; + field self::Class? field4b = null; + field self::ConcreteClass? field5a = null; + field self::ConcreteClass? field5b = null; + field self::Class? field6a = null; + field self::Class? field6b = null; + field core::Object? field7a = null; + field core::Object? field7b = null; + field core::int? field8a = null; + field core::int? field8b = null; + field self::G>? field1c = null; + field self::G>? field1d = null; + field self::G? field2c = null; + field self::G? field2d = null; + field self::G>? field3c = null; + field self::G>? field3d = null; + field self::G>? field4c = null; + field self::G>? field4d = null; + field self::G? field5c = null; + field self::G? field5d = null; + field self::G>? field6c = null; + field self::G>? field6d = null; + field self::G? field7c = null; + field self::G? field8d = null; + field self::G? field8c = null; + field self::G? field7d = null; + synthetic constructor •() → self::Class1 + : super core::Object::•() + ; +} +extension Extension1 on core::int { + static field field1a = self::Extension1|field1a; + static field field1b = self::Extension1|field1b; + static field field2a = self::Extension1|field2a; + static field field2b = self::Extension1|field2b; + static field field3a = self::Extension1|field3a; + static field field3b = self::Extension1|field3b; + static field field4a = self::Extension1|field4a; + static field field4b = self::Extension1|field4b; + static field field5a = self::Extension1|field5a; + static field field5b = self::Extension1|field5b; + static field field6a = self::Extension1|field6a; + static field field6b = self::Extension1|field6b; + static field field7a = self::Extension1|field7a; + static field field7b = self::Extension1|field7b; + static field field8a = self::Extension1|field8a; + static field field8b = self::Extension1|field8b; + static field field1c = self::Extension1|field1c; + static field field1d = self::Extension1|field1d; + static field field2c = self::Extension1|field2c; + static field field2d = self::Extension1|field2d; + static field field3c = self::Extension1|field3c; + static field field3d = self::Extension1|field3d; + static field field4c = self::Extension1|field4c; + static field field4d = self::Extension1|field4d; + static field field5c = self::Extension1|field5c; + static field field5d = self::Extension1|field5d; + static field field6c = self::Extension1|field6c; + static field field6d = self::Extension1|field6d; + static field field7c = self::Extension1|field7c; + static field field8d = self::Extension1|field8d; + static field field8c = self::Extension1|field8c; + static field field7d = self::Extension1|field7d; +} +static field self::Class? field1a; +static field self::Class? field1b; +static field dynamic field2a; +static field dynamic field2b; +static field self::Class? field3a; +static field self::Class? field3b; +static field self::Class? field4a; +static field self::Class? field4b; +static field self::ConcreteClass? field5a; +static field self::ConcreteClass? field5b; +static field self::Class? field6a; +static field self::Class? field6b; +static field core::Object? field7a; +static field core::Object? field7b; +static field core::int? field8a; +static field core::int? field8b; +static field self::G>? field1c; +static field self::G>? field1d; +static field self::G? field2c; +static field self::G? field2d; +static field self::G>? field3c; +static field self::G>? field3d; +static field self::G>? field4c; +static field self::G>? field4d; +static field self::G? field5c; +static field self::G? field5d; +static field self::G>? field6c; +static field self::G>? field6d; +static field self::G? field7c; +static field self::G? field8d; +static field self::G? field8c; +static field self::G? field7d; +static field self::Class? Extension1|field1a; +static field self::Class? Extension1|field1b; +static field dynamic Extension1|field2a; +static field dynamic Extension1|field2b; +static field self::Class? Extension1|field3a; +static field self::Class? Extension1|field3b; +static field self::Class? Extension1|field4a; +static field self::Class? Extension1|field4b; +static field self::ConcreteClass? Extension1|field5a; +static field self::ConcreteClass? Extension1|field5b; +static field self::Class? Extension1|field6a; +static field self::Class? Extension1|field6b; +static field core::Object? Extension1|field7a; +static field core::Object? Extension1|field7b; +static field core::int? Extension1|field8a; +static field core::int? Extension1|field8b; +static field self::G>? Extension1|field1c; +static field self::G>? Extension1|field1d; +static field self::G? Extension1|field2c; +static field self::G? Extension1|field2d; +static field self::G>? Extension1|field3c; +static field self::G>? Extension1|field3d; +static field self::G>? Extension1|field4c; +static field self::G>? Extension1|field4d; +static field self::G? Extension1|field5c; +static field self::G? Extension1|field5d; +static field self::G>? Extension1|field6c; +static field self::G>? Extension1|field6d; +static field self::G? Extension1|field7c; +static field self::G? Extension1|field8d; +static field self::G? Extension1|field8c; +static field self::G? Extension1|field7d; +static method main() → dynamic {} diff --git a/pkg/front_end/testcases/general/bounds_instances.dart b/pkg/front_end/testcases/general/bounds_instances.dart new file mode 100644 index 00000000000..b583f061765 --- /dev/null +++ b/pkg/front_end/testcases/general/bounds_instances.dart @@ -0,0 +1,51 @@ +// Copyright (c) 2022, 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. + +class Class {} + +class ConcreteClass implements Class {} + +typedef F> = Class1; + +class G> {} + +class Class1 {} + +test() { + new F(); // Error + new F(); // Error + new F(); // Error + new F>(); // Error + new F(); // Ok + new F>(); // Ok + new F(); // Error + new F(); // Error + new G(); // Error + new G(); // Error + new G(); // Error + new G>(); // Error + new G(); // Ok + new G>(); // Ok + new G(); // Error + new G(); // Error + + F.new; // Ok + F.new; // Ok + F.new; // Ok + F>.new; // Ok + F.new; // Ok + F>.new; // Ok + F.new; // Error + F.new; // Error + G.new; // Ok + G.new; // Error + G.new; // Error + G>.new; // Error + G.new; // Ok + G>.new; // Ok + G.new; // Error + G.new; // Error +} + +main() {} diff --git a/pkg/front_end/testcases/general/bounds_instances.dart.textual_outline.expect b/pkg/front_end/testcases/general/bounds_instances.dart.textual_outline.expect new file mode 100644 index 00000000000..b507840138c --- /dev/null +++ b/pkg/front_end/testcases/general/bounds_instances.dart.textual_outline.expect @@ -0,0 +1,12 @@ +class Class {} + +class ConcreteClass implements Class {} + +typedef F> = Class1; + +class G> {} + +class Class1 {} + +test() {} +main() {} diff --git a/pkg/front_end/testcases/general/bounds_instances.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/general/bounds_instances.dart.textual_outline_modelled.expect new file mode 100644 index 00000000000..731451ea698 --- /dev/null +++ b/pkg/front_end/testcases/general/bounds_instances.dart.textual_outline_modelled.expect @@ -0,0 +1,11 @@ +class Class {} + +class Class1 {} + +class ConcreteClass implements Class {} + +class G> {} + +main() {} +test() {} +typedef F> = Class1; diff --git a/pkg/front_end/testcases/general/bounds_instances.dart.weak.expect b/pkg/front_end/testcases/general/bounds_instances.dart.weak.expect new file mode 100644 index 00000000000..d236cbc40ca --- /dev/null +++ b/pkg/front_end/testcases/general/bounds_instances.dart.weak.expect @@ -0,0 +1,244 @@ +library /*isNonNullableByDefault*/; +// +// Problems in library: +// +// pkg/front_end/testcases/general/bounds_instances.dart:17:7: Error: Type argument 'dynamic' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_instances.dart'. +// Try changing type arguments so that they conform to the bounds. +// new F(); // Error +// ^ +// pkg/front_end/testcases/general/bounds_instances.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = Class1; +// ^ +// +// pkg/front_end/testcases/general/bounds_instances.dart:18:7: Error: Type argument 'Class' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_instances.dart'. +// Try changing type arguments so that they conform to the bounds. +// new F(); // Error +// ^ +// pkg/front_end/testcases/general/bounds_instances.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = Class1; +// ^ +// +// pkg/front_end/testcases/general/bounds_instances.dart:19:7: Error: Type argument 'Class' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_instances.dart'. +// Try changing type arguments so that they conform to the bounds. +// new F>(); // Error +// ^ +// pkg/front_end/testcases/general/bounds_instances.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = Class1; +// ^ +// +// pkg/front_end/testcases/general/bounds_instances.dart:22:7: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_instances.dart'. +// Try changing type arguments so that they conform to the bounds. +// new F(); // Error +// ^ +// pkg/front_end/testcases/general/bounds_instances.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = Class1; +// ^ +// +// pkg/front_end/testcases/general/bounds_instances.dart:23:7: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_instances.dart'. +// Try changing type arguments so that they conform to the bounds. +// new F(); // Error +// ^ +// pkg/front_end/testcases/general/bounds_instances.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = Class1; +// ^ +// +// pkg/front_end/testcases/general/bounds_instances.dart:25:7: Error: Type argument 'dynamic' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_instances.dart'. +// Try changing type arguments so that they conform to the bounds. +// new G(); // Error +// ^ +// pkg/front_end/testcases/general/bounds_instances.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_instances.dart:26:7: Error: Type argument 'Class' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_instances.dart'. +// Try changing type arguments so that they conform to the bounds. +// new G(); // Error +// ^ +// pkg/front_end/testcases/general/bounds_instances.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_instances.dart:27:7: Error: Type argument 'Class' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_instances.dart'. +// Try changing type arguments so that they conform to the bounds. +// new G>(); // Error +// ^ +// pkg/front_end/testcases/general/bounds_instances.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_instances.dart:30:7: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_instances.dart'. +// Try changing type arguments so that they conform to the bounds. +// new G(); // Error +// ^ +// pkg/front_end/testcases/general/bounds_instances.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_instances.dart:31:7: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_instances.dart'. +// Try changing type arguments so that they conform to the bounds. +// new G(); // Error +// ^ +// pkg/front_end/testcases/general/bounds_instances.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_instances.dart:24:7: Error: Inferred type argument 'Class' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_instances.dart'. +// - 'Object' is from 'dart:core'. +// Try specifying type arguments explicitly so that they conform to the bounds. +// new G(); // Error +// ^ +// pkg/front_end/testcases/general/bounds_instances.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_instances.dart:42:3: Error: Type argument 'dynamic' doesn't conform to the bound 'Class' of the type variable 'X' on 'G Function>()'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_instances.dart'. +// - 'G' is from 'pkg/front_end/testcases/general/bounds_instances.dart'. +// Try changing type arguments so that they conform to the bounds. +// G.new; // Error +// ^ +// +// pkg/front_end/testcases/general/bounds_instances.dart:43:3: Error: Type argument 'Class' doesn't conform to the bound 'Class' of the type variable 'X' on 'G Function>()'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_instances.dart'. +// - 'G' is from 'pkg/front_end/testcases/general/bounds_instances.dart'. +// Try changing type arguments so that they conform to the bounds. +// G.new; // Error +// ^ +// +// pkg/front_end/testcases/general/bounds_instances.dart:44:3: Error: Type argument 'Class' doesn't conform to the bound 'Class' of the type variable 'X' on 'G Function>()'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_instances.dart'. +// - 'G' is from 'pkg/front_end/testcases/general/bounds_instances.dart'. +// Try changing type arguments so that they conform to the bounds. +// G>.new; // Error +// ^ +// +// pkg/front_end/testcases/general/bounds_instances.dart:47:3: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'G Function>()'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_instances.dart'. +// - 'G' is from 'pkg/front_end/testcases/general/bounds_instances.dart'. +// Try changing type arguments so that they conform to the bounds. +// G.new; // Error +// ^ +// +// pkg/front_end/testcases/general/bounds_instances.dart:48:3: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'G Function>()'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_instances.dart'. +// - 'G' is from 'pkg/front_end/testcases/general/bounds_instances.dart'. +// Try changing type arguments so that they conform to the bounds. +// G.new; // Error +// ^ +// +// pkg/front_end/testcases/general/bounds_instances.dart:16:7: Error: Inferred type argument 'Class' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_instances.dart'. +// - 'Object' is from 'dart:core'. +// Try specifying type arguments explicitly so that they conform to the bounds. +// new F(); // Error +// ^ +// pkg/front_end/testcases/general/bounds_instances.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = Class1; +// ^ +// +// pkg/front_end/testcases/general/bounds_instances.dart:39:3: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_instances.dart'. +// Try changing type arguments so that they conform to the bounds. +// F.new; // Error +// ^ +// pkg/front_end/testcases/general/bounds_instances.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = Class1; +// ^ +// +// pkg/front_end/testcases/general/bounds_instances.dart:40:3: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_instances.dart'. +// Try changing type arguments so that they conform to the bounds. +// F.new; // Error +// ^ +// pkg/front_end/testcases/general/bounds_instances.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = Class1; +// ^ +// +import self as self; +import "dart:core" as core; + +typedef F = self::Class> = self::Class1; +class Class extends core::Object { + synthetic constructor •() → self::Class + : super core::Object::•() + ; +} +class ConcreteClass extends core::Object implements self::Class { + synthetic constructor •() → self::ConcreteClass + : super core::Object::•() + ; +} +class G = self::Class> extends core::Object { + synthetic constructor •() → self::G + : super core::Object::•() + ; +} +class Class1 extends core::Object { + synthetic constructor •() → self::Class1 + : super core::Object::•() + ; +} +static method test() → dynamic { + new self::Class1::•(); + new self::Class1::•(); + new self::Class1::•(); + new self::Class1::•(); + new self::Class1::•(); + new self::Class1::•(); + new self::Class1::•(); + new self::Class1::•(); + new self::G::•>(); + new self::G::•(); + new self::G::•>(); + new self::G::•>(); + new self::G::•(); + new self::G::•>(); + new self::G::•(); + new self::G::•(); + #C1; + #C2; + #C2; + #C2; + #C2; + #C2; + #C2; + #C2; + #C3; + #C4; + #C5; + #C5; + #C6; + #C7; + #C8; + #C9; +} +static method main() → dynamic {} +static method _#F#new#tearOff = self::Class>() → self::Class1 + return new self::Class1::•(); + +constants { + #C1 = static-tearoff self::_#F#new#tearOff + #C2 = constructor-tearoff self::Class1::• + #C3 = constructor-tearoff self::G::• + #C4 = instantiation #C3 + #C5 = instantiation #C3 *> + #C6 = instantiation #C3 + #C7 = instantiation #C3 *> + #C8 = instantiation #C3 + #C9 = instantiation #C3 +} diff --git a/pkg/front_end/testcases/general/bounds_instances.dart.weak.modular.expect b/pkg/front_end/testcases/general/bounds_instances.dart.weak.modular.expect new file mode 100644 index 00000000000..d236cbc40ca --- /dev/null +++ b/pkg/front_end/testcases/general/bounds_instances.dart.weak.modular.expect @@ -0,0 +1,244 @@ +library /*isNonNullableByDefault*/; +// +// Problems in library: +// +// pkg/front_end/testcases/general/bounds_instances.dart:17:7: Error: Type argument 'dynamic' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_instances.dart'. +// Try changing type arguments so that they conform to the bounds. +// new F(); // Error +// ^ +// pkg/front_end/testcases/general/bounds_instances.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = Class1; +// ^ +// +// pkg/front_end/testcases/general/bounds_instances.dart:18:7: Error: Type argument 'Class' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_instances.dart'. +// Try changing type arguments so that they conform to the bounds. +// new F(); // Error +// ^ +// pkg/front_end/testcases/general/bounds_instances.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = Class1; +// ^ +// +// pkg/front_end/testcases/general/bounds_instances.dart:19:7: Error: Type argument 'Class' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_instances.dart'. +// Try changing type arguments so that they conform to the bounds. +// new F>(); // Error +// ^ +// pkg/front_end/testcases/general/bounds_instances.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = Class1; +// ^ +// +// pkg/front_end/testcases/general/bounds_instances.dart:22:7: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_instances.dart'. +// Try changing type arguments so that they conform to the bounds. +// new F(); // Error +// ^ +// pkg/front_end/testcases/general/bounds_instances.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = Class1; +// ^ +// +// pkg/front_end/testcases/general/bounds_instances.dart:23:7: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_instances.dart'. +// Try changing type arguments so that they conform to the bounds. +// new F(); // Error +// ^ +// pkg/front_end/testcases/general/bounds_instances.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = Class1; +// ^ +// +// pkg/front_end/testcases/general/bounds_instances.dart:25:7: Error: Type argument 'dynamic' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_instances.dart'. +// Try changing type arguments so that they conform to the bounds. +// new G(); // Error +// ^ +// pkg/front_end/testcases/general/bounds_instances.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_instances.dart:26:7: Error: Type argument 'Class' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_instances.dart'. +// Try changing type arguments so that they conform to the bounds. +// new G(); // Error +// ^ +// pkg/front_end/testcases/general/bounds_instances.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_instances.dart:27:7: Error: Type argument 'Class' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_instances.dart'. +// Try changing type arguments so that they conform to the bounds. +// new G>(); // Error +// ^ +// pkg/front_end/testcases/general/bounds_instances.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_instances.dart:30:7: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_instances.dart'. +// Try changing type arguments so that they conform to the bounds. +// new G(); // Error +// ^ +// pkg/front_end/testcases/general/bounds_instances.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_instances.dart:31:7: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_instances.dart'. +// Try changing type arguments so that they conform to the bounds. +// new G(); // Error +// ^ +// pkg/front_end/testcases/general/bounds_instances.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_instances.dart:24:7: Error: Inferred type argument 'Class' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_instances.dart'. +// - 'Object' is from 'dart:core'. +// Try specifying type arguments explicitly so that they conform to the bounds. +// new G(); // Error +// ^ +// pkg/front_end/testcases/general/bounds_instances.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_instances.dart:42:3: Error: Type argument 'dynamic' doesn't conform to the bound 'Class' of the type variable 'X' on 'G Function>()'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_instances.dart'. +// - 'G' is from 'pkg/front_end/testcases/general/bounds_instances.dart'. +// Try changing type arguments so that they conform to the bounds. +// G.new; // Error +// ^ +// +// pkg/front_end/testcases/general/bounds_instances.dart:43:3: Error: Type argument 'Class' doesn't conform to the bound 'Class' of the type variable 'X' on 'G Function>()'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_instances.dart'. +// - 'G' is from 'pkg/front_end/testcases/general/bounds_instances.dart'. +// Try changing type arguments so that they conform to the bounds. +// G.new; // Error +// ^ +// +// pkg/front_end/testcases/general/bounds_instances.dart:44:3: Error: Type argument 'Class' doesn't conform to the bound 'Class' of the type variable 'X' on 'G Function>()'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_instances.dart'. +// - 'G' is from 'pkg/front_end/testcases/general/bounds_instances.dart'. +// Try changing type arguments so that they conform to the bounds. +// G>.new; // Error +// ^ +// +// pkg/front_end/testcases/general/bounds_instances.dart:47:3: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'G Function>()'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_instances.dart'. +// - 'G' is from 'pkg/front_end/testcases/general/bounds_instances.dart'. +// Try changing type arguments so that they conform to the bounds. +// G.new; // Error +// ^ +// +// pkg/front_end/testcases/general/bounds_instances.dart:48:3: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'G Function>()'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_instances.dart'. +// - 'G' is from 'pkg/front_end/testcases/general/bounds_instances.dart'. +// Try changing type arguments so that they conform to the bounds. +// G.new; // Error +// ^ +// +// pkg/front_end/testcases/general/bounds_instances.dart:16:7: Error: Inferred type argument 'Class' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_instances.dart'. +// - 'Object' is from 'dart:core'. +// Try specifying type arguments explicitly so that they conform to the bounds. +// new F(); // Error +// ^ +// pkg/front_end/testcases/general/bounds_instances.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = Class1; +// ^ +// +// pkg/front_end/testcases/general/bounds_instances.dart:39:3: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_instances.dart'. +// Try changing type arguments so that they conform to the bounds. +// F.new; // Error +// ^ +// pkg/front_end/testcases/general/bounds_instances.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = Class1; +// ^ +// +// pkg/front_end/testcases/general/bounds_instances.dart:40:3: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_instances.dart'. +// Try changing type arguments so that they conform to the bounds. +// F.new; // Error +// ^ +// pkg/front_end/testcases/general/bounds_instances.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = Class1; +// ^ +// +import self as self; +import "dart:core" as core; + +typedef F = self::Class> = self::Class1; +class Class extends core::Object { + synthetic constructor •() → self::Class + : super core::Object::•() + ; +} +class ConcreteClass extends core::Object implements self::Class { + synthetic constructor •() → self::ConcreteClass + : super core::Object::•() + ; +} +class G = self::Class> extends core::Object { + synthetic constructor •() → self::G + : super core::Object::•() + ; +} +class Class1 extends core::Object { + synthetic constructor •() → self::Class1 + : super core::Object::•() + ; +} +static method test() → dynamic { + new self::Class1::•(); + new self::Class1::•(); + new self::Class1::•(); + new self::Class1::•(); + new self::Class1::•(); + new self::Class1::•(); + new self::Class1::•(); + new self::Class1::•(); + new self::G::•>(); + new self::G::•(); + new self::G::•>(); + new self::G::•>(); + new self::G::•(); + new self::G::•>(); + new self::G::•(); + new self::G::•(); + #C1; + #C2; + #C2; + #C2; + #C2; + #C2; + #C2; + #C2; + #C3; + #C4; + #C5; + #C5; + #C6; + #C7; + #C8; + #C9; +} +static method main() → dynamic {} +static method _#F#new#tearOff = self::Class>() → self::Class1 + return new self::Class1::•(); + +constants { + #C1 = static-tearoff self::_#F#new#tearOff + #C2 = constructor-tearoff self::Class1::• + #C3 = constructor-tearoff self::G::• + #C4 = instantiation #C3 + #C5 = instantiation #C3 *> + #C6 = instantiation #C3 + #C7 = instantiation #C3 *> + #C8 = instantiation #C3 + #C9 = instantiation #C3 +} diff --git a/pkg/front_end/testcases/general/bounds_instances.dart.weak.outline.expect b/pkg/front_end/testcases/general/bounds_instances.dart.weak.outline.expect new file mode 100644 index 00000000000..714445fd357 --- /dev/null +++ b/pkg/front_end/testcases/general/bounds_instances.dart.weak.outline.expect @@ -0,0 +1,27 @@ +library /*isNonNullableByDefault*/; +import self as self; +import "dart:core" as core; + +typedef F = self::Class> = self::Class1; +class Class extends core::Object { + synthetic constructor •() → self::Class + ; +} +class ConcreteClass extends core::Object implements self::Class { + synthetic constructor •() → self::ConcreteClass + ; +} +class G = self::Class> extends core::Object { + synthetic constructor •() → self::G + ; +} +class Class1 extends core::Object { + synthetic constructor •() → self::Class1 + ; +} +static method test() → dynamic + ; +static method main() → dynamic + ; +static method _#F#new#tearOff = self::Class>() → self::Class1 + return new self::Class1::•(); diff --git a/pkg/front_end/testcases/general/bounds_literals.dart b/pkg/front_end/testcases/general/bounds_literals.dart new file mode 100644 index 00000000000..1e9e2aa73e3 --- /dev/null +++ b/pkg/front_end/testcases/general/bounds_literals.dart @@ -0,0 +1,58 @@ +// Copyright (c) 2022, 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. + +class Class {} + +class ConcreteClass implements Class {} + +typedef F> = X; + +class G> {} + +test() { + >{}; // Ok + , F>>{}; // Ok + , F>>{}; // Ok + , F>{}; // Error + >{}; // Ok + , G>>{}; // Ok + , G>>{}; // Ok + , G>{}; // Error + + {}; // Ok + >{}; // Ok + >{}; // Ok + >>{}; // Ok + >{}; // Error + >{}; // Error + >{}; // Ok + >>{}; // Ok + {}; // Ok + >{}; // Ok + >{}; // Ok + >>{}; // Ok + >{}; // Ok + >>{}; // Ok + >{}; // Error + >{}; // Error + + []; // Ok + >[]; // Ok + >[]; // Ok + >>[]; // Ok + >[]; // Ok + >>[]; // Ok + >[]; // Error + >[]; // Error + []; // Ok + >[]; // Ok + >[]; // Ok + >>[]; // Ok + >[]; // Ok + >>[]; // Ok + >[]; // Error + >[]; // Error +} + +main() {} diff --git a/pkg/front_end/testcases/general/bounds_literals.dart.textual_outline.expect b/pkg/front_end/testcases/general/bounds_literals.dart.textual_outline.expect new file mode 100644 index 00000000000..903ffb2a072 --- /dev/null +++ b/pkg/front_end/testcases/general/bounds_literals.dart.textual_outline.expect @@ -0,0 +1,10 @@ +class Class {} + +class ConcreteClass implements Class {} + +typedef F> = X; + +class G> {} + +test() {} +main() {} diff --git a/pkg/front_end/testcases/general/bounds_literals.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/general/bounds_literals.dart.textual_outline_modelled.expect new file mode 100644 index 00000000000..a5aa92337e5 --- /dev/null +++ b/pkg/front_end/testcases/general/bounds_literals.dart.textual_outline_modelled.expect @@ -0,0 +1,9 @@ +class Class {} + +class ConcreteClass implements Class {} + +class G> {} + +main() {} +test() {} +typedef F> = X; diff --git a/pkg/front_end/testcases/general/bounds_literals.dart.weak.expect b/pkg/front_end/testcases/general/bounds_literals.dart.weak.expect new file mode 100644 index 00000000000..fc49d816f2f --- /dev/null +++ b/pkg/front_end/testcases/general/bounds_literals.dart.weak.expect @@ -0,0 +1,213 @@ +library /*isNonNullableByDefault*/; +// +// Problems in library: +// +// pkg/front_end/testcases/general/bounds_literals.dart:17:4: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_literals.dart'. +// Try changing type arguments so that they conform to the bounds. +// , F>{}; // Error +// ^ +// pkg/front_end/testcases/general/bounds_literals.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_literals.dart:17:15: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_literals.dart'. +// Try changing type arguments so that they conform to the bounds. +// , F>{}; // Error +// ^ +// pkg/front_end/testcases/general/bounds_literals.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_literals.dart:21:4: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_literals.dart'. +// Try changing type arguments so that they conform to the bounds. +// , G>{}; // Error +// ^ +// pkg/front_end/testcases/general/bounds_literals.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_literals.dart:21:15: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_literals.dart'. +// Try changing type arguments so that they conform to the bounds. +// , G>{}; // Error +// ^ +// pkg/front_end/testcases/general/bounds_literals.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_literals.dart:27:4: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_literals.dart'. +// Try changing type arguments so that they conform to the bounds. +// >{}; // Error +// ^ +// pkg/front_end/testcases/general/bounds_literals.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_literals.dart:28:4: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_literals.dart'. +// Try changing type arguments so that they conform to the bounds. +// >{}; // Error +// ^ +// pkg/front_end/testcases/general/bounds_literals.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_literals.dart:37:4: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_literals.dart'. +// Try changing type arguments so that they conform to the bounds. +// >{}; // Error +// ^ +// pkg/front_end/testcases/general/bounds_literals.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_literals.dart:38:4: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_literals.dart'. +// Try changing type arguments so that they conform to the bounds. +// >{}; // Error +// ^ +// pkg/front_end/testcases/general/bounds_literals.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_literals.dart:46:4: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_literals.dart'. +// Try changing type arguments so that they conform to the bounds. +// >[]; // Error +// ^ +// pkg/front_end/testcases/general/bounds_literals.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_literals.dart:47:4: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_literals.dart'. +// Try changing type arguments so that they conform to the bounds. +// >[]; // Error +// ^ +// pkg/front_end/testcases/general/bounds_literals.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_literals.dart:54:4: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_literals.dart'. +// Try changing type arguments so that they conform to the bounds. +// >[]; // Error +// ^ +// pkg/front_end/testcases/general/bounds_literals.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_literals.dart:55:4: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_literals.dart'. +// Try changing type arguments so that they conform to the bounds. +// >[]; // Error +// ^ +// pkg/front_end/testcases/general/bounds_literals.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +import self as self; +import "dart:core" as core; +import "dart:collection" as col; + +typedef F = self::Class> = X; +class Class extends core::Object { + synthetic constructor •() → self::Class + : super core::Object::•() + ; +} +class ConcreteClass extends core::Object implements self::Class { + synthetic constructor •() → self::ConcreteClass + : super core::Object::•() + ; +} +class G = self::Class> extends core::Object { + synthetic constructor •() → self::G + : super core::Object::•() + ; +} +static method test() → dynamic { + , dynamic>{}; + , self::Class>{}; + >{}; + {}; + >, self::G>>{}; + >, self::G>>{}; + , self::G>>{}; + , self::G>{}; + block { + final core::Set> #t1 = col::LinkedHashSet::•>(); + } =>#t1; + block { + final core::Set #t2 = col::LinkedHashSet::•(); + } =>#t2; + block { + final core::Set> #t3 = col::LinkedHashSet::•>(); + } =>#t3; + block { + final core::Set> #t4 = col::LinkedHashSet::•>(); + } =>#t4; + block { + final core::Set #t5 = col::LinkedHashSet::•(); + } =>#t5; + block { + final core::Set #t6 = col::LinkedHashSet::•(); + } =>#t6; + block { + final core::Set #t7 = col::LinkedHashSet::•(); + } =>#t7; + block { + final core::Set> #t8 = col::LinkedHashSet::•>(); + } =>#t8; + block { + final core::Set>> #t9 = col::LinkedHashSet::•>>(); + } =>#t9; + block { + final core::Set>> #t10 = col::LinkedHashSet::•>>(); + } =>#t10; + block { + final core::Set>> #t11 = col::LinkedHashSet::•>>(); + } =>#t11; + block { + final core::Set>> #t12 = col::LinkedHashSet::•>>(); + } =>#t12; + block { + final core::Set> #t13 = col::LinkedHashSet::•>(); + } =>#t13; + block { + final core::Set>> #t14 = col::LinkedHashSet::•>>(); + } =>#t14; + block { + final core::Set> #t15 = col::LinkedHashSet::•>(); + } =>#t15; + block { + final core::Set> #t16 = col::LinkedHashSet::•>(); + } =>#t16; + >[]; + []; + >[]; + >[]; + []; + >[]; + []; + []; + >>[]; + >>[]; + >>[]; + >>[]; + >[]; + >>[]; + >[]; + >[]; +} +static method main() → dynamic {} diff --git a/pkg/front_end/testcases/general/bounds_literals.dart.weak.modular.expect b/pkg/front_end/testcases/general/bounds_literals.dart.weak.modular.expect new file mode 100644 index 00000000000..fc49d816f2f --- /dev/null +++ b/pkg/front_end/testcases/general/bounds_literals.dart.weak.modular.expect @@ -0,0 +1,213 @@ +library /*isNonNullableByDefault*/; +// +// Problems in library: +// +// pkg/front_end/testcases/general/bounds_literals.dart:17:4: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_literals.dart'. +// Try changing type arguments so that they conform to the bounds. +// , F>{}; // Error +// ^ +// pkg/front_end/testcases/general/bounds_literals.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_literals.dart:17:15: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_literals.dart'. +// Try changing type arguments so that they conform to the bounds. +// , F>{}; // Error +// ^ +// pkg/front_end/testcases/general/bounds_literals.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_literals.dart:21:4: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_literals.dart'. +// Try changing type arguments so that they conform to the bounds. +// , G>{}; // Error +// ^ +// pkg/front_end/testcases/general/bounds_literals.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_literals.dart:21:15: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_literals.dart'. +// Try changing type arguments so that they conform to the bounds. +// , G>{}; // Error +// ^ +// pkg/front_end/testcases/general/bounds_literals.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_literals.dart:27:4: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_literals.dart'. +// Try changing type arguments so that they conform to the bounds. +// >{}; // Error +// ^ +// pkg/front_end/testcases/general/bounds_literals.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_literals.dart:28:4: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_literals.dart'. +// Try changing type arguments so that they conform to the bounds. +// >{}; // Error +// ^ +// pkg/front_end/testcases/general/bounds_literals.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_literals.dart:37:4: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_literals.dart'. +// Try changing type arguments so that they conform to the bounds. +// >{}; // Error +// ^ +// pkg/front_end/testcases/general/bounds_literals.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_literals.dart:38:4: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_literals.dart'. +// Try changing type arguments so that they conform to the bounds. +// >{}; // Error +// ^ +// pkg/front_end/testcases/general/bounds_literals.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_literals.dart:46:4: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_literals.dart'. +// Try changing type arguments so that they conform to the bounds. +// >[]; // Error +// ^ +// pkg/front_end/testcases/general/bounds_literals.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_literals.dart:47:4: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_literals.dart'. +// Try changing type arguments so that they conform to the bounds. +// >[]; // Error +// ^ +// pkg/front_end/testcases/general/bounds_literals.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_literals.dart:54:4: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_literals.dart'. +// Try changing type arguments so that they conform to the bounds. +// >[]; // Error +// ^ +// pkg/front_end/testcases/general/bounds_literals.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_literals.dart:55:4: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_literals.dart'. +// Try changing type arguments so that they conform to the bounds. +// >[]; // Error +// ^ +// pkg/front_end/testcases/general/bounds_literals.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +import self as self; +import "dart:core" as core; +import "dart:collection" as col; + +typedef F = self::Class> = X; +class Class extends core::Object { + synthetic constructor •() → self::Class + : super core::Object::•() + ; +} +class ConcreteClass extends core::Object implements self::Class { + synthetic constructor •() → self::ConcreteClass + : super core::Object::•() + ; +} +class G = self::Class> extends core::Object { + synthetic constructor •() → self::G + : super core::Object::•() + ; +} +static method test() → dynamic { + , dynamic>{}; + , self::Class>{}; + >{}; + {}; + >, self::G>>{}; + >, self::G>>{}; + , self::G>>{}; + , self::G>{}; + block { + final core::Set> #t1 = col::LinkedHashSet::•>(); + } =>#t1; + block { + final core::Set #t2 = col::LinkedHashSet::•(); + } =>#t2; + block { + final core::Set> #t3 = col::LinkedHashSet::•>(); + } =>#t3; + block { + final core::Set> #t4 = col::LinkedHashSet::•>(); + } =>#t4; + block { + final core::Set #t5 = col::LinkedHashSet::•(); + } =>#t5; + block { + final core::Set #t6 = col::LinkedHashSet::•(); + } =>#t6; + block { + final core::Set #t7 = col::LinkedHashSet::•(); + } =>#t7; + block { + final core::Set> #t8 = col::LinkedHashSet::•>(); + } =>#t8; + block { + final core::Set>> #t9 = col::LinkedHashSet::•>>(); + } =>#t9; + block { + final core::Set>> #t10 = col::LinkedHashSet::•>>(); + } =>#t10; + block { + final core::Set>> #t11 = col::LinkedHashSet::•>>(); + } =>#t11; + block { + final core::Set>> #t12 = col::LinkedHashSet::•>>(); + } =>#t12; + block { + final core::Set> #t13 = col::LinkedHashSet::•>(); + } =>#t13; + block { + final core::Set>> #t14 = col::LinkedHashSet::•>>(); + } =>#t14; + block { + final core::Set> #t15 = col::LinkedHashSet::•>(); + } =>#t15; + block { + final core::Set> #t16 = col::LinkedHashSet::•>(); + } =>#t16; + >[]; + []; + >[]; + >[]; + []; + >[]; + []; + []; + >>[]; + >>[]; + >>[]; + >>[]; + >[]; + >>[]; + >[]; + >[]; +} +static method main() → dynamic {} diff --git a/pkg/front_end/testcases/general/bounds_literals.dart.weak.outline.expect b/pkg/front_end/testcases/general/bounds_literals.dart.weak.outline.expect new file mode 100644 index 00000000000..3215dc67a71 --- /dev/null +++ b/pkg/front_end/testcases/general/bounds_literals.dart.weak.outline.expect @@ -0,0 +1,21 @@ +library /*isNonNullableByDefault*/; +import self as self; +import "dart:core" as core; + +typedef F = self::Class> = X; +class Class extends core::Object { + synthetic constructor •() → self::Class + ; +} +class ConcreteClass extends core::Object implements self::Class { + synthetic constructor •() → self::ConcreteClass + ; +} +class G = self::Class> extends core::Object { + synthetic constructor •() → self::G + ; +} +static method test() → dynamic + ; +static method main() → dynamic + ; diff --git a/pkg/front_end/testcases/general/bounds_literals.dart.weak.transformed.expect b/pkg/front_end/testcases/general/bounds_literals.dart.weak.transformed.expect new file mode 100644 index 00000000000..5c630d7fe98 --- /dev/null +++ b/pkg/front_end/testcases/general/bounds_literals.dart.weak.transformed.expect @@ -0,0 +1,213 @@ +library /*isNonNullableByDefault*/; +// +// Problems in library: +// +// pkg/front_end/testcases/general/bounds_literals.dart:17:4: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_literals.dart'. +// Try changing type arguments so that they conform to the bounds. +// , F>{}; // Error +// ^ +// pkg/front_end/testcases/general/bounds_literals.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_literals.dart:17:15: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_literals.dart'. +// Try changing type arguments so that they conform to the bounds. +// , F>{}; // Error +// ^ +// pkg/front_end/testcases/general/bounds_literals.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_literals.dart:21:4: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_literals.dart'. +// Try changing type arguments so that they conform to the bounds. +// , G>{}; // Error +// ^ +// pkg/front_end/testcases/general/bounds_literals.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_literals.dart:21:15: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_literals.dart'. +// Try changing type arguments so that they conform to the bounds. +// , G>{}; // Error +// ^ +// pkg/front_end/testcases/general/bounds_literals.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_literals.dart:27:4: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_literals.dart'. +// Try changing type arguments so that they conform to the bounds. +// >{}; // Error +// ^ +// pkg/front_end/testcases/general/bounds_literals.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_literals.dart:28:4: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_literals.dart'. +// Try changing type arguments so that they conform to the bounds. +// >{}; // Error +// ^ +// pkg/front_end/testcases/general/bounds_literals.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_literals.dart:37:4: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_literals.dart'. +// Try changing type arguments so that they conform to the bounds. +// >{}; // Error +// ^ +// pkg/front_end/testcases/general/bounds_literals.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_literals.dart:38:4: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_literals.dart'. +// Try changing type arguments so that they conform to the bounds. +// >{}; // Error +// ^ +// pkg/front_end/testcases/general/bounds_literals.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_literals.dart:46:4: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_literals.dart'. +// Try changing type arguments so that they conform to the bounds. +// >[]; // Error +// ^ +// pkg/front_end/testcases/general/bounds_literals.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_literals.dart:47:4: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_literals.dart'. +// Try changing type arguments so that they conform to the bounds. +// >[]; // Error +// ^ +// pkg/front_end/testcases/general/bounds_literals.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_literals.dart:54:4: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_literals.dart'. +// Try changing type arguments so that they conform to the bounds. +// >[]; // Error +// ^ +// pkg/front_end/testcases/general/bounds_literals.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_literals.dart:55:4: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_literals.dart'. +// Try changing type arguments so that they conform to the bounds. +// >[]; // Error +// ^ +// pkg/front_end/testcases/general/bounds_literals.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +import self as self; +import "dart:core" as core; +import "dart:collection" as col; + +typedef F = self::Class> = X; +class Class extends core::Object { + synthetic constructor •() → self::Class + : super core::Object::•() + ; +} +class ConcreteClass extends core::Object implements self::Class { + synthetic constructor •() → self::ConcreteClass + : super core::Object::•() + ; +} +class G = self::Class> extends core::Object { + synthetic constructor •() → self::G + : super core::Object::•() + ; +} +static method test() → dynamic { + , dynamic>{}; + , self::Class>{}; + >{}; + {}; + >, self::G>>{}; + >, self::G>>{}; + , self::G>>{}; + , self::G>{}; + block { + final core::Set> #t1 = new col::_CompactLinkedHashSet::•>(); + } =>#t1; + block { + final core::Set #t2 = new col::_CompactLinkedHashSet::•(); + } =>#t2; + block { + final core::Set> #t3 = new col::_CompactLinkedHashSet::•>(); + } =>#t3; + block { + final core::Set> #t4 = new col::_CompactLinkedHashSet::•>(); + } =>#t4; + block { + final core::Set #t5 = new col::_CompactLinkedHashSet::•(); + } =>#t5; + block { + final core::Set #t6 = new col::_CompactLinkedHashSet::•(); + } =>#t6; + block { + final core::Set #t7 = new col::_CompactLinkedHashSet::•(); + } =>#t7; + block { + final core::Set> #t8 = new col::_CompactLinkedHashSet::•>(); + } =>#t8; + block { + final core::Set>> #t9 = new col::_CompactLinkedHashSet::•>>(); + } =>#t9; + block { + final core::Set>> #t10 = new col::_CompactLinkedHashSet::•>>(); + } =>#t10; + block { + final core::Set>> #t11 = new col::_CompactLinkedHashSet::•>>(); + } =>#t11; + block { + final core::Set>> #t12 = new col::_CompactLinkedHashSet::•>>(); + } =>#t12; + block { + final core::Set> #t13 = new col::_CompactLinkedHashSet::•>(); + } =>#t13; + block { + final core::Set>> #t14 = new col::_CompactLinkedHashSet::•>>(); + } =>#t14; + block { + final core::Set> #t15 = new col::_CompactLinkedHashSet::•>(); + } =>#t15; + block { + final core::Set> #t16 = new col::_CompactLinkedHashSet::•>(); + } =>#t16; + core::_GrowableList::•>(0); + core::_GrowableList::•(0); + core::_GrowableList::•>(0); + core::_GrowableList::•>(0); + core::_GrowableList::•(0); + core::_GrowableList::•>(0); + core::_GrowableList::•(0); + core::_GrowableList::•(0); + core::_GrowableList::•>>(0); + core::_GrowableList::•>>(0); + core::_GrowableList::•>>(0); + core::_GrowableList::•>>(0); + core::_GrowableList::•>(0); + core::_GrowableList::•>>(0); + core::_GrowableList::•>(0); + core::_GrowableList::•>(0); +} +static method main() → dynamic {} diff --git a/pkg/front_end/testcases/general/bounds_parameters.dart b/pkg/front_end/testcases/general/bounds_parameters.dart new file mode 100644 index 00000000000..98d74d7ca20 --- /dev/null +++ b/pkg/front_end/testcases/general/bounds_parameters.dart @@ -0,0 +1,135 @@ +// Copyright (c) 2022, 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. + +class Class {} + +class ConcreteClass implements Class {} + +typedef F> = X; + +class G> {} + +void method1( + F t1, // Ok + F t2, // Ok + F t3, // Ok + F> t4, // Ok + F t5, // Ok + F> t6, // Ok + F t7, // Error + F t8, // Error + { + required G s1, // Ok + required G s2, // Ok + required G s3, // Ok + required G> s4, // Ok + required G s5, // Ok + required G> s6, // Ok + required G s7, // Error + required G s8, // Error +}) { + void local( + F t1, // Ok + F t2, // Ok + F t3, // Ok + F> t4, // Ok + F t5, // Ok + F> t6, // Ok + F t7, // Error + F t8, // Error + { + required G s1, // Ok + required G s2, // Ok + required G s3, // Ok + required G> s4, // Ok + required G s5, // Ok + required G> s6, // Ok + required G s7, // Error + required G s8, // Error + }) {} + ( + F t1, // Ok + F t2, // Ok + F t3, // Ok + F> t4, // Ok + F t5, // Ok + F> t6, // Ok + F t7, // Error + F t8, // Error + { + required G s1, // Ok + required G s2, // Ok + required G s3, // Ok + required G> s4, // Ok + required G s5, // Ok + required G> s6, // Ok + required G s7, // Error + required G s8, // Error + }) {}; +} + +class Class1 { + Class1( + F t1, // Ok + F t2, // Ok + F t3, // Ok + F> t4, // Ok + F t5, // Ok + F> t6, // Ok + F t7, // Error + F t8, // Error + { + required G s1, // Ok + required G s2, // Ok + required G s3, // Ok + required G> s4, // Ok + required G s5, // Ok + required G> s6, // Ok + required G s7, // Error + required G s8, // Error + }); + void method2( + F t1, // Ok + F t2, // Ok + F t3, // Ok + F> t4, // Ok + F t5, // Ok + F> t6, // Ok + F t7, // Error + F t8, // Error + { + required G s1, // Ok + required G s2, // Ok + required G s3, // Ok + required G> s4, // Ok + required G s5, // Ok + required G> s6, // Ok + required G s7, // Error + required G s8, // Error + }) {} +} + +extension Extension1 on int { + void method3( + F t1, // Ok + F t2, // Ok + F t3, // Ok + F> t4, // Ok + F t5, // Ok + F> t6, // Ok + F t7, // Error + F t8, // Error + { + required G s1, // Ok + required G s2, // Ok + required G s3, // Ok + required G> s4, // Ok + required G s5, // Ok + required G> s6, // Ok + required G s7, // Error + required G s8, // Error + }) {} +} + +main() {} diff --git a/pkg/front_end/testcases/general/bounds_parameters.dart.textual_outline.expect b/pkg/front_end/testcases/general/bounds_parameters.dart.textual_outline.expect new file mode 100644 index 00000000000..27b2f52e1f1 --- /dev/null +++ b/pkg/front_end/testcases/general/bounds_parameters.dart.textual_outline.expect @@ -0,0 +1,88 @@ +class Class {} + +class ConcreteClass implements Class {} + +typedef F> = X; + +class G> {} + +void method1( + F t1, + F t2, + F t3, + F> t4, + F t5, + F> t6, + F t7, + F t8, { + required G s1, + required G s2, + required G s3, + required G> s4, + required G s5, + required G> s6, + required G s7, + required G s8, +}) {} + +class Class1 { + Class1( + F t1, + F t2, + F t3, + F> t4, + F t5, + F> t6, + F t7, + F t8, { + required G s1, + required G s2, + required G s3, + required G> s4, + required G s5, + required G> s6, + required G s7, + required G s8, + }); + void method2( + F t1, + F t2, + F t3, + F> t4, + F t5, + F> t6, + F t7, + F t8, { + required G s1, + required G s2, + required G s3, + required G> s4, + required G s5, + required G> s6, + required G s7, + required G s8, + }) {} +} + +extension Extension1 on int { + void method3( + F t1, + F t2, + F t3, + F> t4, + F t5, + F> t6, + F t7, + F t8, { + required G s1, + required G s2, + required G s3, + required G> s4, + required G s5, + required G> s6, + required G s7, + required G s8, + }) {} +} + +main() {} diff --git a/pkg/front_end/testcases/general/bounds_parameters.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/general/bounds_parameters.dart.textual_outline_modelled.expect new file mode 100644 index 00000000000..443433c4b08 --- /dev/null +++ b/pkg/front_end/testcases/general/bounds_parameters.dart.textual_outline_modelled.expect @@ -0,0 +1,86 @@ +class Class {} + +class Class1 { + Class1( + F t1, + F t2, + F t3, + F> t4, + F t5, + F> t6, + F t7, + F t8, { + required G s1, + required G s2, + required G s3, + required G> s4, + required G s5, + required G> s6, + required G s7, + required G s8, + }); + void method2( + F t1, + F t2, + F t3, + F> t4, + F t5, + F> t6, + F t7, + F t8, { + required G s1, + required G s2, + required G s3, + required G> s4, + required G s5, + required G> s6, + required G s7, + required G s8, + }) {} +} + +class ConcreteClass implements Class {} + +class G> {} + +extension Extension1 on int { + void method3( + F t1, + F t2, + F t3, + F> t4, + F t5, + F> t6, + F t7, + F t8, { + required G s1, + required G s2, + required G s3, + required G> s4, + required G s5, + required G> s6, + required G s7, + required G s8, + }) {} +} + +main() {} +typedef F> = X; +void method1( + F t1, + F t2, + F t3, + F> t4, + F t5, + F> t6, + F t7, + F t8, { + required G s1, + required G s2, + required G s3, + required G> s4, + required G s5, + required G> s6, + required G s7, + required G s8, +}) {} diff --git a/pkg/front_end/testcases/general/bounds_parameters.dart.weak.expect b/pkg/front_end/testcases/general/bounds_parameters.dart.weak.expect new file mode 100644 index 00000000000..da70b89dae3 --- /dev/null +++ b/pkg/front_end/testcases/general/bounds_parameters.dart.weak.expect @@ -0,0 +1,273 @@ +library /*isNonNullableByDefault*/; +// +// Problems in library: +// +// pkg/front_end/testcases/general/bounds_parameters.dart:20:3: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// F t7, // Error +// ^ +// pkg/front_end/testcases/general/bounds_parameters.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_parameters.dart:21:3: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// F t8, // Error +// ^ +// pkg/front_end/testcases/general/bounds_parameters.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_parameters.dart:29:12: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// required G s7, // Error +// ^ +// pkg/front_end/testcases/general/bounds_parameters.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_parameters.dart:30:12: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// required G s8, // Error +// ^ +// pkg/front_end/testcases/general/bounds_parameters.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_parameters.dart:99:5: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// F t7, // Error +// ^ +// pkg/front_end/testcases/general/bounds_parameters.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_parameters.dart:100:5: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// F t8, // Error +// ^ +// pkg/front_end/testcases/general/bounds_parameters.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_parameters.dart:108:14: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// required G s7, // Error +// ^ +// pkg/front_end/testcases/general/bounds_parameters.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_parameters.dart:109:14: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// required G s8, // Error +// ^ +// pkg/front_end/testcases/general/bounds_parameters.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_parameters.dart:80:5: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// F t7, // Error +// ^ +// pkg/front_end/testcases/general/bounds_parameters.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_parameters.dart:81:5: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// F t8, // Error +// ^ +// pkg/front_end/testcases/general/bounds_parameters.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_parameters.dart:89:14: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// required G s7, // Error +// ^ +// pkg/front_end/testcases/general/bounds_parameters.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_parameters.dart:90:14: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// required G s8, // Error +// ^ +// pkg/front_end/testcases/general/bounds_parameters.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_parameters.dart:121:5: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// F t7, // Error +// ^ +// pkg/front_end/testcases/general/bounds_parameters.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_parameters.dart:122:5: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// F t8, // Error +// ^ +// pkg/front_end/testcases/general/bounds_parameters.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_parameters.dart:130:14: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// required G s7, // Error +// ^ +// pkg/front_end/testcases/general/bounds_parameters.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_parameters.dart:131:14: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// required G s8, // Error +// ^ +// pkg/front_end/testcases/general/bounds_parameters.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_parameters.dart:39:5: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// F t7, // Error +// ^ +// pkg/front_end/testcases/general/bounds_parameters.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_parameters.dart:40:5: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// F t8, // Error +// ^ +// pkg/front_end/testcases/general/bounds_parameters.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_parameters.dart:48:14: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// required G s7, // Error +// ^ +// pkg/front_end/testcases/general/bounds_parameters.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_parameters.dart:49:14: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// required G s8, // Error +// ^ +// pkg/front_end/testcases/general/bounds_parameters.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_parameters.dart:58:5: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// F t7, // Error +// ^ +// pkg/front_end/testcases/general/bounds_parameters.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_parameters.dart:59:5: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// F t8, // Error +// ^ +// pkg/front_end/testcases/general/bounds_parameters.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_parameters.dart:67:14: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// required G s7, // Error +// ^ +// pkg/front_end/testcases/general/bounds_parameters.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_parameters.dart:68:14: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// required G s8, // Error +// ^ +// pkg/front_end/testcases/general/bounds_parameters.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +import self as self; +import "dart:core" as core; + +typedef F = self::Class> = X; +class Class extends core::Object { + synthetic constructor •() → self::Class + : super core::Object::•() + ; +} +class ConcreteClass extends core::Object implements self::Class { + synthetic constructor •() → self::ConcreteClass + : super core::Object::•() + ; +} +class G = self::Class> extends core::Object { + synthetic constructor •() → self::G + : super core::Object::•() + ; +} +class Class1 extends core::Object { + constructor •(self::Class t1, dynamic t2, self::Class t3, self::Class t4, self::ConcreteClass t5, self::Class t6, core::Object t7, core::int t8, {required self::G> s1 = #C1, required self::G s2 = #C1, required self::G> s3 = #C1, required self::G> s4 = #C1, required self::G s5 = #C1, required self::G> s6 = #C1, required self::G s7 = #C1, required self::G s8 = #C1}) → self::Class1 + : super core::Object::•() + ; + method method2(self::Class t1, dynamic t2, self::Class t3, self::Class t4, self::ConcreteClass t5, self::Class t6, core::Object t7, core::int t8, {required self::G> s1 = #C1, required self::G s2 = #C1, required self::G> s3 = #C1, required self::G> s4 = #C1, required self::G s5 = #C1, required self::G> s6 = #C1, required self::G s7 = #C1, required self::G s8 = #C1}) → void {} +} +extension Extension1 on core::int { + method method3 = self::Extension1|method3; + tearoff method3 = self::Extension1|get#method3; +} +static method method1(self::Class t1, dynamic t2, self::Class t3, self::Class t4, self::ConcreteClass t5, self::Class t6, core::Object t7, core::int t8, {required self::G> s1 = #C1, required self::G s2 = #C1, required self::G> s3 = #C1, required self::G> s4 = #C1, required self::G s5 = #C1, required self::G> s6 = #C1, required self::G s7 = #C1, required self::G s8 = #C1}) → void { + function local(self::Class t1, dynamic t2, self::Class t3, self::Class t4, self::ConcreteClass t5, self::Class t6, core::Object t7, core::int t8, {required self::G> s1 = #C1, required self::G s2 = #C1, required self::G> s3 = #C1, required self::G> s4 = #C1, required self::G s5 = #C1, required self::G> s6 = #C1, required self::G s7 = #C1, required self::G s8 = #C1}) → void {} + (self::Class t1, dynamic t2, self::Class t3, self::Class t4, self::ConcreteClass t5, self::Class t6, core::Object t7, core::int t8, {required self::G> s1 = #C1, required self::G s2 = #C1, required self::G> s3 = #C1, required self::G> s4 = #C1, required self::G s5 = #C1, required self::G> s6 = #C1, required self::G s7 = #C1, required self::G s8 = #C1}) → Null {}; +} +static method Extension1|method3(lowered final core::int #this, self::Class t1, dynamic t2, self::Class t3, self::Class t4, self::ConcreteClass t5, self::Class t6, core::Object t7, core::int t8, {required self::G> s1 = #C1, required self::G s2 = #C1, required self::G> s3 = #C1, required self::G> s4 = #C1, required self::G s5 = #C1, required self::G> s6 = #C1, required self::G s7 = #C1, required self::G s8 = #C1}) → void {} +static method Extension1|get#method3(lowered final core::int #this) → (self::Class, dynamic, self::Class, self::Class, self::ConcreteClass, self::Class, core::Object, core::int, {s1: self::G>, s2: self::G, s3: self::G>, s4: self::G>, s5: self::G, s6: self::G>, s7: self::G, s8: self::G}) → void + return (self::Class t1, dynamic t2, self::Class t3, self::Class t4, self::ConcreteClass t5, self::Class t6, core::Object t7, core::int t8, {self::G> s1 = #C1, self::G s2 = #C1, self::G> s3 = #C1, self::G> s4 = #C1, self::G s5 = #C1, self::G> s6 = #C1, self::G s7 = #C1, self::G s8 = #C1}) → void => self::Extension1|method3(#this, t1, t2, t3, t4, t5, t6, t7, t8, s1: s1, s2: s2, s3: s3, s4: s4, s5: s5, s6: s6, s7: s7, s8: s8); +static method main() → dynamic {} + +constants { + #C1 = null +} diff --git a/pkg/front_end/testcases/general/bounds_parameters.dart.weak.modular.expect b/pkg/front_end/testcases/general/bounds_parameters.dart.weak.modular.expect new file mode 100644 index 00000000000..da70b89dae3 --- /dev/null +++ b/pkg/front_end/testcases/general/bounds_parameters.dart.weak.modular.expect @@ -0,0 +1,273 @@ +library /*isNonNullableByDefault*/; +// +// Problems in library: +// +// pkg/front_end/testcases/general/bounds_parameters.dart:20:3: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// F t7, // Error +// ^ +// pkg/front_end/testcases/general/bounds_parameters.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_parameters.dart:21:3: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// F t8, // Error +// ^ +// pkg/front_end/testcases/general/bounds_parameters.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_parameters.dart:29:12: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// required G s7, // Error +// ^ +// pkg/front_end/testcases/general/bounds_parameters.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_parameters.dart:30:12: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// required G s8, // Error +// ^ +// pkg/front_end/testcases/general/bounds_parameters.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_parameters.dart:99:5: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// F t7, // Error +// ^ +// pkg/front_end/testcases/general/bounds_parameters.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_parameters.dart:100:5: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// F t8, // Error +// ^ +// pkg/front_end/testcases/general/bounds_parameters.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_parameters.dart:108:14: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// required G s7, // Error +// ^ +// pkg/front_end/testcases/general/bounds_parameters.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_parameters.dart:109:14: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// required G s8, // Error +// ^ +// pkg/front_end/testcases/general/bounds_parameters.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_parameters.dart:80:5: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// F t7, // Error +// ^ +// pkg/front_end/testcases/general/bounds_parameters.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_parameters.dart:81:5: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// F t8, // Error +// ^ +// pkg/front_end/testcases/general/bounds_parameters.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_parameters.dart:89:14: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// required G s7, // Error +// ^ +// pkg/front_end/testcases/general/bounds_parameters.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_parameters.dart:90:14: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// required G s8, // Error +// ^ +// pkg/front_end/testcases/general/bounds_parameters.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_parameters.dart:121:5: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// F t7, // Error +// ^ +// pkg/front_end/testcases/general/bounds_parameters.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_parameters.dart:122:5: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// F t8, // Error +// ^ +// pkg/front_end/testcases/general/bounds_parameters.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_parameters.dart:130:14: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// required G s7, // Error +// ^ +// pkg/front_end/testcases/general/bounds_parameters.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_parameters.dart:131:14: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// required G s8, // Error +// ^ +// pkg/front_end/testcases/general/bounds_parameters.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_parameters.dart:39:5: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// F t7, // Error +// ^ +// pkg/front_end/testcases/general/bounds_parameters.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_parameters.dart:40:5: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// F t8, // Error +// ^ +// pkg/front_end/testcases/general/bounds_parameters.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_parameters.dart:48:14: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// required G s7, // Error +// ^ +// pkg/front_end/testcases/general/bounds_parameters.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_parameters.dart:49:14: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// required G s8, // Error +// ^ +// pkg/front_end/testcases/general/bounds_parameters.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_parameters.dart:58:5: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// F t7, // Error +// ^ +// pkg/front_end/testcases/general/bounds_parameters.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_parameters.dart:59:5: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// F t8, // Error +// ^ +// pkg/front_end/testcases/general/bounds_parameters.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_parameters.dart:67:14: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// required G s7, // Error +// ^ +// pkg/front_end/testcases/general/bounds_parameters.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_parameters.dart:68:14: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// required G s8, // Error +// ^ +// pkg/front_end/testcases/general/bounds_parameters.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +import self as self; +import "dart:core" as core; + +typedef F = self::Class> = X; +class Class extends core::Object { + synthetic constructor •() → self::Class + : super core::Object::•() + ; +} +class ConcreteClass extends core::Object implements self::Class { + synthetic constructor •() → self::ConcreteClass + : super core::Object::•() + ; +} +class G = self::Class> extends core::Object { + synthetic constructor •() → self::G + : super core::Object::•() + ; +} +class Class1 extends core::Object { + constructor •(self::Class t1, dynamic t2, self::Class t3, self::Class t4, self::ConcreteClass t5, self::Class t6, core::Object t7, core::int t8, {required self::G> s1 = #C1, required self::G s2 = #C1, required self::G> s3 = #C1, required self::G> s4 = #C1, required self::G s5 = #C1, required self::G> s6 = #C1, required self::G s7 = #C1, required self::G s8 = #C1}) → self::Class1 + : super core::Object::•() + ; + method method2(self::Class t1, dynamic t2, self::Class t3, self::Class t4, self::ConcreteClass t5, self::Class t6, core::Object t7, core::int t8, {required self::G> s1 = #C1, required self::G s2 = #C1, required self::G> s3 = #C1, required self::G> s4 = #C1, required self::G s5 = #C1, required self::G> s6 = #C1, required self::G s7 = #C1, required self::G s8 = #C1}) → void {} +} +extension Extension1 on core::int { + method method3 = self::Extension1|method3; + tearoff method3 = self::Extension1|get#method3; +} +static method method1(self::Class t1, dynamic t2, self::Class t3, self::Class t4, self::ConcreteClass t5, self::Class t6, core::Object t7, core::int t8, {required self::G> s1 = #C1, required self::G s2 = #C1, required self::G> s3 = #C1, required self::G> s4 = #C1, required self::G s5 = #C1, required self::G> s6 = #C1, required self::G s7 = #C1, required self::G s8 = #C1}) → void { + function local(self::Class t1, dynamic t2, self::Class t3, self::Class t4, self::ConcreteClass t5, self::Class t6, core::Object t7, core::int t8, {required self::G> s1 = #C1, required self::G s2 = #C1, required self::G> s3 = #C1, required self::G> s4 = #C1, required self::G s5 = #C1, required self::G> s6 = #C1, required self::G s7 = #C1, required self::G s8 = #C1}) → void {} + (self::Class t1, dynamic t2, self::Class t3, self::Class t4, self::ConcreteClass t5, self::Class t6, core::Object t7, core::int t8, {required self::G> s1 = #C1, required self::G s2 = #C1, required self::G> s3 = #C1, required self::G> s4 = #C1, required self::G s5 = #C1, required self::G> s6 = #C1, required self::G s7 = #C1, required self::G s8 = #C1}) → Null {}; +} +static method Extension1|method3(lowered final core::int #this, self::Class t1, dynamic t2, self::Class t3, self::Class t4, self::ConcreteClass t5, self::Class t6, core::Object t7, core::int t8, {required self::G> s1 = #C1, required self::G s2 = #C1, required self::G> s3 = #C1, required self::G> s4 = #C1, required self::G s5 = #C1, required self::G> s6 = #C1, required self::G s7 = #C1, required self::G s8 = #C1}) → void {} +static method Extension1|get#method3(lowered final core::int #this) → (self::Class, dynamic, self::Class, self::Class, self::ConcreteClass, self::Class, core::Object, core::int, {s1: self::G>, s2: self::G, s3: self::G>, s4: self::G>, s5: self::G, s6: self::G>, s7: self::G, s8: self::G}) → void + return (self::Class t1, dynamic t2, self::Class t3, self::Class t4, self::ConcreteClass t5, self::Class t6, core::Object t7, core::int t8, {self::G> s1 = #C1, self::G s2 = #C1, self::G> s3 = #C1, self::G> s4 = #C1, self::G s5 = #C1, self::G> s6 = #C1, self::G s7 = #C1, self::G s8 = #C1}) → void => self::Extension1|method3(#this, t1, t2, t3, t4, t5, t6, t7, t8, s1: s1, s2: s2, s3: s3, s4: s4, s5: s5, s6: s6, s7: s7, s8: s8); +static method main() → dynamic {} + +constants { + #C1 = null +} diff --git a/pkg/front_end/testcases/general/bounds_parameters.dart.weak.outline.expect b/pkg/front_end/testcases/general/bounds_parameters.dart.weak.outline.expect new file mode 100644 index 00000000000..841b07adaae --- /dev/null +++ b/pkg/front_end/testcases/general/bounds_parameters.dart.weak.outline.expect @@ -0,0 +1,190 @@ +library /*isNonNullableByDefault*/; +// +// Problems in library: +// +// pkg/front_end/testcases/general/bounds_parameters.dart:20:3: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// F t7, // Error +// ^ +// pkg/front_end/testcases/general/bounds_parameters.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_parameters.dart:21:3: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// F t8, // Error +// ^ +// pkg/front_end/testcases/general/bounds_parameters.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_parameters.dart:29:12: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// required G s7, // Error +// ^ +// pkg/front_end/testcases/general/bounds_parameters.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_parameters.dart:30:12: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// required G s8, // Error +// ^ +// pkg/front_end/testcases/general/bounds_parameters.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_parameters.dart:99:5: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// F t7, // Error +// ^ +// pkg/front_end/testcases/general/bounds_parameters.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_parameters.dart:100:5: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// F t8, // Error +// ^ +// pkg/front_end/testcases/general/bounds_parameters.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_parameters.dart:108:14: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// required G s7, // Error +// ^ +// pkg/front_end/testcases/general/bounds_parameters.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_parameters.dart:109:14: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// required G s8, // Error +// ^ +// pkg/front_end/testcases/general/bounds_parameters.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_parameters.dart:80:5: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// F t7, // Error +// ^ +// pkg/front_end/testcases/general/bounds_parameters.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_parameters.dart:81:5: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// F t8, // Error +// ^ +// pkg/front_end/testcases/general/bounds_parameters.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_parameters.dart:89:14: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// required G s7, // Error +// ^ +// pkg/front_end/testcases/general/bounds_parameters.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_parameters.dart:90:14: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// required G s8, // Error +// ^ +// pkg/front_end/testcases/general/bounds_parameters.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_parameters.dart:121:5: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// F t7, // Error +// ^ +// pkg/front_end/testcases/general/bounds_parameters.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_parameters.dart:122:5: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// F t8, // Error +// ^ +// pkg/front_end/testcases/general/bounds_parameters.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_parameters.dart:130:14: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// required G s7, // Error +// ^ +// pkg/front_end/testcases/general/bounds_parameters.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_parameters.dart:131:14: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// required G s8, // Error +// ^ +// pkg/front_end/testcases/general/bounds_parameters.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +import self as self; +import "dart:core" as core; + +typedef F = self::Class> = X; +class Class extends core::Object { + synthetic constructor •() → self::Class + ; +} +class ConcreteClass extends core::Object implements self::Class { + synthetic constructor •() → self::ConcreteClass + ; +} +class G = self::Class> extends core::Object { + synthetic constructor •() → self::G + ; +} +class Class1 extends core::Object { + constructor •(self::Class t1, dynamic t2, self::Class t3, self::Class t4, self::ConcreteClass t5, self::Class t6, core::Object t7, core::int t8, {required self::G> s1 = null, required self::G s2 = null, required self::G> s3 = null, required self::G> s4 = null, required self::G s5 = null, required self::G> s6 = null, required self::G s7 = null, required self::G s8 = null}) → self::Class1 + ; + method method2(self::Class t1, dynamic t2, self::Class t3, self::Class t4, self::ConcreteClass t5, self::Class t6, core::Object t7, core::int t8, {required self::G> s1 = null, required self::G s2 = null, required self::G> s3 = null, required self::G> s4 = null, required self::G s5 = null, required self::G> s6 = null, required self::G s7 = null, required self::G s8 = null}) → void + ; +} +extension Extension1 on core::int { + method method3 = self::Extension1|method3; + tearoff method3 = self::Extension1|get#method3; +} +static method method1(self::Class t1, dynamic t2, self::Class t3, self::Class t4, self::ConcreteClass t5, self::Class t6, core::Object t7, core::int t8, {required self::G> s1, required self::G s2, required self::G> s3, required self::G> s4, required self::G s5, required self::G> s6, required self::G s7, required self::G s8}) → void + ; +static method Extension1|method3(lowered final core::int #this, self::Class t1, dynamic t2, self::Class t3, self::Class t4, self::ConcreteClass t5, self::Class t6, core::Object t7, core::int t8, {required self::G> s1, required self::G s2, required self::G> s3, required self::G> s4, required self::G s5, required self::G> s6, required self::G s7, required self::G s8}) → void + ; +static method Extension1|get#method3(lowered final core::int #this) → (self::Class, dynamic, self::Class, self::Class, self::ConcreteClass, self::Class, core::Object, core::int, {s1: self::G>, s2: self::G, s3: self::G>, s4: self::G>, s5: self::G, s6: self::G>, s7: self::G, s8: self::G}) → void + return (self::Class t1, dynamic t2, self::Class t3, self::Class t4, self::ConcreteClass t5, self::Class t6, core::Object t7, core::int t8, {self::G> s1, self::G s2, self::G> s3, self::G> s4, self::G s5, self::G> s6, self::G s7, self::G s8}) → void => self::Extension1|method3(#this, t1, t2, t3, t4, t5, t6, t7, t8, s1: s1, s2: s2, s3: s3, s4: s4, s5: s5, s6: s6, s7: s7, s8: s8); +static method main() → dynamic + ; diff --git a/pkg/front_end/testcases/general/bounds_parameters.dart.weak.transformed.expect b/pkg/front_end/testcases/general/bounds_parameters.dart.weak.transformed.expect new file mode 100644 index 00000000000..da70b89dae3 --- /dev/null +++ b/pkg/front_end/testcases/general/bounds_parameters.dart.weak.transformed.expect @@ -0,0 +1,273 @@ +library /*isNonNullableByDefault*/; +// +// Problems in library: +// +// pkg/front_end/testcases/general/bounds_parameters.dart:20:3: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// F t7, // Error +// ^ +// pkg/front_end/testcases/general/bounds_parameters.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_parameters.dart:21:3: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// F t8, // Error +// ^ +// pkg/front_end/testcases/general/bounds_parameters.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_parameters.dart:29:12: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// required G s7, // Error +// ^ +// pkg/front_end/testcases/general/bounds_parameters.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_parameters.dart:30:12: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// required G s8, // Error +// ^ +// pkg/front_end/testcases/general/bounds_parameters.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_parameters.dart:99:5: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// F t7, // Error +// ^ +// pkg/front_end/testcases/general/bounds_parameters.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_parameters.dart:100:5: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// F t8, // Error +// ^ +// pkg/front_end/testcases/general/bounds_parameters.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_parameters.dart:108:14: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// required G s7, // Error +// ^ +// pkg/front_end/testcases/general/bounds_parameters.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_parameters.dart:109:14: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// required G s8, // Error +// ^ +// pkg/front_end/testcases/general/bounds_parameters.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_parameters.dart:80:5: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// F t7, // Error +// ^ +// pkg/front_end/testcases/general/bounds_parameters.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_parameters.dart:81:5: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// F t8, // Error +// ^ +// pkg/front_end/testcases/general/bounds_parameters.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_parameters.dart:89:14: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// required G s7, // Error +// ^ +// pkg/front_end/testcases/general/bounds_parameters.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_parameters.dart:90:14: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// required G s8, // Error +// ^ +// pkg/front_end/testcases/general/bounds_parameters.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_parameters.dart:121:5: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// F t7, // Error +// ^ +// pkg/front_end/testcases/general/bounds_parameters.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_parameters.dart:122:5: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// F t8, // Error +// ^ +// pkg/front_end/testcases/general/bounds_parameters.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_parameters.dart:130:14: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// required G s7, // Error +// ^ +// pkg/front_end/testcases/general/bounds_parameters.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_parameters.dart:131:14: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// required G s8, // Error +// ^ +// pkg/front_end/testcases/general/bounds_parameters.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_parameters.dart:39:5: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// F t7, // Error +// ^ +// pkg/front_end/testcases/general/bounds_parameters.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_parameters.dart:40:5: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// F t8, // Error +// ^ +// pkg/front_end/testcases/general/bounds_parameters.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_parameters.dart:48:14: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// required G s7, // Error +// ^ +// pkg/front_end/testcases/general/bounds_parameters.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_parameters.dart:49:14: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// required G s8, // Error +// ^ +// pkg/front_end/testcases/general/bounds_parameters.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_parameters.dart:58:5: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// F t7, // Error +// ^ +// pkg/front_end/testcases/general/bounds_parameters.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_parameters.dart:59:5: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// F t8, // Error +// ^ +// pkg/front_end/testcases/general/bounds_parameters.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_parameters.dart:67:14: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// required G s7, // Error +// ^ +// pkg/front_end/testcases/general/bounds_parameters.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_parameters.dart:68:14: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// required G s8, // Error +// ^ +// pkg/front_end/testcases/general/bounds_parameters.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +import self as self; +import "dart:core" as core; + +typedef F = self::Class> = X; +class Class extends core::Object { + synthetic constructor •() → self::Class + : super core::Object::•() + ; +} +class ConcreteClass extends core::Object implements self::Class { + synthetic constructor •() → self::ConcreteClass + : super core::Object::•() + ; +} +class G = self::Class> extends core::Object { + synthetic constructor •() → self::G + : super core::Object::•() + ; +} +class Class1 extends core::Object { + constructor •(self::Class t1, dynamic t2, self::Class t3, self::Class t4, self::ConcreteClass t5, self::Class t6, core::Object t7, core::int t8, {required self::G> s1 = #C1, required self::G s2 = #C1, required self::G> s3 = #C1, required self::G> s4 = #C1, required self::G s5 = #C1, required self::G> s6 = #C1, required self::G s7 = #C1, required self::G s8 = #C1}) → self::Class1 + : super core::Object::•() + ; + method method2(self::Class t1, dynamic t2, self::Class t3, self::Class t4, self::ConcreteClass t5, self::Class t6, core::Object t7, core::int t8, {required self::G> s1 = #C1, required self::G s2 = #C1, required self::G> s3 = #C1, required self::G> s4 = #C1, required self::G s5 = #C1, required self::G> s6 = #C1, required self::G s7 = #C1, required self::G s8 = #C1}) → void {} +} +extension Extension1 on core::int { + method method3 = self::Extension1|method3; + tearoff method3 = self::Extension1|get#method3; +} +static method method1(self::Class t1, dynamic t2, self::Class t3, self::Class t4, self::ConcreteClass t5, self::Class t6, core::Object t7, core::int t8, {required self::G> s1 = #C1, required self::G s2 = #C1, required self::G> s3 = #C1, required self::G> s4 = #C1, required self::G s5 = #C1, required self::G> s6 = #C1, required self::G s7 = #C1, required self::G s8 = #C1}) → void { + function local(self::Class t1, dynamic t2, self::Class t3, self::Class t4, self::ConcreteClass t5, self::Class t6, core::Object t7, core::int t8, {required self::G> s1 = #C1, required self::G s2 = #C1, required self::G> s3 = #C1, required self::G> s4 = #C1, required self::G s5 = #C1, required self::G> s6 = #C1, required self::G s7 = #C1, required self::G s8 = #C1}) → void {} + (self::Class t1, dynamic t2, self::Class t3, self::Class t4, self::ConcreteClass t5, self::Class t6, core::Object t7, core::int t8, {required self::G> s1 = #C1, required self::G s2 = #C1, required self::G> s3 = #C1, required self::G> s4 = #C1, required self::G s5 = #C1, required self::G> s6 = #C1, required self::G s7 = #C1, required self::G s8 = #C1}) → Null {}; +} +static method Extension1|method3(lowered final core::int #this, self::Class t1, dynamic t2, self::Class t3, self::Class t4, self::ConcreteClass t5, self::Class t6, core::Object t7, core::int t8, {required self::G> s1 = #C1, required self::G s2 = #C1, required self::G> s3 = #C1, required self::G> s4 = #C1, required self::G s5 = #C1, required self::G> s6 = #C1, required self::G s7 = #C1, required self::G s8 = #C1}) → void {} +static method Extension1|get#method3(lowered final core::int #this) → (self::Class, dynamic, self::Class, self::Class, self::ConcreteClass, self::Class, core::Object, core::int, {s1: self::G>, s2: self::G, s3: self::G>, s4: self::G>, s5: self::G, s6: self::G>, s7: self::G, s8: self::G}) → void + return (self::Class t1, dynamic t2, self::Class t3, self::Class t4, self::ConcreteClass t5, self::Class t6, core::Object t7, core::int t8, {self::G> s1 = #C1, self::G s2 = #C1, self::G> s3 = #C1, self::G> s4 = #C1, self::G s5 = #C1, self::G> s6 = #C1, self::G s7 = #C1, self::G s8 = #C1}) → void => self::Extension1|method3(#this, t1, t2, t3, t4, t5, t6, t7, t8, s1: s1, s2: s2, s3: s3, s4: s4, s5: s5, s6: s6, s7: s7, s8: s8); +static method main() → dynamic {} + +constants { + #C1 = null +} diff --git a/pkg/front_end/testcases/general/bounds_return_types.dart b/pkg/front_end/testcases/general/bounds_return_types.dart new file mode 100644 index 00000000000..54e4b2fc205 --- /dev/null +++ b/pkg/front_end/testcases/general/bounds_return_types.dart @@ -0,0 +1,87 @@ +// Copyright (c) 2022, 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. + +class Class {} + +class ConcreteClass implements Class {} + +typedef F> = X; + +class G> {} + +F t1() => throw ''; // Ok +F t2() => throw ''; // Ok +F t3() => throw ''; // Ok +F> t4() => throw ''; // Ok +F t5() => throw ''; // Ok +F> t6() => throw ''; // Ok +F t7() => throw ''; // Error +F t8() => throw ''; // Error +G s1() => throw ''; // Ok +G s2() => throw ''; // Ok +G s3() => throw ''; // Ok +G> s4() => throw ''; // Ok +G s5() => throw ''; // Ok +G> s6() => throw ''; // Ok +G s7() => throw ''; // Error +G s8() => throw ''; // Error + +method1() { + F t1() => throw ''; // Ok + F t2() => throw ''; // Ok + F t3() => throw ''; // Ok + F> t4() => throw ''; // Ok + F t5() => throw ''; // Ok + F> t6() => throw ''; // Ok + F t7() => throw ''; // Error + F t8() => throw ''; // Error + G s1() => throw ''; // Ok + G s2() => throw ''; // Ok + G s3() => throw ''; // Ok + G> s4() => throw ''; // Ok + G s5() => throw ''; // Ok + G> s6() => throw ''; // Ok + G s7() => throw ''; // Error + G s8() => throw ''; // Error +} + +class Class1 { + F t1() => throw ''; // Ok + F t2() => throw ''; // Ok + F t3() => throw ''; // Ok + F> t4() => throw ''; // Ok + F t5() => throw ''; // Ok + F> t6() => throw ''; // Ok + F t7() => throw ''; // Error + F t8() => throw ''; // Error + G s1() => throw ''; // Ok + G s2() => throw ''; // Ok + G s3() => throw ''; // Ok + G> s4() => throw ''; // Ok + G s5() => throw ''; // Ok + G> s6() => throw ''; // Ok + G s7() => throw ''; // Error + G s8() => throw ''; // Error +} + +extension Extension1 on int { + F t1() => throw ''; // Ok + F t2() => throw ''; // Ok + F t3() => throw ''; // Ok + F> t4() => throw ''; // Ok + F t5() => throw ''; // Ok + F> t6() => throw ''; // Ok + F t7() => throw ''; // Error + F t8() => throw ''; // Error + G s1() => throw ''; // Ok + G s2() => throw ''; // Ok + G s3() => throw ''; // Ok + G> s4() => throw ''; // Ok + G s5() => throw ''; // Ok + G> s6() => throw ''; // Ok + G s7() => throw ''; // Error + G s8() => throw ''; // Error +} + +main() {} diff --git a/pkg/front_end/testcases/general/bounds_return_types.dart.textual_outline.expect b/pkg/front_end/testcases/general/bounds_return_types.dart.textual_outline.expect new file mode 100644 index 00000000000..0e5dcfa7542 --- /dev/null +++ b/pkg/front_end/testcases/general/bounds_return_types.dart.textual_outline.expect @@ -0,0 +1,65 @@ +class Class {} + +class ConcreteClass implements Class {} + +typedef F> = X; + +class G> {} + +F t1() => throw ''; +F t2() => throw ''; +F t3() => throw ''; +F> t4() => throw ''; +F t5() => throw ''; +F> t6() => throw ''; +F t7() => throw ''; +F t8() => throw ''; +G s1() => throw ''; +G s2() => throw ''; +G s3() => throw ''; +G> s4() => throw ''; +G s5() => throw ''; +G> s6() => throw ''; +G s7() => throw ''; +G s8() => throw ''; +method1() {} + +class Class1 { + F t1() => throw ''; + F t2() => throw ''; + F t3() => throw ''; + F> t4() => throw ''; + F t5() => throw ''; + F> t6() => throw ''; + F t7() => throw ''; + F t8() => throw ''; + G s1() => throw ''; + G s2() => throw ''; + G s3() => throw ''; + G> s4() => throw ''; + G s5() => throw ''; + G> s6() => throw ''; + G s7() => throw ''; + G s8() => throw ''; +} + +extension Extension1 on int { + F t1() => throw ''; + F t2() => throw ''; + F t3() => throw ''; + F> t4() => throw ''; + F t5() => throw ''; + F> t6() => throw ''; + F t7() => throw ''; + F t8() => throw ''; + G s1() => throw ''; + G s2() => throw ''; + G s3() => throw ''; + G> s4() => throw ''; + G s5() => throw ''; + G> s6() => throw ''; + G s7() => throw ''; + G s8() => throw ''; +} + +main() {} diff --git a/pkg/front_end/testcases/general/bounds_return_types.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/general/bounds_return_types.dart.textual_outline_modelled.expect new file mode 100644 index 00000000000..d6ea41209f9 --- /dev/null +++ b/pkg/front_end/testcases/general/bounds_return_types.dart.textual_outline_modelled.expect @@ -0,0 +1,64 @@ +F> t6() => throw ''; +F> t4() => throw ''; +F t3() => throw ''; +F t5() => throw ''; +F t7() => throw ''; +F t2() => throw ''; +F t8() => throw ''; +F t1() => throw ''; +G> s6() => throw ''; +G> s4() => throw ''; +G s3() => throw ''; +G s5() => throw ''; +G s7() => throw ''; +G s2() => throw ''; +G s8() => throw ''; +G s1() => throw ''; + +class Class {} + +class Class1 { + F> t6() => throw ''; + F> t4() => throw ''; + F t3() => throw ''; + F t5() => throw ''; + F t7() => throw ''; + F t2() => throw ''; + F t8() => throw ''; + F t1() => throw ''; + G> s6() => throw ''; + G> s4() => throw ''; + G s3() => throw ''; + G s5() => throw ''; + G s7() => throw ''; + G s2() => throw ''; + G s8() => throw ''; + G s1() => throw ''; +} + +class ConcreteClass implements Class {} + +class G> {} + +extension Extension1 on int { + F> t6() => throw ''; + F> t4() => throw ''; + F t3() => throw ''; + F t5() => throw ''; + F t7() => throw ''; + F t2() => throw ''; + F t8() => throw ''; + F t1() => throw ''; + G> s6() => throw ''; + G> s4() => throw ''; + G s3() => throw ''; + G s5() => throw ''; + G s7() => throw ''; + G s2() => throw ''; + G s8() => throw ''; + G s1() => throw ''; +} + +main() {} +method1() {} +typedef F> = X; diff --git a/pkg/front_end/testcases/general/bounds_return_types.dart.weak.expect b/pkg/front_end/testcases/general/bounds_return_types.dart.weak.expect new file mode 100644 index 00000000000..6adeaf233d3 --- /dev/null +++ b/pkg/front_end/testcases/general/bounds_return_types.dart.weak.expect @@ -0,0 +1,377 @@ +library /*isNonNullableByDefault*/; +// +// Problems in library: +// +// pkg/front_end/testcases/general/bounds_return_types.dart:19:1: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_return_types.dart'. +// Try changing type arguments so that they conform to the bounds. +// F t7() => throw ''; // Error +// ^ +// pkg/front_end/testcases/general/bounds_return_types.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_return_types.dart:20:1: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_return_types.dart'. +// Try changing type arguments so that they conform to the bounds. +// F t8() => throw ''; // Error +// ^ +// pkg/front_end/testcases/general/bounds_return_types.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_return_types.dart:27:1: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_return_types.dart'. +// Try changing type arguments so that they conform to the bounds. +// G s7() => throw ''; // Error +// ^ +// pkg/front_end/testcases/general/bounds_return_types.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_return_types.dart:28:1: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_return_types.dart'. +// Try changing type arguments so that they conform to the bounds. +// G s8() => throw ''; // Error +// ^ +// pkg/front_end/testcases/general/bounds_return_types.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_return_types.dart:56:3: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_return_types.dart'. +// Try changing type arguments so that they conform to the bounds. +// F t7() => throw ''; // Error +// ^ +// pkg/front_end/testcases/general/bounds_return_types.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_return_types.dart:57:3: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_return_types.dart'. +// Try changing type arguments so that they conform to the bounds. +// F t8() => throw ''; // Error +// ^ +// pkg/front_end/testcases/general/bounds_return_types.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_return_types.dart:64:3: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_return_types.dart'. +// Try changing type arguments so that they conform to the bounds. +// G s7() => throw ''; // Error +// ^ +// pkg/front_end/testcases/general/bounds_return_types.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_return_types.dart:65:3: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_return_types.dart'. +// Try changing type arguments so that they conform to the bounds. +// G s8() => throw ''; // Error +// ^ +// pkg/front_end/testcases/general/bounds_return_types.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_return_types.dart:75:3: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_return_types.dart'. +// Try changing type arguments so that they conform to the bounds. +// F t7() => throw ''; // Error +// ^ +// pkg/front_end/testcases/general/bounds_return_types.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_return_types.dart:76:3: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_return_types.dart'. +// Try changing type arguments so that they conform to the bounds. +// F t8() => throw ''; // Error +// ^ +// pkg/front_end/testcases/general/bounds_return_types.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_return_types.dart:83:3: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_return_types.dart'. +// Try changing type arguments so that they conform to the bounds. +// G s7() => throw ''; // Error +// ^ +// pkg/front_end/testcases/general/bounds_return_types.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_return_types.dart:84:3: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_return_types.dart'. +// Try changing type arguments so that they conform to the bounds. +// G s8() => throw ''; // Error +// ^ +// pkg/front_end/testcases/general/bounds_return_types.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_return_types.dart:37:3: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_return_types.dart'. +// Try changing type arguments so that they conform to the bounds. +// F t7() => throw ''; // Error +// ^ +// pkg/front_end/testcases/general/bounds_return_types.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_return_types.dart:38:3: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_return_types.dart'. +// Try changing type arguments so that they conform to the bounds. +// F t8() => throw ''; // Error +// ^ +// pkg/front_end/testcases/general/bounds_return_types.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_return_types.dart:45:3: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_return_types.dart'. +// Try changing type arguments so that they conform to the bounds. +// G s7() => throw ''; // Error +// ^ +// pkg/front_end/testcases/general/bounds_return_types.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_return_types.dart:46:3: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_return_types.dart'. +// Try changing type arguments so that they conform to the bounds. +// G s8() => throw ''; // Error +// ^ +// pkg/front_end/testcases/general/bounds_return_types.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +import self as self; +import "dart:core" as core; + +typedef F = self::Class> = X; +class Class extends core::Object { + synthetic constructor •() → self::Class + : super core::Object::•() + ; +} +class ConcreteClass extends core::Object implements self::Class { + synthetic constructor •() → self::ConcreteClass + : super core::Object::•() + ; +} +class G = self::Class> extends core::Object { + synthetic constructor •() → self::G + : super core::Object::•() + ; +} +class Class1 extends core::Object { + synthetic constructor •() → self::Class1 + : super core::Object::•() + ; + method t1() → self::Class + return throw ""; + method t2() → dynamic + return throw ""; + method t3() → self::Class + return throw ""; + method t4() → self::Class + return throw ""; + method t5() → self::ConcreteClass + return throw ""; + method t6() → self::Class + return throw ""; + method t7() → core::Object + return throw ""; + method t8() → core::int + return throw ""; + method s1() → self::G> + return throw ""; + method s2() → self::G + return throw ""; + method s3() → self::G> + return throw ""; + method s4() → self::G> + return throw ""; + method s5() → self::G + return throw ""; + method s6() → self::G> + return throw ""; + method s7() → self::G + return throw ""; + method s8() → self::G + return throw ""; +} +extension Extension1 on core::int { + method t1 = self::Extension1|t1; + tearoff t1 = self::Extension1|get#t1; + method t2 = self::Extension1|t2; + tearoff t2 = self::Extension1|get#t2; + method t3 = self::Extension1|t3; + tearoff t3 = self::Extension1|get#t3; + method t4 = self::Extension1|t4; + tearoff t4 = self::Extension1|get#t4; + method t5 = self::Extension1|t5; + tearoff t5 = self::Extension1|get#t5; + method t6 = self::Extension1|t6; + tearoff t6 = self::Extension1|get#t6; + method t7 = self::Extension1|t7; + tearoff t7 = self::Extension1|get#t7; + method t8 = self::Extension1|t8; + tearoff t8 = self::Extension1|get#t8; + method s1 = self::Extension1|s1; + tearoff s1 = self::Extension1|get#s1; + method s2 = self::Extension1|s2; + tearoff s2 = self::Extension1|get#s2; + method s3 = self::Extension1|s3; + tearoff s3 = self::Extension1|get#s3; + method s4 = self::Extension1|s4; + tearoff s4 = self::Extension1|get#s4; + method s5 = self::Extension1|s5; + tearoff s5 = self::Extension1|get#s5; + method s6 = self::Extension1|s6; + tearoff s6 = self::Extension1|get#s6; + method s7 = self::Extension1|s7; + tearoff s7 = self::Extension1|get#s7; + method s8 = self::Extension1|s8; + tearoff s8 = self::Extension1|get#s8; +} +static method t1() → self::Class + return throw ""; +static method t2() → dynamic + return throw ""; +static method t3() → self::Class + return throw ""; +static method t4() → self::Class + return throw ""; +static method t5() → self::ConcreteClass + return throw ""; +static method t6() → self::Class + return throw ""; +static method t7() → core::Object + return throw ""; +static method t8() → core::int + return throw ""; +static method s1() → self::G> + return throw ""; +static method s2() → self::G + return throw ""; +static method s3() → self::G> + return throw ""; +static method s4() → self::G> + return throw ""; +static method s5() → self::G + return throw ""; +static method s6() → self::G> + return throw ""; +static method s7() → self::G + return throw ""; +static method s8() → self::G + return throw ""; +static method method1() → dynamic { + function t1() → self::Class + return throw ""; + function t2() → dynamic + return throw ""; + function t3() → self::Class + return throw ""; + function t4() → self::Class + return throw ""; + function t5() → self::ConcreteClass + return throw ""; + function t6() → self::Class + return throw ""; + function t7() → core::Object + return throw ""; + function t8() → core::int + return throw ""; + function s1() → self::G> + return throw ""; + function s2() → self::G + return throw ""; + function s3() → self::G> + return throw ""; + function s4() → self::G> + return throw ""; + function s5() → self::G + return throw ""; + function s6() → self::G> + return throw ""; + function s7() → self::G + return throw ""; + function s8() → self::G + return throw ""; +} +static method Extension1|t1(lowered final core::int #this) → self::Class + return throw ""; +static method Extension1|get#t1(lowered final core::int #this) → () → self::Class + return () → self::Class => self::Extension1|t1(#this); +static method Extension1|t2(lowered final core::int #this) → dynamic + return throw ""; +static method Extension1|get#t2(lowered final core::int #this) → () → dynamic + return () → dynamic => self::Extension1|t2(#this); +static method Extension1|t3(lowered final core::int #this) → self::Class + return throw ""; +static method Extension1|get#t3(lowered final core::int #this) → () → self::Class + return () → self::Class => self::Extension1|t3(#this); +static method Extension1|t4(lowered final core::int #this) → self::Class + return throw ""; +static method Extension1|get#t4(lowered final core::int #this) → () → self::Class + return () → self::Class => self::Extension1|t4(#this); +static method Extension1|t5(lowered final core::int #this) → self::ConcreteClass + return throw ""; +static method Extension1|get#t5(lowered final core::int #this) → () → self::ConcreteClass + return () → self::ConcreteClass => self::Extension1|t5(#this); +static method Extension1|t6(lowered final core::int #this) → self::Class + return throw ""; +static method Extension1|get#t6(lowered final core::int #this) → () → self::Class + return () → self::Class => self::Extension1|t6(#this); +static method Extension1|t7(lowered final core::int #this) → core::Object + return throw ""; +static method Extension1|get#t7(lowered final core::int #this) → () → core::Object + return () → core::Object => self::Extension1|t7(#this); +static method Extension1|t8(lowered final core::int #this) → core::int + return throw ""; +static method Extension1|get#t8(lowered final core::int #this) → () → core::int + return () → core::int => self::Extension1|t8(#this); +static method Extension1|s1(lowered final core::int #this) → self::G> + return throw ""; +static method Extension1|get#s1(lowered final core::int #this) → () → self::G> + return () → self::G> => self::Extension1|s1(#this); +static method Extension1|s2(lowered final core::int #this) → self::G + return throw ""; +static method Extension1|get#s2(lowered final core::int #this) → () → self::G + return () → self::G => self::Extension1|s2(#this); +static method Extension1|s3(lowered final core::int #this) → self::G> + return throw ""; +static method Extension1|get#s3(lowered final core::int #this) → () → self::G> + return () → self::G> => self::Extension1|s3(#this); +static method Extension1|s4(lowered final core::int #this) → self::G> + return throw ""; +static method Extension1|get#s4(lowered final core::int #this) → () → self::G> + return () → self::G> => self::Extension1|s4(#this); +static method Extension1|s5(lowered final core::int #this) → self::G + return throw ""; +static method Extension1|get#s5(lowered final core::int #this) → () → self::G + return () → self::G => self::Extension1|s5(#this); +static method Extension1|s6(lowered final core::int #this) → self::G> + return throw ""; +static method Extension1|get#s6(lowered final core::int #this) → () → self::G> + return () → self::G> => self::Extension1|s6(#this); +static method Extension1|s7(lowered final core::int #this) → self::G + return throw ""; +static method Extension1|get#s7(lowered final core::int #this) → () → self::G + return () → self::G => self::Extension1|s7(#this); +static method Extension1|s8(lowered final core::int #this) → self::G + return throw ""; +static method Extension1|get#s8(lowered final core::int #this) → () → self::G + return () → self::G => self::Extension1|s8(#this); +static method main() → dynamic {} diff --git a/pkg/front_end/testcases/general/bounds_return_types.dart.weak.modular.expect b/pkg/front_end/testcases/general/bounds_return_types.dart.weak.modular.expect new file mode 100644 index 00000000000..6adeaf233d3 --- /dev/null +++ b/pkg/front_end/testcases/general/bounds_return_types.dart.weak.modular.expect @@ -0,0 +1,377 @@ +library /*isNonNullableByDefault*/; +// +// Problems in library: +// +// pkg/front_end/testcases/general/bounds_return_types.dart:19:1: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_return_types.dart'. +// Try changing type arguments so that they conform to the bounds. +// F t7() => throw ''; // Error +// ^ +// pkg/front_end/testcases/general/bounds_return_types.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_return_types.dart:20:1: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_return_types.dart'. +// Try changing type arguments so that they conform to the bounds. +// F t8() => throw ''; // Error +// ^ +// pkg/front_end/testcases/general/bounds_return_types.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_return_types.dart:27:1: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_return_types.dart'. +// Try changing type arguments so that they conform to the bounds. +// G s7() => throw ''; // Error +// ^ +// pkg/front_end/testcases/general/bounds_return_types.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_return_types.dart:28:1: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_return_types.dart'. +// Try changing type arguments so that they conform to the bounds. +// G s8() => throw ''; // Error +// ^ +// pkg/front_end/testcases/general/bounds_return_types.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_return_types.dart:56:3: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_return_types.dart'. +// Try changing type arguments so that they conform to the bounds. +// F t7() => throw ''; // Error +// ^ +// pkg/front_end/testcases/general/bounds_return_types.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_return_types.dart:57:3: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_return_types.dart'. +// Try changing type arguments so that they conform to the bounds. +// F t8() => throw ''; // Error +// ^ +// pkg/front_end/testcases/general/bounds_return_types.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_return_types.dart:64:3: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_return_types.dart'. +// Try changing type arguments so that they conform to the bounds. +// G s7() => throw ''; // Error +// ^ +// pkg/front_end/testcases/general/bounds_return_types.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_return_types.dart:65:3: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_return_types.dart'. +// Try changing type arguments so that they conform to the bounds. +// G s8() => throw ''; // Error +// ^ +// pkg/front_end/testcases/general/bounds_return_types.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_return_types.dart:75:3: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_return_types.dart'. +// Try changing type arguments so that they conform to the bounds. +// F t7() => throw ''; // Error +// ^ +// pkg/front_end/testcases/general/bounds_return_types.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_return_types.dart:76:3: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_return_types.dart'. +// Try changing type arguments so that they conform to the bounds. +// F t8() => throw ''; // Error +// ^ +// pkg/front_end/testcases/general/bounds_return_types.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_return_types.dart:83:3: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_return_types.dart'. +// Try changing type arguments so that they conform to the bounds. +// G s7() => throw ''; // Error +// ^ +// pkg/front_end/testcases/general/bounds_return_types.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_return_types.dart:84:3: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_return_types.dart'. +// Try changing type arguments so that they conform to the bounds. +// G s8() => throw ''; // Error +// ^ +// pkg/front_end/testcases/general/bounds_return_types.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_return_types.dart:37:3: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_return_types.dart'. +// Try changing type arguments so that they conform to the bounds. +// F t7() => throw ''; // Error +// ^ +// pkg/front_end/testcases/general/bounds_return_types.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_return_types.dart:38:3: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_return_types.dart'. +// Try changing type arguments so that they conform to the bounds. +// F t8() => throw ''; // Error +// ^ +// pkg/front_end/testcases/general/bounds_return_types.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_return_types.dart:45:3: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_return_types.dart'. +// Try changing type arguments so that they conform to the bounds. +// G s7() => throw ''; // Error +// ^ +// pkg/front_end/testcases/general/bounds_return_types.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_return_types.dart:46:3: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_return_types.dart'. +// Try changing type arguments so that they conform to the bounds. +// G s8() => throw ''; // Error +// ^ +// pkg/front_end/testcases/general/bounds_return_types.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +import self as self; +import "dart:core" as core; + +typedef F = self::Class> = X; +class Class extends core::Object { + synthetic constructor •() → self::Class + : super core::Object::•() + ; +} +class ConcreteClass extends core::Object implements self::Class { + synthetic constructor •() → self::ConcreteClass + : super core::Object::•() + ; +} +class G = self::Class> extends core::Object { + synthetic constructor •() → self::G + : super core::Object::•() + ; +} +class Class1 extends core::Object { + synthetic constructor •() → self::Class1 + : super core::Object::•() + ; + method t1() → self::Class + return throw ""; + method t2() → dynamic + return throw ""; + method t3() → self::Class + return throw ""; + method t4() → self::Class + return throw ""; + method t5() → self::ConcreteClass + return throw ""; + method t6() → self::Class + return throw ""; + method t7() → core::Object + return throw ""; + method t8() → core::int + return throw ""; + method s1() → self::G> + return throw ""; + method s2() → self::G + return throw ""; + method s3() → self::G> + return throw ""; + method s4() → self::G> + return throw ""; + method s5() → self::G + return throw ""; + method s6() → self::G> + return throw ""; + method s7() → self::G + return throw ""; + method s8() → self::G + return throw ""; +} +extension Extension1 on core::int { + method t1 = self::Extension1|t1; + tearoff t1 = self::Extension1|get#t1; + method t2 = self::Extension1|t2; + tearoff t2 = self::Extension1|get#t2; + method t3 = self::Extension1|t3; + tearoff t3 = self::Extension1|get#t3; + method t4 = self::Extension1|t4; + tearoff t4 = self::Extension1|get#t4; + method t5 = self::Extension1|t5; + tearoff t5 = self::Extension1|get#t5; + method t6 = self::Extension1|t6; + tearoff t6 = self::Extension1|get#t6; + method t7 = self::Extension1|t7; + tearoff t7 = self::Extension1|get#t7; + method t8 = self::Extension1|t8; + tearoff t8 = self::Extension1|get#t8; + method s1 = self::Extension1|s1; + tearoff s1 = self::Extension1|get#s1; + method s2 = self::Extension1|s2; + tearoff s2 = self::Extension1|get#s2; + method s3 = self::Extension1|s3; + tearoff s3 = self::Extension1|get#s3; + method s4 = self::Extension1|s4; + tearoff s4 = self::Extension1|get#s4; + method s5 = self::Extension1|s5; + tearoff s5 = self::Extension1|get#s5; + method s6 = self::Extension1|s6; + tearoff s6 = self::Extension1|get#s6; + method s7 = self::Extension1|s7; + tearoff s7 = self::Extension1|get#s7; + method s8 = self::Extension1|s8; + tearoff s8 = self::Extension1|get#s8; +} +static method t1() → self::Class + return throw ""; +static method t2() → dynamic + return throw ""; +static method t3() → self::Class + return throw ""; +static method t4() → self::Class + return throw ""; +static method t5() → self::ConcreteClass + return throw ""; +static method t6() → self::Class + return throw ""; +static method t7() → core::Object + return throw ""; +static method t8() → core::int + return throw ""; +static method s1() → self::G> + return throw ""; +static method s2() → self::G + return throw ""; +static method s3() → self::G> + return throw ""; +static method s4() → self::G> + return throw ""; +static method s5() → self::G + return throw ""; +static method s6() → self::G> + return throw ""; +static method s7() → self::G + return throw ""; +static method s8() → self::G + return throw ""; +static method method1() → dynamic { + function t1() → self::Class + return throw ""; + function t2() → dynamic + return throw ""; + function t3() → self::Class + return throw ""; + function t4() → self::Class + return throw ""; + function t5() → self::ConcreteClass + return throw ""; + function t6() → self::Class + return throw ""; + function t7() → core::Object + return throw ""; + function t8() → core::int + return throw ""; + function s1() → self::G> + return throw ""; + function s2() → self::G + return throw ""; + function s3() → self::G> + return throw ""; + function s4() → self::G> + return throw ""; + function s5() → self::G + return throw ""; + function s6() → self::G> + return throw ""; + function s7() → self::G + return throw ""; + function s8() → self::G + return throw ""; +} +static method Extension1|t1(lowered final core::int #this) → self::Class + return throw ""; +static method Extension1|get#t1(lowered final core::int #this) → () → self::Class + return () → self::Class => self::Extension1|t1(#this); +static method Extension1|t2(lowered final core::int #this) → dynamic + return throw ""; +static method Extension1|get#t2(lowered final core::int #this) → () → dynamic + return () → dynamic => self::Extension1|t2(#this); +static method Extension1|t3(lowered final core::int #this) → self::Class + return throw ""; +static method Extension1|get#t3(lowered final core::int #this) → () → self::Class + return () → self::Class => self::Extension1|t3(#this); +static method Extension1|t4(lowered final core::int #this) → self::Class + return throw ""; +static method Extension1|get#t4(lowered final core::int #this) → () → self::Class + return () → self::Class => self::Extension1|t4(#this); +static method Extension1|t5(lowered final core::int #this) → self::ConcreteClass + return throw ""; +static method Extension1|get#t5(lowered final core::int #this) → () → self::ConcreteClass + return () → self::ConcreteClass => self::Extension1|t5(#this); +static method Extension1|t6(lowered final core::int #this) → self::Class + return throw ""; +static method Extension1|get#t6(lowered final core::int #this) → () → self::Class + return () → self::Class => self::Extension1|t6(#this); +static method Extension1|t7(lowered final core::int #this) → core::Object + return throw ""; +static method Extension1|get#t7(lowered final core::int #this) → () → core::Object + return () → core::Object => self::Extension1|t7(#this); +static method Extension1|t8(lowered final core::int #this) → core::int + return throw ""; +static method Extension1|get#t8(lowered final core::int #this) → () → core::int + return () → core::int => self::Extension1|t8(#this); +static method Extension1|s1(lowered final core::int #this) → self::G> + return throw ""; +static method Extension1|get#s1(lowered final core::int #this) → () → self::G> + return () → self::G> => self::Extension1|s1(#this); +static method Extension1|s2(lowered final core::int #this) → self::G + return throw ""; +static method Extension1|get#s2(lowered final core::int #this) → () → self::G + return () → self::G => self::Extension1|s2(#this); +static method Extension1|s3(lowered final core::int #this) → self::G> + return throw ""; +static method Extension1|get#s3(lowered final core::int #this) → () → self::G> + return () → self::G> => self::Extension1|s3(#this); +static method Extension1|s4(lowered final core::int #this) → self::G> + return throw ""; +static method Extension1|get#s4(lowered final core::int #this) → () → self::G> + return () → self::G> => self::Extension1|s4(#this); +static method Extension1|s5(lowered final core::int #this) → self::G + return throw ""; +static method Extension1|get#s5(lowered final core::int #this) → () → self::G + return () → self::G => self::Extension1|s5(#this); +static method Extension1|s6(lowered final core::int #this) → self::G> + return throw ""; +static method Extension1|get#s6(lowered final core::int #this) → () → self::G> + return () → self::G> => self::Extension1|s6(#this); +static method Extension1|s7(lowered final core::int #this) → self::G + return throw ""; +static method Extension1|get#s7(lowered final core::int #this) → () → self::G + return () → self::G => self::Extension1|s7(#this); +static method Extension1|s8(lowered final core::int #this) → self::G + return throw ""; +static method Extension1|get#s8(lowered final core::int #this) → () → self::G + return () → self::G => self::Extension1|s8(#this); +static method main() → dynamic {} diff --git a/pkg/front_end/testcases/general/bounds_return_types.dart.weak.outline.expect b/pkg/front_end/testcases/general/bounds_return_types.dart.weak.outline.expect new file mode 100644 index 00000000000..4d68a2134b5 --- /dev/null +++ b/pkg/front_end/testcases/general/bounds_return_types.dart.weak.outline.expect @@ -0,0 +1,304 @@ +library /*isNonNullableByDefault*/; +// +// Problems in library: +// +// pkg/front_end/testcases/general/bounds_return_types.dart:19:1: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_return_types.dart'. +// Try changing type arguments so that they conform to the bounds. +// F t7() => throw ''; // Error +// ^ +// pkg/front_end/testcases/general/bounds_return_types.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_return_types.dart:20:1: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_return_types.dart'. +// Try changing type arguments so that they conform to the bounds. +// F t8() => throw ''; // Error +// ^ +// pkg/front_end/testcases/general/bounds_return_types.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_return_types.dart:27:1: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_return_types.dart'. +// Try changing type arguments so that they conform to the bounds. +// G s7() => throw ''; // Error +// ^ +// pkg/front_end/testcases/general/bounds_return_types.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_return_types.dart:28:1: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_return_types.dart'. +// Try changing type arguments so that they conform to the bounds. +// G s8() => throw ''; // Error +// ^ +// pkg/front_end/testcases/general/bounds_return_types.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_return_types.dart:56:3: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_return_types.dart'. +// Try changing type arguments so that they conform to the bounds. +// F t7() => throw ''; // Error +// ^ +// pkg/front_end/testcases/general/bounds_return_types.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_return_types.dart:57:3: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_return_types.dart'. +// Try changing type arguments so that they conform to the bounds. +// F t8() => throw ''; // Error +// ^ +// pkg/front_end/testcases/general/bounds_return_types.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_return_types.dart:64:3: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_return_types.dart'. +// Try changing type arguments so that they conform to the bounds. +// G s7() => throw ''; // Error +// ^ +// pkg/front_end/testcases/general/bounds_return_types.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_return_types.dart:65:3: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_return_types.dart'. +// Try changing type arguments so that they conform to the bounds. +// G s8() => throw ''; // Error +// ^ +// pkg/front_end/testcases/general/bounds_return_types.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_return_types.dart:75:3: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_return_types.dart'. +// Try changing type arguments so that they conform to the bounds. +// F t7() => throw ''; // Error +// ^ +// pkg/front_end/testcases/general/bounds_return_types.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_return_types.dart:76:3: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_return_types.dart'. +// Try changing type arguments so that they conform to the bounds. +// F t8() => throw ''; // Error +// ^ +// pkg/front_end/testcases/general/bounds_return_types.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_return_types.dart:83:3: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_return_types.dart'. +// Try changing type arguments so that they conform to the bounds. +// G s7() => throw ''; // Error +// ^ +// pkg/front_end/testcases/general/bounds_return_types.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_return_types.dart:84:3: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_return_types.dart'. +// Try changing type arguments so that they conform to the bounds. +// G s8() => throw ''; // Error +// ^ +// pkg/front_end/testcases/general/bounds_return_types.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +import self as self; +import "dart:core" as core; + +typedef F = self::Class> = X; +class Class extends core::Object { + synthetic constructor •() → self::Class + ; +} +class ConcreteClass extends core::Object implements self::Class { + synthetic constructor •() → self::ConcreteClass + ; +} +class G = self::Class> extends core::Object { + synthetic constructor •() → self::G + ; +} +class Class1 extends core::Object { + synthetic constructor •() → self::Class1 + ; + method t1() → self::Class + ; + method t2() → dynamic + ; + method t3() → self::Class + ; + method t4() → self::Class + ; + method t5() → self::ConcreteClass + ; + method t6() → self::Class + ; + method t7() → core::Object + ; + method t8() → core::int + ; + method s1() → self::G> + ; + method s2() → self::G + ; + method s3() → self::G> + ; + method s4() → self::G> + ; + method s5() → self::G + ; + method s6() → self::G> + ; + method s7() → self::G + ; + method s8() → self::G + ; +} +extension Extension1 on core::int { + method t1 = self::Extension1|t1; + tearoff t1 = self::Extension1|get#t1; + method t2 = self::Extension1|t2; + tearoff t2 = self::Extension1|get#t2; + method t3 = self::Extension1|t3; + tearoff t3 = self::Extension1|get#t3; + method t4 = self::Extension1|t4; + tearoff t4 = self::Extension1|get#t4; + method t5 = self::Extension1|t5; + tearoff t5 = self::Extension1|get#t5; + method t6 = self::Extension1|t6; + tearoff t6 = self::Extension1|get#t6; + method t7 = self::Extension1|t7; + tearoff t7 = self::Extension1|get#t7; + method t8 = self::Extension1|t8; + tearoff t8 = self::Extension1|get#t8; + method s1 = self::Extension1|s1; + tearoff s1 = self::Extension1|get#s1; + method s2 = self::Extension1|s2; + tearoff s2 = self::Extension1|get#s2; + method s3 = self::Extension1|s3; + tearoff s3 = self::Extension1|get#s3; + method s4 = self::Extension1|s4; + tearoff s4 = self::Extension1|get#s4; + method s5 = self::Extension1|s5; + tearoff s5 = self::Extension1|get#s5; + method s6 = self::Extension1|s6; + tearoff s6 = self::Extension1|get#s6; + method s7 = self::Extension1|s7; + tearoff s7 = self::Extension1|get#s7; + method s8 = self::Extension1|s8; + tearoff s8 = self::Extension1|get#s8; +} +static method t1() → self::Class + ; +static method t2() → dynamic + ; +static method t3() → self::Class + ; +static method t4() → self::Class + ; +static method t5() → self::ConcreteClass + ; +static method t6() → self::Class + ; +static method t7() → core::Object + ; +static method t8() → core::int + ; +static method s1() → self::G> + ; +static method s2() → self::G + ; +static method s3() → self::G> + ; +static method s4() → self::G> + ; +static method s5() → self::G + ; +static method s6() → self::G> + ; +static method s7() → self::G + ; +static method s8() → self::G + ; +static method method1() → dynamic + ; +static method Extension1|t1(lowered final core::int #this) → self::Class + ; +static method Extension1|get#t1(lowered final core::int #this) → () → self::Class + return () → self::Class => self::Extension1|t1(#this); +static method Extension1|t2(lowered final core::int #this) → dynamic + ; +static method Extension1|get#t2(lowered final core::int #this) → () → dynamic + return () → dynamic => self::Extension1|t2(#this); +static method Extension1|t3(lowered final core::int #this) → self::Class + ; +static method Extension1|get#t3(lowered final core::int #this) → () → self::Class + return () → self::Class => self::Extension1|t3(#this); +static method Extension1|t4(lowered final core::int #this) → self::Class + ; +static method Extension1|get#t4(lowered final core::int #this) → () → self::Class + return () → self::Class => self::Extension1|t4(#this); +static method Extension1|t5(lowered final core::int #this) → self::ConcreteClass + ; +static method Extension1|get#t5(lowered final core::int #this) → () → self::ConcreteClass + return () → self::ConcreteClass => self::Extension1|t5(#this); +static method Extension1|t6(lowered final core::int #this) → self::Class + ; +static method Extension1|get#t6(lowered final core::int #this) → () → self::Class + return () → self::Class => self::Extension1|t6(#this); +static method Extension1|t7(lowered final core::int #this) → core::Object + ; +static method Extension1|get#t7(lowered final core::int #this) → () → core::Object + return () → core::Object => self::Extension1|t7(#this); +static method Extension1|t8(lowered final core::int #this) → core::int + ; +static method Extension1|get#t8(lowered final core::int #this) → () → core::int + return () → core::int => self::Extension1|t8(#this); +static method Extension1|s1(lowered final core::int #this) → self::G> + ; +static method Extension1|get#s1(lowered final core::int #this) → () → self::G> + return () → self::G> => self::Extension1|s1(#this); +static method Extension1|s2(lowered final core::int #this) → self::G + ; +static method Extension1|get#s2(lowered final core::int #this) → () → self::G + return () → self::G => self::Extension1|s2(#this); +static method Extension1|s3(lowered final core::int #this) → self::G> + ; +static method Extension1|get#s3(lowered final core::int #this) → () → self::G> + return () → self::G> => self::Extension1|s3(#this); +static method Extension1|s4(lowered final core::int #this) → self::G> + ; +static method Extension1|get#s4(lowered final core::int #this) → () → self::G> + return () → self::G> => self::Extension1|s4(#this); +static method Extension1|s5(lowered final core::int #this) → self::G + ; +static method Extension1|get#s5(lowered final core::int #this) → () → self::G + return () → self::G => self::Extension1|s5(#this); +static method Extension1|s6(lowered final core::int #this) → self::G> + ; +static method Extension1|get#s6(lowered final core::int #this) → () → self::G> + return () → self::G> => self::Extension1|s6(#this); +static method Extension1|s7(lowered final core::int #this) → self::G + ; +static method Extension1|get#s7(lowered final core::int #this) → () → self::G + return () → self::G => self::Extension1|s7(#this); +static method Extension1|s8(lowered final core::int #this) → self::G + ; +static method Extension1|get#s8(lowered final core::int #this) → () → self::G + return () → self::G => self::Extension1|s8(#this); +static method main() → dynamic + ; diff --git a/pkg/front_end/testcases/general/bounds_return_types.dart.weak.transformed.expect b/pkg/front_end/testcases/general/bounds_return_types.dart.weak.transformed.expect new file mode 100644 index 00000000000..6adeaf233d3 --- /dev/null +++ b/pkg/front_end/testcases/general/bounds_return_types.dart.weak.transformed.expect @@ -0,0 +1,377 @@ +library /*isNonNullableByDefault*/; +// +// Problems in library: +// +// pkg/front_end/testcases/general/bounds_return_types.dart:19:1: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_return_types.dart'. +// Try changing type arguments so that they conform to the bounds. +// F t7() => throw ''; // Error +// ^ +// pkg/front_end/testcases/general/bounds_return_types.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_return_types.dart:20:1: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_return_types.dart'. +// Try changing type arguments so that they conform to the bounds. +// F t8() => throw ''; // Error +// ^ +// pkg/front_end/testcases/general/bounds_return_types.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_return_types.dart:27:1: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_return_types.dart'. +// Try changing type arguments so that they conform to the bounds. +// G s7() => throw ''; // Error +// ^ +// pkg/front_end/testcases/general/bounds_return_types.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_return_types.dart:28:1: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_return_types.dart'. +// Try changing type arguments so that they conform to the bounds. +// G s8() => throw ''; // Error +// ^ +// pkg/front_end/testcases/general/bounds_return_types.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_return_types.dart:56:3: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_return_types.dart'. +// Try changing type arguments so that they conform to the bounds. +// F t7() => throw ''; // Error +// ^ +// pkg/front_end/testcases/general/bounds_return_types.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_return_types.dart:57:3: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_return_types.dart'. +// Try changing type arguments so that they conform to the bounds. +// F t8() => throw ''; // Error +// ^ +// pkg/front_end/testcases/general/bounds_return_types.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_return_types.dart:64:3: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_return_types.dart'. +// Try changing type arguments so that they conform to the bounds. +// G s7() => throw ''; // Error +// ^ +// pkg/front_end/testcases/general/bounds_return_types.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_return_types.dart:65:3: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_return_types.dart'. +// Try changing type arguments so that they conform to the bounds. +// G s8() => throw ''; // Error +// ^ +// pkg/front_end/testcases/general/bounds_return_types.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_return_types.dart:75:3: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_return_types.dart'. +// Try changing type arguments so that they conform to the bounds. +// F t7() => throw ''; // Error +// ^ +// pkg/front_end/testcases/general/bounds_return_types.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_return_types.dart:76:3: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_return_types.dart'. +// Try changing type arguments so that they conform to the bounds. +// F t8() => throw ''; // Error +// ^ +// pkg/front_end/testcases/general/bounds_return_types.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_return_types.dart:83:3: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_return_types.dart'. +// Try changing type arguments so that they conform to the bounds. +// G s7() => throw ''; // Error +// ^ +// pkg/front_end/testcases/general/bounds_return_types.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_return_types.dart:84:3: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_return_types.dart'. +// Try changing type arguments so that they conform to the bounds. +// G s8() => throw ''; // Error +// ^ +// pkg/front_end/testcases/general/bounds_return_types.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_return_types.dart:37:3: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_return_types.dart'. +// Try changing type arguments so that they conform to the bounds. +// F t7() => throw ''; // Error +// ^ +// pkg/front_end/testcases/general/bounds_return_types.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_return_types.dart:38:3: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_return_types.dart'. +// Try changing type arguments so that they conform to the bounds. +// F t8() => throw ''; // Error +// ^ +// pkg/front_end/testcases/general/bounds_return_types.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_return_types.dart:45:3: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_return_types.dart'. +// Try changing type arguments so that they conform to the bounds. +// G s7() => throw ''; // Error +// ^ +// pkg/front_end/testcases/general/bounds_return_types.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_return_types.dart:46:3: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_return_types.dart'. +// Try changing type arguments so that they conform to the bounds. +// G s8() => throw ''; // Error +// ^ +// pkg/front_end/testcases/general/bounds_return_types.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +import self as self; +import "dart:core" as core; + +typedef F = self::Class> = X; +class Class extends core::Object { + synthetic constructor •() → self::Class + : super core::Object::•() + ; +} +class ConcreteClass extends core::Object implements self::Class { + synthetic constructor •() → self::ConcreteClass + : super core::Object::•() + ; +} +class G = self::Class> extends core::Object { + synthetic constructor •() → self::G + : super core::Object::•() + ; +} +class Class1 extends core::Object { + synthetic constructor •() → self::Class1 + : super core::Object::•() + ; + method t1() → self::Class + return throw ""; + method t2() → dynamic + return throw ""; + method t3() → self::Class + return throw ""; + method t4() → self::Class + return throw ""; + method t5() → self::ConcreteClass + return throw ""; + method t6() → self::Class + return throw ""; + method t7() → core::Object + return throw ""; + method t8() → core::int + return throw ""; + method s1() → self::G> + return throw ""; + method s2() → self::G + return throw ""; + method s3() → self::G> + return throw ""; + method s4() → self::G> + return throw ""; + method s5() → self::G + return throw ""; + method s6() → self::G> + return throw ""; + method s7() → self::G + return throw ""; + method s8() → self::G + return throw ""; +} +extension Extension1 on core::int { + method t1 = self::Extension1|t1; + tearoff t1 = self::Extension1|get#t1; + method t2 = self::Extension1|t2; + tearoff t2 = self::Extension1|get#t2; + method t3 = self::Extension1|t3; + tearoff t3 = self::Extension1|get#t3; + method t4 = self::Extension1|t4; + tearoff t4 = self::Extension1|get#t4; + method t5 = self::Extension1|t5; + tearoff t5 = self::Extension1|get#t5; + method t6 = self::Extension1|t6; + tearoff t6 = self::Extension1|get#t6; + method t7 = self::Extension1|t7; + tearoff t7 = self::Extension1|get#t7; + method t8 = self::Extension1|t8; + tearoff t8 = self::Extension1|get#t8; + method s1 = self::Extension1|s1; + tearoff s1 = self::Extension1|get#s1; + method s2 = self::Extension1|s2; + tearoff s2 = self::Extension1|get#s2; + method s3 = self::Extension1|s3; + tearoff s3 = self::Extension1|get#s3; + method s4 = self::Extension1|s4; + tearoff s4 = self::Extension1|get#s4; + method s5 = self::Extension1|s5; + tearoff s5 = self::Extension1|get#s5; + method s6 = self::Extension1|s6; + tearoff s6 = self::Extension1|get#s6; + method s7 = self::Extension1|s7; + tearoff s7 = self::Extension1|get#s7; + method s8 = self::Extension1|s8; + tearoff s8 = self::Extension1|get#s8; +} +static method t1() → self::Class + return throw ""; +static method t2() → dynamic + return throw ""; +static method t3() → self::Class + return throw ""; +static method t4() → self::Class + return throw ""; +static method t5() → self::ConcreteClass + return throw ""; +static method t6() → self::Class + return throw ""; +static method t7() → core::Object + return throw ""; +static method t8() → core::int + return throw ""; +static method s1() → self::G> + return throw ""; +static method s2() → self::G + return throw ""; +static method s3() → self::G> + return throw ""; +static method s4() → self::G> + return throw ""; +static method s5() → self::G + return throw ""; +static method s6() → self::G> + return throw ""; +static method s7() → self::G + return throw ""; +static method s8() → self::G + return throw ""; +static method method1() → dynamic { + function t1() → self::Class + return throw ""; + function t2() → dynamic + return throw ""; + function t3() → self::Class + return throw ""; + function t4() → self::Class + return throw ""; + function t5() → self::ConcreteClass + return throw ""; + function t6() → self::Class + return throw ""; + function t7() → core::Object + return throw ""; + function t8() → core::int + return throw ""; + function s1() → self::G> + return throw ""; + function s2() → self::G + return throw ""; + function s3() → self::G> + return throw ""; + function s4() → self::G> + return throw ""; + function s5() → self::G + return throw ""; + function s6() → self::G> + return throw ""; + function s7() → self::G + return throw ""; + function s8() → self::G + return throw ""; +} +static method Extension1|t1(lowered final core::int #this) → self::Class + return throw ""; +static method Extension1|get#t1(lowered final core::int #this) → () → self::Class + return () → self::Class => self::Extension1|t1(#this); +static method Extension1|t2(lowered final core::int #this) → dynamic + return throw ""; +static method Extension1|get#t2(lowered final core::int #this) → () → dynamic + return () → dynamic => self::Extension1|t2(#this); +static method Extension1|t3(lowered final core::int #this) → self::Class + return throw ""; +static method Extension1|get#t3(lowered final core::int #this) → () → self::Class + return () → self::Class => self::Extension1|t3(#this); +static method Extension1|t4(lowered final core::int #this) → self::Class + return throw ""; +static method Extension1|get#t4(lowered final core::int #this) → () → self::Class + return () → self::Class => self::Extension1|t4(#this); +static method Extension1|t5(lowered final core::int #this) → self::ConcreteClass + return throw ""; +static method Extension1|get#t5(lowered final core::int #this) → () → self::ConcreteClass + return () → self::ConcreteClass => self::Extension1|t5(#this); +static method Extension1|t6(lowered final core::int #this) → self::Class + return throw ""; +static method Extension1|get#t6(lowered final core::int #this) → () → self::Class + return () → self::Class => self::Extension1|t6(#this); +static method Extension1|t7(lowered final core::int #this) → core::Object + return throw ""; +static method Extension1|get#t7(lowered final core::int #this) → () → core::Object + return () → core::Object => self::Extension1|t7(#this); +static method Extension1|t8(lowered final core::int #this) → core::int + return throw ""; +static method Extension1|get#t8(lowered final core::int #this) → () → core::int + return () → core::int => self::Extension1|t8(#this); +static method Extension1|s1(lowered final core::int #this) → self::G> + return throw ""; +static method Extension1|get#s1(lowered final core::int #this) → () → self::G> + return () → self::G> => self::Extension1|s1(#this); +static method Extension1|s2(lowered final core::int #this) → self::G + return throw ""; +static method Extension1|get#s2(lowered final core::int #this) → () → self::G + return () → self::G => self::Extension1|s2(#this); +static method Extension1|s3(lowered final core::int #this) → self::G> + return throw ""; +static method Extension1|get#s3(lowered final core::int #this) → () → self::G> + return () → self::G> => self::Extension1|s3(#this); +static method Extension1|s4(lowered final core::int #this) → self::G> + return throw ""; +static method Extension1|get#s4(lowered final core::int #this) → () → self::G> + return () → self::G> => self::Extension1|s4(#this); +static method Extension1|s5(lowered final core::int #this) → self::G + return throw ""; +static method Extension1|get#s5(lowered final core::int #this) → () → self::G + return () → self::G => self::Extension1|s5(#this); +static method Extension1|s6(lowered final core::int #this) → self::G> + return throw ""; +static method Extension1|get#s6(lowered final core::int #this) → () → self::G> + return () → self::G> => self::Extension1|s6(#this); +static method Extension1|s7(lowered final core::int #this) → self::G + return throw ""; +static method Extension1|get#s7(lowered final core::int #this) → () → self::G + return () → self::G => self::Extension1|s7(#this); +static method Extension1|s8(lowered final core::int #this) → self::G + return throw ""; +static method Extension1|get#s8(lowered final core::int #this) → () → self::G + return () → self::G => self::Extension1|s8(#this); +static method main() → dynamic {} diff --git a/pkg/front_end/testcases/general/bounds_supertypes.dart b/pkg/front_end/testcases/general/bounds_supertypes.dart new file mode 100644 index 00000000000..40f4ea16ebe --- /dev/null +++ b/pkg/front_end/testcases/general/bounds_supertypes.dart @@ -0,0 +1,237 @@ +// Copyright (c) 2022, 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. + +class Class {} + +class ConcreteClass implements Class {} + +typedef F> = Class; + +class G> {} + +class ExtendsT1 extends F {} // Error + +class ExtendsT2 extends F {} // Error + +class ExtendsT3 extends F {} // Error + +class ExtendsT4 extends F> {} // Error + +class ExtendsT5 extends F {} // Ok + +class ExtendsT6 extends F> {} // Ok + +class ExtendsT7 extends F {} // Error + +class ExtendsT8 extends F {} // Error + +class ExtendsS1 extends G {} // Error + +class ExtendsS2 extends G {} // Error + +class ExtendsS3 extends G {} // Error + +class ExtendsS4 extends G> {} // Error + +class ExtendsS5 extends G {} // Ok + +class ExtendsS6 extends G> {} // Ok + +class ExtendsS7 extends G {} // Error + +class ExtendsS8 extends G {} // Error + +class ImplementsT1 implements F {} // Error + +class ImplementsT2 implements F {} // Error + +class ImplementsT3 implements F {} // Error + +class ImplementsT4 implements F> {} // Error + +class ImplementsT5 implements F {} // Ok + +class ImplementsT6 implements F> {} // Ok + +class ImplementsT7 implements F {} // Error + +class ImplementsT8 implements F {} // Error + +class ImplementsS1 implements G {} // Error + +class ImplementsS2 implements G {} // Error + +class ImplementsS3 implements G {} // Error + +class ImplementsS4 implements G> {} // Error + +class ImplementsS5 implements G {} // Ok + +class ImplementsS6 implements G> {} // Ok + +class ImplementsS7 implements G {} // Error + +class ImplementsS8 implements G {} // Error + +class WithT1 with F {} // Error + +class WithT2 with F {} // Error + +class WithT3 with F {} // Error + +class WithT4 with F> {} // Error + +class WithT5 with F {} // Ok + +class WithT6 with F> {} // Ok + +class WithT7 with F {} // Error + +class WithT8 with F {} // Error + +class WithS1 with G {} // Error + +class WithS2 with G {} // Error + +class WithS3 with G {} // Error + +class WithS4 with G> {} // Error + +class WithS5 with G {} // Ok + +class WithS6 with G> {} // Ok + +class WithS7 with G {} // Error + +class WithS8 with G {} // Error + +enum EnumImplementsT1 implements F /* Error */ { a } + +enum EnumImplementsT2 implements F /* Error */ { a } + +enum EnumImplementsT3 implements F /* Error */ { a } + +enum EnumImplementsT4 implements F> /* Error */ { a } + +enum EnumImplementsT5 implements F /* Ok */ { a } + +enum EnumImplementsT6 implements F> /* Ok */ { a } + +enum EnumImplementsT7 implements F /* Error */ { a } + +enum EnumImplementsT8 implements F /* Error */ { a } + +enum EnumImplementsS1 implements G /* Error */ { a } + +enum EnumImplementsS2 implements G /* Error */ { a } + +enum EnumImplementsS3 implements G /* Error */ { a } + +enum EnumImplementsS4 implements G> /* Error */ { a } + +enum EnumImplementsS5 implements G /* Ok */ { a } + +enum EnumImplementsS6 implements G> /* Ok */ { a } + +enum EnumImplementsS7 implements G /* Error */ { a } + +enum EnumImplementsS8 implements G /* Error */ { a } + +enum EnumWithT1 with F /* Error */ { a } + +enum EnumWithT2 with F /* Error */ { a } + +enum EnumWithT3 with F /* Error */ { a } + +enum EnumWithT4 with F> /* Error */ { a } + +enum EnumWithT5 with F /* Ok */ { a } + +enum EnumWithT6 with F> /* Ok */ { a } + +enum EnumWithT7 with F /* Error */ { a } + +enum EnumWithT8 with F /* Error */ { a } + +enum EnumWithS1 with G /* Error */ { a } + +enum EnumWithS2 with G /* Error */ { a } + +enum EnumWithS3 with G /* Error */ { a } + +enum EnumWithS4 with G> /* Error */ { a } + +enum EnumWithS5 with G /* Ok */ { a } + +enum EnumWithS6 with G> /* Ok */ { a } + +enum EnumWithS7 with G /* Error */ { a } + +enum EnumWithS8 with G /* Error */ { a } + +mixin MixinOnT1 on F {} // Error + +mixin MixinOnT2 on F {} // Error + +mixin MixinOnT3 on F {} // Error + +mixin MixinOnT4 on F> {} // Error + +mixin MixinOnT5 on F {} // Ok + +mixin MixinOnT6 on F> {} // Ok + +mixin MixinOnT7 on F {} // Error + +mixin MixinOnT8 on F {} // Error + +mixin MixinOnS1 on G {} // Error + +mixin MixinOnS2 on G {} // Error + +mixin MixinOnS3 on G {} // Error + +mixin MixinOnS4 on G> {} // Error + +mixin MixinOnS5 on G {} // Ok + +mixin MixinOnS6 on G> {} // Ok + +mixin MixinOnS7 on G {} // Error + +mixin MixinOnS8 on G {} // Error + +extension ExtensionOnT1 on F {} // Ok + +extension ExtensionOnT2 on F {} // Ok + +extension ExtensionOnT3 on F {} // Ok + +extension ExtensionOnT4 on F> {} // Ok + +extension ExtensionOnT5 on F {} // Ok + +extension ExtensionOnT6 on F> {} // Ok + +extension ExtensionOnT7 on F {} // Error + +extension ExtensionOnT8 on F {} // Error + +extension ExtensionOnS1 on G {} // Ok + +extension ExtensionOnS2 on G {} // Ok + +extension ExtensionOnS3 on G {} // Ok + +extension ExtensionOnS4 on G> {} // Ok + +extension ExtensionOnS5 on G {} // Ok + +extension ExtensionOnS6 on G> {} // Ok + +extension ExtensionOnS7 on G {} // Error + +extension ExtensionOnS8 on G {} // Error + +main() {} diff --git a/pkg/front_end/testcases/general/bounds_supertypes.dart.textual_outline.expect b/pkg/front_end/testcases/general/bounds_supertypes.dart.textual_outline.expect new file mode 100644 index 00000000000..411c6124967 --- /dev/null +++ b/pkg/front_end/testcases/general/bounds_supertypes.dart.textual_outline.expect @@ -0,0 +1,218 @@ +class Class {} + +class ConcreteClass implements Class {} + +typedef F> = Class; + +class G> {} + +class ExtendsT1 extends F {} + +class ExtendsT2 extends F {} + +class ExtendsT3 extends F {} + +class ExtendsT4 extends F> {} + +class ExtendsT5 extends F {} + +class ExtendsT6 extends F> {} + +class ExtendsT7 extends F {} + +class ExtendsT8 extends F {} + +class ExtendsS1 extends G {} + +class ExtendsS2 extends G {} + +class ExtendsS3 extends G {} + +class ExtendsS4 extends G> {} + +class ExtendsS5 extends G {} + +class ExtendsS6 extends G> {} + +class ExtendsS7 extends G {} + +class ExtendsS8 extends G {} + +class ImplementsT1 implements F {} + +class ImplementsT2 implements F {} + +class ImplementsT3 implements F {} + +class ImplementsT4 implements F> {} + +class ImplementsT5 implements F {} + +class ImplementsT6 implements F> {} + +class ImplementsT7 implements F {} + +class ImplementsT8 implements F {} + +class ImplementsS1 implements G {} + +class ImplementsS2 implements G {} + +class ImplementsS3 implements G {} + +class ImplementsS4 implements G> {} + +class ImplementsS5 implements G {} + +class ImplementsS6 implements G> {} + +class ImplementsS7 implements G {} + +class ImplementsS8 implements G {} + +class WithT1 with F {} + +class WithT2 with F {} + +class WithT3 with F {} + +class WithT4 with F> {} + +class WithT5 with F {} + +class WithT6 with F> {} + +class WithT7 with F {} + +class WithT8 with F {} + +class WithS1 with G {} + +class WithS2 with G {} + +class WithS3 with G {} + +class WithS4 with G> {} + +class WithS5 with G {} + +class WithS6 with G> {} + +class WithS7 with G {} + +class WithS8 with G {} + +enum EnumImplementsT1 implements F { a } + +enum EnumImplementsT2 implements F { a } + +enum EnumImplementsT3 implements F { a } + +enum EnumImplementsT4 implements F> { a } + +enum EnumImplementsT5 implements F { a } + +enum EnumImplementsT6 implements F> { a } + +enum EnumImplementsT7 implements F { a } + +enum EnumImplementsT8 implements F { a } + +enum EnumImplementsS1 implements G { a } + +enum EnumImplementsS2 implements G { a } + +enum EnumImplementsS3 implements G { a } + +enum EnumImplementsS4 implements G> { a } + +enum EnumImplementsS5 implements G { a } + +enum EnumImplementsS6 implements G> { a } + +enum EnumImplementsS7 implements G { a } + +enum EnumImplementsS8 implements G { a } + +enum EnumWithT1 with F { a } + +enum EnumWithT2 with F { a } + +enum EnumWithT3 with F { a } + +enum EnumWithT4 with F> { a } + +enum EnumWithT5 with F { a } + +enum EnumWithT6 with F> { a } + +enum EnumWithT7 with F { a } + +enum EnumWithT8 with F { a } + +enum EnumWithS1 with G { a } + +enum EnumWithS2 with G { a } + +enum EnumWithS3 with G { a } + +enum EnumWithS4 with G> { a } + +enum EnumWithS5 with G { a } + +enum EnumWithS6 with G> { a } + +enum EnumWithS7 with G { a } + +enum EnumWithS8 with G { a } + +mixin MixinOnT1 on F {} +mixin MixinOnT2 on F {} +mixin MixinOnT3 on F {} +mixin MixinOnT4 on F> {} +mixin MixinOnT5 on F {} +mixin MixinOnT6 on F> {} +mixin MixinOnT7 on F {} +mixin MixinOnT8 on F {} +mixin MixinOnS1 on G {} +mixin MixinOnS2 on G {} +mixin MixinOnS3 on G {} +mixin MixinOnS4 on G> {} +mixin MixinOnS5 on G {} +mixin MixinOnS6 on G> {} +mixin MixinOnS7 on G {} +mixin MixinOnS8 on G {} + +extension ExtensionOnT1 on F {} + +extension ExtensionOnT2 on F {} + +extension ExtensionOnT3 on F {} + +extension ExtensionOnT4 on F> {} + +extension ExtensionOnT5 on F {} + +extension ExtensionOnT6 on F> {} + +extension ExtensionOnT7 on F {} + +extension ExtensionOnT8 on F {} + +extension ExtensionOnS1 on G {} + +extension ExtensionOnS2 on G {} + +extension ExtensionOnS3 on G {} + +extension ExtensionOnS4 on G> {} + +extension ExtensionOnS5 on G {} + +extension ExtensionOnS6 on G> {} + +extension ExtensionOnS7 on G {} + +extension ExtensionOnS8 on G {} + +main() {} diff --git a/pkg/front_end/testcases/general/bounds_supertypes.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/general/bounds_supertypes.dart.textual_outline_modelled.expect new file mode 100644 index 00000000000..5203bb65ea0 --- /dev/null +++ b/pkg/front_end/testcases/general/bounds_supertypes.dart.textual_outline_modelled.expect @@ -0,0 +1,216 @@ +class Class {} + +class ConcreteClass implements Class {} + +class ExtendsS1 extends G {} + +class ExtendsS2 extends G {} + +class ExtendsS3 extends G {} + +class ExtendsS4 extends G> {} + +class ExtendsS5 extends G {} + +class ExtendsS6 extends G> {} + +class ExtendsS7 extends G {} + +class ExtendsS8 extends G {} + +class ExtendsT1 extends F {} + +class ExtendsT2 extends F {} + +class ExtendsT3 extends F {} + +class ExtendsT4 extends F> {} + +class ExtendsT5 extends F {} + +class ExtendsT6 extends F> {} + +class ExtendsT7 extends F {} + +class ExtendsT8 extends F {} + +class G> {} + +class ImplementsS1 implements G {} + +class ImplementsS2 implements G {} + +class ImplementsS3 implements G {} + +class ImplementsS4 implements G> {} + +class ImplementsS5 implements G {} + +class ImplementsS6 implements G> {} + +class ImplementsS7 implements G {} + +class ImplementsS8 implements G {} + +class ImplementsT1 implements F {} + +class ImplementsT2 implements F {} + +class ImplementsT3 implements F {} + +class ImplementsT4 implements F> {} + +class ImplementsT5 implements F {} + +class ImplementsT6 implements F> {} + +class ImplementsT7 implements F {} + +class ImplementsT8 implements F {} + +class WithS1 with G {} + +class WithS2 with G {} + +class WithS3 with G {} + +class WithS4 with G> {} + +class WithS5 with G {} + +class WithS6 with G> {} + +class WithS7 with G {} + +class WithS8 with G {} + +class WithT1 with F {} + +class WithT2 with F {} + +class WithT3 with F {} + +class WithT4 with F> {} + +class WithT5 with F {} + +class WithT6 with F> {} + +class WithT7 with F {} + +class WithT8 with F {} + +enum EnumImplementsS1 implements G { a } + +enum EnumImplementsS2 implements G { a } + +enum EnumImplementsS3 implements G { a } + +enum EnumImplementsS4 implements G> { a } + +enum EnumImplementsS5 implements G { a } + +enum EnumImplementsS6 implements G> { a } + +enum EnumImplementsS7 implements G { a } + +enum EnumImplementsS8 implements G { a } + +enum EnumImplementsT1 implements F { a } + +enum EnumImplementsT2 implements F { a } + +enum EnumImplementsT3 implements F { a } + +enum EnumImplementsT4 implements F> { a } + +enum EnumImplementsT5 implements F { a } + +enum EnumImplementsT6 implements F> { a } + +enum EnumImplementsT7 implements F { a } + +enum EnumImplementsT8 implements F { a } + +enum EnumWithS1 with G { a } + +enum EnumWithS2 with G { a } + +enum EnumWithS3 with G { a } + +enum EnumWithS4 with G> { a } + +enum EnumWithS5 with G { a } + +enum EnumWithS6 with G> { a } + +enum EnumWithS7 with G { a } + +enum EnumWithS8 with G { a } + +enum EnumWithT1 with F { a } + +enum EnumWithT2 with F { a } + +enum EnumWithT3 with F { a } + +enum EnumWithT4 with F> { a } + +enum EnumWithT5 with F { a } + +enum EnumWithT6 with F> { a } + +enum EnumWithT7 with F { a } + +enum EnumWithT8 with F { a } + +extension ExtensionOnS1 on G {} + +extension ExtensionOnS2 on G {} + +extension ExtensionOnS3 on G {} + +extension ExtensionOnS4 on G> {} + +extension ExtensionOnS5 on G {} + +extension ExtensionOnS6 on G> {} + +extension ExtensionOnS7 on G {} + +extension ExtensionOnS8 on G {} + +extension ExtensionOnT1 on F {} + +extension ExtensionOnT2 on F {} + +extension ExtensionOnT3 on F {} + +extension ExtensionOnT4 on F> {} + +extension ExtensionOnT5 on F {} + +extension ExtensionOnT6 on F> {} + +extension ExtensionOnT7 on F {} + +extension ExtensionOnT8 on F {} + +main() {} +mixin MixinOnS1 on G {} +mixin MixinOnS2 on G {} +mixin MixinOnS3 on G {} +mixin MixinOnS4 on G> {} +mixin MixinOnS5 on G {} +mixin MixinOnS6 on G> {} +mixin MixinOnS7 on G {} +mixin MixinOnS8 on G {} +mixin MixinOnT1 on F {} +mixin MixinOnT2 on F {} +mixin MixinOnT3 on F {} +mixin MixinOnT4 on F> {} +mixin MixinOnT5 on F {} +mixin MixinOnT6 on F> {} +mixin MixinOnT7 on F {} +mixin MixinOnT8 on F {} +typedef F> = Class; diff --git a/pkg/front_end/testcases/general/bounds_supertypes.dart.weak.expect b/pkg/front_end/testcases/general/bounds_supertypes.dart.weak.expect new file mode 100644 index 00000000000..4b8667d478e --- /dev/null +++ b/pkg/front_end/testcases/general/bounds_supertypes.dart.weak.expect @@ -0,0 +1,1599 @@ +library /*isNonNullableByDefault*/; +// +// Problems in library: +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:13:25: Error: Inferred type argument 'Class' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try specifying type arguments explicitly so that they conform to the bounds. +// class ExtendsT1 extends F {} // Error +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = Class; +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:15:25: Error: Type argument 'dynamic' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// class ExtendsT2 extends F {} // Error +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = Class; +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:17:25: Error: Type argument 'Class' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// class ExtendsT3 extends F {} // Error +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = Class; +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:19:25: Error: Type argument 'Class' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// class ExtendsT4 extends F> {} // Error +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = Class; +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:25:25: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// class ExtendsT7 extends F {} // Error +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = Class; +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:27:25: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// class ExtendsT8 extends F {} // Error +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = Class; +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:29:25: Error: Inferred type argument 'Class' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try specifying type arguments explicitly so that they conform to the bounds. +// class ExtendsS1 extends G {} // Error +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:31:25: Error: Type argument 'dynamic' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// class ExtendsS2 extends G {} // Error +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:33:25: Error: Type argument 'Class' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// class ExtendsS3 extends G {} // Error +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:35:25: Error: Type argument 'Class' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// class ExtendsS4 extends G> {} // Error +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:41:25: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// class ExtendsS7 extends G {} // Error +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:43:25: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// class ExtendsS8 extends G {} // Error +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:45:31: Error: Inferred type argument 'Class' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try specifying type arguments explicitly so that they conform to the bounds. +// class ImplementsT1 implements F {} // Error +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = Class; +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:47:31: Error: Type argument 'dynamic' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// class ImplementsT2 implements F {} // Error +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = Class; +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:49:31: Error: Type argument 'Class' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// class ImplementsT3 implements F {} // Error +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = Class; +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:51:31: Error: Type argument 'Class' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// class ImplementsT4 implements F> {} // Error +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = Class; +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:57:31: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// class ImplementsT7 implements F {} // Error +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = Class; +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:59:31: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// class ImplementsT8 implements F {} // Error +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = Class; +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:61:31: Error: Inferred type argument 'Class' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try specifying type arguments explicitly so that they conform to the bounds. +// class ImplementsS1 implements G {} // Error +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:63:31: Error: Type argument 'dynamic' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// class ImplementsS2 implements G {} // Error +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:65:31: Error: Type argument 'Class' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// class ImplementsS3 implements G {} // Error +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:67:31: Error: Type argument 'Class' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// class ImplementsS4 implements G> {} // Error +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:73:31: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// class ImplementsS7 implements G {} // Error +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:75:31: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// class ImplementsS8 implements G {} // Error +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:77:19: Error: Inferred type argument 'Class' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try specifying type arguments explicitly so that they conform to the bounds. +// class WithT1 with F {} // Error +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = Class; +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:79:19: Error: Type argument 'dynamic' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// class WithT2 with F {} // Error +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = Class; +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:81:19: Error: Type argument 'Class' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// class WithT3 with F {} // Error +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = Class; +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:83:19: Error: Type argument 'Class' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// class WithT4 with F> {} // Error +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = Class; +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:89:19: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// class WithT7 with F {} // Error +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = Class; +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:91:19: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// class WithT8 with F {} // Error +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = Class; +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:109:34: Error: Inferred type argument 'Class' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try specifying type arguments explicitly so that they conform to the bounds. +// enum EnumImplementsT1 implements F /* Error */ { a } +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = Class; +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:111:34: Error: Type argument 'dynamic' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// enum EnumImplementsT2 implements F /* Error */ { a } +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = Class; +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:113:34: Error: Type argument 'Class' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// enum EnumImplementsT3 implements F /* Error */ { a } +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = Class; +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:115:34: Error: Type argument 'Class' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// enum EnumImplementsT4 implements F> /* Error */ { a } +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = Class; +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:121:34: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// enum EnumImplementsT7 implements F /* Error */ { a } +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = Class; +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:123:34: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// enum EnumImplementsT8 implements F /* Error */ { a } +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = Class; +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:125:34: Error: Inferred type argument 'Class' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try specifying type arguments explicitly so that they conform to the bounds. +// enum EnumImplementsS1 implements G /* Error */ { a } +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:127:34: Error: Type argument 'dynamic' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// enum EnumImplementsS2 implements G /* Error */ { a } +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:129:34: Error: Type argument 'Class' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// enum EnumImplementsS3 implements G /* Error */ { a } +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:131:34: Error: Type argument 'Class' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// enum EnumImplementsS4 implements G> /* Error */ { a } +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:137:34: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// enum EnumImplementsS7 implements G /* Error */ { a } +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:139:34: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// enum EnumImplementsS8 implements G /* Error */ { a } +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:141:22: Error: Inferred type argument 'Class' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try specifying type arguments explicitly so that they conform to the bounds. +// enum EnumWithT1 with F /* Error */ { a } +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = Class; +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:143:22: Error: Type argument 'dynamic' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// enum EnumWithT2 with F /* Error */ { a } +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = Class; +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:145:22: Error: Type argument 'Class' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// enum EnumWithT3 with F /* Error */ { a } +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = Class; +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:147:22: Error: Type argument 'Class' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// enum EnumWithT4 with F> /* Error */ { a } +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = Class; +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:153:22: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// enum EnumWithT7 with F /* Error */ { a } +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = Class; +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:155:22: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// enum EnumWithT8 with F /* Error */ { a } +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = Class; +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:173:20: Error: Inferred type argument 'Class' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try specifying type arguments explicitly so that they conform to the bounds. +// mixin MixinOnT1 on F {} // Error +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = Class; +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:175:20: Error: Type argument 'dynamic' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// mixin MixinOnT2 on F {} // Error +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = Class; +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:177:20: Error: Type argument 'Class' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// mixin MixinOnT3 on F {} // Error +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = Class; +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:179:20: Error: Type argument 'Class' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// mixin MixinOnT4 on F> {} // Error +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = Class; +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:185:20: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// mixin MixinOnT7 on F {} // Error +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = Class; +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:187:20: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// mixin MixinOnT8 on F {} // Error +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = Class; +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:189:20: Error: Inferred type argument 'Class' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try specifying type arguments explicitly so that they conform to the bounds. +// mixin MixinOnS1 on G {} // Error +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:191:20: Error: Type argument 'dynamic' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// mixin MixinOnS2 on G {} // Error +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:193:20: Error: Type argument 'Class' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// mixin MixinOnS3 on G {} // Error +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:195:20: Error: Type argument 'Class' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// mixin MixinOnS4 on G> {} // Error +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:201:20: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// mixin MixinOnS7 on G {} // Error +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:203:20: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// mixin MixinOnS8 on G {} // Error +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:217:28: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// extension ExtensionOnT7 on F {} // Error +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = Class; +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:219:28: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// extension ExtensionOnT8 on F {} // Error +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = Class; +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:233:28: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// extension ExtensionOnS7 on G {} // Error +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:235:28: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// extension ExtensionOnS8 on G {} // Error +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:93:19: Error: Inferred type argument 'Class' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try specifying type arguments explicitly so that they conform to the bounds. +// class WithS1 with G {} // Error +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:95:19: Error: Type argument 'dynamic' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// class WithS2 with G {} // Error +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:97:19: Error: Type argument 'Class' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// class WithS3 with G {} // Error +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:99:19: Error: Type argument 'Class' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// class WithS4 with G> {} // Error +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:105:19: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// class WithS7 with G {} // Error +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:107:19: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// class WithS8 with G {} // Error +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:157:22: Error: Inferred type argument 'Class' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try specifying type arguments explicitly so that they conform to the bounds. +// enum EnumWithS1 with G /* Error */ { a } +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:159:22: Error: Type argument 'dynamic' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// enum EnumWithS2 with G /* Error */ { a } +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:161:22: Error: Type argument 'Class' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// enum EnumWithS3 with G /* Error */ { a } +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:163:22: Error: Type argument 'Class' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// enum EnumWithS4 with G> /* Error */ { a } +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:169:22: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// enum EnumWithS7 with G /* Error */ { a } +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:171:22: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// enum EnumWithS8 with G /* Error */ { a } +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +import self as self; +import "dart:core" as core; + +typedef F = self::Class> = self::Class; +class Class extends core::Object { + synthetic constructor •() → self::Class + : super core::Object::•() + ; +} +class ConcreteClass extends core::Object implements self::Class { + synthetic constructor •() → self::ConcreteClass + : super core::Object::•() + ; +} +class G = self::Class> extends core::Object { + synthetic constructor •() → self::G + : super core::Object::•() + ; +} +class ExtendsT1 extends self::Class> { + synthetic constructor •() → self::ExtendsT1 + : super self::Class::•() + ; +} +class ExtendsT2 extends self::Class { + synthetic constructor •() → self::ExtendsT2 + : super self::Class::•() + ; +} +class ExtendsT3 extends self::Class> { + synthetic constructor •() → self::ExtendsT3 + : super self::Class::•() + ; +} +class ExtendsT4 extends self::Class> { + synthetic constructor •() → self::ExtendsT4 + : super self::Class::•() + ; +} +class ExtendsT5 extends self::Class { + synthetic constructor •() → self::ExtendsT5 + : super self::Class::•() + ; +} +class ExtendsT6 extends self::Class> { + synthetic constructor •() → self::ExtendsT6 + : super self::Class::•() + ; +} +class ExtendsT7 extends self::Class { + synthetic constructor •() → self::ExtendsT7 + : super self::Class::•() + ; +} +class ExtendsT8 extends self::Class { + synthetic constructor •() → self::ExtendsT8 + : super self::Class::•() + ; +} +class ExtendsS1 extends self::G> { + synthetic constructor •() → self::ExtendsS1 + : super self::G::•() + ; +} +class ExtendsS2 extends self::G { + synthetic constructor •() → self::ExtendsS2 + : super self::G::•() + ; +} +class ExtendsS3 extends self::G> { + synthetic constructor •() → self::ExtendsS3 + : super self::G::•() + ; +} +class ExtendsS4 extends self::G> { + synthetic constructor •() → self::ExtendsS4 + : super self::G::•() + ; +} +class ExtendsS5 extends self::G { + synthetic constructor •() → self::ExtendsS5 + : super self::G::•() + ; +} +class ExtendsS6 extends self::G> { + synthetic constructor •() → self::ExtendsS6 + : super self::G::•() + ; +} +class ExtendsS7 extends self::G { + synthetic constructor •() → self::ExtendsS7 + : super self::G::•() + ; +} +class ExtendsS8 extends self::G { + synthetic constructor •() → self::ExtendsS8 + : super self::G::•() + ; +} +class ImplementsT1 extends core::Object implements self::Class> { + synthetic constructor •() → self::ImplementsT1 + : super core::Object::•() + ; +} +class ImplementsT2 extends core::Object implements self::Class { + synthetic constructor •() → self::ImplementsT2 + : super core::Object::•() + ; +} +class ImplementsT3 extends core::Object implements self::Class> { + synthetic constructor •() → self::ImplementsT3 + : super core::Object::•() + ; +} +class ImplementsT4 extends core::Object implements self::Class> { + synthetic constructor •() → self::ImplementsT4 + : super core::Object::•() + ; +} +class ImplementsT5 extends core::Object implements self::Class { + synthetic constructor •() → self::ImplementsT5 + : super core::Object::•() + ; +} +class ImplementsT6 extends core::Object implements self::Class> { + synthetic constructor •() → self::ImplementsT6 + : super core::Object::•() + ; +} +class ImplementsT7 extends core::Object implements self::Class { + synthetic constructor •() → self::ImplementsT7 + : super core::Object::•() + ; +} +class ImplementsT8 extends core::Object implements self::Class { + synthetic constructor •() → self::ImplementsT8 + : super core::Object::•() + ; +} +class ImplementsS1 extends core::Object implements self::G> { + synthetic constructor •() → self::ImplementsS1 + : super core::Object::•() + ; +} +class ImplementsS2 extends core::Object implements self::G { + synthetic constructor •() → self::ImplementsS2 + : super core::Object::•() + ; +} +class ImplementsS3 extends core::Object implements self::G> { + synthetic constructor •() → self::ImplementsS3 + : super core::Object::•() + ; +} +class ImplementsS4 extends core::Object implements self::G> { + synthetic constructor •() → self::ImplementsS4 + : super core::Object::•() + ; +} +class ImplementsS5 extends core::Object implements self::G { + synthetic constructor •() → self::ImplementsS5 + : super core::Object::•() + ; +} +class ImplementsS6 extends core::Object implements self::G> { + synthetic constructor •() → self::ImplementsS6 + : super core::Object::•() + ; +} +class ImplementsS7 extends core::Object implements self::G { + synthetic constructor •() → self::ImplementsS7 + : super core::Object::•() + ; +} +class ImplementsS8 extends core::Object implements self::G { + synthetic constructor •() → self::ImplementsS8 + : super core::Object::•() + ; +} +abstract class _WithT1&Object&F = core::Object with self::Class> /*isAnonymousMixin,hasConstConstructor*/ { + const synthetic constructor •() → self::_WithT1&Object&F + : super core::Object::•() + ; +} +class WithT1 extends self::_WithT1&Object&F { + synthetic constructor •() → self::WithT1 + : super self::_WithT1&Object&F::•() + ; +} +abstract class _WithT2&Object&F = core::Object with self::Class /*isAnonymousMixin,hasConstConstructor*/ { + const synthetic constructor •() → self::_WithT2&Object&F + : super core::Object::•() + ; +} +class WithT2 extends self::_WithT2&Object&F { + synthetic constructor •() → self::WithT2 + : super self::_WithT2&Object&F::•() + ; +} +abstract class _WithT3&Object&F = core::Object with self::Class> /*isAnonymousMixin,hasConstConstructor*/ { + const synthetic constructor •() → self::_WithT3&Object&F + : super core::Object::•() + ; +} +class WithT3 extends self::_WithT3&Object&F { + synthetic constructor •() → self::WithT3 + : super self::_WithT3&Object&F::•() + ; +} +abstract class _WithT4&Object&F = core::Object with self::Class> /*isAnonymousMixin,hasConstConstructor*/ { + const synthetic constructor •() → self::_WithT4&Object&F + : super core::Object::•() + ; +} +class WithT4 extends self::_WithT4&Object&F { + synthetic constructor •() → self::WithT4 + : super self::_WithT4&Object&F::•() + ; +} +abstract class _WithT5&Object&F = core::Object with self::Class /*isAnonymousMixin,hasConstConstructor*/ { + const synthetic constructor •() → self::_WithT5&Object&F + : super core::Object::•() + ; +} +class WithT5 extends self::_WithT5&Object&F { + synthetic constructor •() → self::WithT5 + : super self::_WithT5&Object&F::•() + ; +} +abstract class _WithT6&Object&F = core::Object with self::Class> /*isAnonymousMixin,hasConstConstructor*/ { + const synthetic constructor •() → self::_WithT6&Object&F + : super core::Object::•() + ; +} +class WithT6 extends self::_WithT6&Object&F { + synthetic constructor •() → self::WithT6 + : super self::_WithT6&Object&F::•() + ; +} +abstract class _WithT7&Object&F = core::Object with self::Class /*isAnonymousMixin,hasConstConstructor*/ { + const synthetic constructor •() → self::_WithT7&Object&F + : super core::Object::•() + ; +} +class WithT7 extends self::_WithT7&Object&F { + synthetic constructor •() → self::WithT7 + : super self::_WithT7&Object&F::•() + ; +} +abstract class _WithT8&Object&F = core::Object with self::Class /*isAnonymousMixin,hasConstConstructor*/ { + const synthetic constructor •() → self::_WithT8&Object&F + : super core::Object::•() + ; +} +class WithT8 extends self::_WithT8&Object&F { + synthetic constructor •() → self::WithT8 + : super self::_WithT8&Object&F::•() + ; +} +abstract class _WithS1&Object&G = core::Object with self::G> /*isAnonymousMixin,hasConstConstructor*/ { + const synthetic constructor •() → self::_WithS1&Object&G + : super core::Object::•() + ; +} +class WithS1 extends self::_WithS1&Object&G { + synthetic constructor •() → self::WithS1 + : super self::_WithS1&Object&G::•() + ; +} +abstract class _WithS2&Object&G = core::Object with self::G /*isAnonymousMixin,hasConstConstructor*/ { + const synthetic constructor •() → self::_WithS2&Object&G + : super core::Object::•() + ; +} +class WithS2 extends self::_WithS2&Object&G { + synthetic constructor •() → self::WithS2 + : super self::_WithS2&Object&G::•() + ; +} +abstract class _WithS3&Object&G = core::Object with self::G> /*isAnonymousMixin,hasConstConstructor*/ { + const synthetic constructor •() → self::_WithS3&Object&G + : super core::Object::•() + ; +} +class WithS3 extends self::_WithS3&Object&G { + synthetic constructor •() → self::WithS3 + : super self::_WithS3&Object&G::•() + ; +} +abstract class _WithS4&Object&G = core::Object with self::G> /*isAnonymousMixin,hasConstConstructor*/ { + const synthetic constructor •() → self::_WithS4&Object&G + : super core::Object::•() + ; +} +class WithS4 extends self::_WithS4&Object&G { + synthetic constructor •() → self::WithS4 + : super self::_WithS4&Object&G::•() + ; +} +abstract class _WithS5&Object&G = core::Object with self::G /*isAnonymousMixin,hasConstConstructor*/ { + const synthetic constructor •() → self::_WithS5&Object&G + : super core::Object::•() + ; +} +class WithS5 extends self::_WithS5&Object&G { + synthetic constructor •() → self::WithS5 + : super self::_WithS5&Object&G::•() + ; +} +abstract class _WithS6&Object&G = core::Object with self::G> /*isAnonymousMixin,hasConstConstructor*/ { + const synthetic constructor •() → self::_WithS6&Object&G + : super core::Object::•() + ; +} +class WithS6 extends self::_WithS6&Object&G { + synthetic constructor •() → self::WithS6 + : super self::_WithS6&Object&G::•() + ; +} +abstract class _WithS7&Object&G = core::Object with self::G /*isAnonymousMixin,hasConstConstructor*/ { + const synthetic constructor •() → self::_WithS7&Object&G + : super core::Object::•() + ; +} +class WithS7 extends self::_WithS7&Object&G { + synthetic constructor •() → self::WithS7 + : super self::_WithS7&Object&G::•() + ; +} +abstract class _WithS8&Object&G = core::Object with self::G /*isAnonymousMixin,hasConstConstructor*/ { + const synthetic constructor •() → self::_WithS8&Object&G + : super core::Object::•() + ; +} +class WithS8 extends self::_WithS8&Object&G { + synthetic constructor •() → self::WithS8 + : super self::_WithS8&Object&G::•() + ; +} +class EnumImplementsT1 extends core::_Enum implements self::Class> /*isEnum*/ { + static const field core::List values = #C4; + static const field self::EnumImplementsT1 a = #C3; + const constructor •(core::int index, core::String name) → self::EnumImplementsT1 + : super core::_Enum::•(index, name) + ; + method toString() → core::String + return "EnumImplementsT1.${this.{core::_Enum::_name}{core::String}}"; +} +class EnumImplementsT2 extends core::_Enum implements self::Class /*isEnum*/ { + static const field core::List values = #C6; + static const field self::EnumImplementsT2 a = #C5; + const constructor •(core::int index, core::String name) → self::EnumImplementsT2 + : super core::_Enum::•(index, name) + ; + method toString() → core::String + return "EnumImplementsT2.${this.{core::_Enum::_name}{core::String}}"; +} +class EnumImplementsT3 extends core::_Enum implements self::Class> /*isEnum*/ { + static const field core::List values = #C8; + static const field self::EnumImplementsT3 a = #C7; + const constructor •(core::int index, core::String name) → self::EnumImplementsT3 + : super core::_Enum::•(index, name) + ; + method toString() → core::String + return "EnumImplementsT3.${this.{core::_Enum::_name}{core::String}}"; +} +class EnumImplementsT4 extends core::_Enum implements self::Class> /*isEnum*/ { + static const field core::List values = #C10; + static const field self::EnumImplementsT4 a = #C9; + const constructor •(core::int index, core::String name) → self::EnumImplementsT4 + : super core::_Enum::•(index, name) + ; + method toString() → core::String + return "EnumImplementsT4.${this.{core::_Enum::_name}{core::String}}"; +} +class EnumImplementsT5 extends core::_Enum implements self::Class /*isEnum*/ { + static const field core::List values = #C12; + static const field self::EnumImplementsT5 a = #C11; + const constructor •(core::int index, core::String name) → self::EnumImplementsT5 + : super core::_Enum::•(index, name) + ; + method toString() → core::String + return "EnumImplementsT5.${this.{core::_Enum::_name}{core::String}}"; +} +class EnumImplementsT6 extends core::_Enum implements self::Class> /*isEnum*/ { + static const field core::List values = #C14; + static const field self::EnumImplementsT6 a = #C13; + const constructor •(core::int index, core::String name) → self::EnumImplementsT6 + : super core::_Enum::•(index, name) + ; + method toString() → core::String + return "EnumImplementsT6.${this.{core::_Enum::_name}{core::String}}"; +} +class EnumImplementsT7 extends core::_Enum implements self::Class /*isEnum*/ { + static const field core::List values = #C16; + static const field self::EnumImplementsT7 a = #C15; + const constructor •(core::int index, core::String name) → self::EnumImplementsT7 + : super core::_Enum::•(index, name) + ; + method toString() → core::String + return "EnumImplementsT7.${this.{core::_Enum::_name}{core::String}}"; +} +class EnumImplementsT8 extends core::_Enum implements self::Class /*isEnum*/ { + static const field core::List values = #C18; + static const field self::EnumImplementsT8 a = #C17; + const constructor •(core::int index, core::String name) → self::EnumImplementsT8 + : super core::_Enum::•(index, name) + ; + method toString() → core::String + return "EnumImplementsT8.${this.{core::_Enum::_name}{core::String}}"; +} +class EnumImplementsS1 extends core::_Enum implements self::G> /*isEnum*/ { + static const field core::List values = #C20; + static const field self::EnumImplementsS1 a = #C19; + const constructor •(core::int index, core::String name) → self::EnumImplementsS1 + : super core::_Enum::•(index, name) + ; + method toString() → core::String + return "EnumImplementsS1.${this.{core::_Enum::_name}{core::String}}"; +} +class EnumImplementsS2 extends core::_Enum implements self::G /*isEnum*/ { + static const field core::List values = #C22; + static const field self::EnumImplementsS2 a = #C21; + const constructor •(core::int index, core::String name) → self::EnumImplementsS2 + : super core::_Enum::•(index, name) + ; + method toString() → core::String + return "EnumImplementsS2.${this.{core::_Enum::_name}{core::String}}"; +} +class EnumImplementsS3 extends core::_Enum implements self::G> /*isEnum*/ { + static const field core::List values = #C24; + static const field self::EnumImplementsS3 a = #C23; + const constructor •(core::int index, core::String name) → self::EnumImplementsS3 + : super core::_Enum::•(index, name) + ; + method toString() → core::String + return "EnumImplementsS3.${this.{core::_Enum::_name}{core::String}}"; +} +class EnumImplementsS4 extends core::_Enum implements self::G> /*isEnum*/ { + static const field core::List values = #C26; + static const field self::EnumImplementsS4 a = #C25; + const constructor •(core::int index, core::String name) → self::EnumImplementsS4 + : super core::_Enum::•(index, name) + ; + method toString() → core::String + return "EnumImplementsS4.${this.{core::_Enum::_name}{core::String}}"; +} +class EnumImplementsS5 extends core::_Enum implements self::G /*isEnum*/ { + static const field core::List values = #C28; + static const field self::EnumImplementsS5 a = #C27; + const constructor •(core::int index, core::String name) → self::EnumImplementsS5 + : super core::_Enum::•(index, name) + ; + method toString() → core::String + return "EnumImplementsS5.${this.{core::_Enum::_name}{core::String}}"; +} +class EnumImplementsS6 extends core::_Enum implements self::G> /*isEnum*/ { + static const field core::List values = #C30; + static const field self::EnumImplementsS6 a = #C29; + const constructor •(core::int index, core::String name) → self::EnumImplementsS6 + : super core::_Enum::•(index, name) + ; + method toString() → core::String + return "EnumImplementsS6.${this.{core::_Enum::_name}{core::String}}"; +} +class EnumImplementsS7 extends core::_Enum implements self::G /*isEnum*/ { + static const field core::List values = #C32; + static const field self::EnumImplementsS7 a = #C31; + const constructor •(core::int index, core::String name) → self::EnumImplementsS7 + : super core::_Enum::•(index, name) + ; + method toString() → core::String + return "EnumImplementsS7.${this.{core::_Enum::_name}{core::String}}"; +} +class EnumImplementsS8 extends core::_Enum implements self::G /*isEnum*/ { + static const field core::List values = #C34; + static const field self::EnumImplementsS8 a = #C33; + const constructor •(core::int index, core::String name) → self::EnumImplementsS8 + : super core::_Enum::•(index, name) + ; + method toString() → core::String + return "EnumImplementsS8.${this.{core::_Enum::_name}{core::String}}"; +} +abstract class _EnumWithT1&_Enum&F = core::_Enum with self::Class> /*isAnonymousMixin,hasConstConstructor*/ { + const synthetic constructor •(core::int index, core::String _name) → self::_EnumWithT1&_Enum&F + : super core::_Enum::•(index, _name) + ; +} +class EnumWithT1 extends self::_EnumWithT1&_Enum&F /*isEnum*/ { + static const field core::List values = #C36; + static const field self::EnumWithT1 a = #C35; + const constructor •(core::int index, core::String name) → self::EnumWithT1 + : super self::_EnumWithT1&_Enum&F::•(index, name) + ; + method toString() → core::String + return "EnumWithT1.${this.{core::_Enum::_name}{core::String}}"; +} +abstract class _EnumWithT2&_Enum&F = core::_Enum with self::Class /*isAnonymousMixin,hasConstConstructor*/ { + const synthetic constructor •(core::int index, core::String _name) → self::_EnumWithT2&_Enum&F + : super core::_Enum::•(index, _name) + ; +} +class EnumWithT2 extends self::_EnumWithT2&_Enum&F /*isEnum*/ { + static const field core::List values = #C38; + static const field self::EnumWithT2 a = #C37; + const constructor •(core::int index, core::String name) → self::EnumWithT2 + : super self::_EnumWithT2&_Enum&F::•(index, name) + ; + method toString() → core::String + return "EnumWithT2.${this.{core::_Enum::_name}{core::String}}"; +} +abstract class _EnumWithT3&_Enum&F = core::_Enum with self::Class> /*isAnonymousMixin,hasConstConstructor*/ { + const synthetic constructor •(core::int index, core::String _name) → self::_EnumWithT3&_Enum&F + : super core::_Enum::•(index, _name) + ; +} +class EnumWithT3 extends self::_EnumWithT3&_Enum&F /*isEnum*/ { + static const field core::List values = #C40; + static const field self::EnumWithT3 a = #C39; + const constructor •(core::int index, core::String name) → self::EnumWithT3 + : super self::_EnumWithT3&_Enum&F::•(index, name) + ; + method toString() → core::String + return "EnumWithT3.${this.{core::_Enum::_name}{core::String}}"; +} +abstract class _EnumWithT4&_Enum&F = core::_Enum with self::Class> /*isAnonymousMixin,hasConstConstructor*/ { + const synthetic constructor •(core::int index, core::String _name) → self::_EnumWithT4&_Enum&F + : super core::_Enum::•(index, _name) + ; +} +class EnumWithT4 extends self::_EnumWithT4&_Enum&F /*isEnum*/ { + static const field core::List values = #C42; + static const field self::EnumWithT4 a = #C41; + const constructor •(core::int index, core::String name) → self::EnumWithT4 + : super self::_EnumWithT4&_Enum&F::•(index, name) + ; + method toString() → core::String + return "EnumWithT4.${this.{core::_Enum::_name}{core::String}}"; +} +abstract class _EnumWithT5&_Enum&F = core::_Enum with self::Class /*isAnonymousMixin,hasConstConstructor*/ { + const synthetic constructor •(core::int index, core::String _name) → self::_EnumWithT5&_Enum&F + : super core::_Enum::•(index, _name) + ; +} +class EnumWithT5 extends self::_EnumWithT5&_Enum&F /*isEnum*/ { + static const field core::List values = #C44; + static const field self::EnumWithT5 a = #C43; + const constructor •(core::int index, core::String name) → self::EnumWithT5 + : super self::_EnumWithT5&_Enum&F::•(index, name) + ; + method toString() → core::String + return "EnumWithT5.${this.{core::_Enum::_name}{core::String}}"; +} +abstract class _EnumWithT6&_Enum&F = core::_Enum with self::Class> /*isAnonymousMixin,hasConstConstructor*/ { + const synthetic constructor •(core::int index, core::String _name) → self::_EnumWithT6&_Enum&F + : super core::_Enum::•(index, _name) + ; +} +class EnumWithT6 extends self::_EnumWithT6&_Enum&F /*isEnum*/ { + static const field core::List values = #C46; + static const field self::EnumWithT6 a = #C45; + const constructor •(core::int index, core::String name) → self::EnumWithT6 + : super self::_EnumWithT6&_Enum&F::•(index, name) + ; + method toString() → core::String + return "EnumWithT6.${this.{core::_Enum::_name}{core::String}}"; +} +abstract class _EnumWithT7&_Enum&F = core::_Enum with self::Class /*isAnonymousMixin,hasConstConstructor*/ { + const synthetic constructor •(core::int index, core::String _name) → self::_EnumWithT7&_Enum&F + : super core::_Enum::•(index, _name) + ; +} +class EnumWithT7 extends self::_EnumWithT7&_Enum&F /*isEnum*/ { + static const field core::List values = #C48; + static const field self::EnumWithT7 a = #C47; + const constructor •(core::int index, core::String name) → self::EnumWithT7 + : super self::_EnumWithT7&_Enum&F::•(index, name) + ; + method toString() → core::String + return "EnumWithT7.${this.{core::_Enum::_name}{core::String}}"; +} +abstract class _EnumWithT8&_Enum&F = core::_Enum with self::Class /*isAnonymousMixin,hasConstConstructor*/ { + const synthetic constructor •(core::int index, core::String _name) → self::_EnumWithT8&_Enum&F + : super core::_Enum::•(index, _name) + ; +} +class EnumWithT8 extends self::_EnumWithT8&_Enum&F /*isEnum*/ { + static const field core::List values = #C50; + static const field self::EnumWithT8 a = #C49; + const constructor •(core::int index, core::String name) → self::EnumWithT8 + : super self::_EnumWithT8&_Enum&F::•(index, name) + ; + method toString() → core::String + return "EnumWithT8.${this.{core::_Enum::_name}{core::String}}"; +} +abstract class _EnumWithS1&_Enum&G = core::_Enum with self::G> /*isAnonymousMixin,hasConstConstructor*/ { + const synthetic constructor •(core::int index, core::String _name) → self::_EnumWithS1&_Enum&G + : super core::_Enum::•(index, _name) + ; +} +class EnumWithS1 extends self::_EnumWithS1&_Enum&G /*isEnum*/ { + static const field core::List values = #C52; + static const field self::EnumWithS1 a = #C51; + const constructor •(core::int index, core::String name) → self::EnumWithS1 + : super self::_EnumWithS1&_Enum&G::•(index, name) + ; + method toString() → core::String + return "EnumWithS1.${this.{core::_Enum::_name}{core::String}}"; +} +abstract class _EnumWithS2&_Enum&G = core::_Enum with self::G /*isAnonymousMixin,hasConstConstructor*/ { + const synthetic constructor •(core::int index, core::String _name) → self::_EnumWithS2&_Enum&G + : super core::_Enum::•(index, _name) + ; +} +class EnumWithS2 extends self::_EnumWithS2&_Enum&G /*isEnum*/ { + static const field core::List values = #C54; + static const field self::EnumWithS2 a = #C53; + const constructor •(core::int index, core::String name) → self::EnumWithS2 + : super self::_EnumWithS2&_Enum&G::•(index, name) + ; + method toString() → core::String + return "EnumWithS2.${this.{core::_Enum::_name}{core::String}}"; +} +abstract class _EnumWithS3&_Enum&G = core::_Enum with self::G> /*isAnonymousMixin,hasConstConstructor*/ { + const synthetic constructor •(core::int index, core::String _name) → self::_EnumWithS3&_Enum&G + : super core::_Enum::•(index, _name) + ; +} +class EnumWithS3 extends self::_EnumWithS3&_Enum&G /*isEnum*/ { + static const field core::List values = #C56; + static const field self::EnumWithS3 a = #C55; + const constructor •(core::int index, core::String name) → self::EnumWithS3 + : super self::_EnumWithS3&_Enum&G::•(index, name) + ; + method toString() → core::String + return "EnumWithS3.${this.{core::_Enum::_name}{core::String}}"; +} +abstract class _EnumWithS4&_Enum&G = core::_Enum with self::G> /*isAnonymousMixin,hasConstConstructor*/ { + const synthetic constructor •(core::int index, core::String _name) → self::_EnumWithS4&_Enum&G + : super core::_Enum::•(index, _name) + ; +} +class EnumWithS4 extends self::_EnumWithS4&_Enum&G /*isEnum*/ { + static const field core::List values = #C58; + static const field self::EnumWithS4 a = #C57; + const constructor •(core::int index, core::String name) → self::EnumWithS4 + : super self::_EnumWithS4&_Enum&G::•(index, name) + ; + method toString() → core::String + return "EnumWithS4.${this.{core::_Enum::_name}{core::String}}"; +} +abstract class _EnumWithS5&_Enum&G = core::_Enum with self::G /*isAnonymousMixin,hasConstConstructor*/ { + const synthetic constructor •(core::int index, core::String _name) → self::_EnumWithS5&_Enum&G + : super core::_Enum::•(index, _name) + ; +} +class EnumWithS5 extends self::_EnumWithS5&_Enum&G /*isEnum*/ { + static const field core::List values = #C60; + static const field self::EnumWithS5 a = #C59; + const constructor •(core::int index, core::String name) → self::EnumWithS5 + : super self::_EnumWithS5&_Enum&G::•(index, name) + ; + method toString() → core::String + return "EnumWithS5.${this.{core::_Enum::_name}{core::String}}"; +} +abstract class _EnumWithS6&_Enum&G = core::_Enum with self::G> /*isAnonymousMixin,hasConstConstructor*/ { + const synthetic constructor •(core::int index, core::String _name) → self::_EnumWithS6&_Enum&G + : super core::_Enum::•(index, _name) + ; +} +class EnumWithS6 extends self::_EnumWithS6&_Enum&G /*isEnum*/ { + static const field core::List values = #C62; + static const field self::EnumWithS6 a = #C61; + const constructor •(core::int index, core::String name) → self::EnumWithS6 + : super self::_EnumWithS6&_Enum&G::•(index, name) + ; + method toString() → core::String + return "EnumWithS6.${this.{core::_Enum::_name}{core::String}}"; +} +abstract class _EnumWithS7&_Enum&G = core::_Enum with self::G /*isAnonymousMixin,hasConstConstructor*/ { + const synthetic constructor •(core::int index, core::String _name) → self::_EnumWithS7&_Enum&G + : super core::_Enum::•(index, _name) + ; +} +class EnumWithS7 extends self::_EnumWithS7&_Enum&G /*isEnum*/ { + static const field core::List values = #C64; + static const field self::EnumWithS7 a = #C63; + const constructor •(core::int index, core::String name) → self::EnumWithS7 + : super self::_EnumWithS7&_Enum&G::•(index, name) + ; + method toString() → core::String + return "EnumWithS7.${this.{core::_Enum::_name}{core::String}}"; +} +abstract class _EnumWithS8&_Enum&G = core::_Enum with self::G /*isAnonymousMixin,hasConstConstructor*/ { + const synthetic constructor •(core::int index, core::String _name) → self::_EnumWithS8&_Enum&G + : super core::_Enum::•(index, _name) + ; +} +class EnumWithS8 extends self::_EnumWithS8&_Enum&G /*isEnum*/ { + static const field core::List values = #C66; + static const field self::EnumWithS8 a = #C65; + const constructor •(core::int index, core::String name) → self::EnumWithS8 + : super self::_EnumWithS8&_Enum&G::•(index, name) + ; + method toString() → core::String + return "EnumWithS8.${this.{core::_Enum::_name}{core::String}}"; +} +abstract class MixinOnT1 extends self::Class> /*isMixinDeclaration*/ { +} +abstract class MixinOnT2 extends self::Class /*isMixinDeclaration*/ { +} +abstract class MixinOnT3 extends self::Class> /*isMixinDeclaration*/ { +} +abstract class MixinOnT4 extends self::Class> /*isMixinDeclaration*/ { +} +abstract class MixinOnT5 extends self::Class /*isMixinDeclaration*/ { +} +abstract class MixinOnT6 extends self::Class> /*isMixinDeclaration*/ { +} +abstract class MixinOnT7 extends self::Class /*isMixinDeclaration*/ { +} +abstract class MixinOnT8 extends self::Class /*isMixinDeclaration*/ { +} +abstract class MixinOnS1 extends self::G> /*isMixinDeclaration*/ { +} +abstract class MixinOnS2 extends self::G /*isMixinDeclaration*/ { +} +abstract class MixinOnS3 extends self::G> /*isMixinDeclaration*/ { +} +abstract class MixinOnS4 extends self::G> /*isMixinDeclaration*/ { +} +abstract class MixinOnS5 extends self::G /*isMixinDeclaration*/ { +} +abstract class MixinOnS6 extends self::G> /*isMixinDeclaration*/ { +} +abstract class MixinOnS7 extends self::G /*isMixinDeclaration*/ { +} +abstract class MixinOnS8 extends self::G /*isMixinDeclaration*/ { +} +extension ExtensionOnT1 on self::Class> { +} +extension ExtensionOnT2 on self::Class { +} +extension ExtensionOnT3 on self::Class> { +} +extension ExtensionOnT4 on self::Class> { +} +extension ExtensionOnT5 on self::Class { +} +extension ExtensionOnT6 on self::Class> { +} +extension ExtensionOnT7 on self::Class { +} +extension ExtensionOnT8 on self::Class { +} +extension ExtensionOnS1 on self::G> { +} +extension ExtensionOnS2 on self::G { +} +extension ExtensionOnS3 on self::G> { +} +extension ExtensionOnS4 on self::G> { +} +extension ExtensionOnS5 on self::G { +} +extension ExtensionOnS6 on self::G> { +} +extension ExtensionOnS7 on self::G { +} +extension ExtensionOnS8 on self::G { +} +static method main() → dynamic {} +static method _#F#new#tearOff = self::Class>() → self::Class + return new self::Class::•(); + +constants { + #C1 = 0 + #C2 = "a" + #C3 = self::EnumImplementsT1 {index:#C1, _name:#C2} + #C4 = [#C3] + #C5 = self::EnumImplementsT2 {index:#C1, _name:#C2} + #C6 = [#C5] + #C7 = self::EnumImplementsT3 {index:#C1, _name:#C2} + #C8 = [#C7] + #C9 = self::EnumImplementsT4 {index:#C1, _name:#C2} + #C10 = [#C9] + #C11 = self::EnumImplementsT5 {index:#C1, _name:#C2} + #C12 = [#C11] + #C13 = self::EnumImplementsT6 {index:#C1, _name:#C2} + #C14 = [#C13] + #C15 = self::EnumImplementsT7 {index:#C1, _name:#C2} + #C16 = [#C15] + #C17 = self::EnumImplementsT8 {index:#C1, _name:#C2} + #C18 = [#C17] + #C19 = self::EnumImplementsS1 {index:#C1, _name:#C2} + #C20 = [#C19] + #C21 = self::EnumImplementsS2 {index:#C1, _name:#C2} + #C22 = [#C21] + #C23 = self::EnumImplementsS3 {index:#C1, _name:#C2} + #C24 = [#C23] + #C25 = self::EnumImplementsS4 {index:#C1, _name:#C2} + #C26 = [#C25] + #C27 = self::EnumImplementsS5 {index:#C1, _name:#C2} + #C28 = [#C27] + #C29 = self::EnumImplementsS6 {index:#C1, _name:#C2} + #C30 = [#C29] + #C31 = self::EnumImplementsS7 {index:#C1, _name:#C2} + #C32 = [#C31] + #C33 = self::EnumImplementsS8 {index:#C1, _name:#C2} + #C34 = [#C33] + #C35 = self::EnumWithT1 {index:#C1, _name:#C2} + #C36 = [#C35] + #C37 = self::EnumWithT2 {index:#C1, _name:#C2} + #C38 = [#C37] + #C39 = self::EnumWithT3 {index:#C1, _name:#C2} + #C40 = [#C39] + #C41 = self::EnumWithT4 {index:#C1, _name:#C2} + #C42 = [#C41] + #C43 = self::EnumWithT5 {index:#C1, _name:#C2} + #C44 = [#C43] + #C45 = self::EnumWithT6 {index:#C1, _name:#C2} + #C46 = [#C45] + #C47 = self::EnumWithT7 {index:#C1, _name:#C2} + #C48 = [#C47] + #C49 = self::EnumWithT8 {index:#C1, _name:#C2} + #C50 = [#C49] + #C51 = self::EnumWithS1 {index:#C1, _name:#C2} + #C52 = [#C51] + #C53 = self::EnumWithS2 {index:#C1, _name:#C2} + #C54 = [#C53] + #C55 = self::EnumWithS3 {index:#C1, _name:#C2} + #C56 = [#C55] + #C57 = self::EnumWithS4 {index:#C1, _name:#C2} + #C58 = [#C57] + #C59 = self::EnumWithS5 {index:#C1, _name:#C2} + #C60 = [#C59] + #C61 = self::EnumWithS6 {index:#C1, _name:#C2} + #C62 = [#C61] + #C63 = self::EnumWithS7 {index:#C1, _name:#C2} + #C64 = [#C63] + #C65 = self::EnumWithS8 {index:#C1, _name:#C2} + #C66 = [#C65] +} + + +Constructor coverage from constants: +org-dartlang-testcase:///bounds_supertypes.dart: +- EnumImplementsT1. (from org-dartlang-testcase:///bounds_supertypes.dart:109:6) +- _Enum. (from org-dartlang-sdk:///sdk/lib/core/enum.dart:103:9) +- Object. (from org-dartlang-sdk:///sdk/lib/core/object.dart:25:9) +- EnumImplementsT2. (from org-dartlang-testcase:///bounds_supertypes.dart:111:6) +- EnumImplementsT3. (from org-dartlang-testcase:///bounds_supertypes.dart:113:6) +- EnumImplementsT4. (from org-dartlang-testcase:///bounds_supertypes.dart:115:6) +- EnumImplementsT5. (from org-dartlang-testcase:///bounds_supertypes.dart:117:6) +- EnumImplementsT6. (from org-dartlang-testcase:///bounds_supertypes.dart:119:6) +- EnumImplementsT7. (from org-dartlang-testcase:///bounds_supertypes.dart:121:6) +- EnumImplementsT8. (from org-dartlang-testcase:///bounds_supertypes.dart:123:6) +- EnumImplementsS1. (from org-dartlang-testcase:///bounds_supertypes.dart:125:6) +- EnumImplementsS2. (from org-dartlang-testcase:///bounds_supertypes.dart:127:6) +- EnumImplementsS3. (from org-dartlang-testcase:///bounds_supertypes.dart:129:6) +- EnumImplementsS4. (from org-dartlang-testcase:///bounds_supertypes.dart:131:6) +- EnumImplementsS5. (from org-dartlang-testcase:///bounds_supertypes.dart:133:6) +- EnumImplementsS6. (from org-dartlang-testcase:///bounds_supertypes.dart:135:6) +- EnumImplementsS7. (from org-dartlang-testcase:///bounds_supertypes.dart:137:6) +- EnumImplementsS8. (from org-dartlang-testcase:///bounds_supertypes.dart:139:6) +- EnumWithT1. (from org-dartlang-testcase:///bounds_supertypes.dart:141:6) +- _EnumWithT1&_Enum&F. (from org-dartlang-testcase:///bounds_supertypes.dart:141:6) +- EnumWithT2. (from org-dartlang-testcase:///bounds_supertypes.dart:143:6) +- _EnumWithT2&_Enum&F. (from org-dartlang-testcase:///bounds_supertypes.dart:143:6) +- EnumWithT3. (from org-dartlang-testcase:///bounds_supertypes.dart:145:6) +- _EnumWithT3&_Enum&F. (from org-dartlang-testcase:///bounds_supertypes.dart:145:6) +- EnumWithT4. (from org-dartlang-testcase:///bounds_supertypes.dart:147:6) +- _EnumWithT4&_Enum&F. (from org-dartlang-testcase:///bounds_supertypes.dart:147:6) +- EnumWithT5. (from org-dartlang-testcase:///bounds_supertypes.dart:149:6) +- _EnumWithT5&_Enum&F. (from org-dartlang-testcase:///bounds_supertypes.dart:149:6) +- EnumWithT6. (from org-dartlang-testcase:///bounds_supertypes.dart:151:6) +- _EnumWithT6&_Enum&F. (from org-dartlang-testcase:///bounds_supertypes.dart:151:6) +- EnumWithT7. (from org-dartlang-testcase:///bounds_supertypes.dart:153:6) +- _EnumWithT7&_Enum&F. (from org-dartlang-testcase:///bounds_supertypes.dart:153:6) +- EnumWithT8. (from org-dartlang-testcase:///bounds_supertypes.dart:155:6) +- _EnumWithT8&_Enum&F. (from org-dartlang-testcase:///bounds_supertypes.dart:155:6) +- EnumWithS1. (from org-dartlang-testcase:///bounds_supertypes.dart:157:6) +- _EnumWithS1&_Enum&G. (from org-dartlang-testcase:///bounds_supertypes.dart:157:6) +- EnumWithS2. (from org-dartlang-testcase:///bounds_supertypes.dart:159:6) +- _EnumWithS2&_Enum&G. (from org-dartlang-testcase:///bounds_supertypes.dart:159:6) +- EnumWithS3. (from org-dartlang-testcase:///bounds_supertypes.dart:161:6) +- _EnumWithS3&_Enum&G. (from org-dartlang-testcase:///bounds_supertypes.dart:161:6) +- EnumWithS4. (from org-dartlang-testcase:///bounds_supertypes.dart:163:6) +- _EnumWithS4&_Enum&G. (from org-dartlang-testcase:///bounds_supertypes.dart:163:6) +- EnumWithS5. (from org-dartlang-testcase:///bounds_supertypes.dart:165:6) +- _EnumWithS5&_Enum&G. (from org-dartlang-testcase:///bounds_supertypes.dart:165:6) +- EnumWithS6. (from org-dartlang-testcase:///bounds_supertypes.dart:167:6) +- _EnumWithS6&_Enum&G. (from org-dartlang-testcase:///bounds_supertypes.dart:167:6) +- EnumWithS7. (from org-dartlang-testcase:///bounds_supertypes.dart:169:6) +- _EnumWithS7&_Enum&G. (from org-dartlang-testcase:///bounds_supertypes.dart:169:6) +- EnumWithS8. (from org-dartlang-testcase:///bounds_supertypes.dart:171:6) +- _EnumWithS8&_Enum&G. (from org-dartlang-testcase:///bounds_supertypes.dart:171:6) diff --git a/pkg/front_end/testcases/general/bounds_supertypes.dart.weak.modular.expect b/pkg/front_end/testcases/general/bounds_supertypes.dart.weak.modular.expect new file mode 100644 index 00000000000..4b8667d478e --- /dev/null +++ b/pkg/front_end/testcases/general/bounds_supertypes.dart.weak.modular.expect @@ -0,0 +1,1599 @@ +library /*isNonNullableByDefault*/; +// +// Problems in library: +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:13:25: Error: Inferred type argument 'Class' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try specifying type arguments explicitly so that they conform to the bounds. +// class ExtendsT1 extends F {} // Error +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = Class; +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:15:25: Error: Type argument 'dynamic' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// class ExtendsT2 extends F {} // Error +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = Class; +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:17:25: Error: Type argument 'Class' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// class ExtendsT3 extends F {} // Error +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = Class; +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:19:25: Error: Type argument 'Class' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// class ExtendsT4 extends F> {} // Error +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = Class; +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:25:25: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// class ExtendsT7 extends F {} // Error +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = Class; +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:27:25: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// class ExtendsT8 extends F {} // Error +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = Class; +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:29:25: Error: Inferred type argument 'Class' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try specifying type arguments explicitly so that they conform to the bounds. +// class ExtendsS1 extends G {} // Error +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:31:25: Error: Type argument 'dynamic' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// class ExtendsS2 extends G {} // Error +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:33:25: Error: Type argument 'Class' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// class ExtendsS3 extends G {} // Error +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:35:25: Error: Type argument 'Class' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// class ExtendsS4 extends G> {} // Error +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:41:25: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// class ExtendsS7 extends G {} // Error +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:43:25: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// class ExtendsS8 extends G {} // Error +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:45:31: Error: Inferred type argument 'Class' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try specifying type arguments explicitly so that they conform to the bounds. +// class ImplementsT1 implements F {} // Error +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = Class; +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:47:31: Error: Type argument 'dynamic' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// class ImplementsT2 implements F {} // Error +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = Class; +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:49:31: Error: Type argument 'Class' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// class ImplementsT3 implements F {} // Error +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = Class; +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:51:31: Error: Type argument 'Class' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// class ImplementsT4 implements F> {} // Error +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = Class; +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:57:31: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// class ImplementsT7 implements F {} // Error +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = Class; +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:59:31: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// class ImplementsT8 implements F {} // Error +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = Class; +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:61:31: Error: Inferred type argument 'Class' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try specifying type arguments explicitly so that they conform to the bounds. +// class ImplementsS1 implements G {} // Error +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:63:31: Error: Type argument 'dynamic' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// class ImplementsS2 implements G {} // Error +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:65:31: Error: Type argument 'Class' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// class ImplementsS3 implements G {} // Error +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:67:31: Error: Type argument 'Class' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// class ImplementsS4 implements G> {} // Error +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:73:31: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// class ImplementsS7 implements G {} // Error +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:75:31: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// class ImplementsS8 implements G {} // Error +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:77:19: Error: Inferred type argument 'Class' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try specifying type arguments explicitly so that they conform to the bounds. +// class WithT1 with F {} // Error +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = Class; +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:79:19: Error: Type argument 'dynamic' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// class WithT2 with F {} // Error +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = Class; +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:81:19: Error: Type argument 'Class' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// class WithT3 with F {} // Error +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = Class; +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:83:19: Error: Type argument 'Class' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// class WithT4 with F> {} // Error +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = Class; +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:89:19: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// class WithT7 with F {} // Error +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = Class; +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:91:19: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// class WithT8 with F {} // Error +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = Class; +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:109:34: Error: Inferred type argument 'Class' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try specifying type arguments explicitly so that they conform to the bounds. +// enum EnumImplementsT1 implements F /* Error */ { a } +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = Class; +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:111:34: Error: Type argument 'dynamic' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// enum EnumImplementsT2 implements F /* Error */ { a } +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = Class; +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:113:34: Error: Type argument 'Class' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// enum EnumImplementsT3 implements F /* Error */ { a } +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = Class; +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:115:34: Error: Type argument 'Class' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// enum EnumImplementsT4 implements F> /* Error */ { a } +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = Class; +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:121:34: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// enum EnumImplementsT7 implements F /* Error */ { a } +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = Class; +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:123:34: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// enum EnumImplementsT8 implements F /* Error */ { a } +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = Class; +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:125:34: Error: Inferred type argument 'Class' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try specifying type arguments explicitly so that they conform to the bounds. +// enum EnumImplementsS1 implements G /* Error */ { a } +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:127:34: Error: Type argument 'dynamic' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// enum EnumImplementsS2 implements G /* Error */ { a } +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:129:34: Error: Type argument 'Class' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// enum EnumImplementsS3 implements G /* Error */ { a } +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:131:34: Error: Type argument 'Class' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// enum EnumImplementsS4 implements G> /* Error */ { a } +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:137:34: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// enum EnumImplementsS7 implements G /* Error */ { a } +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:139:34: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// enum EnumImplementsS8 implements G /* Error */ { a } +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:141:22: Error: Inferred type argument 'Class' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try specifying type arguments explicitly so that they conform to the bounds. +// enum EnumWithT1 with F /* Error */ { a } +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = Class; +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:143:22: Error: Type argument 'dynamic' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// enum EnumWithT2 with F /* Error */ { a } +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = Class; +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:145:22: Error: Type argument 'Class' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// enum EnumWithT3 with F /* Error */ { a } +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = Class; +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:147:22: Error: Type argument 'Class' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// enum EnumWithT4 with F> /* Error */ { a } +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = Class; +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:153:22: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// enum EnumWithT7 with F /* Error */ { a } +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = Class; +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:155:22: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// enum EnumWithT8 with F /* Error */ { a } +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = Class; +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:173:20: Error: Inferred type argument 'Class' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try specifying type arguments explicitly so that they conform to the bounds. +// mixin MixinOnT1 on F {} // Error +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = Class; +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:175:20: Error: Type argument 'dynamic' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// mixin MixinOnT2 on F {} // Error +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = Class; +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:177:20: Error: Type argument 'Class' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// mixin MixinOnT3 on F {} // Error +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = Class; +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:179:20: Error: Type argument 'Class' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// mixin MixinOnT4 on F> {} // Error +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = Class; +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:185:20: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// mixin MixinOnT7 on F {} // Error +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = Class; +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:187:20: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// mixin MixinOnT8 on F {} // Error +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = Class; +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:189:20: Error: Inferred type argument 'Class' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try specifying type arguments explicitly so that they conform to the bounds. +// mixin MixinOnS1 on G {} // Error +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:191:20: Error: Type argument 'dynamic' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// mixin MixinOnS2 on G {} // Error +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:193:20: Error: Type argument 'Class' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// mixin MixinOnS3 on G {} // Error +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:195:20: Error: Type argument 'Class' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// mixin MixinOnS4 on G> {} // Error +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:201:20: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// mixin MixinOnS7 on G {} // Error +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:203:20: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// mixin MixinOnS8 on G {} // Error +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:217:28: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// extension ExtensionOnT7 on F {} // Error +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = Class; +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:219:28: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// extension ExtensionOnT8 on F {} // Error +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = Class; +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:233:28: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// extension ExtensionOnS7 on G {} // Error +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:235:28: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// extension ExtensionOnS8 on G {} // Error +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:93:19: Error: Inferred type argument 'Class' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try specifying type arguments explicitly so that they conform to the bounds. +// class WithS1 with G {} // Error +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:95:19: Error: Type argument 'dynamic' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// class WithS2 with G {} // Error +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:97:19: Error: Type argument 'Class' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// class WithS3 with G {} // Error +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:99:19: Error: Type argument 'Class' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// class WithS4 with G> {} // Error +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:105:19: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// class WithS7 with G {} // Error +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:107:19: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// class WithS8 with G {} // Error +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:157:22: Error: Inferred type argument 'Class' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try specifying type arguments explicitly so that they conform to the bounds. +// enum EnumWithS1 with G /* Error */ { a } +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:159:22: Error: Type argument 'dynamic' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// enum EnumWithS2 with G /* Error */ { a } +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:161:22: Error: Type argument 'Class' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// enum EnumWithS3 with G /* Error */ { a } +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:163:22: Error: Type argument 'Class' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// enum EnumWithS4 with G> /* Error */ { a } +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:169:22: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// enum EnumWithS7 with G /* Error */ { a } +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:171:22: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// enum EnumWithS8 with G /* Error */ { a } +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +import self as self; +import "dart:core" as core; + +typedef F = self::Class> = self::Class; +class Class extends core::Object { + synthetic constructor •() → self::Class + : super core::Object::•() + ; +} +class ConcreteClass extends core::Object implements self::Class { + synthetic constructor •() → self::ConcreteClass + : super core::Object::•() + ; +} +class G = self::Class> extends core::Object { + synthetic constructor •() → self::G + : super core::Object::•() + ; +} +class ExtendsT1 extends self::Class> { + synthetic constructor •() → self::ExtendsT1 + : super self::Class::•() + ; +} +class ExtendsT2 extends self::Class { + synthetic constructor •() → self::ExtendsT2 + : super self::Class::•() + ; +} +class ExtendsT3 extends self::Class> { + synthetic constructor •() → self::ExtendsT3 + : super self::Class::•() + ; +} +class ExtendsT4 extends self::Class> { + synthetic constructor •() → self::ExtendsT4 + : super self::Class::•() + ; +} +class ExtendsT5 extends self::Class { + synthetic constructor •() → self::ExtendsT5 + : super self::Class::•() + ; +} +class ExtendsT6 extends self::Class> { + synthetic constructor •() → self::ExtendsT6 + : super self::Class::•() + ; +} +class ExtendsT7 extends self::Class { + synthetic constructor •() → self::ExtendsT7 + : super self::Class::•() + ; +} +class ExtendsT8 extends self::Class { + synthetic constructor •() → self::ExtendsT8 + : super self::Class::•() + ; +} +class ExtendsS1 extends self::G> { + synthetic constructor •() → self::ExtendsS1 + : super self::G::•() + ; +} +class ExtendsS2 extends self::G { + synthetic constructor •() → self::ExtendsS2 + : super self::G::•() + ; +} +class ExtendsS3 extends self::G> { + synthetic constructor •() → self::ExtendsS3 + : super self::G::•() + ; +} +class ExtendsS4 extends self::G> { + synthetic constructor •() → self::ExtendsS4 + : super self::G::•() + ; +} +class ExtendsS5 extends self::G { + synthetic constructor •() → self::ExtendsS5 + : super self::G::•() + ; +} +class ExtendsS6 extends self::G> { + synthetic constructor •() → self::ExtendsS6 + : super self::G::•() + ; +} +class ExtendsS7 extends self::G { + synthetic constructor •() → self::ExtendsS7 + : super self::G::•() + ; +} +class ExtendsS8 extends self::G { + synthetic constructor •() → self::ExtendsS8 + : super self::G::•() + ; +} +class ImplementsT1 extends core::Object implements self::Class> { + synthetic constructor •() → self::ImplementsT1 + : super core::Object::•() + ; +} +class ImplementsT2 extends core::Object implements self::Class { + synthetic constructor •() → self::ImplementsT2 + : super core::Object::•() + ; +} +class ImplementsT3 extends core::Object implements self::Class> { + synthetic constructor •() → self::ImplementsT3 + : super core::Object::•() + ; +} +class ImplementsT4 extends core::Object implements self::Class> { + synthetic constructor •() → self::ImplementsT4 + : super core::Object::•() + ; +} +class ImplementsT5 extends core::Object implements self::Class { + synthetic constructor •() → self::ImplementsT5 + : super core::Object::•() + ; +} +class ImplementsT6 extends core::Object implements self::Class> { + synthetic constructor •() → self::ImplementsT6 + : super core::Object::•() + ; +} +class ImplementsT7 extends core::Object implements self::Class { + synthetic constructor •() → self::ImplementsT7 + : super core::Object::•() + ; +} +class ImplementsT8 extends core::Object implements self::Class { + synthetic constructor •() → self::ImplementsT8 + : super core::Object::•() + ; +} +class ImplementsS1 extends core::Object implements self::G> { + synthetic constructor •() → self::ImplementsS1 + : super core::Object::•() + ; +} +class ImplementsS2 extends core::Object implements self::G { + synthetic constructor •() → self::ImplementsS2 + : super core::Object::•() + ; +} +class ImplementsS3 extends core::Object implements self::G> { + synthetic constructor •() → self::ImplementsS3 + : super core::Object::•() + ; +} +class ImplementsS4 extends core::Object implements self::G> { + synthetic constructor •() → self::ImplementsS4 + : super core::Object::•() + ; +} +class ImplementsS5 extends core::Object implements self::G { + synthetic constructor •() → self::ImplementsS5 + : super core::Object::•() + ; +} +class ImplementsS6 extends core::Object implements self::G> { + synthetic constructor •() → self::ImplementsS6 + : super core::Object::•() + ; +} +class ImplementsS7 extends core::Object implements self::G { + synthetic constructor •() → self::ImplementsS7 + : super core::Object::•() + ; +} +class ImplementsS8 extends core::Object implements self::G { + synthetic constructor •() → self::ImplementsS8 + : super core::Object::•() + ; +} +abstract class _WithT1&Object&F = core::Object with self::Class> /*isAnonymousMixin,hasConstConstructor*/ { + const synthetic constructor •() → self::_WithT1&Object&F + : super core::Object::•() + ; +} +class WithT1 extends self::_WithT1&Object&F { + synthetic constructor •() → self::WithT1 + : super self::_WithT1&Object&F::•() + ; +} +abstract class _WithT2&Object&F = core::Object with self::Class /*isAnonymousMixin,hasConstConstructor*/ { + const synthetic constructor •() → self::_WithT2&Object&F + : super core::Object::•() + ; +} +class WithT2 extends self::_WithT2&Object&F { + synthetic constructor •() → self::WithT2 + : super self::_WithT2&Object&F::•() + ; +} +abstract class _WithT3&Object&F = core::Object with self::Class> /*isAnonymousMixin,hasConstConstructor*/ { + const synthetic constructor •() → self::_WithT3&Object&F + : super core::Object::•() + ; +} +class WithT3 extends self::_WithT3&Object&F { + synthetic constructor •() → self::WithT3 + : super self::_WithT3&Object&F::•() + ; +} +abstract class _WithT4&Object&F = core::Object with self::Class> /*isAnonymousMixin,hasConstConstructor*/ { + const synthetic constructor •() → self::_WithT4&Object&F + : super core::Object::•() + ; +} +class WithT4 extends self::_WithT4&Object&F { + synthetic constructor •() → self::WithT4 + : super self::_WithT4&Object&F::•() + ; +} +abstract class _WithT5&Object&F = core::Object with self::Class /*isAnonymousMixin,hasConstConstructor*/ { + const synthetic constructor •() → self::_WithT5&Object&F + : super core::Object::•() + ; +} +class WithT5 extends self::_WithT5&Object&F { + synthetic constructor •() → self::WithT5 + : super self::_WithT5&Object&F::•() + ; +} +abstract class _WithT6&Object&F = core::Object with self::Class> /*isAnonymousMixin,hasConstConstructor*/ { + const synthetic constructor •() → self::_WithT6&Object&F + : super core::Object::•() + ; +} +class WithT6 extends self::_WithT6&Object&F { + synthetic constructor •() → self::WithT6 + : super self::_WithT6&Object&F::•() + ; +} +abstract class _WithT7&Object&F = core::Object with self::Class /*isAnonymousMixin,hasConstConstructor*/ { + const synthetic constructor •() → self::_WithT7&Object&F + : super core::Object::•() + ; +} +class WithT7 extends self::_WithT7&Object&F { + synthetic constructor •() → self::WithT7 + : super self::_WithT7&Object&F::•() + ; +} +abstract class _WithT8&Object&F = core::Object with self::Class /*isAnonymousMixin,hasConstConstructor*/ { + const synthetic constructor •() → self::_WithT8&Object&F + : super core::Object::•() + ; +} +class WithT8 extends self::_WithT8&Object&F { + synthetic constructor •() → self::WithT8 + : super self::_WithT8&Object&F::•() + ; +} +abstract class _WithS1&Object&G = core::Object with self::G> /*isAnonymousMixin,hasConstConstructor*/ { + const synthetic constructor •() → self::_WithS1&Object&G + : super core::Object::•() + ; +} +class WithS1 extends self::_WithS1&Object&G { + synthetic constructor •() → self::WithS1 + : super self::_WithS1&Object&G::•() + ; +} +abstract class _WithS2&Object&G = core::Object with self::G /*isAnonymousMixin,hasConstConstructor*/ { + const synthetic constructor •() → self::_WithS2&Object&G + : super core::Object::•() + ; +} +class WithS2 extends self::_WithS2&Object&G { + synthetic constructor •() → self::WithS2 + : super self::_WithS2&Object&G::•() + ; +} +abstract class _WithS3&Object&G = core::Object with self::G> /*isAnonymousMixin,hasConstConstructor*/ { + const synthetic constructor •() → self::_WithS3&Object&G + : super core::Object::•() + ; +} +class WithS3 extends self::_WithS3&Object&G { + synthetic constructor •() → self::WithS3 + : super self::_WithS3&Object&G::•() + ; +} +abstract class _WithS4&Object&G = core::Object with self::G> /*isAnonymousMixin,hasConstConstructor*/ { + const synthetic constructor •() → self::_WithS4&Object&G + : super core::Object::•() + ; +} +class WithS4 extends self::_WithS4&Object&G { + synthetic constructor •() → self::WithS4 + : super self::_WithS4&Object&G::•() + ; +} +abstract class _WithS5&Object&G = core::Object with self::G /*isAnonymousMixin,hasConstConstructor*/ { + const synthetic constructor •() → self::_WithS5&Object&G + : super core::Object::•() + ; +} +class WithS5 extends self::_WithS5&Object&G { + synthetic constructor •() → self::WithS5 + : super self::_WithS5&Object&G::•() + ; +} +abstract class _WithS6&Object&G = core::Object with self::G> /*isAnonymousMixin,hasConstConstructor*/ { + const synthetic constructor •() → self::_WithS6&Object&G + : super core::Object::•() + ; +} +class WithS6 extends self::_WithS6&Object&G { + synthetic constructor •() → self::WithS6 + : super self::_WithS6&Object&G::•() + ; +} +abstract class _WithS7&Object&G = core::Object with self::G /*isAnonymousMixin,hasConstConstructor*/ { + const synthetic constructor •() → self::_WithS7&Object&G + : super core::Object::•() + ; +} +class WithS7 extends self::_WithS7&Object&G { + synthetic constructor •() → self::WithS7 + : super self::_WithS7&Object&G::•() + ; +} +abstract class _WithS8&Object&G = core::Object with self::G /*isAnonymousMixin,hasConstConstructor*/ { + const synthetic constructor •() → self::_WithS8&Object&G + : super core::Object::•() + ; +} +class WithS8 extends self::_WithS8&Object&G { + synthetic constructor •() → self::WithS8 + : super self::_WithS8&Object&G::•() + ; +} +class EnumImplementsT1 extends core::_Enum implements self::Class> /*isEnum*/ { + static const field core::List values = #C4; + static const field self::EnumImplementsT1 a = #C3; + const constructor •(core::int index, core::String name) → self::EnumImplementsT1 + : super core::_Enum::•(index, name) + ; + method toString() → core::String + return "EnumImplementsT1.${this.{core::_Enum::_name}{core::String}}"; +} +class EnumImplementsT2 extends core::_Enum implements self::Class /*isEnum*/ { + static const field core::List values = #C6; + static const field self::EnumImplementsT2 a = #C5; + const constructor •(core::int index, core::String name) → self::EnumImplementsT2 + : super core::_Enum::•(index, name) + ; + method toString() → core::String + return "EnumImplementsT2.${this.{core::_Enum::_name}{core::String}}"; +} +class EnumImplementsT3 extends core::_Enum implements self::Class> /*isEnum*/ { + static const field core::List values = #C8; + static const field self::EnumImplementsT3 a = #C7; + const constructor •(core::int index, core::String name) → self::EnumImplementsT3 + : super core::_Enum::•(index, name) + ; + method toString() → core::String + return "EnumImplementsT3.${this.{core::_Enum::_name}{core::String}}"; +} +class EnumImplementsT4 extends core::_Enum implements self::Class> /*isEnum*/ { + static const field core::List values = #C10; + static const field self::EnumImplementsT4 a = #C9; + const constructor •(core::int index, core::String name) → self::EnumImplementsT4 + : super core::_Enum::•(index, name) + ; + method toString() → core::String + return "EnumImplementsT4.${this.{core::_Enum::_name}{core::String}}"; +} +class EnumImplementsT5 extends core::_Enum implements self::Class /*isEnum*/ { + static const field core::List values = #C12; + static const field self::EnumImplementsT5 a = #C11; + const constructor •(core::int index, core::String name) → self::EnumImplementsT5 + : super core::_Enum::•(index, name) + ; + method toString() → core::String + return "EnumImplementsT5.${this.{core::_Enum::_name}{core::String}}"; +} +class EnumImplementsT6 extends core::_Enum implements self::Class> /*isEnum*/ { + static const field core::List values = #C14; + static const field self::EnumImplementsT6 a = #C13; + const constructor •(core::int index, core::String name) → self::EnumImplementsT6 + : super core::_Enum::•(index, name) + ; + method toString() → core::String + return "EnumImplementsT6.${this.{core::_Enum::_name}{core::String}}"; +} +class EnumImplementsT7 extends core::_Enum implements self::Class /*isEnum*/ { + static const field core::List values = #C16; + static const field self::EnumImplementsT7 a = #C15; + const constructor •(core::int index, core::String name) → self::EnumImplementsT7 + : super core::_Enum::•(index, name) + ; + method toString() → core::String + return "EnumImplementsT7.${this.{core::_Enum::_name}{core::String}}"; +} +class EnumImplementsT8 extends core::_Enum implements self::Class /*isEnum*/ { + static const field core::List values = #C18; + static const field self::EnumImplementsT8 a = #C17; + const constructor •(core::int index, core::String name) → self::EnumImplementsT8 + : super core::_Enum::•(index, name) + ; + method toString() → core::String + return "EnumImplementsT8.${this.{core::_Enum::_name}{core::String}}"; +} +class EnumImplementsS1 extends core::_Enum implements self::G> /*isEnum*/ { + static const field core::List values = #C20; + static const field self::EnumImplementsS1 a = #C19; + const constructor •(core::int index, core::String name) → self::EnumImplementsS1 + : super core::_Enum::•(index, name) + ; + method toString() → core::String + return "EnumImplementsS1.${this.{core::_Enum::_name}{core::String}}"; +} +class EnumImplementsS2 extends core::_Enum implements self::G /*isEnum*/ { + static const field core::List values = #C22; + static const field self::EnumImplementsS2 a = #C21; + const constructor •(core::int index, core::String name) → self::EnumImplementsS2 + : super core::_Enum::•(index, name) + ; + method toString() → core::String + return "EnumImplementsS2.${this.{core::_Enum::_name}{core::String}}"; +} +class EnumImplementsS3 extends core::_Enum implements self::G> /*isEnum*/ { + static const field core::List values = #C24; + static const field self::EnumImplementsS3 a = #C23; + const constructor •(core::int index, core::String name) → self::EnumImplementsS3 + : super core::_Enum::•(index, name) + ; + method toString() → core::String + return "EnumImplementsS3.${this.{core::_Enum::_name}{core::String}}"; +} +class EnumImplementsS4 extends core::_Enum implements self::G> /*isEnum*/ { + static const field core::List values = #C26; + static const field self::EnumImplementsS4 a = #C25; + const constructor •(core::int index, core::String name) → self::EnumImplementsS4 + : super core::_Enum::•(index, name) + ; + method toString() → core::String + return "EnumImplementsS4.${this.{core::_Enum::_name}{core::String}}"; +} +class EnumImplementsS5 extends core::_Enum implements self::G /*isEnum*/ { + static const field core::List values = #C28; + static const field self::EnumImplementsS5 a = #C27; + const constructor •(core::int index, core::String name) → self::EnumImplementsS5 + : super core::_Enum::•(index, name) + ; + method toString() → core::String + return "EnumImplementsS5.${this.{core::_Enum::_name}{core::String}}"; +} +class EnumImplementsS6 extends core::_Enum implements self::G> /*isEnum*/ { + static const field core::List values = #C30; + static const field self::EnumImplementsS6 a = #C29; + const constructor •(core::int index, core::String name) → self::EnumImplementsS6 + : super core::_Enum::•(index, name) + ; + method toString() → core::String + return "EnumImplementsS6.${this.{core::_Enum::_name}{core::String}}"; +} +class EnumImplementsS7 extends core::_Enum implements self::G /*isEnum*/ { + static const field core::List values = #C32; + static const field self::EnumImplementsS7 a = #C31; + const constructor •(core::int index, core::String name) → self::EnumImplementsS7 + : super core::_Enum::•(index, name) + ; + method toString() → core::String + return "EnumImplementsS7.${this.{core::_Enum::_name}{core::String}}"; +} +class EnumImplementsS8 extends core::_Enum implements self::G /*isEnum*/ { + static const field core::List values = #C34; + static const field self::EnumImplementsS8 a = #C33; + const constructor •(core::int index, core::String name) → self::EnumImplementsS8 + : super core::_Enum::•(index, name) + ; + method toString() → core::String + return "EnumImplementsS8.${this.{core::_Enum::_name}{core::String}}"; +} +abstract class _EnumWithT1&_Enum&F = core::_Enum with self::Class> /*isAnonymousMixin,hasConstConstructor*/ { + const synthetic constructor •(core::int index, core::String _name) → self::_EnumWithT1&_Enum&F + : super core::_Enum::•(index, _name) + ; +} +class EnumWithT1 extends self::_EnumWithT1&_Enum&F /*isEnum*/ { + static const field core::List values = #C36; + static const field self::EnumWithT1 a = #C35; + const constructor •(core::int index, core::String name) → self::EnumWithT1 + : super self::_EnumWithT1&_Enum&F::•(index, name) + ; + method toString() → core::String + return "EnumWithT1.${this.{core::_Enum::_name}{core::String}}"; +} +abstract class _EnumWithT2&_Enum&F = core::_Enum with self::Class /*isAnonymousMixin,hasConstConstructor*/ { + const synthetic constructor •(core::int index, core::String _name) → self::_EnumWithT2&_Enum&F + : super core::_Enum::•(index, _name) + ; +} +class EnumWithT2 extends self::_EnumWithT2&_Enum&F /*isEnum*/ { + static const field core::List values = #C38; + static const field self::EnumWithT2 a = #C37; + const constructor •(core::int index, core::String name) → self::EnumWithT2 + : super self::_EnumWithT2&_Enum&F::•(index, name) + ; + method toString() → core::String + return "EnumWithT2.${this.{core::_Enum::_name}{core::String}}"; +} +abstract class _EnumWithT3&_Enum&F = core::_Enum with self::Class> /*isAnonymousMixin,hasConstConstructor*/ { + const synthetic constructor •(core::int index, core::String _name) → self::_EnumWithT3&_Enum&F + : super core::_Enum::•(index, _name) + ; +} +class EnumWithT3 extends self::_EnumWithT3&_Enum&F /*isEnum*/ { + static const field core::List values = #C40; + static const field self::EnumWithT3 a = #C39; + const constructor •(core::int index, core::String name) → self::EnumWithT3 + : super self::_EnumWithT3&_Enum&F::•(index, name) + ; + method toString() → core::String + return "EnumWithT3.${this.{core::_Enum::_name}{core::String}}"; +} +abstract class _EnumWithT4&_Enum&F = core::_Enum with self::Class> /*isAnonymousMixin,hasConstConstructor*/ { + const synthetic constructor •(core::int index, core::String _name) → self::_EnumWithT4&_Enum&F + : super core::_Enum::•(index, _name) + ; +} +class EnumWithT4 extends self::_EnumWithT4&_Enum&F /*isEnum*/ { + static const field core::List values = #C42; + static const field self::EnumWithT4 a = #C41; + const constructor •(core::int index, core::String name) → self::EnumWithT4 + : super self::_EnumWithT4&_Enum&F::•(index, name) + ; + method toString() → core::String + return "EnumWithT4.${this.{core::_Enum::_name}{core::String}}"; +} +abstract class _EnumWithT5&_Enum&F = core::_Enum with self::Class /*isAnonymousMixin,hasConstConstructor*/ { + const synthetic constructor •(core::int index, core::String _name) → self::_EnumWithT5&_Enum&F + : super core::_Enum::•(index, _name) + ; +} +class EnumWithT5 extends self::_EnumWithT5&_Enum&F /*isEnum*/ { + static const field core::List values = #C44; + static const field self::EnumWithT5 a = #C43; + const constructor •(core::int index, core::String name) → self::EnumWithT5 + : super self::_EnumWithT5&_Enum&F::•(index, name) + ; + method toString() → core::String + return "EnumWithT5.${this.{core::_Enum::_name}{core::String}}"; +} +abstract class _EnumWithT6&_Enum&F = core::_Enum with self::Class> /*isAnonymousMixin,hasConstConstructor*/ { + const synthetic constructor •(core::int index, core::String _name) → self::_EnumWithT6&_Enum&F + : super core::_Enum::•(index, _name) + ; +} +class EnumWithT6 extends self::_EnumWithT6&_Enum&F /*isEnum*/ { + static const field core::List values = #C46; + static const field self::EnumWithT6 a = #C45; + const constructor •(core::int index, core::String name) → self::EnumWithT6 + : super self::_EnumWithT6&_Enum&F::•(index, name) + ; + method toString() → core::String + return "EnumWithT6.${this.{core::_Enum::_name}{core::String}}"; +} +abstract class _EnumWithT7&_Enum&F = core::_Enum with self::Class /*isAnonymousMixin,hasConstConstructor*/ { + const synthetic constructor •(core::int index, core::String _name) → self::_EnumWithT7&_Enum&F + : super core::_Enum::•(index, _name) + ; +} +class EnumWithT7 extends self::_EnumWithT7&_Enum&F /*isEnum*/ { + static const field core::List values = #C48; + static const field self::EnumWithT7 a = #C47; + const constructor •(core::int index, core::String name) → self::EnumWithT7 + : super self::_EnumWithT7&_Enum&F::•(index, name) + ; + method toString() → core::String + return "EnumWithT7.${this.{core::_Enum::_name}{core::String}}"; +} +abstract class _EnumWithT8&_Enum&F = core::_Enum with self::Class /*isAnonymousMixin,hasConstConstructor*/ { + const synthetic constructor •(core::int index, core::String _name) → self::_EnumWithT8&_Enum&F + : super core::_Enum::•(index, _name) + ; +} +class EnumWithT8 extends self::_EnumWithT8&_Enum&F /*isEnum*/ { + static const field core::List values = #C50; + static const field self::EnumWithT8 a = #C49; + const constructor •(core::int index, core::String name) → self::EnumWithT8 + : super self::_EnumWithT8&_Enum&F::•(index, name) + ; + method toString() → core::String + return "EnumWithT8.${this.{core::_Enum::_name}{core::String}}"; +} +abstract class _EnumWithS1&_Enum&G = core::_Enum with self::G> /*isAnonymousMixin,hasConstConstructor*/ { + const synthetic constructor •(core::int index, core::String _name) → self::_EnumWithS1&_Enum&G + : super core::_Enum::•(index, _name) + ; +} +class EnumWithS1 extends self::_EnumWithS1&_Enum&G /*isEnum*/ { + static const field core::List values = #C52; + static const field self::EnumWithS1 a = #C51; + const constructor •(core::int index, core::String name) → self::EnumWithS1 + : super self::_EnumWithS1&_Enum&G::•(index, name) + ; + method toString() → core::String + return "EnumWithS1.${this.{core::_Enum::_name}{core::String}}"; +} +abstract class _EnumWithS2&_Enum&G = core::_Enum with self::G /*isAnonymousMixin,hasConstConstructor*/ { + const synthetic constructor •(core::int index, core::String _name) → self::_EnumWithS2&_Enum&G + : super core::_Enum::•(index, _name) + ; +} +class EnumWithS2 extends self::_EnumWithS2&_Enum&G /*isEnum*/ { + static const field core::List values = #C54; + static const field self::EnumWithS2 a = #C53; + const constructor •(core::int index, core::String name) → self::EnumWithS2 + : super self::_EnumWithS2&_Enum&G::•(index, name) + ; + method toString() → core::String + return "EnumWithS2.${this.{core::_Enum::_name}{core::String}}"; +} +abstract class _EnumWithS3&_Enum&G = core::_Enum with self::G> /*isAnonymousMixin,hasConstConstructor*/ { + const synthetic constructor •(core::int index, core::String _name) → self::_EnumWithS3&_Enum&G + : super core::_Enum::•(index, _name) + ; +} +class EnumWithS3 extends self::_EnumWithS3&_Enum&G /*isEnum*/ { + static const field core::List values = #C56; + static const field self::EnumWithS3 a = #C55; + const constructor •(core::int index, core::String name) → self::EnumWithS3 + : super self::_EnumWithS3&_Enum&G::•(index, name) + ; + method toString() → core::String + return "EnumWithS3.${this.{core::_Enum::_name}{core::String}}"; +} +abstract class _EnumWithS4&_Enum&G = core::_Enum with self::G> /*isAnonymousMixin,hasConstConstructor*/ { + const synthetic constructor •(core::int index, core::String _name) → self::_EnumWithS4&_Enum&G + : super core::_Enum::•(index, _name) + ; +} +class EnumWithS4 extends self::_EnumWithS4&_Enum&G /*isEnum*/ { + static const field core::List values = #C58; + static const field self::EnumWithS4 a = #C57; + const constructor •(core::int index, core::String name) → self::EnumWithS4 + : super self::_EnumWithS4&_Enum&G::•(index, name) + ; + method toString() → core::String + return "EnumWithS4.${this.{core::_Enum::_name}{core::String}}"; +} +abstract class _EnumWithS5&_Enum&G = core::_Enum with self::G /*isAnonymousMixin,hasConstConstructor*/ { + const synthetic constructor •(core::int index, core::String _name) → self::_EnumWithS5&_Enum&G + : super core::_Enum::•(index, _name) + ; +} +class EnumWithS5 extends self::_EnumWithS5&_Enum&G /*isEnum*/ { + static const field core::List values = #C60; + static const field self::EnumWithS5 a = #C59; + const constructor •(core::int index, core::String name) → self::EnumWithS5 + : super self::_EnumWithS5&_Enum&G::•(index, name) + ; + method toString() → core::String + return "EnumWithS5.${this.{core::_Enum::_name}{core::String}}"; +} +abstract class _EnumWithS6&_Enum&G = core::_Enum with self::G> /*isAnonymousMixin,hasConstConstructor*/ { + const synthetic constructor •(core::int index, core::String _name) → self::_EnumWithS6&_Enum&G + : super core::_Enum::•(index, _name) + ; +} +class EnumWithS6 extends self::_EnumWithS6&_Enum&G /*isEnum*/ { + static const field core::List values = #C62; + static const field self::EnumWithS6 a = #C61; + const constructor •(core::int index, core::String name) → self::EnumWithS6 + : super self::_EnumWithS6&_Enum&G::•(index, name) + ; + method toString() → core::String + return "EnumWithS6.${this.{core::_Enum::_name}{core::String}}"; +} +abstract class _EnumWithS7&_Enum&G = core::_Enum with self::G /*isAnonymousMixin,hasConstConstructor*/ { + const synthetic constructor •(core::int index, core::String _name) → self::_EnumWithS7&_Enum&G + : super core::_Enum::•(index, _name) + ; +} +class EnumWithS7 extends self::_EnumWithS7&_Enum&G /*isEnum*/ { + static const field core::List values = #C64; + static const field self::EnumWithS7 a = #C63; + const constructor •(core::int index, core::String name) → self::EnumWithS7 + : super self::_EnumWithS7&_Enum&G::•(index, name) + ; + method toString() → core::String + return "EnumWithS7.${this.{core::_Enum::_name}{core::String}}"; +} +abstract class _EnumWithS8&_Enum&G = core::_Enum with self::G /*isAnonymousMixin,hasConstConstructor*/ { + const synthetic constructor •(core::int index, core::String _name) → self::_EnumWithS8&_Enum&G + : super core::_Enum::•(index, _name) + ; +} +class EnumWithS8 extends self::_EnumWithS8&_Enum&G /*isEnum*/ { + static const field core::List values = #C66; + static const field self::EnumWithS8 a = #C65; + const constructor •(core::int index, core::String name) → self::EnumWithS8 + : super self::_EnumWithS8&_Enum&G::•(index, name) + ; + method toString() → core::String + return "EnumWithS8.${this.{core::_Enum::_name}{core::String}}"; +} +abstract class MixinOnT1 extends self::Class> /*isMixinDeclaration*/ { +} +abstract class MixinOnT2 extends self::Class /*isMixinDeclaration*/ { +} +abstract class MixinOnT3 extends self::Class> /*isMixinDeclaration*/ { +} +abstract class MixinOnT4 extends self::Class> /*isMixinDeclaration*/ { +} +abstract class MixinOnT5 extends self::Class /*isMixinDeclaration*/ { +} +abstract class MixinOnT6 extends self::Class> /*isMixinDeclaration*/ { +} +abstract class MixinOnT7 extends self::Class /*isMixinDeclaration*/ { +} +abstract class MixinOnT8 extends self::Class /*isMixinDeclaration*/ { +} +abstract class MixinOnS1 extends self::G> /*isMixinDeclaration*/ { +} +abstract class MixinOnS2 extends self::G /*isMixinDeclaration*/ { +} +abstract class MixinOnS3 extends self::G> /*isMixinDeclaration*/ { +} +abstract class MixinOnS4 extends self::G> /*isMixinDeclaration*/ { +} +abstract class MixinOnS5 extends self::G /*isMixinDeclaration*/ { +} +abstract class MixinOnS6 extends self::G> /*isMixinDeclaration*/ { +} +abstract class MixinOnS7 extends self::G /*isMixinDeclaration*/ { +} +abstract class MixinOnS8 extends self::G /*isMixinDeclaration*/ { +} +extension ExtensionOnT1 on self::Class> { +} +extension ExtensionOnT2 on self::Class { +} +extension ExtensionOnT3 on self::Class> { +} +extension ExtensionOnT4 on self::Class> { +} +extension ExtensionOnT5 on self::Class { +} +extension ExtensionOnT6 on self::Class> { +} +extension ExtensionOnT7 on self::Class { +} +extension ExtensionOnT8 on self::Class { +} +extension ExtensionOnS1 on self::G> { +} +extension ExtensionOnS2 on self::G { +} +extension ExtensionOnS3 on self::G> { +} +extension ExtensionOnS4 on self::G> { +} +extension ExtensionOnS5 on self::G { +} +extension ExtensionOnS6 on self::G> { +} +extension ExtensionOnS7 on self::G { +} +extension ExtensionOnS8 on self::G { +} +static method main() → dynamic {} +static method _#F#new#tearOff = self::Class>() → self::Class + return new self::Class::•(); + +constants { + #C1 = 0 + #C2 = "a" + #C3 = self::EnumImplementsT1 {index:#C1, _name:#C2} + #C4 = [#C3] + #C5 = self::EnumImplementsT2 {index:#C1, _name:#C2} + #C6 = [#C5] + #C7 = self::EnumImplementsT3 {index:#C1, _name:#C2} + #C8 = [#C7] + #C9 = self::EnumImplementsT4 {index:#C1, _name:#C2} + #C10 = [#C9] + #C11 = self::EnumImplementsT5 {index:#C1, _name:#C2} + #C12 = [#C11] + #C13 = self::EnumImplementsT6 {index:#C1, _name:#C2} + #C14 = [#C13] + #C15 = self::EnumImplementsT7 {index:#C1, _name:#C2} + #C16 = [#C15] + #C17 = self::EnumImplementsT8 {index:#C1, _name:#C2} + #C18 = [#C17] + #C19 = self::EnumImplementsS1 {index:#C1, _name:#C2} + #C20 = [#C19] + #C21 = self::EnumImplementsS2 {index:#C1, _name:#C2} + #C22 = [#C21] + #C23 = self::EnumImplementsS3 {index:#C1, _name:#C2} + #C24 = [#C23] + #C25 = self::EnumImplementsS4 {index:#C1, _name:#C2} + #C26 = [#C25] + #C27 = self::EnumImplementsS5 {index:#C1, _name:#C2} + #C28 = [#C27] + #C29 = self::EnumImplementsS6 {index:#C1, _name:#C2} + #C30 = [#C29] + #C31 = self::EnumImplementsS7 {index:#C1, _name:#C2} + #C32 = [#C31] + #C33 = self::EnumImplementsS8 {index:#C1, _name:#C2} + #C34 = [#C33] + #C35 = self::EnumWithT1 {index:#C1, _name:#C2} + #C36 = [#C35] + #C37 = self::EnumWithT2 {index:#C1, _name:#C2} + #C38 = [#C37] + #C39 = self::EnumWithT3 {index:#C1, _name:#C2} + #C40 = [#C39] + #C41 = self::EnumWithT4 {index:#C1, _name:#C2} + #C42 = [#C41] + #C43 = self::EnumWithT5 {index:#C1, _name:#C2} + #C44 = [#C43] + #C45 = self::EnumWithT6 {index:#C1, _name:#C2} + #C46 = [#C45] + #C47 = self::EnumWithT7 {index:#C1, _name:#C2} + #C48 = [#C47] + #C49 = self::EnumWithT8 {index:#C1, _name:#C2} + #C50 = [#C49] + #C51 = self::EnumWithS1 {index:#C1, _name:#C2} + #C52 = [#C51] + #C53 = self::EnumWithS2 {index:#C1, _name:#C2} + #C54 = [#C53] + #C55 = self::EnumWithS3 {index:#C1, _name:#C2} + #C56 = [#C55] + #C57 = self::EnumWithS4 {index:#C1, _name:#C2} + #C58 = [#C57] + #C59 = self::EnumWithS5 {index:#C1, _name:#C2} + #C60 = [#C59] + #C61 = self::EnumWithS6 {index:#C1, _name:#C2} + #C62 = [#C61] + #C63 = self::EnumWithS7 {index:#C1, _name:#C2} + #C64 = [#C63] + #C65 = self::EnumWithS8 {index:#C1, _name:#C2} + #C66 = [#C65] +} + + +Constructor coverage from constants: +org-dartlang-testcase:///bounds_supertypes.dart: +- EnumImplementsT1. (from org-dartlang-testcase:///bounds_supertypes.dart:109:6) +- _Enum. (from org-dartlang-sdk:///sdk/lib/core/enum.dart:103:9) +- Object. (from org-dartlang-sdk:///sdk/lib/core/object.dart:25:9) +- EnumImplementsT2. (from org-dartlang-testcase:///bounds_supertypes.dart:111:6) +- EnumImplementsT3. (from org-dartlang-testcase:///bounds_supertypes.dart:113:6) +- EnumImplementsT4. (from org-dartlang-testcase:///bounds_supertypes.dart:115:6) +- EnumImplementsT5. (from org-dartlang-testcase:///bounds_supertypes.dart:117:6) +- EnumImplementsT6. (from org-dartlang-testcase:///bounds_supertypes.dart:119:6) +- EnumImplementsT7. (from org-dartlang-testcase:///bounds_supertypes.dart:121:6) +- EnumImplementsT8. (from org-dartlang-testcase:///bounds_supertypes.dart:123:6) +- EnumImplementsS1. (from org-dartlang-testcase:///bounds_supertypes.dart:125:6) +- EnumImplementsS2. (from org-dartlang-testcase:///bounds_supertypes.dart:127:6) +- EnumImplementsS3. (from org-dartlang-testcase:///bounds_supertypes.dart:129:6) +- EnumImplementsS4. (from org-dartlang-testcase:///bounds_supertypes.dart:131:6) +- EnumImplementsS5. (from org-dartlang-testcase:///bounds_supertypes.dart:133:6) +- EnumImplementsS6. (from org-dartlang-testcase:///bounds_supertypes.dart:135:6) +- EnumImplementsS7. (from org-dartlang-testcase:///bounds_supertypes.dart:137:6) +- EnumImplementsS8. (from org-dartlang-testcase:///bounds_supertypes.dart:139:6) +- EnumWithT1. (from org-dartlang-testcase:///bounds_supertypes.dart:141:6) +- _EnumWithT1&_Enum&F. (from org-dartlang-testcase:///bounds_supertypes.dart:141:6) +- EnumWithT2. (from org-dartlang-testcase:///bounds_supertypes.dart:143:6) +- _EnumWithT2&_Enum&F. (from org-dartlang-testcase:///bounds_supertypes.dart:143:6) +- EnumWithT3. (from org-dartlang-testcase:///bounds_supertypes.dart:145:6) +- _EnumWithT3&_Enum&F. (from org-dartlang-testcase:///bounds_supertypes.dart:145:6) +- EnumWithT4. (from org-dartlang-testcase:///bounds_supertypes.dart:147:6) +- _EnumWithT4&_Enum&F. (from org-dartlang-testcase:///bounds_supertypes.dart:147:6) +- EnumWithT5. (from org-dartlang-testcase:///bounds_supertypes.dart:149:6) +- _EnumWithT5&_Enum&F. (from org-dartlang-testcase:///bounds_supertypes.dart:149:6) +- EnumWithT6. (from org-dartlang-testcase:///bounds_supertypes.dart:151:6) +- _EnumWithT6&_Enum&F. (from org-dartlang-testcase:///bounds_supertypes.dart:151:6) +- EnumWithT7. (from org-dartlang-testcase:///bounds_supertypes.dart:153:6) +- _EnumWithT7&_Enum&F. (from org-dartlang-testcase:///bounds_supertypes.dart:153:6) +- EnumWithT8. (from org-dartlang-testcase:///bounds_supertypes.dart:155:6) +- _EnumWithT8&_Enum&F. (from org-dartlang-testcase:///bounds_supertypes.dart:155:6) +- EnumWithS1. (from org-dartlang-testcase:///bounds_supertypes.dart:157:6) +- _EnumWithS1&_Enum&G. (from org-dartlang-testcase:///bounds_supertypes.dart:157:6) +- EnumWithS2. (from org-dartlang-testcase:///bounds_supertypes.dart:159:6) +- _EnumWithS2&_Enum&G. (from org-dartlang-testcase:///bounds_supertypes.dart:159:6) +- EnumWithS3. (from org-dartlang-testcase:///bounds_supertypes.dart:161:6) +- _EnumWithS3&_Enum&G. (from org-dartlang-testcase:///bounds_supertypes.dart:161:6) +- EnumWithS4. (from org-dartlang-testcase:///bounds_supertypes.dart:163:6) +- _EnumWithS4&_Enum&G. (from org-dartlang-testcase:///bounds_supertypes.dart:163:6) +- EnumWithS5. (from org-dartlang-testcase:///bounds_supertypes.dart:165:6) +- _EnumWithS5&_Enum&G. (from org-dartlang-testcase:///bounds_supertypes.dart:165:6) +- EnumWithS6. (from org-dartlang-testcase:///bounds_supertypes.dart:167:6) +- _EnumWithS6&_Enum&G. (from org-dartlang-testcase:///bounds_supertypes.dart:167:6) +- EnumWithS7. (from org-dartlang-testcase:///bounds_supertypes.dart:169:6) +- _EnumWithS7&_Enum&G. (from org-dartlang-testcase:///bounds_supertypes.dart:169:6) +- EnumWithS8. (from org-dartlang-testcase:///bounds_supertypes.dart:171:6) +- _EnumWithS8&_Enum&G. (from org-dartlang-testcase:///bounds_supertypes.dart:171:6) diff --git a/pkg/front_end/testcases/general/bounds_supertypes.dart.weak.outline.expect b/pkg/front_end/testcases/general/bounds_supertypes.dart.weak.outline.expect new file mode 100644 index 00000000000..ed00b2eb8b7 --- /dev/null +++ b/pkg/front_end/testcases/general/bounds_supertypes.dart.weak.outline.expect @@ -0,0 +1,1478 @@ +library /*isNonNullableByDefault*/; +// +// Problems in library: +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:13:25: Error: Inferred type argument 'Class' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try specifying type arguments explicitly so that they conform to the bounds. +// class ExtendsT1 extends F {} // Error +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = Class; +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:15:25: Error: Type argument 'dynamic' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// class ExtendsT2 extends F {} // Error +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = Class; +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:17:25: Error: Type argument 'Class' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// class ExtendsT3 extends F {} // Error +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = Class; +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:19:25: Error: Type argument 'Class' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// class ExtendsT4 extends F> {} // Error +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = Class; +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:25:25: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// class ExtendsT7 extends F {} // Error +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = Class; +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:27:25: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// class ExtendsT8 extends F {} // Error +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = Class; +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:29:25: Error: Inferred type argument 'Class' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try specifying type arguments explicitly so that they conform to the bounds. +// class ExtendsS1 extends G {} // Error +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:31:25: Error: Type argument 'dynamic' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// class ExtendsS2 extends G {} // Error +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:33:25: Error: Type argument 'Class' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// class ExtendsS3 extends G {} // Error +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:35:25: Error: Type argument 'Class' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// class ExtendsS4 extends G> {} // Error +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:41:25: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// class ExtendsS7 extends G {} // Error +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:43:25: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// class ExtendsS8 extends G {} // Error +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:45:31: Error: Inferred type argument 'Class' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try specifying type arguments explicitly so that they conform to the bounds. +// class ImplementsT1 implements F {} // Error +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = Class; +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:47:31: Error: Type argument 'dynamic' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// class ImplementsT2 implements F {} // Error +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = Class; +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:49:31: Error: Type argument 'Class' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// class ImplementsT3 implements F {} // Error +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = Class; +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:51:31: Error: Type argument 'Class' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// class ImplementsT4 implements F> {} // Error +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = Class; +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:57:31: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// class ImplementsT7 implements F {} // Error +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = Class; +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:59:31: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// class ImplementsT8 implements F {} // Error +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = Class; +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:61:31: Error: Inferred type argument 'Class' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try specifying type arguments explicitly so that they conform to the bounds. +// class ImplementsS1 implements G {} // Error +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:63:31: Error: Type argument 'dynamic' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// class ImplementsS2 implements G {} // Error +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:65:31: Error: Type argument 'Class' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// class ImplementsS3 implements G {} // Error +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:67:31: Error: Type argument 'Class' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// class ImplementsS4 implements G> {} // Error +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:73:31: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// class ImplementsS7 implements G {} // Error +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:75:31: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// class ImplementsS8 implements G {} // Error +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:77:19: Error: Inferred type argument 'Class' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try specifying type arguments explicitly so that they conform to the bounds. +// class WithT1 with F {} // Error +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = Class; +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:79:19: Error: Type argument 'dynamic' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// class WithT2 with F {} // Error +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = Class; +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:81:19: Error: Type argument 'Class' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// class WithT3 with F {} // Error +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = Class; +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:83:19: Error: Type argument 'Class' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// class WithT4 with F> {} // Error +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = Class; +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:89:19: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// class WithT7 with F {} // Error +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = Class; +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:91:19: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// class WithT8 with F {} // Error +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = Class; +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:109:34: Error: Inferred type argument 'Class' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try specifying type arguments explicitly so that they conform to the bounds. +// enum EnumImplementsT1 implements F /* Error */ { a } +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = Class; +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:111:34: Error: Type argument 'dynamic' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// enum EnumImplementsT2 implements F /* Error */ { a } +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = Class; +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:113:34: Error: Type argument 'Class' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// enum EnumImplementsT3 implements F /* Error */ { a } +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = Class; +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:115:34: Error: Type argument 'Class' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// enum EnumImplementsT4 implements F> /* Error */ { a } +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = Class; +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:121:34: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// enum EnumImplementsT7 implements F /* Error */ { a } +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = Class; +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:123:34: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// enum EnumImplementsT8 implements F /* Error */ { a } +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = Class; +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:125:34: Error: Inferred type argument 'Class' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try specifying type arguments explicitly so that they conform to the bounds. +// enum EnumImplementsS1 implements G /* Error */ { a } +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:127:34: Error: Type argument 'dynamic' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// enum EnumImplementsS2 implements G /* Error */ { a } +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:129:34: Error: Type argument 'Class' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// enum EnumImplementsS3 implements G /* Error */ { a } +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:131:34: Error: Type argument 'Class' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// enum EnumImplementsS4 implements G> /* Error */ { a } +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:137:34: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// enum EnumImplementsS7 implements G /* Error */ { a } +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:139:34: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// enum EnumImplementsS8 implements G /* Error */ { a } +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:141:22: Error: Inferred type argument 'Class' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try specifying type arguments explicitly so that they conform to the bounds. +// enum EnumWithT1 with F /* Error */ { a } +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = Class; +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:143:22: Error: Type argument 'dynamic' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// enum EnumWithT2 with F /* Error */ { a } +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = Class; +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:145:22: Error: Type argument 'Class' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// enum EnumWithT3 with F /* Error */ { a } +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = Class; +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:147:22: Error: Type argument 'Class' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// enum EnumWithT4 with F> /* Error */ { a } +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = Class; +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:153:22: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// enum EnumWithT7 with F /* Error */ { a } +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = Class; +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:155:22: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// enum EnumWithT8 with F /* Error */ { a } +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = Class; +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:173:20: Error: Inferred type argument 'Class' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try specifying type arguments explicitly so that they conform to the bounds. +// mixin MixinOnT1 on F {} // Error +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = Class; +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:175:20: Error: Type argument 'dynamic' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// mixin MixinOnT2 on F {} // Error +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = Class; +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:177:20: Error: Type argument 'Class' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// mixin MixinOnT3 on F {} // Error +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = Class; +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:179:20: Error: Type argument 'Class' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// mixin MixinOnT4 on F> {} // Error +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = Class; +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:185:20: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// mixin MixinOnT7 on F {} // Error +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = Class; +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:187:20: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// mixin MixinOnT8 on F {} // Error +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = Class; +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:189:20: Error: Inferred type argument 'Class' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try specifying type arguments explicitly so that they conform to the bounds. +// mixin MixinOnS1 on G {} // Error +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:191:20: Error: Type argument 'dynamic' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// mixin MixinOnS2 on G {} // Error +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:193:20: Error: Type argument 'Class' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// mixin MixinOnS3 on G {} // Error +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:195:20: Error: Type argument 'Class' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// mixin MixinOnS4 on G> {} // Error +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:201:20: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// mixin MixinOnS7 on G {} // Error +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:203:20: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// mixin MixinOnS8 on G {} // Error +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:217:28: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// extension ExtensionOnT7 on F {} // Error +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = Class; +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:219:28: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// extension ExtensionOnT8 on F {} // Error +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = Class; +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:233:28: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// extension ExtensionOnS7 on G {} // Error +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:235:28: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// extension ExtensionOnS8 on G {} // Error +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:93:19: Error: Inferred type argument 'Class' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try specifying type arguments explicitly so that they conform to the bounds. +// class WithS1 with G {} // Error +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:95:19: Error: Type argument 'dynamic' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// class WithS2 with G {} // Error +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:97:19: Error: Type argument 'Class' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// class WithS3 with G {} // Error +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:99:19: Error: Type argument 'Class' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// class WithS4 with G> {} // Error +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:105:19: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// class WithS7 with G {} // Error +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:107:19: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// class WithS8 with G {} // Error +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:157:22: Error: Inferred type argument 'Class' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try specifying type arguments explicitly so that they conform to the bounds. +// enum EnumWithS1 with G /* Error */ { a } +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:159:22: Error: Type argument 'dynamic' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// enum EnumWithS2 with G /* Error */ { a } +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:161:22: Error: Type argument 'Class' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// enum EnumWithS3 with G /* Error */ { a } +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:163:22: Error: Type argument 'Class' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// enum EnumWithS4 with G> /* Error */ { a } +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:169:22: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// enum EnumWithS7 with G /* Error */ { a } +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:171:22: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// enum EnumWithS8 with G /* Error */ { a } +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +import self as self; +import "dart:core" as core; + +typedef F = self::Class> = self::Class; +class Class extends core::Object { + synthetic constructor •() → self::Class + ; +} +class ConcreteClass extends core::Object implements self::Class { + synthetic constructor •() → self::ConcreteClass + ; +} +class G = self::Class> extends core::Object { + synthetic constructor •() → self::G + ; +} +class ExtendsT1 extends self::Class> { + synthetic constructor •() → self::ExtendsT1 + ; +} +class ExtendsT2 extends self::Class { + synthetic constructor •() → self::ExtendsT2 + ; +} +class ExtendsT3 extends self::Class> { + synthetic constructor •() → self::ExtendsT3 + ; +} +class ExtendsT4 extends self::Class> { + synthetic constructor •() → self::ExtendsT4 + ; +} +class ExtendsT5 extends self::Class { + synthetic constructor •() → self::ExtendsT5 + ; +} +class ExtendsT6 extends self::Class> { + synthetic constructor •() → self::ExtendsT6 + ; +} +class ExtendsT7 extends self::Class { + synthetic constructor •() → self::ExtendsT7 + ; +} +class ExtendsT8 extends self::Class { + synthetic constructor •() → self::ExtendsT8 + ; +} +class ExtendsS1 extends self::G> { + synthetic constructor •() → self::ExtendsS1 + ; +} +class ExtendsS2 extends self::G { + synthetic constructor •() → self::ExtendsS2 + ; +} +class ExtendsS3 extends self::G> { + synthetic constructor •() → self::ExtendsS3 + ; +} +class ExtendsS4 extends self::G> { + synthetic constructor •() → self::ExtendsS4 + ; +} +class ExtendsS5 extends self::G { + synthetic constructor •() → self::ExtendsS5 + ; +} +class ExtendsS6 extends self::G> { + synthetic constructor •() → self::ExtendsS6 + ; +} +class ExtendsS7 extends self::G { + synthetic constructor •() → self::ExtendsS7 + ; +} +class ExtendsS8 extends self::G { + synthetic constructor •() → self::ExtendsS8 + ; +} +class ImplementsT1 extends core::Object implements self::Class> { + synthetic constructor •() → self::ImplementsT1 + ; +} +class ImplementsT2 extends core::Object implements self::Class { + synthetic constructor •() → self::ImplementsT2 + ; +} +class ImplementsT3 extends core::Object implements self::Class> { + synthetic constructor •() → self::ImplementsT3 + ; +} +class ImplementsT4 extends core::Object implements self::Class> { + synthetic constructor •() → self::ImplementsT4 + ; +} +class ImplementsT5 extends core::Object implements self::Class { + synthetic constructor •() → self::ImplementsT5 + ; +} +class ImplementsT6 extends core::Object implements self::Class> { + synthetic constructor •() → self::ImplementsT6 + ; +} +class ImplementsT7 extends core::Object implements self::Class { + synthetic constructor •() → self::ImplementsT7 + ; +} +class ImplementsT8 extends core::Object implements self::Class { + synthetic constructor •() → self::ImplementsT8 + ; +} +class ImplementsS1 extends core::Object implements self::G> { + synthetic constructor •() → self::ImplementsS1 + ; +} +class ImplementsS2 extends core::Object implements self::G { + synthetic constructor •() → self::ImplementsS2 + ; +} +class ImplementsS3 extends core::Object implements self::G> { + synthetic constructor •() → self::ImplementsS3 + ; +} +class ImplementsS4 extends core::Object implements self::G> { + synthetic constructor •() → self::ImplementsS4 + ; +} +class ImplementsS5 extends core::Object implements self::G { + synthetic constructor •() → self::ImplementsS5 + ; +} +class ImplementsS6 extends core::Object implements self::G> { + synthetic constructor •() → self::ImplementsS6 + ; +} +class ImplementsS7 extends core::Object implements self::G { + synthetic constructor •() → self::ImplementsS7 + ; +} +class ImplementsS8 extends core::Object implements self::G { + synthetic constructor •() → self::ImplementsS8 + ; +} +abstract class _WithT1&Object&F = core::Object with self::Class> /*isAnonymousMixin,hasConstConstructor*/ { + const synthetic constructor •() → self::_WithT1&Object&F + : super core::Object::•() + ; +} +class WithT1 extends self::_WithT1&Object&F { + synthetic constructor •() → self::WithT1 + ; +} +abstract class _WithT2&Object&F = core::Object with self::Class /*isAnonymousMixin,hasConstConstructor*/ { + const synthetic constructor •() → self::_WithT2&Object&F + : super core::Object::•() + ; +} +class WithT2 extends self::_WithT2&Object&F { + synthetic constructor •() → self::WithT2 + ; +} +abstract class _WithT3&Object&F = core::Object with self::Class> /*isAnonymousMixin,hasConstConstructor*/ { + const synthetic constructor •() → self::_WithT3&Object&F + : super core::Object::•() + ; +} +class WithT3 extends self::_WithT3&Object&F { + synthetic constructor •() → self::WithT3 + ; +} +abstract class _WithT4&Object&F = core::Object with self::Class> /*isAnonymousMixin,hasConstConstructor*/ { + const synthetic constructor •() → self::_WithT4&Object&F + : super core::Object::•() + ; +} +class WithT4 extends self::_WithT4&Object&F { + synthetic constructor •() → self::WithT4 + ; +} +abstract class _WithT5&Object&F = core::Object with self::Class /*isAnonymousMixin,hasConstConstructor*/ { + const synthetic constructor •() → self::_WithT5&Object&F + : super core::Object::•() + ; +} +class WithT5 extends self::_WithT5&Object&F { + synthetic constructor •() → self::WithT5 + ; +} +abstract class _WithT6&Object&F = core::Object with self::Class> /*isAnonymousMixin,hasConstConstructor*/ { + const synthetic constructor •() → self::_WithT6&Object&F + : super core::Object::•() + ; +} +class WithT6 extends self::_WithT6&Object&F { + synthetic constructor •() → self::WithT6 + ; +} +abstract class _WithT7&Object&F = core::Object with self::Class /*isAnonymousMixin,hasConstConstructor*/ { + const synthetic constructor •() → self::_WithT7&Object&F + : super core::Object::•() + ; +} +class WithT7 extends self::_WithT7&Object&F { + synthetic constructor •() → self::WithT7 + ; +} +abstract class _WithT8&Object&F = core::Object with self::Class /*isAnonymousMixin,hasConstConstructor*/ { + const synthetic constructor •() → self::_WithT8&Object&F + : super core::Object::•() + ; +} +class WithT8 extends self::_WithT8&Object&F { + synthetic constructor •() → self::WithT8 + ; +} +abstract class _WithS1&Object&G = core::Object with self::G> /*isAnonymousMixin,hasConstConstructor*/ { + const synthetic constructor •() → self::_WithS1&Object&G + : super core::Object::•() + ; +} +class WithS1 extends self::_WithS1&Object&G { + synthetic constructor •() → self::WithS1 + ; +} +abstract class _WithS2&Object&G = core::Object with self::G /*isAnonymousMixin,hasConstConstructor*/ { + const synthetic constructor •() → self::_WithS2&Object&G + : super core::Object::•() + ; +} +class WithS2 extends self::_WithS2&Object&G { + synthetic constructor •() → self::WithS2 + ; +} +abstract class _WithS3&Object&G = core::Object with self::G> /*isAnonymousMixin,hasConstConstructor*/ { + const synthetic constructor •() → self::_WithS3&Object&G + : super core::Object::•() + ; +} +class WithS3 extends self::_WithS3&Object&G { + synthetic constructor •() → self::WithS3 + ; +} +abstract class _WithS4&Object&G = core::Object with self::G> /*isAnonymousMixin,hasConstConstructor*/ { + const synthetic constructor •() → self::_WithS4&Object&G + : super core::Object::•() + ; +} +class WithS4 extends self::_WithS4&Object&G { + synthetic constructor •() → self::WithS4 + ; +} +abstract class _WithS5&Object&G = core::Object with self::G /*isAnonymousMixin,hasConstConstructor*/ { + const synthetic constructor •() → self::_WithS5&Object&G + : super core::Object::•() + ; +} +class WithS5 extends self::_WithS5&Object&G { + synthetic constructor •() → self::WithS5 + ; +} +abstract class _WithS6&Object&G = core::Object with self::G> /*isAnonymousMixin,hasConstConstructor*/ { + const synthetic constructor •() → self::_WithS6&Object&G + : super core::Object::•() + ; +} +class WithS6 extends self::_WithS6&Object&G { + synthetic constructor •() → self::WithS6 + ; +} +abstract class _WithS7&Object&G = core::Object with self::G /*isAnonymousMixin,hasConstConstructor*/ { + const synthetic constructor •() → self::_WithS7&Object&G + : super core::Object::•() + ; +} +class WithS7 extends self::_WithS7&Object&G { + synthetic constructor •() → self::WithS7 + ; +} +abstract class _WithS8&Object&G = core::Object with self::G /*isAnonymousMixin,hasConstConstructor*/ { + const synthetic constructor •() → self::_WithS8&Object&G + : super core::Object::•() + ; +} +class WithS8 extends self::_WithS8&Object&G { + synthetic constructor •() → self::WithS8 + ; +} +class EnumImplementsT1 extends core::_Enum implements self::Class> /*isEnum*/ { + static const field core::List values = const [self::EnumImplementsT1::a]; + static const field self::EnumImplementsT1 a = const self::EnumImplementsT1::•(0, "a"); + const constructor •(core::int index, core::String name) → self::EnumImplementsT1 + : super core::_Enum::•(index, name) + ; + method toString() → core::String + return "EnumImplementsT1.${this.{core::_Enum::_name}{core::String}}"; +} +class EnumImplementsT2 extends core::_Enum implements self::Class /*isEnum*/ { + static const field core::List values = const [self::EnumImplementsT2::a]; + static const field self::EnumImplementsT2 a = const self::EnumImplementsT2::•(0, "a"); + const constructor •(core::int index, core::String name) → self::EnumImplementsT2 + : super core::_Enum::•(index, name) + ; + method toString() → core::String + return "EnumImplementsT2.${this.{core::_Enum::_name}{core::String}}"; +} +class EnumImplementsT3 extends core::_Enum implements self::Class> /*isEnum*/ { + static const field core::List values = const [self::EnumImplementsT3::a]; + static const field self::EnumImplementsT3 a = const self::EnumImplementsT3::•(0, "a"); + const constructor •(core::int index, core::String name) → self::EnumImplementsT3 + : super core::_Enum::•(index, name) + ; + method toString() → core::String + return "EnumImplementsT3.${this.{core::_Enum::_name}{core::String}}"; +} +class EnumImplementsT4 extends core::_Enum implements self::Class> /*isEnum*/ { + static const field core::List values = const [self::EnumImplementsT4::a]; + static const field self::EnumImplementsT4 a = const self::EnumImplementsT4::•(0, "a"); + const constructor •(core::int index, core::String name) → self::EnumImplementsT4 + : super core::_Enum::•(index, name) + ; + method toString() → core::String + return "EnumImplementsT4.${this.{core::_Enum::_name}{core::String}}"; +} +class EnumImplementsT5 extends core::_Enum implements self::Class /*isEnum*/ { + static const field core::List values = const [self::EnumImplementsT5::a]; + static const field self::EnumImplementsT5 a = const self::EnumImplementsT5::•(0, "a"); + const constructor •(core::int index, core::String name) → self::EnumImplementsT5 + : super core::_Enum::•(index, name) + ; + method toString() → core::String + return "EnumImplementsT5.${this.{core::_Enum::_name}{core::String}}"; +} +class EnumImplementsT6 extends core::_Enum implements self::Class> /*isEnum*/ { + static const field core::List values = const [self::EnumImplementsT6::a]; + static const field self::EnumImplementsT6 a = const self::EnumImplementsT6::•(0, "a"); + const constructor •(core::int index, core::String name) → self::EnumImplementsT6 + : super core::_Enum::•(index, name) + ; + method toString() → core::String + return "EnumImplementsT6.${this.{core::_Enum::_name}{core::String}}"; +} +class EnumImplementsT7 extends core::_Enum implements self::Class /*isEnum*/ { + static const field core::List values = const [self::EnumImplementsT7::a]; + static const field self::EnumImplementsT7 a = const self::EnumImplementsT7::•(0, "a"); + const constructor •(core::int index, core::String name) → self::EnumImplementsT7 + : super core::_Enum::•(index, name) + ; + method toString() → core::String + return "EnumImplementsT7.${this.{core::_Enum::_name}{core::String}}"; +} +class EnumImplementsT8 extends core::_Enum implements self::Class /*isEnum*/ { + static const field core::List values = const [self::EnumImplementsT8::a]; + static const field self::EnumImplementsT8 a = const self::EnumImplementsT8::•(0, "a"); + const constructor •(core::int index, core::String name) → self::EnumImplementsT8 + : super core::_Enum::•(index, name) + ; + method toString() → core::String + return "EnumImplementsT8.${this.{core::_Enum::_name}{core::String}}"; +} +class EnumImplementsS1 extends core::_Enum implements self::G> /*isEnum*/ { + static const field core::List values = const [self::EnumImplementsS1::a]; + static const field self::EnumImplementsS1 a = const self::EnumImplementsS1::•(0, "a"); + const constructor •(core::int index, core::String name) → self::EnumImplementsS1 + : super core::_Enum::•(index, name) + ; + method toString() → core::String + return "EnumImplementsS1.${this.{core::_Enum::_name}{core::String}}"; +} +class EnumImplementsS2 extends core::_Enum implements self::G /*isEnum*/ { + static const field core::List values = const [self::EnumImplementsS2::a]; + static const field self::EnumImplementsS2 a = const self::EnumImplementsS2::•(0, "a"); + const constructor •(core::int index, core::String name) → self::EnumImplementsS2 + : super core::_Enum::•(index, name) + ; + method toString() → core::String + return "EnumImplementsS2.${this.{core::_Enum::_name}{core::String}}"; +} +class EnumImplementsS3 extends core::_Enum implements self::G> /*isEnum*/ { + static const field core::List values = const [self::EnumImplementsS3::a]; + static const field self::EnumImplementsS3 a = const self::EnumImplementsS3::•(0, "a"); + const constructor •(core::int index, core::String name) → self::EnumImplementsS3 + : super core::_Enum::•(index, name) + ; + method toString() → core::String + return "EnumImplementsS3.${this.{core::_Enum::_name}{core::String}}"; +} +class EnumImplementsS4 extends core::_Enum implements self::G> /*isEnum*/ { + static const field core::List values = const [self::EnumImplementsS4::a]; + static const field self::EnumImplementsS4 a = const self::EnumImplementsS4::•(0, "a"); + const constructor •(core::int index, core::String name) → self::EnumImplementsS4 + : super core::_Enum::•(index, name) + ; + method toString() → core::String + return "EnumImplementsS4.${this.{core::_Enum::_name}{core::String}}"; +} +class EnumImplementsS5 extends core::_Enum implements self::G /*isEnum*/ { + static const field core::List values = const [self::EnumImplementsS5::a]; + static const field self::EnumImplementsS5 a = const self::EnumImplementsS5::•(0, "a"); + const constructor •(core::int index, core::String name) → self::EnumImplementsS5 + : super core::_Enum::•(index, name) + ; + method toString() → core::String + return "EnumImplementsS5.${this.{core::_Enum::_name}{core::String}}"; +} +class EnumImplementsS6 extends core::_Enum implements self::G> /*isEnum*/ { + static const field core::List values = const [self::EnumImplementsS6::a]; + static const field self::EnumImplementsS6 a = const self::EnumImplementsS6::•(0, "a"); + const constructor •(core::int index, core::String name) → self::EnumImplementsS6 + : super core::_Enum::•(index, name) + ; + method toString() → core::String + return "EnumImplementsS6.${this.{core::_Enum::_name}{core::String}}"; +} +class EnumImplementsS7 extends core::_Enum implements self::G /*isEnum*/ { + static const field core::List values = const [self::EnumImplementsS7::a]; + static const field self::EnumImplementsS7 a = const self::EnumImplementsS7::•(0, "a"); + const constructor •(core::int index, core::String name) → self::EnumImplementsS7 + : super core::_Enum::•(index, name) + ; + method toString() → core::String + return "EnumImplementsS7.${this.{core::_Enum::_name}{core::String}}"; +} +class EnumImplementsS8 extends core::_Enum implements self::G /*isEnum*/ { + static const field core::List values = const [self::EnumImplementsS8::a]; + static const field self::EnumImplementsS8 a = const self::EnumImplementsS8::•(0, "a"); + const constructor •(core::int index, core::String name) → self::EnumImplementsS8 + : super core::_Enum::•(index, name) + ; + method toString() → core::String + return "EnumImplementsS8.${this.{core::_Enum::_name}{core::String}}"; +} +abstract class _EnumWithT1&_Enum&F = core::_Enum with self::Class> /*isAnonymousMixin,hasConstConstructor*/ { + const synthetic constructor •(core::int index, core::String _name) → self::_EnumWithT1&_Enum&F + : super core::_Enum::•(index, _name) + ; +} +class EnumWithT1 extends self::_EnumWithT1&_Enum&F /*isEnum*/ { + static const field core::List values = const [self::EnumWithT1::a]; + static const field self::EnumWithT1 a = const self::EnumWithT1::•(0, "a"); + const constructor •(core::int index, core::String name) → self::EnumWithT1 + ; + method toString() → core::String + return "EnumWithT1.${this.{core::_Enum::_name}{core::String}}"; +} +abstract class _EnumWithT2&_Enum&F = core::_Enum with self::Class /*isAnonymousMixin,hasConstConstructor*/ { + const synthetic constructor •(core::int index, core::String _name) → self::_EnumWithT2&_Enum&F + : super core::_Enum::•(index, _name) + ; +} +class EnumWithT2 extends self::_EnumWithT2&_Enum&F /*isEnum*/ { + static const field core::List values = const [self::EnumWithT2::a]; + static const field self::EnumWithT2 a = const self::EnumWithT2::•(0, "a"); + const constructor •(core::int index, core::String name) → self::EnumWithT2 + ; + method toString() → core::String + return "EnumWithT2.${this.{core::_Enum::_name}{core::String}}"; +} +abstract class _EnumWithT3&_Enum&F = core::_Enum with self::Class> /*isAnonymousMixin,hasConstConstructor*/ { + const synthetic constructor •(core::int index, core::String _name) → self::_EnumWithT3&_Enum&F + : super core::_Enum::•(index, _name) + ; +} +class EnumWithT3 extends self::_EnumWithT3&_Enum&F /*isEnum*/ { + static const field core::List values = const [self::EnumWithT3::a]; + static const field self::EnumWithT3 a = const self::EnumWithT3::•(0, "a"); + const constructor •(core::int index, core::String name) → self::EnumWithT3 + ; + method toString() → core::String + return "EnumWithT3.${this.{core::_Enum::_name}{core::String}}"; +} +abstract class _EnumWithT4&_Enum&F = core::_Enum with self::Class> /*isAnonymousMixin,hasConstConstructor*/ { + const synthetic constructor •(core::int index, core::String _name) → self::_EnumWithT4&_Enum&F + : super core::_Enum::•(index, _name) + ; +} +class EnumWithT4 extends self::_EnumWithT4&_Enum&F /*isEnum*/ { + static const field core::List values = const [self::EnumWithT4::a]; + static const field self::EnumWithT4 a = const self::EnumWithT4::•(0, "a"); + const constructor •(core::int index, core::String name) → self::EnumWithT4 + ; + method toString() → core::String + return "EnumWithT4.${this.{core::_Enum::_name}{core::String}}"; +} +abstract class _EnumWithT5&_Enum&F = core::_Enum with self::Class /*isAnonymousMixin,hasConstConstructor*/ { + const synthetic constructor •(core::int index, core::String _name) → self::_EnumWithT5&_Enum&F + : super core::_Enum::•(index, _name) + ; +} +class EnumWithT5 extends self::_EnumWithT5&_Enum&F /*isEnum*/ { + static const field core::List values = const [self::EnumWithT5::a]; + static const field self::EnumWithT5 a = const self::EnumWithT5::•(0, "a"); + const constructor •(core::int index, core::String name) → self::EnumWithT5 + ; + method toString() → core::String + return "EnumWithT5.${this.{core::_Enum::_name}{core::String}}"; +} +abstract class _EnumWithT6&_Enum&F = core::_Enum with self::Class> /*isAnonymousMixin,hasConstConstructor*/ { + const synthetic constructor •(core::int index, core::String _name) → self::_EnumWithT6&_Enum&F + : super core::_Enum::•(index, _name) + ; +} +class EnumWithT6 extends self::_EnumWithT6&_Enum&F /*isEnum*/ { + static const field core::List values = const [self::EnumWithT6::a]; + static const field self::EnumWithT6 a = const self::EnumWithT6::•(0, "a"); + const constructor •(core::int index, core::String name) → self::EnumWithT6 + ; + method toString() → core::String + return "EnumWithT6.${this.{core::_Enum::_name}{core::String}}"; +} +abstract class _EnumWithT7&_Enum&F = core::_Enum with self::Class /*isAnonymousMixin,hasConstConstructor*/ { + const synthetic constructor •(core::int index, core::String _name) → self::_EnumWithT7&_Enum&F + : super core::_Enum::•(index, _name) + ; +} +class EnumWithT7 extends self::_EnumWithT7&_Enum&F /*isEnum*/ { + static const field core::List values = const [self::EnumWithT7::a]; + static const field self::EnumWithT7 a = const self::EnumWithT7::•(0, "a"); + const constructor •(core::int index, core::String name) → self::EnumWithT7 + ; + method toString() → core::String + return "EnumWithT7.${this.{core::_Enum::_name}{core::String}}"; +} +abstract class _EnumWithT8&_Enum&F = core::_Enum with self::Class /*isAnonymousMixin,hasConstConstructor*/ { + const synthetic constructor •(core::int index, core::String _name) → self::_EnumWithT8&_Enum&F + : super core::_Enum::•(index, _name) + ; +} +class EnumWithT8 extends self::_EnumWithT8&_Enum&F /*isEnum*/ { + static const field core::List values = const [self::EnumWithT8::a]; + static const field self::EnumWithT8 a = const self::EnumWithT8::•(0, "a"); + const constructor •(core::int index, core::String name) → self::EnumWithT8 + ; + method toString() → core::String + return "EnumWithT8.${this.{core::_Enum::_name}{core::String}}"; +} +abstract class _EnumWithS1&_Enum&G = core::_Enum with self::G> /*isAnonymousMixin,hasConstConstructor*/ { + const synthetic constructor •(core::int index, core::String _name) → self::_EnumWithS1&_Enum&G + : super core::_Enum::•(index, _name) + ; +} +class EnumWithS1 extends self::_EnumWithS1&_Enum&G /*isEnum*/ { + static const field core::List values = const [self::EnumWithS1::a]; + static const field self::EnumWithS1 a = const self::EnumWithS1::•(0, "a"); + const constructor •(core::int index, core::String name) → self::EnumWithS1 + ; + method toString() → core::String + return "EnumWithS1.${this.{core::_Enum::_name}{core::String}}"; +} +abstract class _EnumWithS2&_Enum&G = core::_Enum with self::G /*isAnonymousMixin,hasConstConstructor*/ { + const synthetic constructor •(core::int index, core::String _name) → self::_EnumWithS2&_Enum&G + : super core::_Enum::•(index, _name) + ; +} +class EnumWithS2 extends self::_EnumWithS2&_Enum&G /*isEnum*/ { + static const field core::List values = const [self::EnumWithS2::a]; + static const field self::EnumWithS2 a = const self::EnumWithS2::•(0, "a"); + const constructor •(core::int index, core::String name) → self::EnumWithS2 + ; + method toString() → core::String + return "EnumWithS2.${this.{core::_Enum::_name}{core::String}}"; +} +abstract class _EnumWithS3&_Enum&G = core::_Enum with self::G> /*isAnonymousMixin,hasConstConstructor*/ { + const synthetic constructor •(core::int index, core::String _name) → self::_EnumWithS3&_Enum&G + : super core::_Enum::•(index, _name) + ; +} +class EnumWithS3 extends self::_EnumWithS3&_Enum&G /*isEnum*/ { + static const field core::List values = const [self::EnumWithS3::a]; + static const field self::EnumWithS3 a = const self::EnumWithS3::•(0, "a"); + const constructor •(core::int index, core::String name) → self::EnumWithS3 + ; + method toString() → core::String + return "EnumWithS3.${this.{core::_Enum::_name}{core::String}}"; +} +abstract class _EnumWithS4&_Enum&G = core::_Enum with self::G> /*isAnonymousMixin,hasConstConstructor*/ { + const synthetic constructor •(core::int index, core::String _name) → self::_EnumWithS4&_Enum&G + : super core::_Enum::•(index, _name) + ; +} +class EnumWithS4 extends self::_EnumWithS4&_Enum&G /*isEnum*/ { + static const field core::List values = const [self::EnumWithS4::a]; + static const field self::EnumWithS4 a = const self::EnumWithS4::•(0, "a"); + const constructor •(core::int index, core::String name) → self::EnumWithS4 + ; + method toString() → core::String + return "EnumWithS4.${this.{core::_Enum::_name}{core::String}}"; +} +abstract class _EnumWithS5&_Enum&G = core::_Enum with self::G /*isAnonymousMixin,hasConstConstructor*/ { + const synthetic constructor •(core::int index, core::String _name) → self::_EnumWithS5&_Enum&G + : super core::_Enum::•(index, _name) + ; +} +class EnumWithS5 extends self::_EnumWithS5&_Enum&G /*isEnum*/ { + static const field core::List values = const [self::EnumWithS5::a]; + static const field self::EnumWithS5 a = const self::EnumWithS5::•(0, "a"); + const constructor •(core::int index, core::String name) → self::EnumWithS5 + ; + method toString() → core::String + return "EnumWithS5.${this.{core::_Enum::_name}{core::String}}"; +} +abstract class _EnumWithS6&_Enum&G = core::_Enum with self::G> /*isAnonymousMixin,hasConstConstructor*/ { + const synthetic constructor •(core::int index, core::String _name) → self::_EnumWithS6&_Enum&G + : super core::_Enum::•(index, _name) + ; +} +class EnumWithS6 extends self::_EnumWithS6&_Enum&G /*isEnum*/ { + static const field core::List values = const [self::EnumWithS6::a]; + static const field self::EnumWithS6 a = const self::EnumWithS6::•(0, "a"); + const constructor •(core::int index, core::String name) → self::EnumWithS6 + ; + method toString() → core::String + return "EnumWithS6.${this.{core::_Enum::_name}{core::String}}"; +} +abstract class _EnumWithS7&_Enum&G = core::_Enum with self::G /*isAnonymousMixin,hasConstConstructor*/ { + const synthetic constructor •(core::int index, core::String _name) → self::_EnumWithS7&_Enum&G + : super core::_Enum::•(index, _name) + ; +} +class EnumWithS7 extends self::_EnumWithS7&_Enum&G /*isEnum*/ { + static const field core::List values = const [self::EnumWithS7::a]; + static const field self::EnumWithS7 a = const self::EnumWithS7::•(0, "a"); + const constructor •(core::int index, core::String name) → self::EnumWithS7 + ; + method toString() → core::String + return "EnumWithS7.${this.{core::_Enum::_name}{core::String}}"; +} +abstract class _EnumWithS8&_Enum&G = core::_Enum with self::G /*isAnonymousMixin,hasConstConstructor*/ { + const synthetic constructor •(core::int index, core::String _name) → self::_EnumWithS8&_Enum&G + : super core::_Enum::•(index, _name) + ; +} +class EnumWithS8 extends self::_EnumWithS8&_Enum&G /*isEnum*/ { + static const field core::List values = const [self::EnumWithS8::a]; + static const field self::EnumWithS8 a = const self::EnumWithS8::•(0, "a"); + const constructor •(core::int index, core::String name) → self::EnumWithS8 + ; + method toString() → core::String + return "EnumWithS8.${this.{core::_Enum::_name}{core::String}}"; +} +abstract class MixinOnT1 extends self::Class> /*isMixinDeclaration*/ { +} +abstract class MixinOnT2 extends self::Class /*isMixinDeclaration*/ { +} +abstract class MixinOnT3 extends self::Class> /*isMixinDeclaration*/ { +} +abstract class MixinOnT4 extends self::Class> /*isMixinDeclaration*/ { +} +abstract class MixinOnT5 extends self::Class /*isMixinDeclaration*/ { +} +abstract class MixinOnT6 extends self::Class> /*isMixinDeclaration*/ { +} +abstract class MixinOnT7 extends self::Class /*isMixinDeclaration*/ { +} +abstract class MixinOnT8 extends self::Class /*isMixinDeclaration*/ { +} +abstract class MixinOnS1 extends self::G> /*isMixinDeclaration*/ { +} +abstract class MixinOnS2 extends self::G /*isMixinDeclaration*/ { +} +abstract class MixinOnS3 extends self::G> /*isMixinDeclaration*/ { +} +abstract class MixinOnS4 extends self::G> /*isMixinDeclaration*/ { +} +abstract class MixinOnS5 extends self::G /*isMixinDeclaration*/ { +} +abstract class MixinOnS6 extends self::G> /*isMixinDeclaration*/ { +} +abstract class MixinOnS7 extends self::G /*isMixinDeclaration*/ { +} +abstract class MixinOnS8 extends self::G /*isMixinDeclaration*/ { +} +extension ExtensionOnT1 on self::Class> { +} +extension ExtensionOnT2 on self::Class { +} +extension ExtensionOnT3 on self::Class> { +} +extension ExtensionOnT4 on self::Class> { +} +extension ExtensionOnT5 on self::Class { +} +extension ExtensionOnT6 on self::Class> { +} +extension ExtensionOnT7 on self::Class { +} +extension ExtensionOnT8 on self::Class { +} +extension ExtensionOnS1 on self::G> { +} +extension ExtensionOnS2 on self::G { +} +extension ExtensionOnS3 on self::G> { +} +extension ExtensionOnS4 on self::G> { +} +extension ExtensionOnS5 on self::G { +} +extension ExtensionOnS6 on self::G> { +} +extension ExtensionOnS7 on self::G { +} +extension ExtensionOnS8 on self::G { +} +static method main() → dynamic + ; +static method _#F#new#tearOff = self::Class>() → self::Class + return new self::Class::•(); + + +Extra constant evaluation status: +Evaluated: ListLiteral @ org-dartlang-testcase:///bounds_supertypes.dart:109:6 -> ListConstant(const [const EnumImplementsT1{_Enum.index: 0, _Enum._name: "a"}]) +Evaluated: ConstructorInvocation @ org-dartlang-testcase:///bounds_supertypes.dart:109:50 -> InstanceConstant(const EnumImplementsT1{_Enum.index: 0, _Enum._name: "a"}) +Evaluated: ListLiteral @ org-dartlang-testcase:///bounds_supertypes.dart:111:6 -> ListConstant(const [const EnumImplementsT2{_Enum.index: 0, _Enum._name: "a"}]) +Evaluated: ConstructorInvocation @ org-dartlang-testcase:///bounds_supertypes.dart:111:59 -> InstanceConstant(const EnumImplementsT2{_Enum.index: 0, _Enum._name: "a"}) +Evaluated: ListLiteral @ org-dartlang-testcase:///bounds_supertypes.dart:113:6 -> ListConstant(const [const EnumImplementsT3{_Enum.index: 0, _Enum._name: "a"}]) +Evaluated: ConstructorInvocation @ org-dartlang-testcase:///bounds_supertypes.dart:113:57 -> InstanceConstant(const EnumImplementsT3{_Enum.index: 0, _Enum._name: "a"}) +Evaluated: ListLiteral @ org-dartlang-testcase:///bounds_supertypes.dart:115:6 -> ListConstant(const [const EnumImplementsT4{_Enum.index: 0, _Enum._name: "a"}]) +Evaluated: ConstructorInvocation @ org-dartlang-testcase:///bounds_supertypes.dart:115:66 -> InstanceConstant(const EnumImplementsT4{_Enum.index: 0, _Enum._name: "a"}) +Evaluated: ListLiteral @ org-dartlang-testcase:///bounds_supertypes.dart:117:6 -> ListConstant(const [const EnumImplementsT5{_Enum.index: 0, _Enum._name: "a"}]) +Evaluated: ConstructorInvocation @ org-dartlang-testcase:///bounds_supertypes.dart:117:62 -> InstanceConstant(const EnumImplementsT5{_Enum.index: 0, _Enum._name: "a"}) +Evaluated: ListLiteral @ org-dartlang-testcase:///bounds_supertypes.dart:119:6 -> ListConstant(const [const EnumImplementsT6{_Enum.index: 0, _Enum._name: "a"}]) +Evaluated: ConstructorInvocation @ org-dartlang-testcase:///bounds_supertypes.dart:119:69 -> InstanceConstant(const EnumImplementsT6{_Enum.index: 0, _Enum._name: "a"}) +Evaluated: ListLiteral @ org-dartlang-testcase:///bounds_supertypes.dart:121:6 -> ListConstant(const [const EnumImplementsT7{_Enum.index: 0, _Enum._name: "a"}]) +Evaluated: ConstructorInvocation @ org-dartlang-testcase:///bounds_supertypes.dart:121:58 -> InstanceConstant(const EnumImplementsT7{_Enum.index: 0, _Enum._name: "a"}) +Evaluated: ListLiteral @ org-dartlang-testcase:///bounds_supertypes.dart:123:6 -> ListConstant(const [const EnumImplementsT8{_Enum.index: 0, _Enum._name: "a"}]) +Evaluated: ConstructorInvocation @ org-dartlang-testcase:///bounds_supertypes.dart:123:55 -> InstanceConstant(const EnumImplementsT8{_Enum.index: 0, _Enum._name: "a"}) +Evaluated: ListLiteral @ org-dartlang-testcase:///bounds_supertypes.dart:125:6 -> ListConstant(const [const EnumImplementsS1{_Enum.index: 0, _Enum._name: "a"}]) +Evaluated: ConstructorInvocation @ org-dartlang-testcase:///bounds_supertypes.dart:125:50 -> InstanceConstant(const EnumImplementsS1{_Enum.index: 0, _Enum._name: "a"}) +Evaluated: ListLiteral @ org-dartlang-testcase:///bounds_supertypes.dart:127:6 -> ListConstant(const [const EnumImplementsS2{_Enum.index: 0, _Enum._name: "a"}]) +Evaluated: ConstructorInvocation @ org-dartlang-testcase:///bounds_supertypes.dart:127:59 -> InstanceConstant(const EnumImplementsS2{_Enum.index: 0, _Enum._name: "a"}) +Evaluated: ListLiteral @ org-dartlang-testcase:///bounds_supertypes.dart:129:6 -> ListConstant(const [const EnumImplementsS3{_Enum.index: 0, _Enum._name: "a"}]) +Evaluated: ConstructorInvocation @ org-dartlang-testcase:///bounds_supertypes.dart:129:57 -> InstanceConstant(const EnumImplementsS3{_Enum.index: 0, _Enum._name: "a"}) +Evaluated: ListLiteral @ org-dartlang-testcase:///bounds_supertypes.dart:131:6 -> ListConstant(const [const EnumImplementsS4{_Enum.index: 0, _Enum._name: "a"}]) +Evaluated: ConstructorInvocation @ org-dartlang-testcase:///bounds_supertypes.dart:131:66 -> InstanceConstant(const EnumImplementsS4{_Enum.index: 0, _Enum._name: "a"}) +Evaluated: ListLiteral @ org-dartlang-testcase:///bounds_supertypes.dart:133:6 -> ListConstant(const [const EnumImplementsS5{_Enum.index: 0, _Enum._name: "a"}]) +Evaluated: ConstructorInvocation @ org-dartlang-testcase:///bounds_supertypes.dart:133:62 -> InstanceConstant(const EnumImplementsS5{_Enum.index: 0, _Enum._name: "a"}) +Evaluated: ListLiteral @ org-dartlang-testcase:///bounds_supertypes.dart:135:6 -> ListConstant(const [const EnumImplementsS6{_Enum.index: 0, _Enum._name: "a"}]) +Evaluated: ConstructorInvocation @ org-dartlang-testcase:///bounds_supertypes.dart:135:69 -> InstanceConstant(const EnumImplementsS6{_Enum.index: 0, _Enum._name: "a"}) +Evaluated: ListLiteral @ org-dartlang-testcase:///bounds_supertypes.dart:137:6 -> ListConstant(const [const EnumImplementsS7{_Enum.index: 0, _Enum._name: "a"}]) +Evaluated: ConstructorInvocation @ org-dartlang-testcase:///bounds_supertypes.dart:137:58 -> InstanceConstant(const EnumImplementsS7{_Enum.index: 0, _Enum._name: "a"}) +Evaluated: ListLiteral @ org-dartlang-testcase:///bounds_supertypes.dart:139:6 -> ListConstant(const [const EnumImplementsS8{_Enum.index: 0, _Enum._name: "a"}]) +Evaluated: ConstructorInvocation @ org-dartlang-testcase:///bounds_supertypes.dart:139:55 -> InstanceConstant(const EnumImplementsS8{_Enum.index: 0, _Enum._name: "a"}) +Evaluated: ListLiteral @ org-dartlang-testcase:///bounds_supertypes.dart:141:6 -> ListConstant(const [const EnumWithT1{}]) +Evaluated: ConstructorInvocation @ org-dartlang-testcase:///bounds_supertypes.dart:141:38 -> InstanceConstant(const EnumWithT1{}) +Evaluated: ListLiteral @ org-dartlang-testcase:///bounds_supertypes.dart:143:6 -> ListConstant(const [const EnumWithT2{}]) +Evaluated: ConstructorInvocation @ org-dartlang-testcase:///bounds_supertypes.dart:143:47 -> InstanceConstant(const EnumWithT2{}) +Evaluated: ListLiteral @ org-dartlang-testcase:///bounds_supertypes.dart:145:6 -> ListConstant(const [const EnumWithT3{}]) +Evaluated: ConstructorInvocation @ org-dartlang-testcase:///bounds_supertypes.dart:145:45 -> InstanceConstant(const EnumWithT3{}) +Evaluated: ListLiteral @ org-dartlang-testcase:///bounds_supertypes.dart:147:6 -> ListConstant(const [const EnumWithT4{}]) +Evaluated: ConstructorInvocation @ org-dartlang-testcase:///bounds_supertypes.dart:147:54 -> InstanceConstant(const EnumWithT4{}) +Evaluated: ListLiteral @ org-dartlang-testcase:///bounds_supertypes.dart:149:6 -> ListConstant(const [const EnumWithT5{}]) +Evaluated: ConstructorInvocation @ org-dartlang-testcase:///bounds_supertypes.dart:149:50 -> InstanceConstant(const EnumWithT5{}) +Evaluated: ListLiteral @ org-dartlang-testcase:///bounds_supertypes.dart:151:6 -> ListConstant(const [const EnumWithT6{}]) +Evaluated: ConstructorInvocation @ org-dartlang-testcase:///bounds_supertypes.dart:151:57 -> InstanceConstant(const EnumWithT6{}) +Evaluated: ListLiteral @ org-dartlang-testcase:///bounds_supertypes.dart:153:6 -> ListConstant(const [const EnumWithT7{}]) +Evaluated: ConstructorInvocation @ org-dartlang-testcase:///bounds_supertypes.dart:153:46 -> InstanceConstant(const EnumWithT7{}) +Evaluated: ListLiteral @ org-dartlang-testcase:///bounds_supertypes.dart:155:6 -> ListConstant(const [const EnumWithT8{}]) +Evaluated: ConstructorInvocation @ org-dartlang-testcase:///bounds_supertypes.dart:155:43 -> InstanceConstant(const EnumWithT8{}) +Evaluated: ListLiteral @ org-dartlang-testcase:///bounds_supertypes.dart:157:6 -> ListConstant(const [const EnumWithS1{}]) +Evaluated: ConstructorInvocation @ org-dartlang-testcase:///bounds_supertypes.dart:157:38 -> InstanceConstant(const EnumWithS1{}) +Evaluated: ListLiteral @ org-dartlang-testcase:///bounds_supertypes.dart:159:6 -> ListConstant(const [const EnumWithS2{}]) +Evaluated: ConstructorInvocation @ org-dartlang-testcase:///bounds_supertypes.dart:159:47 -> InstanceConstant(const EnumWithS2{}) +Evaluated: ListLiteral @ org-dartlang-testcase:///bounds_supertypes.dart:161:6 -> ListConstant(const [const EnumWithS3{}]) +Evaluated: ConstructorInvocation @ org-dartlang-testcase:///bounds_supertypes.dart:161:45 -> InstanceConstant(const EnumWithS3{}) +Evaluated: ListLiteral @ org-dartlang-testcase:///bounds_supertypes.dart:163:6 -> ListConstant(const [const EnumWithS4{}]) +Evaluated: ConstructorInvocation @ org-dartlang-testcase:///bounds_supertypes.dart:163:54 -> InstanceConstant(const EnumWithS4{}) +Evaluated: ListLiteral @ org-dartlang-testcase:///bounds_supertypes.dart:165:6 -> ListConstant(const [const EnumWithS5{}]) +Evaluated: ConstructorInvocation @ org-dartlang-testcase:///bounds_supertypes.dart:165:50 -> InstanceConstant(const EnumWithS5{}) +Evaluated: ListLiteral @ org-dartlang-testcase:///bounds_supertypes.dart:167:6 -> ListConstant(const [const EnumWithS6{}]) +Evaluated: ConstructorInvocation @ org-dartlang-testcase:///bounds_supertypes.dart:167:57 -> InstanceConstant(const EnumWithS6{}) +Evaluated: ListLiteral @ org-dartlang-testcase:///bounds_supertypes.dart:169:6 -> ListConstant(const [const EnumWithS7{}]) +Evaluated: ConstructorInvocation @ org-dartlang-testcase:///bounds_supertypes.dart:169:46 -> InstanceConstant(const EnumWithS7{}) +Evaluated: ListLiteral @ org-dartlang-testcase:///bounds_supertypes.dart:171:6 -> ListConstant(const [const EnumWithS8{}]) +Evaluated: ConstructorInvocation @ org-dartlang-testcase:///bounds_supertypes.dart:171:43 -> InstanceConstant(const EnumWithS8{}) +Extra constant evaluation: evaluated: 225, effectively constant: 64 diff --git a/pkg/front_end/testcases/general/bounds_supertypes.dart.weak.transformed.expect b/pkg/front_end/testcases/general/bounds_supertypes.dart.weak.transformed.expect new file mode 100644 index 00000000000..c15302b651c --- /dev/null +++ b/pkg/front_end/testcases/general/bounds_supertypes.dart.weak.transformed.expect @@ -0,0 +1,1599 @@ +library /*isNonNullableByDefault*/; +// +// Problems in library: +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:13:25: Error: Inferred type argument 'Class' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try specifying type arguments explicitly so that they conform to the bounds. +// class ExtendsT1 extends F {} // Error +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = Class; +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:15:25: Error: Type argument 'dynamic' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// class ExtendsT2 extends F {} // Error +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = Class; +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:17:25: Error: Type argument 'Class' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// class ExtendsT3 extends F {} // Error +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = Class; +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:19:25: Error: Type argument 'Class' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// class ExtendsT4 extends F> {} // Error +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = Class; +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:25:25: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// class ExtendsT7 extends F {} // Error +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = Class; +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:27:25: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// class ExtendsT8 extends F {} // Error +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = Class; +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:29:25: Error: Inferred type argument 'Class' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try specifying type arguments explicitly so that they conform to the bounds. +// class ExtendsS1 extends G {} // Error +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:31:25: Error: Type argument 'dynamic' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// class ExtendsS2 extends G {} // Error +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:33:25: Error: Type argument 'Class' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// class ExtendsS3 extends G {} // Error +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:35:25: Error: Type argument 'Class' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// class ExtendsS4 extends G> {} // Error +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:41:25: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// class ExtendsS7 extends G {} // Error +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:43:25: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// class ExtendsS8 extends G {} // Error +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:45:31: Error: Inferred type argument 'Class' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try specifying type arguments explicitly so that they conform to the bounds. +// class ImplementsT1 implements F {} // Error +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = Class; +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:47:31: Error: Type argument 'dynamic' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// class ImplementsT2 implements F {} // Error +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = Class; +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:49:31: Error: Type argument 'Class' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// class ImplementsT3 implements F {} // Error +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = Class; +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:51:31: Error: Type argument 'Class' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// class ImplementsT4 implements F> {} // Error +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = Class; +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:57:31: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// class ImplementsT7 implements F {} // Error +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = Class; +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:59:31: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// class ImplementsT8 implements F {} // Error +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = Class; +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:61:31: Error: Inferred type argument 'Class' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try specifying type arguments explicitly so that they conform to the bounds. +// class ImplementsS1 implements G {} // Error +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:63:31: Error: Type argument 'dynamic' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// class ImplementsS2 implements G {} // Error +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:65:31: Error: Type argument 'Class' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// class ImplementsS3 implements G {} // Error +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:67:31: Error: Type argument 'Class' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// class ImplementsS4 implements G> {} // Error +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:73:31: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// class ImplementsS7 implements G {} // Error +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:75:31: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// class ImplementsS8 implements G {} // Error +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:77:19: Error: Inferred type argument 'Class' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try specifying type arguments explicitly so that they conform to the bounds. +// class WithT1 with F {} // Error +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = Class; +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:79:19: Error: Type argument 'dynamic' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// class WithT2 with F {} // Error +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = Class; +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:81:19: Error: Type argument 'Class' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// class WithT3 with F {} // Error +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = Class; +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:83:19: Error: Type argument 'Class' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// class WithT4 with F> {} // Error +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = Class; +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:89:19: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// class WithT7 with F {} // Error +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = Class; +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:91:19: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// class WithT8 with F {} // Error +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = Class; +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:109:34: Error: Inferred type argument 'Class' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try specifying type arguments explicitly so that they conform to the bounds. +// enum EnumImplementsT1 implements F /* Error */ { a } +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = Class; +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:111:34: Error: Type argument 'dynamic' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// enum EnumImplementsT2 implements F /* Error */ { a } +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = Class; +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:113:34: Error: Type argument 'Class' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// enum EnumImplementsT3 implements F /* Error */ { a } +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = Class; +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:115:34: Error: Type argument 'Class' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// enum EnumImplementsT4 implements F> /* Error */ { a } +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = Class; +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:121:34: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// enum EnumImplementsT7 implements F /* Error */ { a } +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = Class; +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:123:34: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// enum EnumImplementsT8 implements F /* Error */ { a } +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = Class; +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:125:34: Error: Inferred type argument 'Class' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try specifying type arguments explicitly so that they conform to the bounds. +// enum EnumImplementsS1 implements G /* Error */ { a } +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:127:34: Error: Type argument 'dynamic' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// enum EnumImplementsS2 implements G /* Error */ { a } +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:129:34: Error: Type argument 'Class' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// enum EnumImplementsS3 implements G /* Error */ { a } +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:131:34: Error: Type argument 'Class' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// enum EnumImplementsS4 implements G> /* Error */ { a } +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:137:34: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// enum EnumImplementsS7 implements G /* Error */ { a } +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:139:34: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// enum EnumImplementsS8 implements G /* Error */ { a } +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:141:22: Error: Inferred type argument 'Class' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try specifying type arguments explicitly so that they conform to the bounds. +// enum EnumWithT1 with F /* Error */ { a } +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = Class; +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:143:22: Error: Type argument 'dynamic' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// enum EnumWithT2 with F /* Error */ { a } +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = Class; +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:145:22: Error: Type argument 'Class' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// enum EnumWithT3 with F /* Error */ { a } +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = Class; +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:147:22: Error: Type argument 'Class' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// enum EnumWithT4 with F> /* Error */ { a } +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = Class; +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:153:22: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// enum EnumWithT7 with F /* Error */ { a } +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = Class; +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:155:22: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// enum EnumWithT8 with F /* Error */ { a } +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = Class; +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:173:20: Error: Inferred type argument 'Class' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try specifying type arguments explicitly so that they conform to the bounds. +// mixin MixinOnT1 on F {} // Error +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = Class; +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:175:20: Error: Type argument 'dynamic' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// mixin MixinOnT2 on F {} // Error +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = Class; +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:177:20: Error: Type argument 'Class' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// mixin MixinOnT3 on F {} // Error +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = Class; +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:179:20: Error: Type argument 'Class' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// mixin MixinOnT4 on F> {} // Error +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = Class; +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:185:20: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// mixin MixinOnT7 on F {} // Error +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = Class; +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:187:20: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// mixin MixinOnT8 on F {} // Error +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = Class; +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:189:20: Error: Inferred type argument 'Class' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try specifying type arguments explicitly so that they conform to the bounds. +// mixin MixinOnS1 on G {} // Error +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:191:20: Error: Type argument 'dynamic' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// mixin MixinOnS2 on G {} // Error +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:193:20: Error: Type argument 'Class' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// mixin MixinOnS3 on G {} // Error +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:195:20: Error: Type argument 'Class' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// mixin MixinOnS4 on G> {} // Error +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:201:20: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// mixin MixinOnS7 on G {} // Error +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:203:20: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// mixin MixinOnS8 on G {} // Error +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:217:28: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// extension ExtensionOnT7 on F {} // Error +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = Class; +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:219:28: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// extension ExtensionOnT8 on F {} // Error +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = Class; +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:233:28: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// extension ExtensionOnS7 on G {} // Error +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:235:28: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// extension ExtensionOnS8 on G {} // Error +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:93:19: Error: Inferred type argument 'Class' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try specifying type arguments explicitly so that they conform to the bounds. +// class WithS1 with G {} // Error +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:95:19: Error: Type argument 'dynamic' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// class WithS2 with G {} // Error +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:97:19: Error: Type argument 'Class' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// class WithS3 with G {} // Error +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:99:19: Error: Type argument 'Class' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// class WithS4 with G> {} // Error +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:105:19: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// class WithS7 with G {} // Error +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:107:19: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// class WithS8 with G {} // Error +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:157:22: Error: Inferred type argument 'Class' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try specifying type arguments explicitly so that they conform to the bounds. +// enum EnumWithS1 with G /* Error */ { a } +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:159:22: Error: Type argument 'dynamic' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// enum EnumWithS2 with G /* Error */ { a } +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:161:22: Error: Type argument 'Class' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// enum EnumWithS3 with G /* Error */ { a } +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:163:22: Error: Type argument 'Class' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// enum EnumWithS4 with G> /* Error */ { a } +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:169:22: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// enum EnumWithS7 with G /* Error */ { a } +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_supertypes.dart:171:22: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_supertypes.dart'. +// Try changing type arguments so that they conform to the bounds. +// enum EnumWithS8 with G /* Error */ { a } +// ^ +// pkg/front_end/testcases/general/bounds_supertypes.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +import self as self; +import "dart:core" as core; + +typedef F = self::Class> = self::Class; +class Class extends core::Object { + synthetic constructor •() → self::Class + : super core::Object::•() + ; +} +class ConcreteClass extends core::Object implements self::Class { + synthetic constructor •() → self::ConcreteClass + : super core::Object::•() + ; +} +class G = self::Class> extends core::Object { + synthetic constructor •() → self::G + : super core::Object::•() + ; +} +class ExtendsT1 extends self::Class> { + synthetic constructor •() → self::ExtendsT1 + : super self::Class::•() + ; +} +class ExtendsT2 extends self::Class { + synthetic constructor •() → self::ExtendsT2 + : super self::Class::•() + ; +} +class ExtendsT3 extends self::Class> { + synthetic constructor •() → self::ExtendsT3 + : super self::Class::•() + ; +} +class ExtendsT4 extends self::Class> { + synthetic constructor •() → self::ExtendsT4 + : super self::Class::•() + ; +} +class ExtendsT5 extends self::Class { + synthetic constructor •() → self::ExtendsT5 + : super self::Class::•() + ; +} +class ExtendsT6 extends self::Class> { + synthetic constructor •() → self::ExtendsT6 + : super self::Class::•() + ; +} +class ExtendsT7 extends self::Class { + synthetic constructor •() → self::ExtendsT7 + : super self::Class::•() + ; +} +class ExtendsT8 extends self::Class { + synthetic constructor •() → self::ExtendsT8 + : super self::Class::•() + ; +} +class ExtendsS1 extends self::G> { + synthetic constructor •() → self::ExtendsS1 + : super self::G::•() + ; +} +class ExtendsS2 extends self::G { + synthetic constructor •() → self::ExtendsS2 + : super self::G::•() + ; +} +class ExtendsS3 extends self::G> { + synthetic constructor •() → self::ExtendsS3 + : super self::G::•() + ; +} +class ExtendsS4 extends self::G> { + synthetic constructor •() → self::ExtendsS4 + : super self::G::•() + ; +} +class ExtendsS5 extends self::G { + synthetic constructor •() → self::ExtendsS5 + : super self::G::•() + ; +} +class ExtendsS6 extends self::G> { + synthetic constructor •() → self::ExtendsS6 + : super self::G::•() + ; +} +class ExtendsS7 extends self::G { + synthetic constructor •() → self::ExtendsS7 + : super self::G::•() + ; +} +class ExtendsS8 extends self::G { + synthetic constructor •() → self::ExtendsS8 + : super self::G::•() + ; +} +class ImplementsT1 extends core::Object implements self::Class> { + synthetic constructor •() → self::ImplementsT1 + : super core::Object::•() + ; +} +class ImplementsT2 extends core::Object implements self::Class { + synthetic constructor •() → self::ImplementsT2 + : super core::Object::•() + ; +} +class ImplementsT3 extends core::Object implements self::Class> { + synthetic constructor •() → self::ImplementsT3 + : super core::Object::•() + ; +} +class ImplementsT4 extends core::Object implements self::Class> { + synthetic constructor •() → self::ImplementsT4 + : super core::Object::•() + ; +} +class ImplementsT5 extends core::Object implements self::Class { + synthetic constructor •() → self::ImplementsT5 + : super core::Object::•() + ; +} +class ImplementsT6 extends core::Object implements self::Class> { + synthetic constructor •() → self::ImplementsT6 + : super core::Object::•() + ; +} +class ImplementsT7 extends core::Object implements self::Class { + synthetic constructor •() → self::ImplementsT7 + : super core::Object::•() + ; +} +class ImplementsT8 extends core::Object implements self::Class { + synthetic constructor •() → self::ImplementsT8 + : super core::Object::•() + ; +} +class ImplementsS1 extends core::Object implements self::G> { + synthetic constructor •() → self::ImplementsS1 + : super core::Object::•() + ; +} +class ImplementsS2 extends core::Object implements self::G { + synthetic constructor •() → self::ImplementsS2 + : super core::Object::•() + ; +} +class ImplementsS3 extends core::Object implements self::G> { + synthetic constructor •() → self::ImplementsS3 + : super core::Object::•() + ; +} +class ImplementsS4 extends core::Object implements self::G> { + synthetic constructor •() → self::ImplementsS4 + : super core::Object::•() + ; +} +class ImplementsS5 extends core::Object implements self::G { + synthetic constructor •() → self::ImplementsS5 + : super core::Object::•() + ; +} +class ImplementsS6 extends core::Object implements self::G> { + synthetic constructor •() → self::ImplementsS6 + : super core::Object::•() + ; +} +class ImplementsS7 extends core::Object implements self::G { + synthetic constructor •() → self::ImplementsS7 + : super core::Object::•() + ; +} +class ImplementsS8 extends core::Object implements self::G { + synthetic constructor •() → self::ImplementsS8 + : super core::Object::•() + ; +} +abstract class _WithT1&Object&F extends core::Object implements self::Class> /*isAnonymousMixin,isEliminatedMixin,hasConstConstructor*/ { + const synthetic constructor •() → self::_WithT1&Object&F + : super core::Object::•() + ; +} +class WithT1 extends self::_WithT1&Object&F { + synthetic constructor •() → self::WithT1 + : super self::_WithT1&Object&F::•() + ; +} +abstract class _WithT2&Object&F extends core::Object implements self::Class /*isAnonymousMixin,isEliminatedMixin,hasConstConstructor*/ { + const synthetic constructor •() → self::_WithT2&Object&F + : super core::Object::•() + ; +} +class WithT2 extends self::_WithT2&Object&F { + synthetic constructor •() → self::WithT2 + : super self::_WithT2&Object&F::•() + ; +} +abstract class _WithT3&Object&F extends core::Object implements self::Class> /*isAnonymousMixin,isEliminatedMixin,hasConstConstructor*/ { + const synthetic constructor •() → self::_WithT3&Object&F + : super core::Object::•() + ; +} +class WithT3 extends self::_WithT3&Object&F { + synthetic constructor •() → self::WithT3 + : super self::_WithT3&Object&F::•() + ; +} +abstract class _WithT4&Object&F extends core::Object implements self::Class> /*isAnonymousMixin,isEliminatedMixin,hasConstConstructor*/ { + const synthetic constructor •() → self::_WithT4&Object&F + : super core::Object::•() + ; +} +class WithT4 extends self::_WithT4&Object&F { + synthetic constructor •() → self::WithT4 + : super self::_WithT4&Object&F::•() + ; +} +abstract class _WithT5&Object&F extends core::Object implements self::Class /*isAnonymousMixin,isEliminatedMixin,hasConstConstructor*/ { + const synthetic constructor •() → self::_WithT5&Object&F + : super core::Object::•() + ; +} +class WithT5 extends self::_WithT5&Object&F { + synthetic constructor •() → self::WithT5 + : super self::_WithT5&Object&F::•() + ; +} +abstract class _WithT6&Object&F extends core::Object implements self::Class> /*isAnonymousMixin,isEliminatedMixin,hasConstConstructor*/ { + const synthetic constructor •() → self::_WithT6&Object&F + : super core::Object::•() + ; +} +class WithT6 extends self::_WithT6&Object&F { + synthetic constructor •() → self::WithT6 + : super self::_WithT6&Object&F::•() + ; +} +abstract class _WithT7&Object&F extends core::Object implements self::Class /*isAnonymousMixin,isEliminatedMixin,hasConstConstructor*/ { + const synthetic constructor •() → self::_WithT7&Object&F + : super core::Object::•() + ; +} +class WithT7 extends self::_WithT7&Object&F { + synthetic constructor •() → self::WithT7 + : super self::_WithT7&Object&F::•() + ; +} +abstract class _WithT8&Object&F extends core::Object implements self::Class /*isAnonymousMixin,isEliminatedMixin,hasConstConstructor*/ { + const synthetic constructor •() → self::_WithT8&Object&F + : super core::Object::•() + ; +} +class WithT8 extends self::_WithT8&Object&F { + synthetic constructor •() → self::WithT8 + : super self::_WithT8&Object&F::•() + ; +} +abstract class _WithS1&Object&G extends core::Object implements self::G> /*isAnonymousMixin,isEliminatedMixin,hasConstConstructor*/ { + const synthetic constructor •() → self::_WithS1&Object&G + : super core::Object::•() + ; +} +class WithS1 extends self::_WithS1&Object&G { + synthetic constructor •() → self::WithS1 + : super self::_WithS1&Object&G::•() + ; +} +abstract class _WithS2&Object&G extends core::Object implements self::G /*isAnonymousMixin,isEliminatedMixin,hasConstConstructor*/ { + const synthetic constructor •() → self::_WithS2&Object&G + : super core::Object::•() + ; +} +class WithS2 extends self::_WithS2&Object&G { + synthetic constructor •() → self::WithS2 + : super self::_WithS2&Object&G::•() + ; +} +abstract class _WithS3&Object&G extends core::Object implements self::G> /*isAnonymousMixin,isEliminatedMixin,hasConstConstructor*/ { + const synthetic constructor •() → self::_WithS3&Object&G + : super core::Object::•() + ; +} +class WithS3 extends self::_WithS3&Object&G { + synthetic constructor •() → self::WithS3 + : super self::_WithS3&Object&G::•() + ; +} +abstract class _WithS4&Object&G extends core::Object implements self::G> /*isAnonymousMixin,isEliminatedMixin,hasConstConstructor*/ { + const synthetic constructor •() → self::_WithS4&Object&G + : super core::Object::•() + ; +} +class WithS4 extends self::_WithS4&Object&G { + synthetic constructor •() → self::WithS4 + : super self::_WithS4&Object&G::•() + ; +} +abstract class _WithS5&Object&G extends core::Object implements self::G /*isAnonymousMixin,isEliminatedMixin,hasConstConstructor*/ { + const synthetic constructor •() → self::_WithS5&Object&G + : super core::Object::•() + ; +} +class WithS5 extends self::_WithS5&Object&G { + synthetic constructor •() → self::WithS5 + : super self::_WithS5&Object&G::•() + ; +} +abstract class _WithS6&Object&G extends core::Object implements self::G> /*isAnonymousMixin,isEliminatedMixin,hasConstConstructor*/ { + const synthetic constructor •() → self::_WithS6&Object&G + : super core::Object::•() + ; +} +class WithS6 extends self::_WithS6&Object&G { + synthetic constructor •() → self::WithS6 + : super self::_WithS6&Object&G::•() + ; +} +abstract class _WithS7&Object&G extends core::Object implements self::G /*isAnonymousMixin,isEliminatedMixin,hasConstConstructor*/ { + const synthetic constructor •() → self::_WithS7&Object&G + : super core::Object::•() + ; +} +class WithS7 extends self::_WithS7&Object&G { + synthetic constructor •() → self::WithS7 + : super self::_WithS7&Object&G::•() + ; +} +abstract class _WithS8&Object&G extends core::Object implements self::G /*isAnonymousMixin,isEliminatedMixin,hasConstConstructor*/ { + const synthetic constructor •() → self::_WithS8&Object&G + : super core::Object::•() + ; +} +class WithS8 extends self::_WithS8&Object&G { + synthetic constructor •() → self::WithS8 + : super self::_WithS8&Object&G::•() + ; +} +class EnumImplementsT1 extends core::_Enum implements self::Class> /*isEnum*/ { + static const field core::List values = #C4; + static const field self::EnumImplementsT1 a = #C3; + const constructor •(core::int index, core::String name) → self::EnumImplementsT1 + : super core::_Enum::•(index, name) + ; + method toString() → core::String + return "EnumImplementsT1.${this.{core::_Enum::_name}{core::String}}"; +} +class EnumImplementsT2 extends core::_Enum implements self::Class /*isEnum*/ { + static const field core::List values = #C6; + static const field self::EnumImplementsT2 a = #C5; + const constructor •(core::int index, core::String name) → self::EnumImplementsT2 + : super core::_Enum::•(index, name) + ; + method toString() → core::String + return "EnumImplementsT2.${this.{core::_Enum::_name}{core::String}}"; +} +class EnumImplementsT3 extends core::_Enum implements self::Class> /*isEnum*/ { + static const field core::List values = #C8; + static const field self::EnumImplementsT3 a = #C7; + const constructor •(core::int index, core::String name) → self::EnumImplementsT3 + : super core::_Enum::•(index, name) + ; + method toString() → core::String + return "EnumImplementsT3.${this.{core::_Enum::_name}{core::String}}"; +} +class EnumImplementsT4 extends core::_Enum implements self::Class> /*isEnum*/ { + static const field core::List values = #C10; + static const field self::EnumImplementsT4 a = #C9; + const constructor •(core::int index, core::String name) → self::EnumImplementsT4 + : super core::_Enum::•(index, name) + ; + method toString() → core::String + return "EnumImplementsT4.${this.{core::_Enum::_name}{core::String}}"; +} +class EnumImplementsT5 extends core::_Enum implements self::Class /*isEnum*/ { + static const field core::List values = #C12; + static const field self::EnumImplementsT5 a = #C11; + const constructor •(core::int index, core::String name) → self::EnumImplementsT5 + : super core::_Enum::•(index, name) + ; + method toString() → core::String + return "EnumImplementsT5.${this.{core::_Enum::_name}{core::String}}"; +} +class EnumImplementsT6 extends core::_Enum implements self::Class> /*isEnum*/ { + static const field core::List values = #C14; + static const field self::EnumImplementsT6 a = #C13; + const constructor •(core::int index, core::String name) → self::EnumImplementsT6 + : super core::_Enum::•(index, name) + ; + method toString() → core::String + return "EnumImplementsT6.${this.{core::_Enum::_name}{core::String}}"; +} +class EnumImplementsT7 extends core::_Enum implements self::Class /*isEnum*/ { + static const field core::List values = #C16; + static const field self::EnumImplementsT7 a = #C15; + const constructor •(core::int index, core::String name) → self::EnumImplementsT7 + : super core::_Enum::•(index, name) + ; + method toString() → core::String + return "EnumImplementsT7.${this.{core::_Enum::_name}{core::String}}"; +} +class EnumImplementsT8 extends core::_Enum implements self::Class /*isEnum*/ { + static const field core::List values = #C18; + static const field self::EnumImplementsT8 a = #C17; + const constructor •(core::int index, core::String name) → self::EnumImplementsT8 + : super core::_Enum::•(index, name) + ; + method toString() → core::String + return "EnumImplementsT8.${this.{core::_Enum::_name}{core::String}}"; +} +class EnumImplementsS1 extends core::_Enum implements self::G> /*isEnum*/ { + static const field core::List values = #C20; + static const field self::EnumImplementsS1 a = #C19; + const constructor •(core::int index, core::String name) → self::EnumImplementsS1 + : super core::_Enum::•(index, name) + ; + method toString() → core::String + return "EnumImplementsS1.${this.{core::_Enum::_name}{core::String}}"; +} +class EnumImplementsS2 extends core::_Enum implements self::G /*isEnum*/ { + static const field core::List values = #C22; + static const field self::EnumImplementsS2 a = #C21; + const constructor •(core::int index, core::String name) → self::EnumImplementsS2 + : super core::_Enum::•(index, name) + ; + method toString() → core::String + return "EnumImplementsS2.${this.{core::_Enum::_name}{core::String}}"; +} +class EnumImplementsS3 extends core::_Enum implements self::G> /*isEnum*/ { + static const field core::List values = #C24; + static const field self::EnumImplementsS3 a = #C23; + const constructor •(core::int index, core::String name) → self::EnumImplementsS3 + : super core::_Enum::•(index, name) + ; + method toString() → core::String + return "EnumImplementsS3.${this.{core::_Enum::_name}{core::String}}"; +} +class EnumImplementsS4 extends core::_Enum implements self::G> /*isEnum*/ { + static const field core::List values = #C26; + static const field self::EnumImplementsS4 a = #C25; + const constructor •(core::int index, core::String name) → self::EnumImplementsS4 + : super core::_Enum::•(index, name) + ; + method toString() → core::String + return "EnumImplementsS4.${this.{core::_Enum::_name}{core::String}}"; +} +class EnumImplementsS5 extends core::_Enum implements self::G /*isEnum*/ { + static const field core::List values = #C28; + static const field self::EnumImplementsS5 a = #C27; + const constructor •(core::int index, core::String name) → self::EnumImplementsS5 + : super core::_Enum::•(index, name) + ; + method toString() → core::String + return "EnumImplementsS5.${this.{core::_Enum::_name}{core::String}}"; +} +class EnumImplementsS6 extends core::_Enum implements self::G> /*isEnum*/ { + static const field core::List values = #C30; + static const field self::EnumImplementsS6 a = #C29; + const constructor •(core::int index, core::String name) → self::EnumImplementsS6 + : super core::_Enum::•(index, name) + ; + method toString() → core::String + return "EnumImplementsS6.${this.{core::_Enum::_name}{core::String}}"; +} +class EnumImplementsS7 extends core::_Enum implements self::G /*isEnum*/ { + static const field core::List values = #C32; + static const field self::EnumImplementsS7 a = #C31; + const constructor •(core::int index, core::String name) → self::EnumImplementsS7 + : super core::_Enum::•(index, name) + ; + method toString() → core::String + return "EnumImplementsS7.${this.{core::_Enum::_name}{core::String}}"; +} +class EnumImplementsS8 extends core::_Enum implements self::G /*isEnum*/ { + static const field core::List values = #C34; + static const field self::EnumImplementsS8 a = #C33; + const constructor •(core::int index, core::String name) → self::EnumImplementsS8 + : super core::_Enum::•(index, name) + ; + method toString() → core::String + return "EnumImplementsS8.${this.{core::_Enum::_name}{core::String}}"; +} +abstract class _EnumWithT1&_Enum&F extends core::_Enum implements self::Class> /*isAnonymousMixin,isEliminatedMixin,hasConstConstructor*/ { + const synthetic constructor •(core::int index, core::String _name) → self::_EnumWithT1&_Enum&F + : super core::_Enum::•(index, _name) + ; +} +class EnumWithT1 extends self::_EnumWithT1&_Enum&F /*isEnum*/ { + static const field core::List values = #C36; + static const field self::EnumWithT1 a = #C35; + const constructor •(core::int index, core::String name) → self::EnumWithT1 + : super self::_EnumWithT1&_Enum&F::•(index, name) + ; + method toString() → core::String + return "EnumWithT1.${this.{core::_Enum::_name}{core::String}}"; +} +abstract class _EnumWithT2&_Enum&F extends core::_Enum implements self::Class /*isAnonymousMixin,isEliminatedMixin,hasConstConstructor*/ { + const synthetic constructor •(core::int index, core::String _name) → self::_EnumWithT2&_Enum&F + : super core::_Enum::•(index, _name) + ; +} +class EnumWithT2 extends self::_EnumWithT2&_Enum&F /*isEnum*/ { + static const field core::List values = #C38; + static const field self::EnumWithT2 a = #C37; + const constructor •(core::int index, core::String name) → self::EnumWithT2 + : super self::_EnumWithT2&_Enum&F::•(index, name) + ; + method toString() → core::String + return "EnumWithT2.${this.{core::_Enum::_name}{core::String}}"; +} +abstract class _EnumWithT3&_Enum&F extends core::_Enum implements self::Class> /*isAnonymousMixin,isEliminatedMixin,hasConstConstructor*/ { + const synthetic constructor •(core::int index, core::String _name) → self::_EnumWithT3&_Enum&F + : super core::_Enum::•(index, _name) + ; +} +class EnumWithT3 extends self::_EnumWithT3&_Enum&F /*isEnum*/ { + static const field core::List values = #C40; + static const field self::EnumWithT3 a = #C39; + const constructor •(core::int index, core::String name) → self::EnumWithT3 + : super self::_EnumWithT3&_Enum&F::•(index, name) + ; + method toString() → core::String + return "EnumWithT3.${this.{core::_Enum::_name}{core::String}}"; +} +abstract class _EnumWithT4&_Enum&F extends core::_Enum implements self::Class> /*isAnonymousMixin,isEliminatedMixin,hasConstConstructor*/ { + const synthetic constructor •(core::int index, core::String _name) → self::_EnumWithT4&_Enum&F + : super core::_Enum::•(index, _name) + ; +} +class EnumWithT4 extends self::_EnumWithT4&_Enum&F /*isEnum*/ { + static const field core::List values = #C42; + static const field self::EnumWithT4 a = #C41; + const constructor •(core::int index, core::String name) → self::EnumWithT4 + : super self::_EnumWithT4&_Enum&F::•(index, name) + ; + method toString() → core::String + return "EnumWithT4.${this.{core::_Enum::_name}{core::String}}"; +} +abstract class _EnumWithT5&_Enum&F extends core::_Enum implements self::Class /*isAnonymousMixin,isEliminatedMixin,hasConstConstructor*/ { + const synthetic constructor •(core::int index, core::String _name) → self::_EnumWithT5&_Enum&F + : super core::_Enum::•(index, _name) + ; +} +class EnumWithT5 extends self::_EnumWithT5&_Enum&F /*isEnum*/ { + static const field core::List values = #C44; + static const field self::EnumWithT5 a = #C43; + const constructor •(core::int index, core::String name) → self::EnumWithT5 + : super self::_EnumWithT5&_Enum&F::•(index, name) + ; + method toString() → core::String + return "EnumWithT5.${this.{core::_Enum::_name}{core::String}}"; +} +abstract class _EnumWithT6&_Enum&F extends core::_Enum implements self::Class> /*isAnonymousMixin,isEliminatedMixin,hasConstConstructor*/ { + const synthetic constructor •(core::int index, core::String _name) → self::_EnumWithT6&_Enum&F + : super core::_Enum::•(index, _name) + ; +} +class EnumWithT6 extends self::_EnumWithT6&_Enum&F /*isEnum*/ { + static const field core::List values = #C46; + static const field self::EnumWithT6 a = #C45; + const constructor •(core::int index, core::String name) → self::EnumWithT6 + : super self::_EnumWithT6&_Enum&F::•(index, name) + ; + method toString() → core::String + return "EnumWithT6.${this.{core::_Enum::_name}{core::String}}"; +} +abstract class _EnumWithT7&_Enum&F extends core::_Enum implements self::Class /*isAnonymousMixin,isEliminatedMixin,hasConstConstructor*/ { + const synthetic constructor •(core::int index, core::String _name) → self::_EnumWithT7&_Enum&F + : super core::_Enum::•(index, _name) + ; +} +class EnumWithT7 extends self::_EnumWithT7&_Enum&F /*isEnum*/ { + static const field core::List values = #C48; + static const field self::EnumWithT7 a = #C47; + const constructor •(core::int index, core::String name) → self::EnumWithT7 + : super self::_EnumWithT7&_Enum&F::•(index, name) + ; + method toString() → core::String + return "EnumWithT7.${this.{core::_Enum::_name}{core::String}}"; +} +abstract class _EnumWithT8&_Enum&F extends core::_Enum implements self::Class /*isAnonymousMixin,isEliminatedMixin,hasConstConstructor*/ { + const synthetic constructor •(core::int index, core::String _name) → self::_EnumWithT8&_Enum&F + : super core::_Enum::•(index, _name) + ; +} +class EnumWithT8 extends self::_EnumWithT8&_Enum&F /*isEnum*/ { + static const field core::List values = #C50; + static const field self::EnumWithT8 a = #C49; + const constructor •(core::int index, core::String name) → self::EnumWithT8 + : super self::_EnumWithT8&_Enum&F::•(index, name) + ; + method toString() → core::String + return "EnumWithT8.${this.{core::_Enum::_name}{core::String}}"; +} +abstract class _EnumWithS1&_Enum&G extends core::_Enum implements self::G> /*isAnonymousMixin,isEliminatedMixin,hasConstConstructor*/ { + const synthetic constructor •(core::int index, core::String _name) → self::_EnumWithS1&_Enum&G + : super core::_Enum::•(index, _name) + ; +} +class EnumWithS1 extends self::_EnumWithS1&_Enum&G /*isEnum*/ { + static const field core::List values = #C52; + static const field self::EnumWithS1 a = #C51; + const constructor •(core::int index, core::String name) → self::EnumWithS1 + : super self::_EnumWithS1&_Enum&G::•(index, name) + ; + method toString() → core::String + return "EnumWithS1.${this.{core::_Enum::_name}{core::String}}"; +} +abstract class _EnumWithS2&_Enum&G extends core::_Enum implements self::G /*isAnonymousMixin,isEliminatedMixin,hasConstConstructor*/ { + const synthetic constructor •(core::int index, core::String _name) → self::_EnumWithS2&_Enum&G + : super core::_Enum::•(index, _name) + ; +} +class EnumWithS2 extends self::_EnumWithS2&_Enum&G /*isEnum*/ { + static const field core::List values = #C54; + static const field self::EnumWithS2 a = #C53; + const constructor •(core::int index, core::String name) → self::EnumWithS2 + : super self::_EnumWithS2&_Enum&G::•(index, name) + ; + method toString() → core::String + return "EnumWithS2.${this.{core::_Enum::_name}{core::String}}"; +} +abstract class _EnumWithS3&_Enum&G extends core::_Enum implements self::G> /*isAnonymousMixin,isEliminatedMixin,hasConstConstructor*/ { + const synthetic constructor •(core::int index, core::String _name) → self::_EnumWithS3&_Enum&G + : super core::_Enum::•(index, _name) + ; +} +class EnumWithS3 extends self::_EnumWithS3&_Enum&G /*isEnum*/ { + static const field core::List values = #C56; + static const field self::EnumWithS3 a = #C55; + const constructor •(core::int index, core::String name) → self::EnumWithS3 + : super self::_EnumWithS3&_Enum&G::•(index, name) + ; + method toString() → core::String + return "EnumWithS3.${this.{core::_Enum::_name}{core::String}}"; +} +abstract class _EnumWithS4&_Enum&G extends core::_Enum implements self::G> /*isAnonymousMixin,isEliminatedMixin,hasConstConstructor*/ { + const synthetic constructor •(core::int index, core::String _name) → self::_EnumWithS4&_Enum&G + : super core::_Enum::•(index, _name) + ; +} +class EnumWithS4 extends self::_EnumWithS4&_Enum&G /*isEnum*/ { + static const field core::List values = #C58; + static const field self::EnumWithS4 a = #C57; + const constructor •(core::int index, core::String name) → self::EnumWithS4 + : super self::_EnumWithS4&_Enum&G::•(index, name) + ; + method toString() → core::String + return "EnumWithS4.${this.{core::_Enum::_name}{core::String}}"; +} +abstract class _EnumWithS5&_Enum&G extends core::_Enum implements self::G /*isAnonymousMixin,isEliminatedMixin,hasConstConstructor*/ { + const synthetic constructor •(core::int index, core::String _name) → self::_EnumWithS5&_Enum&G + : super core::_Enum::•(index, _name) + ; +} +class EnumWithS5 extends self::_EnumWithS5&_Enum&G /*isEnum*/ { + static const field core::List values = #C60; + static const field self::EnumWithS5 a = #C59; + const constructor •(core::int index, core::String name) → self::EnumWithS5 + : super self::_EnumWithS5&_Enum&G::•(index, name) + ; + method toString() → core::String + return "EnumWithS5.${this.{core::_Enum::_name}{core::String}}"; +} +abstract class _EnumWithS6&_Enum&G extends core::_Enum implements self::G> /*isAnonymousMixin,isEliminatedMixin,hasConstConstructor*/ { + const synthetic constructor •(core::int index, core::String _name) → self::_EnumWithS6&_Enum&G + : super core::_Enum::•(index, _name) + ; +} +class EnumWithS6 extends self::_EnumWithS6&_Enum&G /*isEnum*/ { + static const field core::List values = #C62; + static const field self::EnumWithS6 a = #C61; + const constructor •(core::int index, core::String name) → self::EnumWithS6 + : super self::_EnumWithS6&_Enum&G::•(index, name) + ; + method toString() → core::String + return "EnumWithS6.${this.{core::_Enum::_name}{core::String}}"; +} +abstract class _EnumWithS7&_Enum&G extends core::_Enum implements self::G /*isAnonymousMixin,isEliminatedMixin,hasConstConstructor*/ { + const synthetic constructor •(core::int index, core::String _name) → self::_EnumWithS7&_Enum&G + : super core::_Enum::•(index, _name) + ; +} +class EnumWithS7 extends self::_EnumWithS7&_Enum&G /*isEnum*/ { + static const field core::List values = #C64; + static const field self::EnumWithS7 a = #C63; + const constructor •(core::int index, core::String name) → self::EnumWithS7 + : super self::_EnumWithS7&_Enum&G::•(index, name) + ; + method toString() → core::String + return "EnumWithS7.${this.{core::_Enum::_name}{core::String}}"; +} +abstract class _EnumWithS8&_Enum&G extends core::_Enum implements self::G /*isAnonymousMixin,isEliminatedMixin,hasConstConstructor*/ { + const synthetic constructor •(core::int index, core::String _name) → self::_EnumWithS8&_Enum&G + : super core::_Enum::•(index, _name) + ; +} +class EnumWithS8 extends self::_EnumWithS8&_Enum&G /*isEnum*/ { + static const field core::List values = #C66; + static const field self::EnumWithS8 a = #C65; + const constructor •(core::int index, core::String name) → self::EnumWithS8 + : super self::_EnumWithS8&_Enum&G::•(index, name) + ; + method toString() → core::String + return "EnumWithS8.${this.{core::_Enum::_name}{core::String}}"; +} +abstract class MixinOnT1 extends self::Class> /*isMixinDeclaration*/ { +} +abstract class MixinOnT2 extends self::Class /*isMixinDeclaration*/ { +} +abstract class MixinOnT3 extends self::Class> /*isMixinDeclaration*/ { +} +abstract class MixinOnT4 extends self::Class> /*isMixinDeclaration*/ { +} +abstract class MixinOnT5 extends self::Class /*isMixinDeclaration*/ { +} +abstract class MixinOnT6 extends self::Class> /*isMixinDeclaration*/ { +} +abstract class MixinOnT7 extends self::Class /*isMixinDeclaration*/ { +} +abstract class MixinOnT8 extends self::Class /*isMixinDeclaration*/ { +} +abstract class MixinOnS1 extends self::G> /*isMixinDeclaration*/ { +} +abstract class MixinOnS2 extends self::G /*isMixinDeclaration*/ { +} +abstract class MixinOnS3 extends self::G> /*isMixinDeclaration*/ { +} +abstract class MixinOnS4 extends self::G> /*isMixinDeclaration*/ { +} +abstract class MixinOnS5 extends self::G /*isMixinDeclaration*/ { +} +abstract class MixinOnS6 extends self::G> /*isMixinDeclaration*/ { +} +abstract class MixinOnS7 extends self::G /*isMixinDeclaration*/ { +} +abstract class MixinOnS8 extends self::G /*isMixinDeclaration*/ { +} +extension ExtensionOnT1 on self::Class> { +} +extension ExtensionOnT2 on self::Class { +} +extension ExtensionOnT3 on self::Class> { +} +extension ExtensionOnT4 on self::Class> { +} +extension ExtensionOnT5 on self::Class { +} +extension ExtensionOnT6 on self::Class> { +} +extension ExtensionOnT7 on self::Class { +} +extension ExtensionOnT8 on self::Class { +} +extension ExtensionOnS1 on self::G> { +} +extension ExtensionOnS2 on self::G { +} +extension ExtensionOnS3 on self::G> { +} +extension ExtensionOnS4 on self::G> { +} +extension ExtensionOnS5 on self::G { +} +extension ExtensionOnS6 on self::G> { +} +extension ExtensionOnS7 on self::G { +} +extension ExtensionOnS8 on self::G { +} +static method main() → dynamic {} +static method _#F#new#tearOff = self::Class>() → self::Class + return new self::Class::•(); + +constants { + #C1 = 0 + #C2 = "a" + #C3 = self::EnumImplementsT1 {index:#C1, _name:#C2} + #C4 = [#C3] + #C5 = self::EnumImplementsT2 {index:#C1, _name:#C2} + #C6 = [#C5] + #C7 = self::EnumImplementsT3 {index:#C1, _name:#C2} + #C8 = [#C7] + #C9 = self::EnumImplementsT4 {index:#C1, _name:#C2} + #C10 = [#C9] + #C11 = self::EnumImplementsT5 {index:#C1, _name:#C2} + #C12 = [#C11] + #C13 = self::EnumImplementsT6 {index:#C1, _name:#C2} + #C14 = [#C13] + #C15 = self::EnumImplementsT7 {index:#C1, _name:#C2} + #C16 = [#C15] + #C17 = self::EnumImplementsT8 {index:#C1, _name:#C2} + #C18 = [#C17] + #C19 = self::EnumImplementsS1 {index:#C1, _name:#C2} + #C20 = [#C19] + #C21 = self::EnumImplementsS2 {index:#C1, _name:#C2} + #C22 = [#C21] + #C23 = self::EnumImplementsS3 {index:#C1, _name:#C2} + #C24 = [#C23] + #C25 = self::EnumImplementsS4 {index:#C1, _name:#C2} + #C26 = [#C25] + #C27 = self::EnumImplementsS5 {index:#C1, _name:#C2} + #C28 = [#C27] + #C29 = self::EnumImplementsS6 {index:#C1, _name:#C2} + #C30 = [#C29] + #C31 = self::EnumImplementsS7 {index:#C1, _name:#C2} + #C32 = [#C31] + #C33 = self::EnumImplementsS8 {index:#C1, _name:#C2} + #C34 = [#C33] + #C35 = self::EnumWithT1 {index:#C1, _name:#C2} + #C36 = [#C35] + #C37 = self::EnumWithT2 {index:#C1, _name:#C2} + #C38 = [#C37] + #C39 = self::EnumWithT3 {index:#C1, _name:#C2} + #C40 = [#C39] + #C41 = self::EnumWithT4 {index:#C1, _name:#C2} + #C42 = [#C41] + #C43 = self::EnumWithT5 {index:#C1, _name:#C2} + #C44 = [#C43] + #C45 = self::EnumWithT6 {index:#C1, _name:#C2} + #C46 = [#C45] + #C47 = self::EnumWithT7 {index:#C1, _name:#C2} + #C48 = [#C47] + #C49 = self::EnumWithT8 {index:#C1, _name:#C2} + #C50 = [#C49] + #C51 = self::EnumWithS1 {index:#C1, _name:#C2} + #C52 = [#C51] + #C53 = self::EnumWithS2 {index:#C1, _name:#C2} + #C54 = [#C53] + #C55 = self::EnumWithS3 {index:#C1, _name:#C2} + #C56 = [#C55] + #C57 = self::EnumWithS4 {index:#C1, _name:#C2} + #C58 = [#C57] + #C59 = self::EnumWithS5 {index:#C1, _name:#C2} + #C60 = [#C59] + #C61 = self::EnumWithS6 {index:#C1, _name:#C2} + #C62 = [#C61] + #C63 = self::EnumWithS7 {index:#C1, _name:#C2} + #C64 = [#C63] + #C65 = self::EnumWithS8 {index:#C1, _name:#C2} + #C66 = [#C65] +} + + +Constructor coverage from constants: +org-dartlang-testcase:///bounds_supertypes.dart: +- EnumImplementsT1. (from org-dartlang-testcase:///bounds_supertypes.dart:109:6) +- _Enum. (from org-dartlang-sdk:///sdk/lib/core/enum.dart:103:9) +- Object. (from org-dartlang-sdk:///sdk/lib/core/object.dart:25:9) +- EnumImplementsT2. (from org-dartlang-testcase:///bounds_supertypes.dart:111:6) +- EnumImplementsT3. (from org-dartlang-testcase:///bounds_supertypes.dart:113:6) +- EnumImplementsT4. (from org-dartlang-testcase:///bounds_supertypes.dart:115:6) +- EnumImplementsT5. (from org-dartlang-testcase:///bounds_supertypes.dart:117:6) +- EnumImplementsT6. (from org-dartlang-testcase:///bounds_supertypes.dart:119:6) +- EnumImplementsT7. (from org-dartlang-testcase:///bounds_supertypes.dart:121:6) +- EnumImplementsT8. (from org-dartlang-testcase:///bounds_supertypes.dart:123:6) +- EnumImplementsS1. (from org-dartlang-testcase:///bounds_supertypes.dart:125:6) +- EnumImplementsS2. (from org-dartlang-testcase:///bounds_supertypes.dart:127:6) +- EnumImplementsS3. (from org-dartlang-testcase:///bounds_supertypes.dart:129:6) +- EnumImplementsS4. (from org-dartlang-testcase:///bounds_supertypes.dart:131:6) +- EnumImplementsS5. (from org-dartlang-testcase:///bounds_supertypes.dart:133:6) +- EnumImplementsS6. (from org-dartlang-testcase:///bounds_supertypes.dart:135:6) +- EnumImplementsS7. (from org-dartlang-testcase:///bounds_supertypes.dart:137:6) +- EnumImplementsS8. (from org-dartlang-testcase:///bounds_supertypes.dart:139:6) +- EnumWithT1. (from org-dartlang-testcase:///bounds_supertypes.dart:141:6) +- _EnumWithT1&_Enum&F. (from org-dartlang-testcase:///bounds_supertypes.dart:141:6) +- EnumWithT2. (from org-dartlang-testcase:///bounds_supertypes.dart:143:6) +- _EnumWithT2&_Enum&F. (from org-dartlang-testcase:///bounds_supertypes.dart:143:6) +- EnumWithT3. (from org-dartlang-testcase:///bounds_supertypes.dart:145:6) +- _EnumWithT3&_Enum&F. (from org-dartlang-testcase:///bounds_supertypes.dart:145:6) +- EnumWithT4. (from org-dartlang-testcase:///bounds_supertypes.dart:147:6) +- _EnumWithT4&_Enum&F. (from org-dartlang-testcase:///bounds_supertypes.dart:147:6) +- EnumWithT5. (from org-dartlang-testcase:///bounds_supertypes.dart:149:6) +- _EnumWithT5&_Enum&F. (from org-dartlang-testcase:///bounds_supertypes.dart:149:6) +- EnumWithT6. (from org-dartlang-testcase:///bounds_supertypes.dart:151:6) +- _EnumWithT6&_Enum&F. (from org-dartlang-testcase:///bounds_supertypes.dart:151:6) +- EnumWithT7. (from org-dartlang-testcase:///bounds_supertypes.dart:153:6) +- _EnumWithT7&_Enum&F. (from org-dartlang-testcase:///bounds_supertypes.dart:153:6) +- EnumWithT8. (from org-dartlang-testcase:///bounds_supertypes.dart:155:6) +- _EnumWithT8&_Enum&F. (from org-dartlang-testcase:///bounds_supertypes.dart:155:6) +- EnumWithS1. (from org-dartlang-testcase:///bounds_supertypes.dart:157:6) +- _EnumWithS1&_Enum&G. (from org-dartlang-testcase:///bounds_supertypes.dart:157:6) +- EnumWithS2. (from org-dartlang-testcase:///bounds_supertypes.dart:159:6) +- _EnumWithS2&_Enum&G. (from org-dartlang-testcase:///bounds_supertypes.dart:159:6) +- EnumWithS3. (from org-dartlang-testcase:///bounds_supertypes.dart:161:6) +- _EnumWithS3&_Enum&G. (from org-dartlang-testcase:///bounds_supertypes.dart:161:6) +- EnumWithS4. (from org-dartlang-testcase:///bounds_supertypes.dart:163:6) +- _EnumWithS4&_Enum&G. (from org-dartlang-testcase:///bounds_supertypes.dart:163:6) +- EnumWithS5. (from org-dartlang-testcase:///bounds_supertypes.dart:165:6) +- _EnumWithS5&_Enum&G. (from org-dartlang-testcase:///bounds_supertypes.dart:165:6) +- EnumWithS6. (from org-dartlang-testcase:///bounds_supertypes.dart:167:6) +- _EnumWithS6&_Enum&G. (from org-dartlang-testcase:///bounds_supertypes.dart:167:6) +- EnumWithS7. (from org-dartlang-testcase:///bounds_supertypes.dart:169:6) +- _EnumWithS7&_Enum&G. (from org-dartlang-testcase:///bounds_supertypes.dart:169:6) +- EnumWithS8. (from org-dartlang-testcase:///bounds_supertypes.dart:171:6) +- _EnumWithS8&_Enum&G. (from org-dartlang-testcase:///bounds_supertypes.dart:171:6) diff --git a/pkg/front_end/testcases/general/bounds_type_aliases.dart b/pkg/front_end/testcases/general/bounds_type_aliases.dart new file mode 100644 index 00000000000..001c96062ba --- /dev/null +++ b/pkg/front_end/testcases/general/bounds_type_aliases.dart @@ -0,0 +1,50 @@ +// Copyright (c) 2022, 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. + +class Class {} + +class ConcreteClass implements Class {} + +typedef F> = X; + +class G> {} + +typedef T1 = F; // Error +typedef T2 = F; // Error +typedef T3 = F; // Error +typedef T4 = F>; // Error +typedef T5 = F; // Ok +typedef T6 = F>; // Ok +typedef T7 = F; // Error +typedef T8 = F; // Error + +typedef S1 = G; // Error +typedef S2 = G; // Error +typedef S3 = G; // Error +typedef S4 = G>; // Error +typedef S5 = G; // Ok +typedef S6 = G>; // Ok +typedef S7 = G; // Error +typedef S8 = G; // Error + +typedef Typedef1 = void Function< + T1 extends F, // Error + T2 extends F, // Ok + T3 extends F, // Ok + T4 extends F>, // Ok + T5 extends F, // Ok + T6 extends F>, // Ok + T7 extends F, // Error + T8 extends F, // Error + S1 extends G, // Error + S2 extends G, // Ok + S3 extends G, // Ok + S4 extends G>, // Ok + S5 extends G, // Ok + S6 extends G>, // Ok + S7 extends G, // Error + S8 extends G // Error + >(); + +main() {} diff --git a/pkg/front_end/testcases/general/bounds_type_aliases.dart.textual_outline.expect b/pkg/front_end/testcases/general/bounds_type_aliases.dart.textual_outline.expect new file mode 100644 index 00000000000..1de49ae5630 --- /dev/null +++ b/pkg/front_end/testcases/general/bounds_type_aliases.dart.textual_outline.expect @@ -0,0 +1,42 @@ +class Class {} + +class ConcreteClass implements Class {} + +typedef F> = X; + +class G> {} + +typedef T1 = F; +typedef T2 = F; +typedef T3 = F; +typedef T4 = F>; +typedef T5 = F; +typedef T6 = F>; +typedef T7 = F; +typedef T8 = F; +typedef S1 = G; +typedef S2 = G; +typedef S3 = G; +typedef S4 = G>; +typedef S5 = G; +typedef S6 = G>; +typedef S7 = G; +typedef S8 = G; +typedef Typedef1 = void Function< + T1 extends F, + T2 extends F, + T3 extends F, + T4 extends F>, + T5 extends F, + T6 extends F>, + T7 extends F, + T8 extends F, + S1 extends G, + S2 extends G, + S3 extends G, + S4 extends G>, + S5 extends G, + S6 extends G>, + S7 extends G, + S8 extends G>(); +main() {} diff --git a/pkg/front_end/testcases/general/bounds_type_aliases.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/general/bounds_type_aliases.dart.textual_outline_modelled.expect new file mode 100644 index 00000000000..c61e199f9fb --- /dev/null +++ b/pkg/front_end/testcases/general/bounds_type_aliases.dart.textual_outline_modelled.expect @@ -0,0 +1,41 @@ +class Class {} + +class ConcreteClass implements Class {} + +class G> {} + +main() {} +typedef F> = X; +typedef S1 = G; +typedef S2 = G; +typedef S3 = G; +typedef S4 = G>; +typedef S5 = G; +typedef S6 = G>; +typedef S7 = G; +typedef S8 = G; +typedef T1 = F; +typedef T2 = F; +typedef T3 = F; +typedef T4 = F>; +typedef T5 = F; +typedef T6 = F>; +typedef T7 = F; +typedef T8 = F; +typedef Typedef1 = void Function< + T1 extends F, + T2 extends F, + T3 extends F, + T4 extends F>, + T5 extends F, + T6 extends F>, + T7 extends F, + T8 extends F, + S1 extends G, + S2 extends G, + S3 extends G, + S4 extends G>, + S5 extends G, + S6 extends G>, + S7 extends G, + S8 extends G>(); diff --git a/pkg/front_end/testcases/general/bounds_type_aliases.dart.weak.expect b/pkg/front_end/testcases/general/bounds_type_aliases.dart.weak.expect new file mode 100644 index 00000000000..bc261f0d922 --- /dev/null +++ b/pkg/front_end/testcases/general/bounds_type_aliases.dart.weak.expect @@ -0,0 +1,205 @@ +library /*isNonNullableByDefault*/; +// +// Problems in library: +// +// pkg/front_end/testcases/general/bounds_type_aliases.dart:32:5: Error: Generic type 'F' can't be used without type arguments in a type variable bound. +// Try providing type arguments to 'F' here. +// T1 extends F, // Error +// ^^ +// pkg/front_end/testcases/general/bounds_type_aliases.dart:9:11: Context: Bound of this variable references variable 'X' from the same declaration. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_type_aliases.dart:40:5: Error: Generic type 'G' can't be used without type arguments in a type variable bound. +// Try providing type arguments to 'G' here. +// S1 extends G, // Error +// ^^ +// pkg/front_end/testcases/general/bounds_type_aliases.dart:11:9: Context: Bound of this variable references variable 'X' from the same declaration. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_type_aliases.dart:38:16: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_aliases.dart'. +// Try changing type arguments so that they conform to the bounds. +// T7 extends F, // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_aliases.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_type_aliases.dart:39:16: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_aliases.dart'. +// Try changing type arguments so that they conform to the bounds. +// T8 extends F, // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_aliases.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_type_aliases.dart:46:16: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_aliases.dart'. +// Try changing type arguments so that they conform to the bounds. +// S7 extends G, // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_aliases.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_type_aliases.dart:47:16: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_aliases.dart'. +// Try changing type arguments so that they conform to the bounds. +// S8 extends G // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_aliases.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_type_aliases.dart:13:14: Error: Inferred type argument 'Class' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_aliases.dart'. +// Try specifying type arguments explicitly so that they conform to the bounds. +// typedef T1 = F; // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_aliases.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_type_aliases.dart:14:14: Error: Type argument 'dynamic' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_aliases.dart'. +// Try changing type arguments so that they conform to the bounds. +// typedef T2 = F; // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_aliases.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_type_aliases.dart:15:14: Error: Type argument 'Class' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_aliases.dart'. +// Try changing type arguments so that they conform to the bounds. +// typedef T3 = F; // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_aliases.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_type_aliases.dart:16:14: Error: Type argument 'Class' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_aliases.dart'. +// Try changing type arguments so that they conform to the bounds. +// typedef T4 = F>; // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_aliases.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_type_aliases.dart:19:14: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_aliases.dart'. +// Try changing type arguments so that they conform to the bounds. +// typedef T7 = F; // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_aliases.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_type_aliases.dart:20:14: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_aliases.dart'. +// Try changing type arguments so that they conform to the bounds. +// typedef T8 = F; // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_aliases.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_type_aliases.dart:22:14: Error: Inferred type argument 'Class' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_aliases.dart'. +// Try specifying type arguments explicitly so that they conform to the bounds. +// typedef S1 = G; // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_aliases.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_type_aliases.dart:23:14: Error: Type argument 'dynamic' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_aliases.dart'. +// Try changing type arguments so that they conform to the bounds. +// typedef S2 = G; // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_aliases.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_type_aliases.dart:24:14: Error: Type argument 'Class' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_aliases.dart'. +// Try changing type arguments so that they conform to the bounds. +// typedef S3 = G; // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_aliases.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_type_aliases.dart:25:14: Error: Type argument 'Class' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_aliases.dart'. +// Try changing type arguments so that they conform to the bounds. +// typedef S4 = G>; // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_aliases.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_type_aliases.dart:28:14: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_aliases.dart'. +// Try changing type arguments so that they conform to the bounds. +// typedef S7 = G; // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_aliases.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_type_aliases.dart:29:14: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_aliases.dart'. +// Try changing type arguments so that they conform to the bounds. +// typedef S8 = G; // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_aliases.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +import self as self; +import "dart:core" as core; + +typedef F = self::Class> = X; +typedef T1 = self::Class; +typedef T2 = dynamic; +typedef T3 = self::Class; +typedef T4 = self::Class; +typedef T5 = self::ConcreteClass; +typedef T6 = self::Class; +typedef T7 = core::Object; +typedef T8 = core::int; +typedef S1 = self::G>; +typedef S2 = self::G; +typedef S3 = self::G>; +typedef S4 = self::G>; +typedef S5 = self::G; +typedef S6 = self::G>; +typedef S7 = self::G; +typedef S8 = self::G; +typedef Typedef1 = = dynamic, T2 extends dynamic, T3 extends self::Class = dynamic, T4 extends self::Class = dynamic, T5 extends self::ConcreteClass = dynamic, T6 extends self::Class = dynamic, T7 extends core::Object = dynamic, T8 extends core::int = dynamic, S1 extends self::G> = dynamic, S2 extends self::G = dynamic, S3 extends self::G> = dynamic, S4 extends self::G> = dynamic, S5 extends self::G = dynamic, S6 extends self::G> = dynamic, S7 extends self::G = dynamic, S8 extends self::G = dynamic>() → void; +class Class extends core::Object { + synthetic constructor •() → self::Class + : super core::Object::•() + ; +} +class ConcreteClass extends core::Object implements self::Class { + synthetic constructor •() → self::ConcreteClass + : super core::Object::•() + ; +} +class G = self::Class> extends core::Object { + synthetic constructor •() → self::G + : super core::Object::•() + ; +} +static method main() → dynamic {} diff --git a/pkg/front_end/testcases/general/bounds_type_aliases.dart.weak.modular.expect b/pkg/front_end/testcases/general/bounds_type_aliases.dart.weak.modular.expect new file mode 100644 index 00000000000..bc261f0d922 --- /dev/null +++ b/pkg/front_end/testcases/general/bounds_type_aliases.dart.weak.modular.expect @@ -0,0 +1,205 @@ +library /*isNonNullableByDefault*/; +// +// Problems in library: +// +// pkg/front_end/testcases/general/bounds_type_aliases.dart:32:5: Error: Generic type 'F' can't be used without type arguments in a type variable bound. +// Try providing type arguments to 'F' here. +// T1 extends F, // Error +// ^^ +// pkg/front_end/testcases/general/bounds_type_aliases.dart:9:11: Context: Bound of this variable references variable 'X' from the same declaration. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_type_aliases.dart:40:5: Error: Generic type 'G' can't be used without type arguments in a type variable bound. +// Try providing type arguments to 'G' here. +// S1 extends G, // Error +// ^^ +// pkg/front_end/testcases/general/bounds_type_aliases.dart:11:9: Context: Bound of this variable references variable 'X' from the same declaration. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_type_aliases.dart:38:16: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_aliases.dart'. +// Try changing type arguments so that they conform to the bounds. +// T7 extends F, // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_aliases.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_type_aliases.dart:39:16: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_aliases.dart'. +// Try changing type arguments so that they conform to the bounds. +// T8 extends F, // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_aliases.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_type_aliases.dart:46:16: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_aliases.dart'. +// Try changing type arguments so that they conform to the bounds. +// S7 extends G, // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_aliases.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_type_aliases.dart:47:16: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_aliases.dart'. +// Try changing type arguments so that they conform to the bounds. +// S8 extends G // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_aliases.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_type_aliases.dart:13:14: Error: Inferred type argument 'Class' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_aliases.dart'. +// Try specifying type arguments explicitly so that they conform to the bounds. +// typedef T1 = F; // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_aliases.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_type_aliases.dart:14:14: Error: Type argument 'dynamic' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_aliases.dart'. +// Try changing type arguments so that they conform to the bounds. +// typedef T2 = F; // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_aliases.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_type_aliases.dart:15:14: Error: Type argument 'Class' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_aliases.dart'. +// Try changing type arguments so that they conform to the bounds. +// typedef T3 = F; // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_aliases.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_type_aliases.dart:16:14: Error: Type argument 'Class' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_aliases.dart'. +// Try changing type arguments so that they conform to the bounds. +// typedef T4 = F>; // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_aliases.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_type_aliases.dart:19:14: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_aliases.dart'. +// Try changing type arguments so that they conform to the bounds. +// typedef T7 = F; // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_aliases.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_type_aliases.dart:20:14: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_aliases.dart'. +// Try changing type arguments so that they conform to the bounds. +// typedef T8 = F; // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_aliases.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_type_aliases.dart:22:14: Error: Inferred type argument 'Class' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_aliases.dart'. +// Try specifying type arguments explicitly so that they conform to the bounds. +// typedef S1 = G; // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_aliases.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_type_aliases.dart:23:14: Error: Type argument 'dynamic' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_aliases.dart'. +// Try changing type arguments so that they conform to the bounds. +// typedef S2 = G; // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_aliases.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_type_aliases.dart:24:14: Error: Type argument 'Class' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_aliases.dart'. +// Try changing type arguments so that they conform to the bounds. +// typedef S3 = G; // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_aliases.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_type_aliases.dart:25:14: Error: Type argument 'Class' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_aliases.dart'. +// Try changing type arguments so that they conform to the bounds. +// typedef S4 = G>; // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_aliases.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_type_aliases.dart:28:14: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_aliases.dart'. +// Try changing type arguments so that they conform to the bounds. +// typedef S7 = G; // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_aliases.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_type_aliases.dart:29:14: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_aliases.dart'. +// Try changing type arguments so that they conform to the bounds. +// typedef S8 = G; // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_aliases.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +import self as self; +import "dart:core" as core; + +typedef F = self::Class> = X; +typedef T1 = self::Class; +typedef T2 = dynamic; +typedef T3 = self::Class; +typedef T4 = self::Class; +typedef T5 = self::ConcreteClass; +typedef T6 = self::Class; +typedef T7 = core::Object; +typedef T8 = core::int; +typedef S1 = self::G>; +typedef S2 = self::G; +typedef S3 = self::G>; +typedef S4 = self::G>; +typedef S5 = self::G; +typedef S6 = self::G>; +typedef S7 = self::G; +typedef S8 = self::G; +typedef Typedef1 = = dynamic, T2 extends dynamic, T3 extends self::Class = dynamic, T4 extends self::Class = dynamic, T5 extends self::ConcreteClass = dynamic, T6 extends self::Class = dynamic, T7 extends core::Object = dynamic, T8 extends core::int = dynamic, S1 extends self::G> = dynamic, S2 extends self::G = dynamic, S3 extends self::G> = dynamic, S4 extends self::G> = dynamic, S5 extends self::G = dynamic, S6 extends self::G> = dynamic, S7 extends self::G = dynamic, S8 extends self::G = dynamic>() → void; +class Class extends core::Object { + synthetic constructor •() → self::Class + : super core::Object::•() + ; +} +class ConcreteClass extends core::Object implements self::Class { + synthetic constructor •() → self::ConcreteClass + : super core::Object::•() + ; +} +class G = self::Class> extends core::Object { + synthetic constructor •() → self::G + : super core::Object::•() + ; +} +static method main() → dynamic {} diff --git a/pkg/front_end/testcases/general/bounds_type_aliases.dart.weak.outline.expect b/pkg/front_end/testcases/general/bounds_type_aliases.dart.weak.outline.expect new file mode 100644 index 00000000000..03267706c6e --- /dev/null +++ b/pkg/front_end/testcases/general/bounds_type_aliases.dart.weak.outline.expect @@ -0,0 +1,203 @@ +library /*isNonNullableByDefault*/; +// +// Problems in library: +// +// pkg/front_end/testcases/general/bounds_type_aliases.dart:32:5: Error: Generic type 'F' can't be used without type arguments in a type variable bound. +// Try providing type arguments to 'F' here. +// T1 extends F, // Error +// ^^ +// pkg/front_end/testcases/general/bounds_type_aliases.dart:9:11: Context: Bound of this variable references variable 'X' from the same declaration. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_type_aliases.dart:40:5: Error: Generic type 'G' can't be used without type arguments in a type variable bound. +// Try providing type arguments to 'G' here. +// S1 extends G, // Error +// ^^ +// pkg/front_end/testcases/general/bounds_type_aliases.dart:11:9: Context: Bound of this variable references variable 'X' from the same declaration. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_type_aliases.dart:38:16: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_aliases.dart'. +// Try changing type arguments so that they conform to the bounds. +// T7 extends F, // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_aliases.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_type_aliases.dart:39:16: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_aliases.dart'. +// Try changing type arguments so that they conform to the bounds. +// T8 extends F, // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_aliases.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_type_aliases.dart:46:16: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_aliases.dart'. +// Try changing type arguments so that they conform to the bounds. +// S7 extends G, // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_aliases.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_type_aliases.dart:47:16: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_aliases.dart'. +// Try changing type arguments so that they conform to the bounds. +// S8 extends G // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_aliases.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_type_aliases.dart:13:14: Error: Inferred type argument 'Class' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_aliases.dart'. +// Try specifying type arguments explicitly so that they conform to the bounds. +// typedef T1 = F; // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_aliases.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_type_aliases.dart:14:14: Error: Type argument 'dynamic' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_aliases.dart'. +// Try changing type arguments so that they conform to the bounds. +// typedef T2 = F; // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_aliases.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_type_aliases.dart:15:14: Error: Type argument 'Class' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_aliases.dart'. +// Try changing type arguments so that they conform to the bounds. +// typedef T3 = F; // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_aliases.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_type_aliases.dart:16:14: Error: Type argument 'Class' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_aliases.dart'. +// Try changing type arguments so that they conform to the bounds. +// typedef T4 = F>; // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_aliases.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_type_aliases.dart:19:14: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_aliases.dart'. +// Try changing type arguments so that they conform to the bounds. +// typedef T7 = F; // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_aliases.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_type_aliases.dart:20:14: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_aliases.dart'. +// Try changing type arguments so that they conform to the bounds. +// typedef T8 = F; // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_aliases.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_type_aliases.dart:22:14: Error: Inferred type argument 'Class' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_aliases.dart'. +// Try specifying type arguments explicitly so that they conform to the bounds. +// typedef S1 = G; // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_aliases.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_type_aliases.dart:23:14: Error: Type argument 'dynamic' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_aliases.dart'. +// Try changing type arguments so that they conform to the bounds. +// typedef S2 = G; // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_aliases.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_type_aliases.dart:24:14: Error: Type argument 'Class' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_aliases.dart'. +// Try changing type arguments so that they conform to the bounds. +// typedef S3 = G; // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_aliases.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_type_aliases.dart:25:14: Error: Type argument 'Class' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_aliases.dart'. +// Try changing type arguments so that they conform to the bounds. +// typedef S4 = G>; // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_aliases.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_type_aliases.dart:28:14: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_aliases.dart'. +// Try changing type arguments so that they conform to the bounds. +// typedef S7 = G; // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_aliases.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_type_aliases.dart:29:14: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_aliases.dart'. +// Try changing type arguments so that they conform to the bounds. +// typedef S8 = G; // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_aliases.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +import self as self; +import "dart:core" as core; + +typedef F = self::Class> = X; +typedef T1 = self::Class; +typedef T2 = dynamic; +typedef T3 = self::Class; +typedef T4 = self::Class; +typedef T5 = self::ConcreteClass; +typedef T6 = self::Class; +typedef T7 = core::Object; +typedef T8 = core::int; +typedef S1 = self::G>; +typedef S2 = self::G; +typedef S3 = self::G>; +typedef S4 = self::G>; +typedef S5 = self::G; +typedef S6 = self::G>; +typedef S7 = self::G; +typedef S8 = self::G; +typedef Typedef1 = = dynamic, T2 extends dynamic, T3 extends self::Class = dynamic, T4 extends self::Class = dynamic, T5 extends self::ConcreteClass = dynamic, T6 extends self::Class = dynamic, T7 extends core::Object = dynamic, T8 extends core::int = dynamic, S1 extends self::G> = dynamic, S2 extends self::G = dynamic, S3 extends self::G> = dynamic, S4 extends self::G> = dynamic, S5 extends self::G = dynamic, S6 extends self::G> = dynamic, S7 extends self::G = dynamic, S8 extends self::G = dynamic>() → void; +class Class extends core::Object { + synthetic constructor •() → self::Class + ; +} +class ConcreteClass extends core::Object implements self::Class { + synthetic constructor •() → self::ConcreteClass + ; +} +class G = self::Class> extends core::Object { + synthetic constructor •() → self::G + ; +} +static method main() → dynamic + ; diff --git a/pkg/front_end/testcases/general/bounds_type_aliases.dart.weak.transformed.expect b/pkg/front_end/testcases/general/bounds_type_aliases.dart.weak.transformed.expect new file mode 100644 index 00000000000..bc261f0d922 --- /dev/null +++ b/pkg/front_end/testcases/general/bounds_type_aliases.dart.weak.transformed.expect @@ -0,0 +1,205 @@ +library /*isNonNullableByDefault*/; +// +// Problems in library: +// +// pkg/front_end/testcases/general/bounds_type_aliases.dart:32:5: Error: Generic type 'F' can't be used without type arguments in a type variable bound. +// Try providing type arguments to 'F' here. +// T1 extends F, // Error +// ^^ +// pkg/front_end/testcases/general/bounds_type_aliases.dart:9:11: Context: Bound of this variable references variable 'X' from the same declaration. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_type_aliases.dart:40:5: Error: Generic type 'G' can't be used without type arguments in a type variable bound. +// Try providing type arguments to 'G' here. +// S1 extends G, // Error +// ^^ +// pkg/front_end/testcases/general/bounds_type_aliases.dart:11:9: Context: Bound of this variable references variable 'X' from the same declaration. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_type_aliases.dart:38:16: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_aliases.dart'. +// Try changing type arguments so that they conform to the bounds. +// T7 extends F, // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_aliases.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_type_aliases.dart:39:16: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_aliases.dart'. +// Try changing type arguments so that they conform to the bounds. +// T8 extends F, // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_aliases.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_type_aliases.dart:46:16: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_aliases.dart'. +// Try changing type arguments so that they conform to the bounds. +// S7 extends G, // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_aliases.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_type_aliases.dart:47:16: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_aliases.dart'. +// Try changing type arguments so that they conform to the bounds. +// S8 extends G // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_aliases.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_type_aliases.dart:13:14: Error: Inferred type argument 'Class' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_aliases.dart'. +// Try specifying type arguments explicitly so that they conform to the bounds. +// typedef T1 = F; // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_aliases.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_type_aliases.dart:14:14: Error: Type argument 'dynamic' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_aliases.dart'. +// Try changing type arguments so that they conform to the bounds. +// typedef T2 = F; // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_aliases.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_type_aliases.dart:15:14: Error: Type argument 'Class' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_aliases.dart'. +// Try changing type arguments so that they conform to the bounds. +// typedef T3 = F; // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_aliases.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_type_aliases.dart:16:14: Error: Type argument 'Class' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_aliases.dart'. +// Try changing type arguments so that they conform to the bounds. +// typedef T4 = F>; // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_aliases.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_type_aliases.dart:19:14: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_aliases.dart'. +// Try changing type arguments so that they conform to the bounds. +// typedef T7 = F; // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_aliases.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_type_aliases.dart:20:14: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_aliases.dart'. +// Try changing type arguments so that they conform to the bounds. +// typedef T8 = F; // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_aliases.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_type_aliases.dart:22:14: Error: Inferred type argument 'Class' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_aliases.dart'. +// Try specifying type arguments explicitly so that they conform to the bounds. +// typedef S1 = G; // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_aliases.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_type_aliases.dart:23:14: Error: Type argument 'dynamic' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_aliases.dart'. +// Try changing type arguments so that they conform to the bounds. +// typedef S2 = G; // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_aliases.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_type_aliases.dart:24:14: Error: Type argument 'Class' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_aliases.dart'. +// Try changing type arguments so that they conform to the bounds. +// typedef S3 = G; // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_aliases.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_type_aliases.dart:25:14: Error: Type argument 'Class' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_aliases.dart'. +// Try changing type arguments so that they conform to the bounds. +// typedef S4 = G>; // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_aliases.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_type_aliases.dart:28:14: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_aliases.dart'. +// Try changing type arguments so that they conform to the bounds. +// typedef S7 = G; // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_aliases.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_type_aliases.dart:29:14: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_aliases.dart'. +// Try changing type arguments so that they conform to the bounds. +// typedef S8 = G; // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_aliases.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +import self as self; +import "dart:core" as core; + +typedef F = self::Class> = X; +typedef T1 = self::Class; +typedef T2 = dynamic; +typedef T3 = self::Class; +typedef T4 = self::Class; +typedef T5 = self::ConcreteClass; +typedef T6 = self::Class; +typedef T7 = core::Object; +typedef T8 = core::int; +typedef S1 = self::G>; +typedef S2 = self::G; +typedef S3 = self::G>; +typedef S4 = self::G>; +typedef S5 = self::G; +typedef S6 = self::G>; +typedef S7 = self::G; +typedef S8 = self::G; +typedef Typedef1 = = dynamic, T2 extends dynamic, T3 extends self::Class = dynamic, T4 extends self::Class = dynamic, T5 extends self::ConcreteClass = dynamic, T6 extends self::Class = dynamic, T7 extends core::Object = dynamic, T8 extends core::int = dynamic, S1 extends self::G> = dynamic, S2 extends self::G = dynamic, S3 extends self::G> = dynamic, S4 extends self::G> = dynamic, S5 extends self::G = dynamic, S6 extends self::G> = dynamic, S7 extends self::G = dynamic, S8 extends self::G = dynamic>() → void; +class Class extends core::Object { + synthetic constructor •() → self::Class + : super core::Object::•() + ; +} +class ConcreteClass extends core::Object implements self::Class { + synthetic constructor •() → self::ConcreteClass + : super core::Object::•() + ; +} +class G = self::Class> extends core::Object { + synthetic constructor •() → self::G + : super core::Object::•() + ; +} +static method main() → dynamic {} diff --git a/pkg/front_end/testcases/general/bounds_type_arguments.dart b/pkg/front_end/testcases/general/bounds_type_arguments.dart new file mode 100644 index 00000000000..47fd3403e1b --- /dev/null +++ b/pkg/front_end/testcases/general/bounds_type_arguments.dart @@ -0,0 +1,204 @@ +// Copyright (c) 2022, 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. + +class Class {} + +class ConcreteClass implements Class {} + +typedef F> = X; + +class G> {} + +typedef H = Class2; + +void staticMethod() {} + +class Class1 { + Class1(); + + factory Class1.fact() => new Class1(); + + factory Class1.redirect() = Class1; +} + +class Class2 { + void instanceMethod() {} +} + +test() { + staticMethod< + F, // Ok + F, // Ok + F, // Ok + F>, // Ok + F, // Ok + F>, // Ok + F, // Error + F, // Error + G, // Ok + G, // Ok + G, // Ok + G>, // Ok + G, // Ok + G>, // Ok + G, // Error + G // Error + >(); + + var tearOff = staticMethod; + tearOff< + F, // Ok + F, // Ok + F, // Ok + F>, // Ok + F, // Ok + F>, // Ok + F, // Error + F, // Error + G, // Ok + G, // Ok + G, // Ok + G>, // Ok + G, // Ok + G>, // Ok + G, // Error + G // Error + >(); + + tearOff< + F, // Ok + F, // Ok + F, // Ok + F>, // Ok + F, // Ok + F>, // Ok + F, // Error + F, // Error + G, // Ok + G, // Ok + G, // Ok + G>, // Ok + G, // Ok + G>, // Ok + G, // Error + G // Error + >; + + new Class1< + F, // Ok + F, // Ok + F, // Ok + F>, // Ok + F, // Ok + F>, // Ok + F, // Error + F, // Error + G, // Ok + G, // Ok + G, // Ok + G>, // Ok + G, // Ok + G>, // Ok + G, // Error + G // Error + >(); + + new Class1< + F, // Ok + F, // Ok + F, // Ok + F>, // Ok + F, // Ok + F>, // Ok + F, // Error + F, // Error + G, // Ok + G, // Ok + G, // Ok + G>, // Ok + G, // Ok + G>, // Ok + G, // Error + G // Error + >.fact(); + + new Class1< + F, // Ok + F, // Ok + F, // Ok + F>, // Ok + F, // Ok + F>, // Ok + F, // Error + F, // Error + G, // Ok + G, // Ok + G, // Ok + G>, // Ok + G, // Ok + G>, // Ok + G, // Error + G // Error + >.redirect(); + + new Class2().instanceMethod< + F, // Ok + F, // Ok + F, // Ok + F>, // Ok + F, // Ok + F>, // Ok + F, // Error + F, // Error + G, // Ok + G, // Ok + G, // Ok + G>, // Ok + G, // Ok + G>, // Ok + G, // Error + G // Error + >(); + + dynamic d = staticMethod; + d< + F, // Ok + F, // Ok + F, // Ok + F>, // Ok + F, // Ok + F>, // Ok + F, // Error + F, // Error + G, // Ok + G, // Ok + G, // Ok + G>, // Ok + G, // Ok + G>, // Ok + G, // Error + G // Error + >(); + + new H(); // Ok + new H>(); // Ok + new H>(); // Ok + new H>>(); // Ok + new H>(); // Ok + new H>>(); // Ok + new H>(); // Error + new H>(); // Error + new H(); // Ok + new H>(); // Ok + new H>(); // Ok + new H>>(); // Ok + new H>(); // Ok + new H>>(); // Ok + new H>(); // Error + new H>(); // Error +} + +main() {} diff --git a/pkg/front_end/testcases/general/bounds_type_arguments.dart.textual_outline.expect b/pkg/front_end/testcases/general/bounds_type_arguments.dart.textual_outline.expect new file mode 100644 index 00000000000..62264e39b2a --- /dev/null +++ b/pkg/front_end/testcases/general/bounds_type_arguments.dart.textual_outline.expect @@ -0,0 +1,25 @@ +class Class {} + +class ConcreteClass implements Class {} + +typedef F> = X; + +class G> {} + +typedef H = Class2; +void staticMethod() {} + +class Class1 { + Class1(); + factory Class1.fact() => new Class1(); + factory Class1.redirect() = Class1; +} + +class Class2 { + void instanceMethod() {} +} + +test() {} +main() {} diff --git a/pkg/front_end/testcases/general/bounds_type_arguments.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/general/bounds_type_arguments.dart.textual_outline_modelled.expect new file mode 100644 index 00000000000..31c481b9f97 --- /dev/null +++ b/pkg/front_end/testcases/general/bounds_type_arguments.dart.textual_outline_modelled.expect @@ -0,0 +1,23 @@ +class Class {} + +class Class1 { + Class1(); + factory Class1.fact() => new Class1(); + factory Class1.redirect() = Class1; +} + +class Class2 { + void instanceMethod() {} +} + +class ConcreteClass implements Class {} + +class G> {} + +main() {} +test() {} +typedef F> = X; +typedef H = Class2; +void staticMethod() {} diff --git a/pkg/front_end/testcases/general/bounds_type_arguments.dart.weak.expect b/pkg/front_end/testcases/general/bounds_type_arguments.dart.weak.expect new file mode 100644 index 00000000000..4d4b0ad578a --- /dev/null +++ b/pkg/front_end/testcases/general/bounds_type_arguments.dart.weak.expect @@ -0,0 +1,419 @@ +library /*isNonNullableByDefault*/; +// +// Problems in library: +// +// pkg/front_end/testcases/general/bounds_type_arguments.dart:39:7: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_arguments.dart'. +// Try changing type arguments so that they conform to the bounds. +// F, // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_arguments.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_type_arguments.dart:40:7: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_arguments.dart'. +// Try changing type arguments so that they conform to the bounds. +// F, // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_arguments.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_type_arguments.dart:47:7: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_arguments.dart'. +// Try changing type arguments so that they conform to the bounds. +// G, // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_arguments.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_type_arguments.dart:48:7: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_arguments.dart'. +// Try changing type arguments so that they conform to the bounds. +// G // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_arguments.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_type_arguments.dart:59:7: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_arguments.dart'. +// Try changing type arguments so that they conform to the bounds. +// F, // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_arguments.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_type_arguments.dart:60:7: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_arguments.dart'. +// Try changing type arguments so that they conform to the bounds. +// F, // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_arguments.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_type_arguments.dart:67:7: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_arguments.dart'. +// Try changing type arguments so that they conform to the bounds. +// G, // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_arguments.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_type_arguments.dart:68:7: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_arguments.dart'. +// Try changing type arguments so that they conform to the bounds. +// G // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_arguments.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_type_arguments.dart:78:7: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_arguments.dart'. +// Try changing type arguments so that they conform to the bounds. +// F, // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_arguments.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_type_arguments.dart:79:7: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_arguments.dart'. +// Try changing type arguments so that they conform to the bounds. +// F, // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_arguments.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_type_arguments.dart:86:7: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_arguments.dart'. +// Try changing type arguments so that they conform to the bounds. +// G, // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_arguments.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_type_arguments.dart:87:7: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_arguments.dart'. +// Try changing type arguments so that they conform to the bounds. +// G // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_arguments.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_type_arguments.dart:97:7: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_arguments.dart'. +// Try changing type arguments so that they conform to the bounds. +// F, // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_arguments.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_type_arguments.dart:98:7: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_arguments.dart'. +// Try changing type arguments so that they conform to the bounds. +// F, // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_arguments.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_type_arguments.dart:105:7: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_arguments.dart'. +// Try changing type arguments so that they conform to the bounds. +// G, // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_arguments.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_type_arguments.dart:106:7: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_arguments.dart'. +// Try changing type arguments so that they conform to the bounds. +// G // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_arguments.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_type_arguments.dart:116:7: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_arguments.dart'. +// Try changing type arguments so that they conform to the bounds. +// F, // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_arguments.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_type_arguments.dart:117:7: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_arguments.dart'. +// Try changing type arguments so that they conform to the bounds. +// F, // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_arguments.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_type_arguments.dart:124:7: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_arguments.dart'. +// Try changing type arguments so that they conform to the bounds. +// G, // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_arguments.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_type_arguments.dart:125:7: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_arguments.dart'. +// Try changing type arguments so that they conform to the bounds. +// G // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_arguments.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_type_arguments.dart:135:7: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_arguments.dart'. +// Try changing type arguments so that they conform to the bounds. +// F, // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_arguments.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_type_arguments.dart:136:7: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_arguments.dart'. +// Try changing type arguments so that they conform to the bounds. +// F, // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_arguments.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_type_arguments.dart:143:7: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_arguments.dart'. +// Try changing type arguments so that they conform to the bounds. +// G, // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_arguments.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_type_arguments.dart:144:7: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_arguments.dart'. +// Try changing type arguments so that they conform to the bounds. +// G // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_arguments.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_type_arguments.dart:154:7: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_arguments.dart'. +// Try changing type arguments so that they conform to the bounds. +// F, // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_arguments.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_type_arguments.dart:155:7: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_arguments.dart'. +// Try changing type arguments so that they conform to the bounds. +// F, // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_arguments.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_type_arguments.dart:162:7: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_arguments.dart'. +// Try changing type arguments so that they conform to the bounds. +// G, // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_arguments.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_type_arguments.dart:163:7: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_arguments.dart'. +// Try changing type arguments so that they conform to the bounds. +// G // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_arguments.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_type_arguments.dart:174:7: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_arguments.dart'. +// Try changing type arguments so that they conform to the bounds. +// F, // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_arguments.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_type_arguments.dart:175:7: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_arguments.dart'. +// Try changing type arguments so that they conform to the bounds. +// F, // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_arguments.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_type_arguments.dart:182:7: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_arguments.dart'. +// Try changing type arguments so that they conform to the bounds. +// G, // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_arguments.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_type_arguments.dart:183:7: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_arguments.dart'. +// Try changing type arguments so that they conform to the bounds. +// G // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_arguments.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_type_arguments.dart:192:9: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_arguments.dart'. +// Try changing type arguments so that they conform to the bounds. +// new H>(); // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_arguments.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_type_arguments.dart:193:9: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_arguments.dart'. +// Try changing type arguments so that they conform to the bounds. +// new H>(); // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_arguments.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_type_arguments.dart:200:9: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_arguments.dart'. +// Try changing type arguments so that they conform to the bounds. +// new H>(); // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_arguments.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_type_arguments.dart:201:9: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_arguments.dart'. +// Try changing type arguments so that they conform to the bounds. +// new H>(); // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_arguments.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +import self as self; +import "dart:core" as core; + +typedef F = self::Class> = X; +typedef H = self::Class2; +class Class extends core::Object { + synthetic constructor •() → self::Class + : super core::Object::•() + ; +} +class ConcreteClass extends core::Object implements self::Class { + synthetic constructor •() → self::ConcreteClass + : super core::Object::•() + ; +} +class G = self::Class> extends core::Object { + synthetic constructor •() → self::G + : super core::Object::•() + ; +} +class Class1 extends core::Object { + static final field dynamic _redirecting# = [#C1]/*isLegacy*/; + constructor •() → self::Class1 + : super core::Object::•() + ; + static factory fact() → self::Class1 + return new self::Class1::•(); + static factory redirect() → self::Class1 + return new self::Class1::•(); +} +class Class2 extends core::Object { + synthetic constructor •() → self::Class2 + : super core::Object::•() + ; + method instanceMethod() → void {} +} +static method staticMethod() → void {} +static method test() → dynamic { + self::staticMethod, dynamic, self::Class, self::Class, self::ConcreteClass, self::Class, core::Object, core::int, self::G>, self::G, self::G>, self::G>, self::G, self::G>, self::G, self::G>(); + () → void tearOff = #C2; + tearOff, dynamic, self::Class, self::Class, self::ConcreteClass, self::Class, core::Object, core::int, self::G>, self::G, self::G>, self::G>, self::G, self::G>, self::G, self::G>(){() → void}; + tearOff, dynamic, self::Class, self::Class, self::ConcreteClass, self::Class, core::Object, core::int, self::G>, self::G, self::G>, self::G>, self::G, self::G>, self::G, self::G>; + new self::Class1::•, dynamic, self::Class, self::Class, self::ConcreteClass, self::Class, core::Object, core::int, self::G>, self::G, self::G>, self::G>, self::G, self::G>, self::G, self::G>(); + self::Class1::fact, dynamic, self::Class, self::Class, self::ConcreteClass, self::Class, core::Object, core::int, self::G>, self::G, self::G>, self::G>, self::G, self::G>, self::G, self::G>(); + new self::Class1::•, dynamic, self::Class, self::Class, self::ConcreteClass, self::Class, core::Object, core::int, self::G>, self::G, self::G>, self::G>, self::G, self::G>, self::G, self::G>(); + new self::Class2::•().{self::Class2::instanceMethod}, dynamic, self::Class, self::Class, self::ConcreteClass, self::Class, core::Object, core::int, self::G>, self::G, self::G>, self::G>, self::G, self::G>, self::G, self::G>(){() → void}; + dynamic d = #C2; + d{dynamic}.call, dynamic, self::Class, self::Class, self::ConcreteClass, self::Class, core::Object, core::int, self::G>, self::G, self::G>, self::G>, self::G, self::G>, self::G, self::G>(); + new self::Class2::•(); + new self::Class2::•(); + new self::Class2::•(); + new self::Class2::•(); + new self::Class2::•(); + new self::Class2::•(); + new self::Class2::•(); + new self::Class2::•(); + new self::Class2::•(); + new self::Class2::•(); + new self::Class2::•(); + new self::Class2::•(); + new self::Class2::•(); + new self::Class2::•(); + new self::Class2::•(); + new self::Class2::•(); +} +static method main() → dynamic {} +static method _#H#new#tearOff() → self::Class2 + return new self::Class2::•(); + +constants { + #C1 = constructor-tearoff self::Class1::redirect + #C2 = static-tearoff self::staticMethod +} diff --git a/pkg/front_end/testcases/general/bounds_type_arguments.dart.weak.modular.expect b/pkg/front_end/testcases/general/bounds_type_arguments.dart.weak.modular.expect new file mode 100644 index 00000000000..4d4b0ad578a --- /dev/null +++ b/pkg/front_end/testcases/general/bounds_type_arguments.dart.weak.modular.expect @@ -0,0 +1,419 @@ +library /*isNonNullableByDefault*/; +// +// Problems in library: +// +// pkg/front_end/testcases/general/bounds_type_arguments.dart:39:7: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_arguments.dart'. +// Try changing type arguments so that they conform to the bounds. +// F, // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_arguments.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_type_arguments.dart:40:7: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_arguments.dart'. +// Try changing type arguments so that they conform to the bounds. +// F, // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_arguments.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_type_arguments.dart:47:7: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_arguments.dart'. +// Try changing type arguments so that they conform to the bounds. +// G, // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_arguments.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_type_arguments.dart:48:7: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_arguments.dart'. +// Try changing type arguments so that they conform to the bounds. +// G // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_arguments.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_type_arguments.dart:59:7: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_arguments.dart'. +// Try changing type arguments so that they conform to the bounds. +// F, // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_arguments.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_type_arguments.dart:60:7: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_arguments.dart'. +// Try changing type arguments so that they conform to the bounds. +// F, // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_arguments.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_type_arguments.dart:67:7: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_arguments.dart'. +// Try changing type arguments so that they conform to the bounds. +// G, // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_arguments.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_type_arguments.dart:68:7: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_arguments.dart'. +// Try changing type arguments so that they conform to the bounds. +// G // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_arguments.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_type_arguments.dart:78:7: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_arguments.dart'. +// Try changing type arguments so that they conform to the bounds. +// F, // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_arguments.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_type_arguments.dart:79:7: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_arguments.dart'. +// Try changing type arguments so that they conform to the bounds. +// F, // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_arguments.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_type_arguments.dart:86:7: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_arguments.dart'. +// Try changing type arguments so that they conform to the bounds. +// G, // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_arguments.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_type_arguments.dart:87:7: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_arguments.dart'. +// Try changing type arguments so that they conform to the bounds. +// G // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_arguments.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_type_arguments.dart:97:7: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_arguments.dart'. +// Try changing type arguments so that they conform to the bounds. +// F, // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_arguments.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_type_arguments.dart:98:7: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_arguments.dart'. +// Try changing type arguments so that they conform to the bounds. +// F, // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_arguments.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_type_arguments.dart:105:7: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_arguments.dart'. +// Try changing type arguments so that they conform to the bounds. +// G, // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_arguments.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_type_arguments.dart:106:7: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_arguments.dart'. +// Try changing type arguments so that they conform to the bounds. +// G // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_arguments.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_type_arguments.dart:116:7: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_arguments.dart'. +// Try changing type arguments so that they conform to the bounds. +// F, // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_arguments.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_type_arguments.dart:117:7: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_arguments.dart'. +// Try changing type arguments so that they conform to the bounds. +// F, // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_arguments.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_type_arguments.dart:124:7: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_arguments.dart'. +// Try changing type arguments so that they conform to the bounds. +// G, // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_arguments.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_type_arguments.dart:125:7: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_arguments.dart'. +// Try changing type arguments so that they conform to the bounds. +// G // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_arguments.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_type_arguments.dart:135:7: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_arguments.dart'. +// Try changing type arguments so that they conform to the bounds. +// F, // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_arguments.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_type_arguments.dart:136:7: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_arguments.dart'. +// Try changing type arguments so that they conform to the bounds. +// F, // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_arguments.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_type_arguments.dart:143:7: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_arguments.dart'. +// Try changing type arguments so that they conform to the bounds. +// G, // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_arguments.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_type_arguments.dart:144:7: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_arguments.dart'. +// Try changing type arguments so that they conform to the bounds. +// G // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_arguments.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_type_arguments.dart:154:7: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_arguments.dart'. +// Try changing type arguments so that they conform to the bounds. +// F, // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_arguments.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_type_arguments.dart:155:7: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_arguments.dart'. +// Try changing type arguments so that they conform to the bounds. +// F, // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_arguments.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_type_arguments.dart:162:7: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_arguments.dart'. +// Try changing type arguments so that they conform to the bounds. +// G, // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_arguments.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_type_arguments.dart:163:7: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_arguments.dart'. +// Try changing type arguments so that they conform to the bounds. +// G // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_arguments.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_type_arguments.dart:174:7: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_arguments.dart'. +// Try changing type arguments so that they conform to the bounds. +// F, // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_arguments.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_type_arguments.dart:175:7: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_arguments.dart'. +// Try changing type arguments so that they conform to the bounds. +// F, // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_arguments.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_type_arguments.dart:182:7: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_arguments.dart'. +// Try changing type arguments so that they conform to the bounds. +// G, // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_arguments.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_type_arguments.dart:183:7: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_arguments.dart'. +// Try changing type arguments so that they conform to the bounds. +// G // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_arguments.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_type_arguments.dart:192:9: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_arguments.dart'. +// Try changing type arguments so that they conform to the bounds. +// new H>(); // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_arguments.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_type_arguments.dart:193:9: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_arguments.dart'. +// Try changing type arguments so that they conform to the bounds. +// new H>(); // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_arguments.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_type_arguments.dart:200:9: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_arguments.dart'. +// Try changing type arguments so that they conform to the bounds. +// new H>(); // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_arguments.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_type_arguments.dart:201:9: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_arguments.dart'. +// Try changing type arguments so that they conform to the bounds. +// new H>(); // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_arguments.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +import self as self; +import "dart:core" as core; + +typedef F = self::Class> = X; +typedef H = self::Class2; +class Class extends core::Object { + synthetic constructor •() → self::Class + : super core::Object::•() + ; +} +class ConcreteClass extends core::Object implements self::Class { + synthetic constructor •() → self::ConcreteClass + : super core::Object::•() + ; +} +class G = self::Class> extends core::Object { + synthetic constructor •() → self::G + : super core::Object::•() + ; +} +class Class1 extends core::Object { + static final field dynamic _redirecting# = [#C1]/*isLegacy*/; + constructor •() → self::Class1 + : super core::Object::•() + ; + static factory fact() → self::Class1 + return new self::Class1::•(); + static factory redirect() → self::Class1 + return new self::Class1::•(); +} +class Class2 extends core::Object { + synthetic constructor •() → self::Class2 + : super core::Object::•() + ; + method instanceMethod() → void {} +} +static method staticMethod() → void {} +static method test() → dynamic { + self::staticMethod, dynamic, self::Class, self::Class, self::ConcreteClass, self::Class, core::Object, core::int, self::G>, self::G, self::G>, self::G>, self::G, self::G>, self::G, self::G>(); + () → void tearOff = #C2; + tearOff, dynamic, self::Class, self::Class, self::ConcreteClass, self::Class, core::Object, core::int, self::G>, self::G, self::G>, self::G>, self::G, self::G>, self::G, self::G>(){() → void}; + tearOff, dynamic, self::Class, self::Class, self::ConcreteClass, self::Class, core::Object, core::int, self::G>, self::G, self::G>, self::G>, self::G, self::G>, self::G, self::G>; + new self::Class1::•, dynamic, self::Class, self::Class, self::ConcreteClass, self::Class, core::Object, core::int, self::G>, self::G, self::G>, self::G>, self::G, self::G>, self::G, self::G>(); + self::Class1::fact, dynamic, self::Class, self::Class, self::ConcreteClass, self::Class, core::Object, core::int, self::G>, self::G, self::G>, self::G>, self::G, self::G>, self::G, self::G>(); + new self::Class1::•, dynamic, self::Class, self::Class, self::ConcreteClass, self::Class, core::Object, core::int, self::G>, self::G, self::G>, self::G>, self::G, self::G>, self::G, self::G>(); + new self::Class2::•().{self::Class2::instanceMethod}, dynamic, self::Class, self::Class, self::ConcreteClass, self::Class, core::Object, core::int, self::G>, self::G, self::G>, self::G>, self::G, self::G>, self::G, self::G>(){() → void}; + dynamic d = #C2; + d{dynamic}.call, dynamic, self::Class, self::Class, self::ConcreteClass, self::Class, core::Object, core::int, self::G>, self::G, self::G>, self::G>, self::G, self::G>, self::G, self::G>(); + new self::Class2::•(); + new self::Class2::•(); + new self::Class2::•(); + new self::Class2::•(); + new self::Class2::•(); + new self::Class2::•(); + new self::Class2::•(); + new self::Class2::•(); + new self::Class2::•(); + new self::Class2::•(); + new self::Class2::•(); + new self::Class2::•(); + new self::Class2::•(); + new self::Class2::•(); + new self::Class2::•(); + new self::Class2::•(); +} +static method main() → dynamic {} +static method _#H#new#tearOff() → self::Class2 + return new self::Class2::•(); + +constants { + #C1 = constructor-tearoff self::Class1::redirect + #C2 = static-tearoff self::staticMethod +} diff --git a/pkg/front_end/testcases/general/bounds_type_arguments.dart.weak.outline.expect b/pkg/front_end/testcases/general/bounds_type_arguments.dart.weak.outline.expect new file mode 100644 index 00000000000..a7a3717ddb8 --- /dev/null +++ b/pkg/front_end/testcases/general/bounds_type_arguments.dart.weak.outline.expect @@ -0,0 +1,46 @@ +library /*isNonNullableByDefault*/; +import self as self; +import "dart:core" as core; + +typedef F = self::Class> = X; +typedef H = self::Class2; +class Class extends core::Object { + synthetic constructor •() → self::Class + ; +} +class ConcreteClass extends core::Object implements self::Class { + synthetic constructor •() → self::ConcreteClass + ; +} +class G = self::Class> extends core::Object { + synthetic constructor •() → self::G + ; +} +class Class1 extends core::Object { + static final field dynamic _redirecting# = [self::Class1::redirect]/*isLegacy*/; + constructor •() → self::Class1 + ; + static factory fact() → self::Class1 + ; + static factory redirect() → self::Class1 + return new self::Class1::•(); +} +class Class2 extends core::Object { + synthetic constructor •() → self::Class2 + ; + method instanceMethod() → void + ; +} +static method staticMethod() → void + ; +static method test() → dynamic + ; +static method main() → dynamic + ; +static method _#H#new#tearOff() → self::Class2 + return new self::Class2::•(); + + +Extra constant evaluation status: +Evaluated: ConstructorTearOff @ org-dartlang-testcase:///bounds_type_arguments.dart:18:7 -> ConstructorTearOffConstant(Class1.redirect) +Extra constant evaluation: evaluated: 4, effectively constant: 1 diff --git a/pkg/front_end/testcases/general/bounds_type_arguments.dart.weak.transformed.expect b/pkg/front_end/testcases/general/bounds_type_arguments.dart.weak.transformed.expect new file mode 100644 index 00000000000..4d4b0ad578a --- /dev/null +++ b/pkg/front_end/testcases/general/bounds_type_arguments.dart.weak.transformed.expect @@ -0,0 +1,419 @@ +library /*isNonNullableByDefault*/; +// +// Problems in library: +// +// pkg/front_end/testcases/general/bounds_type_arguments.dart:39:7: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_arguments.dart'. +// Try changing type arguments so that they conform to the bounds. +// F, // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_arguments.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_type_arguments.dart:40:7: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_arguments.dart'. +// Try changing type arguments so that they conform to the bounds. +// F, // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_arguments.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_type_arguments.dart:47:7: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_arguments.dart'. +// Try changing type arguments so that they conform to the bounds. +// G, // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_arguments.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_type_arguments.dart:48:7: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_arguments.dart'. +// Try changing type arguments so that they conform to the bounds. +// G // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_arguments.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_type_arguments.dart:59:7: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_arguments.dart'. +// Try changing type arguments so that they conform to the bounds. +// F, // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_arguments.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_type_arguments.dart:60:7: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_arguments.dart'. +// Try changing type arguments so that they conform to the bounds. +// F, // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_arguments.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_type_arguments.dart:67:7: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_arguments.dart'. +// Try changing type arguments so that they conform to the bounds. +// G, // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_arguments.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_type_arguments.dart:68:7: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_arguments.dart'. +// Try changing type arguments so that they conform to the bounds. +// G // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_arguments.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_type_arguments.dart:78:7: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_arguments.dart'. +// Try changing type arguments so that they conform to the bounds. +// F, // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_arguments.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_type_arguments.dart:79:7: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_arguments.dart'. +// Try changing type arguments so that they conform to the bounds. +// F, // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_arguments.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_type_arguments.dart:86:7: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_arguments.dart'. +// Try changing type arguments so that they conform to the bounds. +// G, // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_arguments.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_type_arguments.dart:87:7: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_arguments.dart'. +// Try changing type arguments so that they conform to the bounds. +// G // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_arguments.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_type_arguments.dart:97:7: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_arguments.dart'. +// Try changing type arguments so that they conform to the bounds. +// F, // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_arguments.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_type_arguments.dart:98:7: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_arguments.dart'. +// Try changing type arguments so that they conform to the bounds. +// F, // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_arguments.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_type_arguments.dart:105:7: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_arguments.dart'. +// Try changing type arguments so that they conform to the bounds. +// G, // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_arguments.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_type_arguments.dart:106:7: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_arguments.dart'. +// Try changing type arguments so that they conform to the bounds. +// G // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_arguments.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_type_arguments.dart:116:7: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_arguments.dart'. +// Try changing type arguments so that they conform to the bounds. +// F, // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_arguments.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_type_arguments.dart:117:7: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_arguments.dart'. +// Try changing type arguments so that they conform to the bounds. +// F, // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_arguments.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_type_arguments.dart:124:7: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_arguments.dart'. +// Try changing type arguments so that they conform to the bounds. +// G, // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_arguments.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_type_arguments.dart:125:7: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_arguments.dart'. +// Try changing type arguments so that they conform to the bounds. +// G // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_arguments.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_type_arguments.dart:135:7: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_arguments.dart'. +// Try changing type arguments so that they conform to the bounds. +// F, // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_arguments.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_type_arguments.dart:136:7: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_arguments.dart'. +// Try changing type arguments so that they conform to the bounds. +// F, // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_arguments.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_type_arguments.dart:143:7: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_arguments.dart'. +// Try changing type arguments so that they conform to the bounds. +// G, // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_arguments.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_type_arguments.dart:144:7: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_arguments.dart'. +// Try changing type arguments so that they conform to the bounds. +// G // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_arguments.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_type_arguments.dart:154:7: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_arguments.dart'. +// Try changing type arguments so that they conform to the bounds. +// F, // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_arguments.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_type_arguments.dart:155:7: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_arguments.dart'. +// Try changing type arguments so that they conform to the bounds. +// F, // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_arguments.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_type_arguments.dart:162:7: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_arguments.dart'. +// Try changing type arguments so that they conform to the bounds. +// G, // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_arguments.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_type_arguments.dart:163:7: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_arguments.dart'. +// Try changing type arguments so that they conform to the bounds. +// G // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_arguments.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_type_arguments.dart:174:7: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_arguments.dart'. +// Try changing type arguments so that they conform to the bounds. +// F, // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_arguments.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_type_arguments.dart:175:7: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_arguments.dart'. +// Try changing type arguments so that they conform to the bounds. +// F, // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_arguments.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_type_arguments.dart:182:7: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_arguments.dart'. +// Try changing type arguments so that they conform to the bounds. +// G, // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_arguments.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_type_arguments.dart:183:7: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_arguments.dart'. +// Try changing type arguments so that they conform to the bounds. +// G // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_arguments.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_type_arguments.dart:192:9: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_arguments.dart'. +// Try changing type arguments so that they conform to the bounds. +// new H>(); // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_arguments.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_type_arguments.dart:193:9: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_arguments.dart'. +// Try changing type arguments so that they conform to the bounds. +// new H>(); // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_arguments.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_type_arguments.dart:200:9: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_arguments.dart'. +// Try changing type arguments so that they conform to the bounds. +// new H>(); // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_arguments.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_type_arguments.dart:201:9: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_arguments.dart'. +// Try changing type arguments so that they conform to the bounds. +// new H>(); // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_arguments.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +import self as self; +import "dart:core" as core; + +typedef F = self::Class> = X; +typedef H = self::Class2; +class Class extends core::Object { + synthetic constructor •() → self::Class + : super core::Object::•() + ; +} +class ConcreteClass extends core::Object implements self::Class { + synthetic constructor •() → self::ConcreteClass + : super core::Object::•() + ; +} +class G = self::Class> extends core::Object { + synthetic constructor •() → self::G + : super core::Object::•() + ; +} +class Class1 extends core::Object { + static final field dynamic _redirecting# = [#C1]/*isLegacy*/; + constructor •() → self::Class1 + : super core::Object::•() + ; + static factory fact() → self::Class1 + return new self::Class1::•(); + static factory redirect() → self::Class1 + return new self::Class1::•(); +} +class Class2 extends core::Object { + synthetic constructor •() → self::Class2 + : super core::Object::•() + ; + method instanceMethod() → void {} +} +static method staticMethod() → void {} +static method test() → dynamic { + self::staticMethod, dynamic, self::Class, self::Class, self::ConcreteClass, self::Class, core::Object, core::int, self::G>, self::G, self::G>, self::G>, self::G, self::G>, self::G, self::G>(); + () → void tearOff = #C2; + tearOff, dynamic, self::Class, self::Class, self::ConcreteClass, self::Class, core::Object, core::int, self::G>, self::G, self::G>, self::G>, self::G, self::G>, self::G, self::G>(){() → void}; + tearOff, dynamic, self::Class, self::Class, self::ConcreteClass, self::Class, core::Object, core::int, self::G>, self::G, self::G>, self::G>, self::G, self::G>, self::G, self::G>; + new self::Class1::•, dynamic, self::Class, self::Class, self::ConcreteClass, self::Class, core::Object, core::int, self::G>, self::G, self::G>, self::G>, self::G, self::G>, self::G, self::G>(); + self::Class1::fact, dynamic, self::Class, self::Class, self::ConcreteClass, self::Class, core::Object, core::int, self::G>, self::G, self::G>, self::G>, self::G, self::G>, self::G, self::G>(); + new self::Class1::•, dynamic, self::Class, self::Class, self::ConcreteClass, self::Class, core::Object, core::int, self::G>, self::G, self::G>, self::G>, self::G, self::G>, self::G, self::G>(); + new self::Class2::•().{self::Class2::instanceMethod}, dynamic, self::Class, self::Class, self::ConcreteClass, self::Class, core::Object, core::int, self::G>, self::G, self::G>, self::G>, self::G, self::G>, self::G, self::G>(){() → void}; + dynamic d = #C2; + d{dynamic}.call, dynamic, self::Class, self::Class, self::ConcreteClass, self::Class, core::Object, core::int, self::G>, self::G, self::G>, self::G>, self::G, self::G>, self::G, self::G>(); + new self::Class2::•(); + new self::Class2::•(); + new self::Class2::•(); + new self::Class2::•(); + new self::Class2::•(); + new self::Class2::•(); + new self::Class2::•(); + new self::Class2::•(); + new self::Class2::•(); + new self::Class2::•(); + new self::Class2::•(); + new self::Class2::•(); + new self::Class2::•(); + new self::Class2::•(); + new self::Class2::•(); + new self::Class2::•(); +} +static method main() → dynamic {} +static method _#H#new#tearOff() → self::Class2 + return new self::Class2::•(); + +constants { + #C1 = constructor-tearoff self::Class1::redirect + #C2 = static-tearoff self::staticMethod +} diff --git a/pkg/front_end/testcases/general/bounds_type_literals.dart b/pkg/front_end/testcases/general/bounds_type_literals.dart new file mode 100644 index 00000000000..2c4f20a8f0d --- /dev/null +++ b/pkg/front_end/testcases/general/bounds_type_literals.dart @@ -0,0 +1,34 @@ +// Copyright (c) 2022, 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. + +class Class {} + +class ConcreteClass implements Class {} + +typedef F> = X; + +class G> {} + +class Class1 {} + +test() { + F; // Ok + F; // Ok + F; // Ok + F>; // Ok + F; // Ok + F>; // Ok + F; // Error + F; // Error + G; // Ok + G; // Ok + G; // Ok + G>; // Ok + G; // Ok + G>; // Ok + G; // Error + G; // Error +} + +main() {} diff --git a/pkg/front_end/testcases/general/bounds_type_literals.dart.textual_outline.expect b/pkg/front_end/testcases/general/bounds_type_literals.dart.textual_outline.expect new file mode 100644 index 00000000000..d7e1cd186d1 --- /dev/null +++ b/pkg/front_end/testcases/general/bounds_type_literals.dart.textual_outline.expect @@ -0,0 +1,12 @@ +class Class {} + +class ConcreteClass implements Class {} + +typedef F> = X; + +class G> {} + +class Class1 {} + +test() {} +main() {} diff --git a/pkg/front_end/testcases/general/bounds_type_literals.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/general/bounds_type_literals.dart.textual_outline_modelled.expect new file mode 100644 index 00000000000..105a3bd2a79 --- /dev/null +++ b/pkg/front_end/testcases/general/bounds_type_literals.dart.textual_outline_modelled.expect @@ -0,0 +1,11 @@ +class Class {} + +class Class1 {} + +class ConcreteClass implements Class {} + +class G> {} + +main() {} +test() {} +typedef F> = X; diff --git a/pkg/front_end/testcases/general/bounds_type_literals.dart.weak.expect b/pkg/front_end/testcases/general/bounds_type_literals.dart.weak.expect new file mode 100644 index 00000000000..1f414e9ee24 --- /dev/null +++ b/pkg/front_end/testcases/general/bounds_type_literals.dart.weak.expect @@ -0,0 +1,100 @@ +library /*isNonNullableByDefault*/; +// +// Problems in library: +// +// pkg/front_end/testcases/general/bounds_type_literals.dart:22:3: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_literals.dart'. +// Try changing type arguments so that they conform to the bounds. +// F; // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_literals.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_type_literals.dart:23:3: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_literals.dart'. +// Try changing type arguments so that they conform to the bounds. +// F; // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_literals.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_type_literals.dart:30:3: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_literals.dart'. +// Try changing type arguments so that they conform to the bounds. +// G; // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_literals.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_type_literals.dart:31:3: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_literals.dart'. +// Try changing type arguments so that they conform to the bounds. +// G; // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_literals.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +import self as self; +import "dart:core" as core; + +typedef F = self::Class> = X; +class Class extends core::Object { + synthetic constructor •() → self::Class + : super core::Object::•() + ; +} +class ConcreteClass extends core::Object implements self::Class { + synthetic constructor •() → self::ConcreteClass + : super core::Object::•() + ; +} +class G = self::Class> extends core::Object { + synthetic constructor •() → self::G + : super core::Object::•() + ; +} +class Class1 extends core::Object { + synthetic constructor •() → self::Class1 + : super core::Object::•() + ; +} +static method test() → dynamic { + #C1; + #C2; + #C1; + #C1; + #C3; + #C4; + #C5; + #C6; + #C7; + #C8; + #C7; + #C7; + #C9; + #C10; + #C11; + #C12; +} +static method main() → dynamic {} + +constants { + #C1 = TypeLiteralConstant(self::Class*) + #C2 = TypeLiteralConstant(dynamic) + #C3 = TypeLiteralConstant(self::ConcreteClass*) + #C4 = TypeLiteralConstant(self::Class*) + #C5 = TypeLiteralConstant(core::Object*) + #C6 = TypeLiteralConstant(core::int*) + #C7 = TypeLiteralConstant(self::G*>*) + #C8 = TypeLiteralConstant(self::G*) + #C9 = TypeLiteralConstant(self::G*) + #C10 = TypeLiteralConstant(self::G*>*) + #C11 = TypeLiteralConstant(self::G*) + #C12 = TypeLiteralConstant(self::G*) +} diff --git a/pkg/front_end/testcases/general/bounds_type_literals.dart.weak.modular.expect b/pkg/front_end/testcases/general/bounds_type_literals.dart.weak.modular.expect new file mode 100644 index 00000000000..1f414e9ee24 --- /dev/null +++ b/pkg/front_end/testcases/general/bounds_type_literals.dart.weak.modular.expect @@ -0,0 +1,100 @@ +library /*isNonNullableByDefault*/; +// +// Problems in library: +// +// pkg/front_end/testcases/general/bounds_type_literals.dart:22:3: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_literals.dart'. +// Try changing type arguments so that they conform to the bounds. +// F; // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_literals.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_type_literals.dart:23:3: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_literals.dart'. +// Try changing type arguments so that they conform to the bounds. +// F; // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_literals.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_type_literals.dart:30:3: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_literals.dart'. +// Try changing type arguments so that they conform to the bounds. +// G; // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_literals.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_type_literals.dart:31:3: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_literals.dart'. +// Try changing type arguments so that they conform to the bounds. +// G; // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_literals.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +import self as self; +import "dart:core" as core; + +typedef F = self::Class> = X; +class Class extends core::Object { + synthetic constructor •() → self::Class + : super core::Object::•() + ; +} +class ConcreteClass extends core::Object implements self::Class { + synthetic constructor •() → self::ConcreteClass + : super core::Object::•() + ; +} +class G = self::Class> extends core::Object { + synthetic constructor •() → self::G + : super core::Object::•() + ; +} +class Class1 extends core::Object { + synthetic constructor •() → self::Class1 + : super core::Object::•() + ; +} +static method test() → dynamic { + #C1; + #C2; + #C1; + #C1; + #C3; + #C4; + #C5; + #C6; + #C7; + #C8; + #C7; + #C7; + #C9; + #C10; + #C11; + #C12; +} +static method main() → dynamic {} + +constants { + #C1 = TypeLiteralConstant(self::Class*) + #C2 = TypeLiteralConstant(dynamic) + #C3 = TypeLiteralConstant(self::ConcreteClass*) + #C4 = TypeLiteralConstant(self::Class*) + #C5 = TypeLiteralConstant(core::Object*) + #C6 = TypeLiteralConstant(core::int*) + #C7 = TypeLiteralConstant(self::G*>*) + #C8 = TypeLiteralConstant(self::G*) + #C9 = TypeLiteralConstant(self::G*) + #C10 = TypeLiteralConstant(self::G*>*) + #C11 = TypeLiteralConstant(self::G*) + #C12 = TypeLiteralConstant(self::G*) +} diff --git a/pkg/front_end/testcases/general/bounds_type_literals.dart.weak.outline.expect b/pkg/front_end/testcases/general/bounds_type_literals.dart.weak.outline.expect new file mode 100644 index 00000000000..354780e96ef --- /dev/null +++ b/pkg/front_end/testcases/general/bounds_type_literals.dart.weak.outline.expect @@ -0,0 +1,25 @@ +library /*isNonNullableByDefault*/; +import self as self; +import "dart:core" as core; + +typedef F = self::Class> = X; +class Class extends core::Object { + synthetic constructor •() → self::Class + ; +} +class ConcreteClass extends core::Object implements self::Class { + synthetic constructor •() → self::ConcreteClass + ; +} +class G = self::Class> extends core::Object { + synthetic constructor •() → self::G + ; +} +class Class1 extends core::Object { + synthetic constructor •() → self::Class1 + ; +} +static method test() → dynamic + ; +static method main() → dynamic + ; diff --git a/pkg/front_end/testcases/general/bounds_type_literals.dart.weak.transformed.expect b/pkg/front_end/testcases/general/bounds_type_literals.dart.weak.transformed.expect new file mode 100644 index 00000000000..1f414e9ee24 --- /dev/null +++ b/pkg/front_end/testcases/general/bounds_type_literals.dart.weak.transformed.expect @@ -0,0 +1,100 @@ +library /*isNonNullableByDefault*/; +// +// Problems in library: +// +// pkg/front_end/testcases/general/bounds_type_literals.dart:22:3: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_literals.dart'. +// Try changing type arguments so that they conform to the bounds. +// F; // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_literals.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_type_literals.dart:23:3: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_literals.dart'. +// Try changing type arguments so that they conform to the bounds. +// F; // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_literals.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_type_literals.dart:30:3: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_literals.dart'. +// Try changing type arguments so that they conform to the bounds. +// G; // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_literals.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_type_literals.dart:31:3: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_literals.dart'. +// Try changing type arguments so that they conform to the bounds. +// G; // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_literals.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +import self as self; +import "dart:core" as core; + +typedef F = self::Class> = X; +class Class extends core::Object { + synthetic constructor •() → self::Class + : super core::Object::•() + ; +} +class ConcreteClass extends core::Object implements self::Class { + synthetic constructor •() → self::ConcreteClass + : super core::Object::•() + ; +} +class G = self::Class> extends core::Object { + synthetic constructor •() → self::G + : super core::Object::•() + ; +} +class Class1 extends core::Object { + synthetic constructor •() → self::Class1 + : super core::Object::•() + ; +} +static method test() → dynamic { + #C1; + #C2; + #C1; + #C1; + #C3; + #C4; + #C5; + #C6; + #C7; + #C8; + #C7; + #C7; + #C9; + #C10; + #C11; + #C12; +} +static method main() → dynamic {} + +constants { + #C1 = TypeLiteralConstant(self::Class*) + #C2 = TypeLiteralConstant(dynamic) + #C3 = TypeLiteralConstant(self::ConcreteClass*) + #C4 = TypeLiteralConstant(self::Class*) + #C5 = TypeLiteralConstant(core::Object*) + #C6 = TypeLiteralConstant(core::int*) + #C7 = TypeLiteralConstant(self::G*>*) + #C8 = TypeLiteralConstant(self::G*) + #C9 = TypeLiteralConstant(self::G*) + #C10 = TypeLiteralConstant(self::G*>*) + #C11 = TypeLiteralConstant(self::G*) + #C12 = TypeLiteralConstant(self::G*) +} diff --git a/pkg/front_end/testcases/general/bounds_type_parameters.dart b/pkg/front_end/testcases/general/bounds_type_parameters.dart new file mode 100644 index 00000000000..3a1e8eb4de9 --- /dev/null +++ b/pkg/front_end/testcases/general/bounds_type_parameters.dart @@ -0,0 +1,243 @@ +// Copyright (c) 2022, 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. + +class Class {} + +class ConcreteClass implements Class {} + +typedef F> = X; + +class G> {} + +typedef Typedef1< + T1 extends F, // Error + T2 extends F, // Ok + T3 extends F, // Ok + T4 extends F>, // Ok + T5 extends F, // Ok + T6 extends F>, // Ok + T7 extends F, // Error + T8 extends F, // Error + S1 extends G, // Error + S2 extends G, // Ok + S3 extends G, // Ok + S4 extends G>, // Ok + S5 extends G, // Ok + S6 extends G>, // Ok + S7 extends G, // Error + S8 extends G // Error + > + = void Function(); + +typedef Typedef2 = void Function< + T1 extends F, // Error + T2 extends F, // Ok + T3 extends F, // Ok + T4 extends F>, // Ok + T5 extends F, // Ok + T6 extends F>, // Ok + T7 extends F, // Error + T8 extends F, // Error + S1 extends G, // Error + S2 extends G, // Ok + S3 extends G, // Ok + S4 extends G>, // Ok + S5 extends G, // Ok + S6 extends G>, // Ok + S7 extends G, // Error + S8 extends G // Error + >(); + +typedef void Typedef3< + T1 extends F, // Error + T2 extends F, // Ok + T3 extends F, // Ok + T4 extends F>, // Ok + T5 extends F, // Ok + T6 extends F>, // Ok + T7 extends F, // Error + T8 extends F, // Error + S1 extends G, // Error + S2 extends G, // Ok + S3 extends G, // Ok + S4 extends G>, // Ok + S5 extends G, // Ok + S6 extends G>, // Ok + S7 extends G, // Error + S8 extends G // Error + >(); + +class Class1< + T1 extends F, // Error + T2 extends F, // Ok + T3 extends F, // Ok + T4 extends F>, // Ok + T5 extends F, // Ok + T6 extends F>, // Ok + T7 extends F, // Error + T8 extends F, // Error + S1 extends G, // Error + S2 extends G, // Ok + S3 extends G, // Ok + S4 extends G>, // Ok + S5 extends G, // Ok + S6 extends G>, // Ok + S7 extends G, // Error + S8 extends G // Error + > {} + +class Class2< + T1 extends F, // Error + T2 extends F, // Ok + T3 extends F, // Ok + T4 extends F>, // Ok + T5 extends F, // Ok + T6 extends F>, // Ok + T7 extends F, // Error + T8 extends F, // Error + S1 extends G, // Error + S2 extends G, // Ok + S3 extends G, // Ok + S4 extends G>, // Ok + S5 extends G, // Ok + S6 extends G>, // Ok + S7 extends G, // Error + S8 extends G // Error + > = Object with Class; + +mixin Mixin1< + T1 extends F, // Error + T2 extends F, // Ok + T3 extends F, // Ok + T4 extends F>, // Ok + T5 extends F, // Ok + T6 extends F>, // Ok + T7 extends F, // Error + T8 extends F, // Error + S1 extends G, // Error + S2 extends G, // Ok + S3 extends G, // Ok + S4 extends G>, // Ok + S5 extends G, // Ok + S6 extends G>, // Ok + S7 extends G, // Error + S8 extends G // Error + > {} + +// TODO(johnniwinther): Check/create this type as regular bounded i2b. +enum Enum1< + T1 extends F, // Error + T2 extends F, // Ok + T3 extends F, // Error + T4 extends F>, // Error + T5 extends F, // Ok + T6 extends F>, // Ok + T7 extends F, // Error + T8 extends F, // Error + S1 extends G, // Error + S2 extends G, // Error + S3 extends G, // Error + S4 extends G>, // Error + S5 extends G, // Ok + S6 extends G>, // Ok + S7 extends G, // Error + S8 extends G // Error + > { + a< + ConcreteClass, + ConcreteClass, + ConcreteClass, + ConcreteClass, + ConcreteClass, + ConcreteClass, + ConcreteClass, + ConcreteClass, + G, + G, + G, + G, + G, + G, + G, + G>() +} + +extension Extension< + T1 extends F, // Ok + T2 extends F, // Ok + T3 extends F, // Ok + T4 extends F>, // Ok + T5 extends F, // Ok + T6 extends F>, // Ok + T7 extends F, // Error + T8 extends F, // Error + S1 extends G, // Ok + S2 extends G, // Ok + S3 extends G, // Ok + S4 extends G>, // Ok + S5 extends G, // Ok + S6 extends G>, // Ok + S7 extends G, // Error + S8 extends G // Error + > on Class {} + +void method1< + T1 extends F, // Error + T2 extends F, // Ok + T3 extends F, // Ok + T4 extends F>, // Ok + T5 extends F, // Ok + T6 extends F>, // Ok + T7 extends F, // Error + T8 extends F, // Error + S1 extends G, // Error + S2 extends G, // Ok + S3 extends G, // Ok + S4 extends G>, // Ok + S5 extends G, // Ok + S6 extends G>, // Ok + S7 extends G, // Error + S8 extends G // Error + >() {} + +test() { + void local1< + T1 extends F, // Ok + T2 extends F, // Ok + T3 extends F, // Ok + T4 extends F>, // Ok + T5 extends F, // Ok + T6 extends F>, // Ok + T7 extends F, // Error + T8 extends F, // Error + S1 extends G, // Ok + S2 extends G, // Ok + S3 extends G, // Ok + S4 extends G>, // Ok + S5 extends G, // Ok + S6 extends G>, // Ok + S7 extends G, // Error + S8 extends G // Error + >() {} + void Function< + T1 extends F, // Ok + T2 extends F, // Ok + T3 extends F, // Ok + T4 extends F>, // Ok + T5 extends F, // Ok + T6 extends F>, // Ok + T7 extends F, // Error + T8 extends F, // Error + S1 extends G, // Ok + S2 extends G, // Ok + S3 extends G, // Ok + S4 extends G>, // Ok + S5 extends G, // Ok + S6 extends G>, // Ok + S7 extends G, // Error + S8 extends G // Error + >() local; +} + +main() {} diff --git a/pkg/front_end/testcases/general/bounds_type_parameters.dart.textual_outline.expect b/pkg/front_end/testcases/general/bounds_type_parameters.dart.textual_outline.expect new file mode 100644 index 00000000000..7608f2da31a --- /dev/null +++ b/pkg/front_end/testcases/general/bounds_type_parameters.dart.textual_outline.expect @@ -0,0 +1,187 @@ +class Class {} + +class ConcreteClass implements Class {} + +typedef F> = X; + +class G> {} + +typedef Typedef1< + T1 extends F, + T2 extends F, + T3 extends F, + T4 extends F>, + T5 extends F, + T6 extends F>, + T7 extends F, + T8 extends F, + S1 extends G, + S2 extends G, + S3 extends G, + S4 extends G>, + S5 extends G, + S6 extends G>, + S7 extends G, + S8 extends G> + = void Function(); +typedef Typedef2 = void Function< + T1 extends F, + T2 extends F, + T3 extends F, + T4 extends F>, + T5 extends F, + T6 extends F>, + T7 extends F, + T8 extends F, + S1 extends G, + S2 extends G, + S3 extends G, + S4 extends G>, + S5 extends G, + S6 extends G>, + S7 extends G, + S8 extends G>(); +typedef void Typedef3< + T1 extends F, + T2 extends F, + T3 extends F, + T4 extends F>, + T5 extends F, + T6 extends F>, + T7 extends F, + T8 extends F, + S1 extends G, + S2 extends G, + S3 extends G, + S4 extends G>, + S5 extends G, + S6 extends G>, + S7 extends G, + S8 extends G>(); + +class Class1< + T1 extends F, + T2 extends F, + T3 extends F, + T4 extends F>, + T5 extends F, + T6 extends F>, + T7 extends F, + T8 extends F, + S1 extends G, + S2 extends G, + S3 extends G, + S4 extends G>, + S5 extends G, + S6 extends G>, + S7 extends G, + S8 extends G> {} + +class Class2< + T1 extends F, + T2 extends F, + T3 extends F, + T4 extends F>, + T5 extends F, + T6 extends F>, + T7 extends F, + T8 extends F, + S1 extends G, + S2 extends G, + S3 extends G, + S4 extends G>, + S5 extends G, + S6 extends G>, + S7 extends G, + S8 extends G> = Object with Class; +mixin Mixin1< + T1 extends F, + T2 extends F, + T3 extends F, + T4 extends F>, + T5 extends F, + T6 extends F>, + T7 extends F, + T8 extends F, + S1 extends G, + S2 extends G, + S3 extends G, + S4 extends G>, + S5 extends G, + S6 extends G>, + S7 extends G, + S8 extends G> {} + +enum Enum1< + T1 extends F, + T2 extends F, + T3 extends F, + T4 extends F>, + T5 extends F, + T6 extends F>, + T7 extends F, + T8 extends F, + S1 extends G, + S2 extends G, + S3 extends G, + S4 extends G>, + S5 extends G, + S6 extends G>, + S7 extends G, + S8 extends G> { + a< + ConcreteClass, + ConcreteClass, + ConcreteClass, + ConcreteClass, + ConcreteClass, + ConcreteClass, + ConcreteClass, + ConcreteClass, + G, + G, + G, + G, + G, + G, + G, + G>() +} + +extension Extension< + T1 extends F, + T2 extends F, + T3 extends F, + T4 extends F>, + T5 extends F, + T6 extends F>, + T7 extends F, + T8 extends F, + S1 extends G, + S2 extends G, + S3 extends G, + S4 extends G>, + S5 extends G, + S6 extends G>, + S7 extends G, + S8 extends G> on Class {} + +void method1< + T1 extends F, + T2 extends F, + T3 extends F, + T4 extends F>, + T5 extends F, + T6 extends F>, + T7 extends F, + T8 extends F, + S1 extends G, + S2 extends G, + S3 extends G, + S4 extends G>, + S5 extends G, + S6 extends G>, + S7 extends G, + S8 extends G>() {} +test() {} +main() {} diff --git a/pkg/front_end/testcases/general/bounds_type_parameters.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/general/bounds_type_parameters.dart.textual_outline_modelled.expect new file mode 100644 index 00000000000..216f660d66f --- /dev/null +++ b/pkg/front_end/testcases/general/bounds_type_parameters.dart.textual_outline_modelled.expect @@ -0,0 +1,185 @@ +class Class {} + +class Class1< + T1 extends F, + T2 extends F, + T3 extends F, + T4 extends F>, + T5 extends F, + T6 extends F>, + T7 extends F, + T8 extends F, + S1 extends G, + S2 extends G, + S3 extends G, + S4 extends G>, + S5 extends G, + S6 extends G>, + S7 extends G, + S8 extends G> {} + +class Class2< + T1 extends F, + T2 extends F, + T3 extends F, + T4 extends F>, + T5 extends F, + T6 extends F>, + T7 extends F, + T8 extends F, + S1 extends G, + S2 extends G, + S3 extends G, + S4 extends G>, + S5 extends G, + S6 extends G>, + S7 extends G, + S8 extends G> = Object with Class; + +class ConcreteClass implements Class {} + +class G> {} + +enum Enum1< + T1 extends F, + T2 extends F, + T3 extends F, + T4 extends F>, + T5 extends F, + T6 extends F>, + T7 extends F, + T8 extends F, + S1 extends G, + S2 extends G, + S3 extends G, + S4 extends G>, + S5 extends G, + S6 extends G>, + S7 extends G, + S8 extends G> { + a< + ConcreteClass, + ConcreteClass, + ConcreteClass, + ConcreteClass, + ConcreteClass, + ConcreteClass, + ConcreteClass, + ConcreteClass, + G, + G, + G, + G, + G, + G, + G, + G>() +} + +extension Extension< + T1 extends F, + T2 extends F, + T3 extends F, + T4 extends F>, + T5 extends F, + T6 extends F>, + T7 extends F, + T8 extends F, + S1 extends G, + S2 extends G, + S3 extends G, + S4 extends G>, + S5 extends G, + S6 extends G>, + S7 extends G, + S8 extends G> on Class {} + +main() {} +mixin Mixin1< + T1 extends F, + T2 extends F, + T3 extends F, + T4 extends F>, + T5 extends F, + T6 extends F>, + T7 extends F, + T8 extends F, + S1 extends G, + S2 extends G, + S3 extends G, + S4 extends G>, + S5 extends G, + S6 extends G>, + S7 extends G, + S8 extends G> {} +test() {} +typedef F> = X; +typedef Typedef1< + T1 extends F, + T2 extends F, + T3 extends F, + T4 extends F>, + T5 extends F, + T6 extends F>, + T7 extends F, + T8 extends F, + S1 extends G, + S2 extends G, + S3 extends G, + S4 extends G>, + S5 extends G, + S6 extends G>, + S7 extends G, + S8 extends G> + = void Function(); +typedef Typedef2 = void Function< + T1 extends F, + T2 extends F, + T3 extends F, + T4 extends F>, + T5 extends F, + T6 extends F>, + T7 extends F, + T8 extends F, + S1 extends G, + S2 extends G, + S3 extends G, + S4 extends G>, + S5 extends G, + S6 extends G>, + S7 extends G, + S8 extends G>(); +typedef void Typedef3< + T1 extends F, + T2 extends F, + T3 extends F, + T4 extends F>, + T5 extends F, + T6 extends F>, + T7 extends F, + T8 extends F, + S1 extends G, + S2 extends G, + S3 extends G, + S4 extends G>, + S5 extends G, + S6 extends G>, + S7 extends G, + S8 extends G>(); +void method1< + T1 extends F, + T2 extends F, + T3 extends F, + T4 extends F>, + T5 extends F, + T6 extends F>, + T7 extends F, + T8 extends F, + S1 extends G, + S2 extends G, + S3 extends G, + S4 extends G>, + S5 extends G, + S6 extends G>, + S7 extends G, + S8 extends G>() {} diff --git a/pkg/front_end/testcases/general/bounds_type_parameters.dart.weak.expect b/pkg/front_end/testcases/general/bounds_type_parameters.dart.weak.expect new file mode 100644 index 00000000000..dbd7faac8e1 --- /dev/null +++ b/pkg/front_end/testcases/general/bounds_type_parameters.dart.weak.expect @@ -0,0 +1,634 @@ +library /*isNonNullableByDefault*/; +// +// Problems in library: +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:14:9: Error: Generic type 'F' can't be used without type arguments in a type variable bound. +// Try providing type arguments to 'F' here. +// T1 extends F, // Error +// ^^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:9:11: Context: Bound of this variable references variable 'X' from the same declaration. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:22:9: Error: Generic type 'G' can't be used without type arguments in a type variable bound. +// Try providing type arguments to 'G' here. +// S1 extends G, // Error +// ^^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:11:9: Context: Bound of this variable references variable 'X' from the same declaration. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:34:5: Error: Generic type 'F' can't be used without type arguments in a type variable bound. +// Try providing type arguments to 'F' here. +// T1 extends F, // Error +// ^^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:9:11: Context: Bound of this variable references variable 'X' from the same declaration. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:42:5: Error: Generic type 'G' can't be used without type arguments in a type variable bound. +// Try providing type arguments to 'G' here. +// S1 extends G, // Error +// ^^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:11:9: Context: Bound of this variable references variable 'X' from the same declaration. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:53:5: Error: Generic type 'F' can't be used without type arguments in a type variable bound. +// Try providing type arguments to 'F' here. +// T1 extends F, // Error +// ^^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:9:11: Context: Bound of this variable references variable 'X' from the same declaration. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:61:5: Error: Generic type 'G' can't be used without type arguments in a type variable bound. +// Try providing type arguments to 'G' here. +// S1 extends G, // Error +// ^^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:11:9: Context: Bound of this variable references variable 'X' from the same declaration. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:72:5: Error: Generic type 'F' can't be used without type arguments in a type variable bound. +// Try providing type arguments to 'F' here. +// T1 extends F, // Error +// ^^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:9:11: Context: Bound of this variable references variable 'X' from the same declaration. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:80:5: Error: Generic type 'G' can't be used without type arguments in a type variable bound. +// Try providing type arguments to 'G' here. +// S1 extends G, // Error +// ^^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:11:9: Context: Bound of this variable references variable 'X' from the same declaration. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:91:5: Error: Generic type 'F' can't be used without type arguments in a type variable bound. +// Try providing type arguments to 'F' here. +// T1 extends F, // Error +// ^^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:9:11: Context: Bound of this variable references variable 'X' from the same declaration. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:99:5: Error: Generic type 'G' can't be used without type arguments in a type variable bound. +// Try providing type arguments to 'G' here. +// S1 extends G, // Error +// ^^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:11:9: Context: Bound of this variable references variable 'X' from the same declaration. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:110:5: Error: Generic type 'F' can't be used without type arguments in a type variable bound. +// Try providing type arguments to 'F' here. +// T1 extends F, // Error +// ^^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:9:11: Context: Bound of this variable references variable 'X' from the same declaration. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:118:5: Error: Generic type 'G' can't be used without type arguments in a type variable bound. +// Try providing type arguments to 'G' here. +// S1 extends G, // Error +// ^^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:11:9: Context: Bound of this variable references variable 'X' from the same declaration. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:130:5: Error: Generic type 'F' can't be used without type arguments in a type variable bound. +// Try providing type arguments to 'F' here. +// T1 extends F, // Error +// ^^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:9:11: Context: Bound of this variable references variable 'X' from the same declaration. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:138:5: Error: Generic type 'G' can't be used without type arguments in a type variable bound. +// Try providing type arguments to 'G' here. +// S1 extends G, // Error +// ^^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:11:9: Context: Bound of this variable references variable 'X' from the same declaration. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:186:5: Error: Generic type 'F' can't be used without type arguments in a type variable bound. +// Try providing type arguments to 'F' here. +// T1 extends F, // Error +// ^^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:9:11: Context: Bound of this variable references variable 'X' from the same declaration. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:194:5: Error: Generic type 'G' can't be used without type arguments in a type variable bound. +// Try providing type arguments to 'G' here. +// S1 extends G, // Error +// ^^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:11:9: Context: Bound of this variable references variable 'X' from the same declaration. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:20:20: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// T7 extends F, // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:21:20: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// T8 extends F, // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:28:20: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// S7 extends G, // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:29:20: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// S8 extends G // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:40:16: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// T7 extends F, // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:41:16: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// T8 extends F, // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:48:16: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// S7 extends G, // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:49:16: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// S8 extends G // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:59:16: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// T7 extends F, // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:60:16: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// T8 extends F, // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:67:16: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// S7 extends G, // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:68:16: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// S8 extends G // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:78:16: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// T7 extends F, // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:79:16: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// T8 extends F, // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:86:16: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// S7 extends G, // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:87:16: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// S8 extends G // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:97:16: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// T7 extends F, // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:98:16: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// T8 extends F, // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:105:16: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// S7 extends G, // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:106:16: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// S8 extends G // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:116:16: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// T7 extends F, // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:117:16: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// T8 extends F, // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:124:16: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// S7 extends G, // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:125:16: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// S8 extends G // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:136:16: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// T7 extends F, // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:137:16: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// T8 extends F, // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:144:16: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// S7 extends G, // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:145:16: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// S8 extends G // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:173:16: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// T7 extends F, // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:174:16: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// T8 extends F, // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:181:16: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// S7 extends G, // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:182:16: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// S8 extends G // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:192:16: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// T7 extends F, // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:193:16: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// T8 extends F, // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:200:16: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// S7 extends G, // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:201:16: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// S8 extends G // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:147:3: Error: Type argument 'ConcreteClass' doesn't conform to the bound 'int' of the type variable 'T8' on 'Enum1'. +// - 'ConcreteClass' is from 'pkg/front_end/testcases/general/bounds_type_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// a< +// ^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:137:5: Context: This is the type variable whose bound isn't conformed to. +// T8 extends F, // Error +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:147:3: Error: Type argument 'G' doesn't conform to the bound 'G' of the type variable 'S8' on 'Enum1'. +// - 'G' is from 'pkg/front_end/testcases/general/bounds_type_parameters.dart'. +// - 'ConcreteClass' is from 'pkg/front_end/testcases/general/bounds_type_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// a< +// ^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:145:5: Context: This is the type variable whose bound isn't conformed to. +// S8 extends G // Error +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:212:18: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// T7 extends F, // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:213:18: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// T8 extends F, // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:220:18: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// S7 extends G, // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:221:18: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// S8 extends G // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:230:18: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// T7 extends F, // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:231:18: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// T8 extends F, // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:238:18: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// S7 extends G, // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:239:18: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// S8 extends G // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +import self as self; +import "dart:core" as core; + +typedef F = self::Class> = X; +typedef Typedef1 = dynamic, unrelated T2 extends dynamic, unrelated T3 extends self::Class = dynamic, unrelated T4 extends self::Class = dynamic, unrelated T5 extends self::ConcreteClass = dynamic, unrelated T6 extends self::Class = dynamic, unrelated T7 extends core::Object = dynamic, unrelated T8 extends core::int = dynamic, unrelated S1 extends self::G> = dynamic, unrelated S2 extends self::G = dynamic, unrelated S3 extends self::G> = dynamic, unrelated S4 extends self::G> = dynamic, unrelated S5 extends self::G = dynamic, unrelated S6 extends self::G> = dynamic, unrelated S7 extends self::G = dynamic, unrelated S8 extends self::G = dynamic> = () → void; +typedef Typedef2 = = dynamic, T2 extends dynamic, T3 extends self::Class = dynamic, T4 extends self::Class = dynamic, T5 extends self::ConcreteClass = dynamic, T6 extends self::Class = dynamic, T7 extends core::Object = dynamic, T8 extends core::int = dynamic, S1 extends self::G> = dynamic, S2 extends self::G = dynamic, S3 extends self::G> = dynamic, S4 extends self::G> = dynamic, S5 extends self::G = dynamic, S6 extends self::G> = dynamic, S7 extends self::G = dynamic, S8 extends self::G = dynamic>() → void; +typedef Typedef3 = dynamic, unrelated T2 extends dynamic, unrelated T3 extends self::Class = dynamic, unrelated T4 extends self::Class = dynamic, unrelated T5 extends self::ConcreteClass = dynamic, unrelated T6 extends self::Class = dynamic, unrelated T7 extends core::Object = dynamic, unrelated T8 extends core::int = dynamic, unrelated S1 extends self::G> = dynamic, unrelated S2 extends self::G = dynamic, unrelated S3 extends self::G> = dynamic, unrelated S4 extends self::G> = dynamic, unrelated S5 extends self::G = dynamic, unrelated S6 extends self::G> = dynamic, unrelated S7 extends self::G = dynamic, unrelated S8 extends self::G = dynamic> = () → void; +class Class extends core::Object { + synthetic constructor •() → self::Class + : super core::Object::•() + ; +} +class ConcreteClass extends core::Object implements self::Class { + synthetic constructor •() → self::ConcreteClass + : super core::Object::•() + ; +} +class G = self::Class> extends core::Object { + synthetic constructor •() → self::G + : super core::Object::•() + ; +} +class Class1 = dynamic, T2 extends dynamic, T3 extends self::Class = dynamic, T4 extends self::Class = dynamic, T5 extends self::ConcreteClass = dynamic, T6 extends self::Class = dynamic, T7 extends core::Object = dynamic, T8 extends core::int = dynamic, S1 extends self::G> = dynamic, S2 extends self::G = dynamic, S3 extends self::G> = dynamic, S4 extends self::G> = dynamic, S5 extends self::G = dynamic, S6 extends self::G> = dynamic, S7 extends self::G = dynamic, S8 extends self::G = dynamic> extends core::Object { + synthetic constructor •() → self::Class1 + : super core::Object::•() + ; +} +class Class2 = dynamic, T2 extends dynamic, T3 extends self::Class = dynamic, T4 extends self::Class = dynamic, T5 extends self::ConcreteClass = dynamic, T6 extends self::Class = dynamic, T7 extends core::Object = dynamic, T8 extends core::int = dynamic, S1 extends self::G> = dynamic, S2 extends self::G = dynamic, S3 extends self::G> = dynamic, S4 extends self::G> = dynamic, S5 extends self::G = dynamic, S6 extends self::G> = dynamic, S7 extends self::G = dynamic, S8 extends self::G = dynamic> = core::Object with self::Class /*hasConstConstructor*/ { + const synthetic constructor •() → self::Class2 + : super core::Object::•() + ; +} +abstract class Mixin1 = dynamic, T2 extends dynamic, T3 extends self::Class = dynamic, T4 extends self::Class = dynamic, T5 extends self::ConcreteClass = dynamic, T6 extends self::Class = dynamic, T7 extends core::Object = dynamic, T8 extends core::int = dynamic, S1 extends self::G> = dynamic, S2 extends self::G = dynamic, S3 extends self::G> = dynamic, S4 extends self::G> = dynamic, S5 extends self::G = dynamic, S6 extends self::G> = dynamic, S7 extends self::G = dynamic, S8 extends self::G = dynamic> extends core::Object /*isMixinDeclaration*/ { +} +class Enum1 = dynamic, T2 extends dynamic, T3 extends self::Class = dynamic, T4 extends self::Class = dynamic, T5 extends self::ConcreteClass = dynamic, T6 extends self::Class = dynamic, T7 extends core::Object = dynamic, T8 extends core::int = dynamic, S1 extends self::G> = dynamic, S2 extends self::G = dynamic, S3 extends self::G> = dynamic, S4 extends self::G> = dynamic, S5 extends self::G = dynamic, S6 extends self::G> = dynamic, S7 extends self::G = dynamic, S8 extends self::G = dynamic> extends core::_Enum /*isEnum*/ { + static const field core::List> values = #C4; + static const field self::Enum1, self::G, self::G, self::G, self::G, self::G, self::G, self::G> a = #C3; + const constructor •(core::int index, core::String name) → self::Enum1 + : super core::_Enum::•(index, name) + ; + method toString() → core::String + return "Enum1.${this.{core::_Enum::_name}{core::String}}"; +} +extension Extension, T2 extends dynamic, T3 extends self::Class, T4 extends self::Class, T5 extends self::ConcreteClass, T6 extends self::Class, T7 extends core::Object, T8 extends core::int, S1 extends self::G>, S2 extends self::G, S3 extends self::G>, S4 extends self::G>, S5 extends self::G, S6 extends self::G>, S7 extends self::G, S8 extends self::G> on self::Class { +} +static method method1 = dynamic, T2 extends dynamic, T3 extends self::Class = dynamic, T4 extends self::Class = dynamic, T5 extends self::ConcreteClass = dynamic, T6 extends self::Class = dynamic, T7 extends core::Object = dynamic, T8 extends core::int = dynamic, S1 extends self::G> = dynamic, S2 extends self::G = dynamic, S3 extends self::G> = dynamic, S4 extends self::G> = dynamic, S5 extends self::G = dynamic, S6 extends self::G> = dynamic, S7 extends self::G = dynamic, S8 extends self::G = dynamic>() → void {} +static method test() → dynamic { + function local1, T2 extends dynamic, T3 extends self::Class, T4 extends self::Class, T5 extends self::ConcreteClass, T6 extends self::Class, T7 extends core::Object, T8 extends core::int, S1 extends self::G>, S2 extends self::G, S3 extends self::G>, S4 extends self::G>, S5 extends self::G, S6 extends self::G>, S7 extends self::G, S8 extends self::G>() → void {} + , T2 extends dynamic, T3 extends self::Class, T4 extends self::Class, T5 extends self::ConcreteClass, T6 extends self::Class, T7 extends core::Object, T8 extends core::int, S1 extends self::G>, S2 extends self::G, S3 extends self::G>, S4 extends self::G>, S5 extends self::G, S6 extends self::G>, S7 extends self::G, S8 extends self::G>() → void local; +} +static method main() → dynamic {} + +constants { + #C1 = 0 + #C2 = "a" + #C3 = self::Enum1*, self::G*, self::G*, self::G*, self::G*, self::G*, self::G*, self::G*> {index:#C1, _name:#C2} + #C4 = *>[#C3] +} + + +Constructor coverage from constants: +org-dartlang-testcase:///bounds_type_parameters.dart: +- Enum1. (from org-dartlang-testcase:///bounds_type_parameters.dart:129:6) +- _Enum. (from org-dartlang-sdk:///sdk/lib/core/enum.dart:103:9) +- Object. (from org-dartlang-sdk:///sdk/lib/core/object.dart:25:9) diff --git a/pkg/front_end/testcases/general/bounds_type_parameters.dart.weak.modular.expect b/pkg/front_end/testcases/general/bounds_type_parameters.dart.weak.modular.expect new file mode 100644 index 00000000000..dbd7faac8e1 --- /dev/null +++ b/pkg/front_end/testcases/general/bounds_type_parameters.dart.weak.modular.expect @@ -0,0 +1,634 @@ +library /*isNonNullableByDefault*/; +// +// Problems in library: +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:14:9: Error: Generic type 'F' can't be used without type arguments in a type variable bound. +// Try providing type arguments to 'F' here. +// T1 extends F, // Error +// ^^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:9:11: Context: Bound of this variable references variable 'X' from the same declaration. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:22:9: Error: Generic type 'G' can't be used without type arguments in a type variable bound. +// Try providing type arguments to 'G' here. +// S1 extends G, // Error +// ^^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:11:9: Context: Bound of this variable references variable 'X' from the same declaration. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:34:5: Error: Generic type 'F' can't be used without type arguments in a type variable bound. +// Try providing type arguments to 'F' here. +// T1 extends F, // Error +// ^^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:9:11: Context: Bound of this variable references variable 'X' from the same declaration. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:42:5: Error: Generic type 'G' can't be used without type arguments in a type variable bound. +// Try providing type arguments to 'G' here. +// S1 extends G, // Error +// ^^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:11:9: Context: Bound of this variable references variable 'X' from the same declaration. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:53:5: Error: Generic type 'F' can't be used without type arguments in a type variable bound. +// Try providing type arguments to 'F' here. +// T1 extends F, // Error +// ^^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:9:11: Context: Bound of this variable references variable 'X' from the same declaration. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:61:5: Error: Generic type 'G' can't be used without type arguments in a type variable bound. +// Try providing type arguments to 'G' here. +// S1 extends G, // Error +// ^^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:11:9: Context: Bound of this variable references variable 'X' from the same declaration. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:72:5: Error: Generic type 'F' can't be used without type arguments in a type variable bound. +// Try providing type arguments to 'F' here. +// T1 extends F, // Error +// ^^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:9:11: Context: Bound of this variable references variable 'X' from the same declaration. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:80:5: Error: Generic type 'G' can't be used without type arguments in a type variable bound. +// Try providing type arguments to 'G' here. +// S1 extends G, // Error +// ^^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:11:9: Context: Bound of this variable references variable 'X' from the same declaration. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:91:5: Error: Generic type 'F' can't be used without type arguments in a type variable bound. +// Try providing type arguments to 'F' here. +// T1 extends F, // Error +// ^^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:9:11: Context: Bound of this variable references variable 'X' from the same declaration. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:99:5: Error: Generic type 'G' can't be used without type arguments in a type variable bound. +// Try providing type arguments to 'G' here. +// S1 extends G, // Error +// ^^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:11:9: Context: Bound of this variable references variable 'X' from the same declaration. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:110:5: Error: Generic type 'F' can't be used without type arguments in a type variable bound. +// Try providing type arguments to 'F' here. +// T1 extends F, // Error +// ^^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:9:11: Context: Bound of this variable references variable 'X' from the same declaration. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:118:5: Error: Generic type 'G' can't be used without type arguments in a type variable bound. +// Try providing type arguments to 'G' here. +// S1 extends G, // Error +// ^^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:11:9: Context: Bound of this variable references variable 'X' from the same declaration. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:130:5: Error: Generic type 'F' can't be used without type arguments in a type variable bound. +// Try providing type arguments to 'F' here. +// T1 extends F, // Error +// ^^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:9:11: Context: Bound of this variable references variable 'X' from the same declaration. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:138:5: Error: Generic type 'G' can't be used without type arguments in a type variable bound. +// Try providing type arguments to 'G' here. +// S1 extends G, // Error +// ^^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:11:9: Context: Bound of this variable references variable 'X' from the same declaration. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:186:5: Error: Generic type 'F' can't be used without type arguments in a type variable bound. +// Try providing type arguments to 'F' here. +// T1 extends F, // Error +// ^^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:9:11: Context: Bound of this variable references variable 'X' from the same declaration. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:194:5: Error: Generic type 'G' can't be used without type arguments in a type variable bound. +// Try providing type arguments to 'G' here. +// S1 extends G, // Error +// ^^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:11:9: Context: Bound of this variable references variable 'X' from the same declaration. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:20:20: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// T7 extends F, // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:21:20: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// T8 extends F, // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:28:20: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// S7 extends G, // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:29:20: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// S8 extends G // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:40:16: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// T7 extends F, // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:41:16: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// T8 extends F, // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:48:16: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// S7 extends G, // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:49:16: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// S8 extends G // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:59:16: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// T7 extends F, // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:60:16: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// T8 extends F, // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:67:16: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// S7 extends G, // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:68:16: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// S8 extends G // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:78:16: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// T7 extends F, // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:79:16: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// T8 extends F, // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:86:16: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// S7 extends G, // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:87:16: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// S8 extends G // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:97:16: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// T7 extends F, // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:98:16: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// T8 extends F, // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:105:16: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// S7 extends G, // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:106:16: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// S8 extends G // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:116:16: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// T7 extends F, // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:117:16: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// T8 extends F, // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:124:16: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// S7 extends G, // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:125:16: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// S8 extends G // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:136:16: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// T7 extends F, // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:137:16: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// T8 extends F, // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:144:16: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// S7 extends G, // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:145:16: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// S8 extends G // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:173:16: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// T7 extends F, // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:174:16: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// T8 extends F, // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:181:16: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// S7 extends G, // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:182:16: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// S8 extends G // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:192:16: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// T7 extends F, // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:193:16: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// T8 extends F, // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:200:16: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// S7 extends G, // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:201:16: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// S8 extends G // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:147:3: Error: Type argument 'ConcreteClass' doesn't conform to the bound 'int' of the type variable 'T8' on 'Enum1'. +// - 'ConcreteClass' is from 'pkg/front_end/testcases/general/bounds_type_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// a< +// ^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:137:5: Context: This is the type variable whose bound isn't conformed to. +// T8 extends F, // Error +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:147:3: Error: Type argument 'G' doesn't conform to the bound 'G' of the type variable 'S8' on 'Enum1'. +// - 'G' is from 'pkg/front_end/testcases/general/bounds_type_parameters.dart'. +// - 'ConcreteClass' is from 'pkg/front_end/testcases/general/bounds_type_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// a< +// ^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:145:5: Context: This is the type variable whose bound isn't conformed to. +// S8 extends G // Error +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:212:18: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// T7 extends F, // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:213:18: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// T8 extends F, // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:220:18: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// S7 extends G, // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:221:18: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// S8 extends G // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:230:18: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// T7 extends F, // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:231:18: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// T8 extends F, // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:238:18: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// S7 extends G, // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:239:18: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// S8 extends G // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +import self as self; +import "dart:core" as core; + +typedef F = self::Class> = X; +typedef Typedef1 = dynamic, unrelated T2 extends dynamic, unrelated T3 extends self::Class = dynamic, unrelated T4 extends self::Class = dynamic, unrelated T5 extends self::ConcreteClass = dynamic, unrelated T6 extends self::Class = dynamic, unrelated T7 extends core::Object = dynamic, unrelated T8 extends core::int = dynamic, unrelated S1 extends self::G> = dynamic, unrelated S2 extends self::G = dynamic, unrelated S3 extends self::G> = dynamic, unrelated S4 extends self::G> = dynamic, unrelated S5 extends self::G = dynamic, unrelated S6 extends self::G> = dynamic, unrelated S7 extends self::G = dynamic, unrelated S8 extends self::G = dynamic> = () → void; +typedef Typedef2 = = dynamic, T2 extends dynamic, T3 extends self::Class = dynamic, T4 extends self::Class = dynamic, T5 extends self::ConcreteClass = dynamic, T6 extends self::Class = dynamic, T7 extends core::Object = dynamic, T8 extends core::int = dynamic, S1 extends self::G> = dynamic, S2 extends self::G = dynamic, S3 extends self::G> = dynamic, S4 extends self::G> = dynamic, S5 extends self::G = dynamic, S6 extends self::G> = dynamic, S7 extends self::G = dynamic, S8 extends self::G = dynamic>() → void; +typedef Typedef3 = dynamic, unrelated T2 extends dynamic, unrelated T3 extends self::Class = dynamic, unrelated T4 extends self::Class = dynamic, unrelated T5 extends self::ConcreteClass = dynamic, unrelated T6 extends self::Class = dynamic, unrelated T7 extends core::Object = dynamic, unrelated T8 extends core::int = dynamic, unrelated S1 extends self::G> = dynamic, unrelated S2 extends self::G = dynamic, unrelated S3 extends self::G> = dynamic, unrelated S4 extends self::G> = dynamic, unrelated S5 extends self::G = dynamic, unrelated S6 extends self::G> = dynamic, unrelated S7 extends self::G = dynamic, unrelated S8 extends self::G = dynamic> = () → void; +class Class extends core::Object { + synthetic constructor •() → self::Class + : super core::Object::•() + ; +} +class ConcreteClass extends core::Object implements self::Class { + synthetic constructor •() → self::ConcreteClass + : super core::Object::•() + ; +} +class G = self::Class> extends core::Object { + synthetic constructor •() → self::G + : super core::Object::•() + ; +} +class Class1 = dynamic, T2 extends dynamic, T3 extends self::Class = dynamic, T4 extends self::Class = dynamic, T5 extends self::ConcreteClass = dynamic, T6 extends self::Class = dynamic, T7 extends core::Object = dynamic, T8 extends core::int = dynamic, S1 extends self::G> = dynamic, S2 extends self::G = dynamic, S3 extends self::G> = dynamic, S4 extends self::G> = dynamic, S5 extends self::G = dynamic, S6 extends self::G> = dynamic, S7 extends self::G = dynamic, S8 extends self::G = dynamic> extends core::Object { + synthetic constructor •() → self::Class1 + : super core::Object::•() + ; +} +class Class2 = dynamic, T2 extends dynamic, T3 extends self::Class = dynamic, T4 extends self::Class = dynamic, T5 extends self::ConcreteClass = dynamic, T6 extends self::Class = dynamic, T7 extends core::Object = dynamic, T8 extends core::int = dynamic, S1 extends self::G> = dynamic, S2 extends self::G = dynamic, S3 extends self::G> = dynamic, S4 extends self::G> = dynamic, S5 extends self::G = dynamic, S6 extends self::G> = dynamic, S7 extends self::G = dynamic, S8 extends self::G = dynamic> = core::Object with self::Class /*hasConstConstructor*/ { + const synthetic constructor •() → self::Class2 + : super core::Object::•() + ; +} +abstract class Mixin1 = dynamic, T2 extends dynamic, T3 extends self::Class = dynamic, T4 extends self::Class = dynamic, T5 extends self::ConcreteClass = dynamic, T6 extends self::Class = dynamic, T7 extends core::Object = dynamic, T8 extends core::int = dynamic, S1 extends self::G> = dynamic, S2 extends self::G = dynamic, S3 extends self::G> = dynamic, S4 extends self::G> = dynamic, S5 extends self::G = dynamic, S6 extends self::G> = dynamic, S7 extends self::G = dynamic, S8 extends self::G = dynamic> extends core::Object /*isMixinDeclaration*/ { +} +class Enum1 = dynamic, T2 extends dynamic, T3 extends self::Class = dynamic, T4 extends self::Class = dynamic, T5 extends self::ConcreteClass = dynamic, T6 extends self::Class = dynamic, T7 extends core::Object = dynamic, T8 extends core::int = dynamic, S1 extends self::G> = dynamic, S2 extends self::G = dynamic, S3 extends self::G> = dynamic, S4 extends self::G> = dynamic, S5 extends self::G = dynamic, S6 extends self::G> = dynamic, S7 extends self::G = dynamic, S8 extends self::G = dynamic> extends core::_Enum /*isEnum*/ { + static const field core::List> values = #C4; + static const field self::Enum1, self::G, self::G, self::G, self::G, self::G, self::G, self::G> a = #C3; + const constructor •(core::int index, core::String name) → self::Enum1 + : super core::_Enum::•(index, name) + ; + method toString() → core::String + return "Enum1.${this.{core::_Enum::_name}{core::String}}"; +} +extension Extension, T2 extends dynamic, T3 extends self::Class, T4 extends self::Class, T5 extends self::ConcreteClass, T6 extends self::Class, T7 extends core::Object, T8 extends core::int, S1 extends self::G>, S2 extends self::G, S3 extends self::G>, S4 extends self::G>, S5 extends self::G, S6 extends self::G>, S7 extends self::G, S8 extends self::G> on self::Class { +} +static method method1 = dynamic, T2 extends dynamic, T3 extends self::Class = dynamic, T4 extends self::Class = dynamic, T5 extends self::ConcreteClass = dynamic, T6 extends self::Class = dynamic, T7 extends core::Object = dynamic, T8 extends core::int = dynamic, S1 extends self::G> = dynamic, S2 extends self::G = dynamic, S3 extends self::G> = dynamic, S4 extends self::G> = dynamic, S5 extends self::G = dynamic, S6 extends self::G> = dynamic, S7 extends self::G = dynamic, S8 extends self::G = dynamic>() → void {} +static method test() → dynamic { + function local1, T2 extends dynamic, T3 extends self::Class, T4 extends self::Class, T5 extends self::ConcreteClass, T6 extends self::Class, T7 extends core::Object, T8 extends core::int, S1 extends self::G>, S2 extends self::G, S3 extends self::G>, S4 extends self::G>, S5 extends self::G, S6 extends self::G>, S7 extends self::G, S8 extends self::G>() → void {} + , T2 extends dynamic, T3 extends self::Class, T4 extends self::Class, T5 extends self::ConcreteClass, T6 extends self::Class, T7 extends core::Object, T8 extends core::int, S1 extends self::G>, S2 extends self::G, S3 extends self::G>, S4 extends self::G>, S5 extends self::G, S6 extends self::G>, S7 extends self::G, S8 extends self::G>() → void local; +} +static method main() → dynamic {} + +constants { + #C1 = 0 + #C2 = "a" + #C3 = self::Enum1*, self::G*, self::G*, self::G*, self::G*, self::G*, self::G*, self::G*> {index:#C1, _name:#C2} + #C4 = *>[#C3] +} + + +Constructor coverage from constants: +org-dartlang-testcase:///bounds_type_parameters.dart: +- Enum1. (from org-dartlang-testcase:///bounds_type_parameters.dart:129:6) +- _Enum. (from org-dartlang-sdk:///sdk/lib/core/enum.dart:103:9) +- Object. (from org-dartlang-sdk:///sdk/lib/core/object.dart:25:9) diff --git a/pkg/front_end/testcases/general/bounds_type_parameters.dart.weak.outline.expect b/pkg/front_end/testcases/general/bounds_type_parameters.dart.weak.outline.expect new file mode 100644 index 00000000000..ad2a952f5dd --- /dev/null +++ b/pkg/front_end/testcases/general/bounds_type_parameters.dart.weak.outline.expect @@ -0,0 +1,546 @@ +library /*isNonNullableByDefault*/; +// +// Problems in library: +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:14:9: Error: Generic type 'F' can't be used without type arguments in a type variable bound. +// Try providing type arguments to 'F' here. +// T1 extends F, // Error +// ^^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:9:11: Context: Bound of this variable references variable 'X' from the same declaration. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:22:9: Error: Generic type 'G' can't be used without type arguments in a type variable bound. +// Try providing type arguments to 'G' here. +// S1 extends G, // Error +// ^^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:11:9: Context: Bound of this variable references variable 'X' from the same declaration. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:34:5: Error: Generic type 'F' can't be used without type arguments in a type variable bound. +// Try providing type arguments to 'F' here. +// T1 extends F, // Error +// ^^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:9:11: Context: Bound of this variable references variable 'X' from the same declaration. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:42:5: Error: Generic type 'G' can't be used without type arguments in a type variable bound. +// Try providing type arguments to 'G' here. +// S1 extends G, // Error +// ^^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:11:9: Context: Bound of this variable references variable 'X' from the same declaration. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:53:5: Error: Generic type 'F' can't be used without type arguments in a type variable bound. +// Try providing type arguments to 'F' here. +// T1 extends F, // Error +// ^^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:9:11: Context: Bound of this variable references variable 'X' from the same declaration. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:61:5: Error: Generic type 'G' can't be used without type arguments in a type variable bound. +// Try providing type arguments to 'G' here. +// S1 extends G, // Error +// ^^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:11:9: Context: Bound of this variable references variable 'X' from the same declaration. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:72:5: Error: Generic type 'F' can't be used without type arguments in a type variable bound. +// Try providing type arguments to 'F' here. +// T1 extends F, // Error +// ^^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:9:11: Context: Bound of this variable references variable 'X' from the same declaration. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:80:5: Error: Generic type 'G' can't be used without type arguments in a type variable bound. +// Try providing type arguments to 'G' here. +// S1 extends G, // Error +// ^^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:11:9: Context: Bound of this variable references variable 'X' from the same declaration. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:91:5: Error: Generic type 'F' can't be used without type arguments in a type variable bound. +// Try providing type arguments to 'F' here. +// T1 extends F, // Error +// ^^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:9:11: Context: Bound of this variable references variable 'X' from the same declaration. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:99:5: Error: Generic type 'G' can't be used without type arguments in a type variable bound. +// Try providing type arguments to 'G' here. +// S1 extends G, // Error +// ^^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:11:9: Context: Bound of this variable references variable 'X' from the same declaration. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:110:5: Error: Generic type 'F' can't be used without type arguments in a type variable bound. +// Try providing type arguments to 'F' here. +// T1 extends F, // Error +// ^^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:9:11: Context: Bound of this variable references variable 'X' from the same declaration. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:118:5: Error: Generic type 'G' can't be used without type arguments in a type variable bound. +// Try providing type arguments to 'G' here. +// S1 extends G, // Error +// ^^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:11:9: Context: Bound of this variable references variable 'X' from the same declaration. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:130:5: Error: Generic type 'F' can't be used without type arguments in a type variable bound. +// Try providing type arguments to 'F' here. +// T1 extends F, // Error +// ^^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:9:11: Context: Bound of this variable references variable 'X' from the same declaration. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:138:5: Error: Generic type 'G' can't be used without type arguments in a type variable bound. +// Try providing type arguments to 'G' here. +// S1 extends G, // Error +// ^^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:11:9: Context: Bound of this variable references variable 'X' from the same declaration. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:186:5: Error: Generic type 'F' can't be used without type arguments in a type variable bound. +// Try providing type arguments to 'F' here. +// T1 extends F, // Error +// ^^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:9:11: Context: Bound of this variable references variable 'X' from the same declaration. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:194:5: Error: Generic type 'G' can't be used without type arguments in a type variable bound. +// Try providing type arguments to 'G' here. +// S1 extends G, // Error +// ^^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:11:9: Context: Bound of this variable references variable 'X' from the same declaration. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:20:20: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// T7 extends F, // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:21:20: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// T8 extends F, // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:28:20: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// S7 extends G, // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:29:20: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// S8 extends G // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:40:16: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// T7 extends F, // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:41:16: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// T8 extends F, // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:48:16: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// S7 extends G, // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:49:16: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// S8 extends G // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:59:16: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// T7 extends F, // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:60:16: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// T8 extends F, // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:67:16: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// S7 extends G, // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:68:16: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// S8 extends G // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:78:16: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// T7 extends F, // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:79:16: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// T8 extends F, // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:86:16: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// S7 extends G, // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:87:16: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// S8 extends G // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:97:16: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// T7 extends F, // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:98:16: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// T8 extends F, // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:105:16: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// S7 extends G, // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:106:16: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// S8 extends G // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:116:16: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// T7 extends F, // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:117:16: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// T8 extends F, // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:124:16: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// S7 extends G, // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:125:16: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// S8 extends G // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:136:16: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// T7 extends F, // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:137:16: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// T8 extends F, // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:144:16: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// S7 extends G, // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:145:16: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// S8 extends G // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:173:16: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// T7 extends F, // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:174:16: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// T8 extends F, // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:181:16: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// S7 extends G, // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:182:16: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// S8 extends G // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:192:16: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// T7 extends F, // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:193:16: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// T8 extends F, // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:200:16: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// S7 extends G, // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:201:16: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// S8 extends G // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:147:3: Error: Type argument 'ConcreteClass' doesn't conform to the bound 'int' of the type variable 'T8' on 'Enum1'. +// - 'ConcreteClass' is from 'pkg/front_end/testcases/general/bounds_type_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// a< +// ^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:137:5: Context: This is the type variable whose bound isn't conformed to. +// T8 extends F, // Error +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:147:3: Error: Type argument 'G' doesn't conform to the bound 'G' of the type variable 'S8' on 'Enum1'. +// - 'G' is from 'pkg/front_end/testcases/general/bounds_type_parameters.dart'. +// - 'ConcreteClass' is from 'pkg/front_end/testcases/general/bounds_type_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// a< +// ^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:145:5: Context: This is the type variable whose bound isn't conformed to. +// S8 extends G // Error +// ^ +// +import self as self; +import "dart:core" as core; + +typedef F = self::Class> = X; +typedef Typedef1 = dynamic, unrelated T2 extends dynamic, unrelated T3 extends self::Class = dynamic, unrelated T4 extends self::Class = dynamic, unrelated T5 extends self::ConcreteClass = dynamic, unrelated T6 extends self::Class = dynamic, unrelated T7 extends core::Object = dynamic, unrelated T8 extends core::int = dynamic, unrelated S1 extends self::G> = dynamic, unrelated S2 extends self::G = dynamic, unrelated S3 extends self::G> = dynamic, unrelated S4 extends self::G> = dynamic, unrelated S5 extends self::G = dynamic, unrelated S6 extends self::G> = dynamic, unrelated S7 extends self::G = dynamic, unrelated S8 extends self::G = dynamic> = () → void; +typedef Typedef2 = = dynamic, T2 extends dynamic, T3 extends self::Class = dynamic, T4 extends self::Class = dynamic, T5 extends self::ConcreteClass = dynamic, T6 extends self::Class = dynamic, T7 extends core::Object = dynamic, T8 extends core::int = dynamic, S1 extends self::G> = dynamic, S2 extends self::G = dynamic, S3 extends self::G> = dynamic, S4 extends self::G> = dynamic, S5 extends self::G = dynamic, S6 extends self::G> = dynamic, S7 extends self::G = dynamic, S8 extends self::G = dynamic>() → void; +typedef Typedef3 = dynamic, unrelated T2 extends dynamic, unrelated T3 extends self::Class = dynamic, unrelated T4 extends self::Class = dynamic, unrelated T5 extends self::ConcreteClass = dynamic, unrelated T6 extends self::Class = dynamic, unrelated T7 extends core::Object = dynamic, unrelated T8 extends core::int = dynamic, unrelated S1 extends self::G> = dynamic, unrelated S2 extends self::G = dynamic, unrelated S3 extends self::G> = dynamic, unrelated S4 extends self::G> = dynamic, unrelated S5 extends self::G = dynamic, unrelated S6 extends self::G> = dynamic, unrelated S7 extends self::G = dynamic, unrelated S8 extends self::G = dynamic> = () → void; +class Class extends core::Object { + synthetic constructor •() → self::Class + ; +} +class ConcreteClass extends core::Object implements self::Class { + synthetic constructor •() → self::ConcreteClass + ; +} +class G = self::Class> extends core::Object { + synthetic constructor •() → self::G + ; +} +class Class1 = dynamic, T2 extends dynamic, T3 extends self::Class = dynamic, T4 extends self::Class = dynamic, T5 extends self::ConcreteClass = dynamic, T6 extends self::Class = dynamic, T7 extends core::Object = dynamic, T8 extends core::int = dynamic, S1 extends self::G> = dynamic, S2 extends self::G = dynamic, S3 extends self::G> = dynamic, S4 extends self::G> = dynamic, S5 extends self::G = dynamic, S6 extends self::G> = dynamic, S7 extends self::G = dynamic, S8 extends self::G = dynamic> extends core::Object { + synthetic constructor •() → self::Class1 + ; +} +class Class2 = dynamic, T2 extends dynamic, T3 extends self::Class = dynamic, T4 extends self::Class = dynamic, T5 extends self::ConcreteClass = dynamic, T6 extends self::Class = dynamic, T7 extends core::Object = dynamic, T8 extends core::int = dynamic, S1 extends self::G> = dynamic, S2 extends self::G = dynamic, S3 extends self::G> = dynamic, S4 extends self::G> = dynamic, S5 extends self::G = dynamic, S6 extends self::G> = dynamic, S7 extends self::G = dynamic, S8 extends self::G = dynamic> = core::Object with self::Class /*hasConstConstructor*/ { + const synthetic constructor •() → self::Class2 + : super core::Object::•() + ; +} +abstract class Mixin1 = dynamic, T2 extends dynamic, T3 extends self::Class = dynamic, T4 extends self::Class = dynamic, T5 extends self::ConcreteClass = dynamic, T6 extends self::Class = dynamic, T7 extends core::Object = dynamic, T8 extends core::int = dynamic, S1 extends self::G> = dynamic, S2 extends self::G = dynamic, S3 extends self::G> = dynamic, S4 extends self::G> = dynamic, S5 extends self::G = dynamic, S6 extends self::G> = dynamic, S7 extends self::G = dynamic, S8 extends self::G = dynamic> extends core::Object /*isMixinDeclaration*/ { +} +class Enum1 = dynamic, T2 extends dynamic, T3 extends self::Class = dynamic, T4 extends self::Class = dynamic, T5 extends self::ConcreteClass = dynamic, T6 extends self::Class = dynamic, T7 extends core::Object = dynamic, T8 extends core::int = dynamic, S1 extends self::G> = dynamic, S2 extends self::G = dynamic, S3 extends self::G> = dynamic, S4 extends self::G> = dynamic, S5 extends self::G = dynamic, S6 extends self::G> = dynamic, S7 extends self::G = dynamic, S8 extends self::G = dynamic> extends core::_Enum /*isEnum*/ { + static const field core::List> values = const >[self::Enum1::a]; + static const field self::Enum1, self::G, self::G, self::G, self::G, self::G, self::G, self::G> a = const self::Enum1::•, self::G, self::G, self::G, self::G, self::G, self::G, self::G>(0, "a"); + const constructor •(core::int index, core::String name) → self::Enum1 + : super core::_Enum::•(index, name) + ; + method toString() → core::String + return "Enum1.${this.{core::_Enum::_name}{core::String}}"; +} +extension Extension, T2 extends dynamic, T3 extends self::Class, T4 extends self::Class, T5 extends self::ConcreteClass, T6 extends self::Class, T7 extends core::Object, T8 extends core::int, S1 extends self::G>, S2 extends self::G, S3 extends self::G>, S4 extends self::G>, S5 extends self::G, S6 extends self::G>, S7 extends self::G, S8 extends self::G> on self::Class { +} +static method method1 = dynamic, T2 extends dynamic, T3 extends self::Class = dynamic, T4 extends self::Class = dynamic, T5 extends self::ConcreteClass = dynamic, T6 extends self::Class = dynamic, T7 extends core::Object = dynamic, T8 extends core::int = dynamic, S1 extends self::G> = dynamic, S2 extends self::G = dynamic, S3 extends self::G> = dynamic, S4 extends self::G> = dynamic, S5 extends self::G = dynamic, S6 extends self::G> = dynamic, S7 extends self::G = dynamic, S8 extends self::G = dynamic>() → void + ; +static method test() → dynamic + ; +static method main() → dynamic + ; + + +Extra constant evaluation status: +Evaluated: ListLiteral @ org-dartlang-testcase:///bounds_type_parameters.dart:129:6 -> ListConstant(const *>[const Enum1*, G*, G*, G*, G*, G*, G*, G*>{_Enum.index: 0, _Enum._name: "a"}]) +Evaluated: ConstructorInvocation @ org-dartlang-testcase:///bounds_type_parameters.dart:147:3 -> InstanceConstant(const Enum1*, G*, G*, G*, G*, G*, G*, G*>{_Enum.index: 0, _Enum._name: "a"}) +Extra constant evaluation: evaluated: 7, effectively constant: 2 diff --git a/pkg/front_end/testcases/general/bounds_type_parameters.dart.weak.transformed.expect b/pkg/front_end/testcases/general/bounds_type_parameters.dart.weak.transformed.expect new file mode 100644 index 00000000000..9bede0a046e --- /dev/null +++ b/pkg/front_end/testcases/general/bounds_type_parameters.dart.weak.transformed.expect @@ -0,0 +1,634 @@ +library /*isNonNullableByDefault*/; +// +// Problems in library: +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:14:9: Error: Generic type 'F' can't be used without type arguments in a type variable bound. +// Try providing type arguments to 'F' here. +// T1 extends F, // Error +// ^^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:9:11: Context: Bound of this variable references variable 'X' from the same declaration. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:22:9: Error: Generic type 'G' can't be used without type arguments in a type variable bound. +// Try providing type arguments to 'G' here. +// S1 extends G, // Error +// ^^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:11:9: Context: Bound of this variable references variable 'X' from the same declaration. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:34:5: Error: Generic type 'F' can't be used without type arguments in a type variable bound. +// Try providing type arguments to 'F' here. +// T1 extends F, // Error +// ^^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:9:11: Context: Bound of this variable references variable 'X' from the same declaration. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:42:5: Error: Generic type 'G' can't be used without type arguments in a type variable bound. +// Try providing type arguments to 'G' here. +// S1 extends G, // Error +// ^^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:11:9: Context: Bound of this variable references variable 'X' from the same declaration. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:53:5: Error: Generic type 'F' can't be used without type arguments in a type variable bound. +// Try providing type arguments to 'F' here. +// T1 extends F, // Error +// ^^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:9:11: Context: Bound of this variable references variable 'X' from the same declaration. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:61:5: Error: Generic type 'G' can't be used without type arguments in a type variable bound. +// Try providing type arguments to 'G' here. +// S1 extends G, // Error +// ^^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:11:9: Context: Bound of this variable references variable 'X' from the same declaration. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:72:5: Error: Generic type 'F' can't be used without type arguments in a type variable bound. +// Try providing type arguments to 'F' here. +// T1 extends F, // Error +// ^^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:9:11: Context: Bound of this variable references variable 'X' from the same declaration. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:80:5: Error: Generic type 'G' can't be used without type arguments in a type variable bound. +// Try providing type arguments to 'G' here. +// S1 extends G, // Error +// ^^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:11:9: Context: Bound of this variable references variable 'X' from the same declaration. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:91:5: Error: Generic type 'F' can't be used without type arguments in a type variable bound. +// Try providing type arguments to 'F' here. +// T1 extends F, // Error +// ^^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:9:11: Context: Bound of this variable references variable 'X' from the same declaration. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:99:5: Error: Generic type 'G' can't be used without type arguments in a type variable bound. +// Try providing type arguments to 'G' here. +// S1 extends G, // Error +// ^^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:11:9: Context: Bound of this variable references variable 'X' from the same declaration. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:110:5: Error: Generic type 'F' can't be used without type arguments in a type variable bound. +// Try providing type arguments to 'F' here. +// T1 extends F, // Error +// ^^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:9:11: Context: Bound of this variable references variable 'X' from the same declaration. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:118:5: Error: Generic type 'G' can't be used without type arguments in a type variable bound. +// Try providing type arguments to 'G' here. +// S1 extends G, // Error +// ^^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:11:9: Context: Bound of this variable references variable 'X' from the same declaration. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:130:5: Error: Generic type 'F' can't be used without type arguments in a type variable bound. +// Try providing type arguments to 'F' here. +// T1 extends F, // Error +// ^^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:9:11: Context: Bound of this variable references variable 'X' from the same declaration. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:138:5: Error: Generic type 'G' can't be used without type arguments in a type variable bound. +// Try providing type arguments to 'G' here. +// S1 extends G, // Error +// ^^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:11:9: Context: Bound of this variable references variable 'X' from the same declaration. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:186:5: Error: Generic type 'F' can't be used without type arguments in a type variable bound. +// Try providing type arguments to 'F' here. +// T1 extends F, // Error +// ^^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:9:11: Context: Bound of this variable references variable 'X' from the same declaration. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:194:5: Error: Generic type 'G' can't be used without type arguments in a type variable bound. +// Try providing type arguments to 'G' here. +// S1 extends G, // Error +// ^^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:11:9: Context: Bound of this variable references variable 'X' from the same declaration. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:20:20: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// T7 extends F, // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:21:20: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// T8 extends F, // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:28:20: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// S7 extends G, // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:29:20: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// S8 extends G // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:40:16: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// T7 extends F, // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:41:16: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// T8 extends F, // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:48:16: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// S7 extends G, // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:49:16: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// S8 extends G // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:59:16: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// T7 extends F, // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:60:16: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// T8 extends F, // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:67:16: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// S7 extends G, // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:68:16: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// S8 extends G // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:78:16: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// T7 extends F, // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:79:16: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// T8 extends F, // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:86:16: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// S7 extends G, // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:87:16: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// S8 extends G // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:97:16: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// T7 extends F, // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:98:16: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// T8 extends F, // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:105:16: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// S7 extends G, // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:106:16: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// S8 extends G // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:116:16: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// T7 extends F, // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:117:16: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// T8 extends F, // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:124:16: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// S7 extends G, // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:125:16: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// S8 extends G // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:136:16: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// T7 extends F, // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:137:16: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// T8 extends F, // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:144:16: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// S7 extends G, // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:145:16: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// S8 extends G // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:173:16: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// T7 extends F, // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:174:16: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// T8 extends F, // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:181:16: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// S7 extends G, // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:182:16: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// S8 extends G // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:192:16: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// T7 extends F, // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:193:16: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// T8 extends F, // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:200:16: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// S7 extends G, // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:201:16: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// S8 extends G // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:147:3: Error: Type argument 'ConcreteClass' doesn't conform to the bound 'int' of the type variable 'T8' on 'Enum1'. +// - 'ConcreteClass' is from 'pkg/front_end/testcases/general/bounds_type_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// a< +// ^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:137:5: Context: This is the type variable whose bound isn't conformed to. +// T8 extends F, // Error +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:147:3: Error: Type argument 'G' doesn't conform to the bound 'G' of the type variable 'S8' on 'Enum1'. +// - 'G' is from 'pkg/front_end/testcases/general/bounds_type_parameters.dart'. +// - 'ConcreteClass' is from 'pkg/front_end/testcases/general/bounds_type_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// a< +// ^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:145:5: Context: This is the type variable whose bound isn't conformed to. +// S8 extends G // Error +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:212:18: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// T7 extends F, // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:213:18: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// T8 extends F, // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:220:18: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// S7 extends G, // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:221:18: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// S8 extends G // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:230:18: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// T7 extends F, // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:231:18: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// T8 extends F, // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:238:18: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// S7 extends G, // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_type_parameters.dart:239:18: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_parameters.dart'. +// Try changing type arguments so that they conform to the bounds. +// S8 extends G // Error +// ^ +// pkg/front_end/testcases/general/bounds_type_parameters.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +import self as self; +import "dart:core" as core; + +typedef F = self::Class> = X; +typedef Typedef1 = dynamic, unrelated T2 extends dynamic, unrelated T3 extends self::Class = dynamic, unrelated T4 extends self::Class = dynamic, unrelated T5 extends self::ConcreteClass = dynamic, unrelated T6 extends self::Class = dynamic, unrelated T7 extends core::Object = dynamic, unrelated T8 extends core::int = dynamic, unrelated S1 extends self::G> = dynamic, unrelated S2 extends self::G = dynamic, unrelated S3 extends self::G> = dynamic, unrelated S4 extends self::G> = dynamic, unrelated S5 extends self::G = dynamic, unrelated S6 extends self::G> = dynamic, unrelated S7 extends self::G = dynamic, unrelated S8 extends self::G = dynamic> = () → void; +typedef Typedef2 = = dynamic, T2 extends dynamic, T3 extends self::Class = dynamic, T4 extends self::Class = dynamic, T5 extends self::ConcreteClass = dynamic, T6 extends self::Class = dynamic, T7 extends core::Object = dynamic, T8 extends core::int = dynamic, S1 extends self::G> = dynamic, S2 extends self::G = dynamic, S3 extends self::G> = dynamic, S4 extends self::G> = dynamic, S5 extends self::G = dynamic, S6 extends self::G> = dynamic, S7 extends self::G = dynamic, S8 extends self::G = dynamic>() → void; +typedef Typedef3 = dynamic, unrelated T2 extends dynamic, unrelated T3 extends self::Class = dynamic, unrelated T4 extends self::Class = dynamic, unrelated T5 extends self::ConcreteClass = dynamic, unrelated T6 extends self::Class = dynamic, unrelated T7 extends core::Object = dynamic, unrelated T8 extends core::int = dynamic, unrelated S1 extends self::G> = dynamic, unrelated S2 extends self::G = dynamic, unrelated S3 extends self::G> = dynamic, unrelated S4 extends self::G> = dynamic, unrelated S5 extends self::G = dynamic, unrelated S6 extends self::G> = dynamic, unrelated S7 extends self::G = dynamic, unrelated S8 extends self::G = dynamic> = () → void; +class Class extends core::Object { + synthetic constructor •() → self::Class + : super core::Object::•() + ; +} +class ConcreteClass extends core::Object implements self::Class { + synthetic constructor •() → self::ConcreteClass + : super core::Object::•() + ; +} +class G = self::Class> extends core::Object { + synthetic constructor •() → self::G + : super core::Object::•() + ; +} +class Class1 = dynamic, T2 extends dynamic, T3 extends self::Class = dynamic, T4 extends self::Class = dynamic, T5 extends self::ConcreteClass = dynamic, T6 extends self::Class = dynamic, T7 extends core::Object = dynamic, T8 extends core::int = dynamic, S1 extends self::G> = dynamic, S2 extends self::G = dynamic, S3 extends self::G> = dynamic, S4 extends self::G> = dynamic, S5 extends self::G = dynamic, S6 extends self::G> = dynamic, S7 extends self::G = dynamic, S8 extends self::G = dynamic> extends core::Object { + synthetic constructor •() → self::Class1 + : super core::Object::•() + ; +} +class Class2 = dynamic, T2 extends dynamic, T3 extends self::Class = dynamic, T4 extends self::Class = dynamic, T5 extends self::ConcreteClass = dynamic, T6 extends self::Class = dynamic, T7 extends core::Object = dynamic, T8 extends core::int = dynamic, S1 extends self::G> = dynamic, S2 extends self::G = dynamic, S3 extends self::G> = dynamic, S4 extends self::G> = dynamic, S5 extends self::G = dynamic, S6 extends self::G> = dynamic, S7 extends self::G = dynamic, S8 extends self::G = dynamic> extends core::Object implements self::Class /*isEliminatedMixin,hasConstConstructor*/ { + const synthetic constructor •() → self::Class2 + : super core::Object::•() + ; +} +abstract class Mixin1 = dynamic, T2 extends dynamic, T3 extends self::Class = dynamic, T4 extends self::Class = dynamic, T5 extends self::ConcreteClass = dynamic, T6 extends self::Class = dynamic, T7 extends core::Object = dynamic, T8 extends core::int = dynamic, S1 extends self::G> = dynamic, S2 extends self::G = dynamic, S3 extends self::G> = dynamic, S4 extends self::G> = dynamic, S5 extends self::G = dynamic, S6 extends self::G> = dynamic, S7 extends self::G = dynamic, S8 extends self::G = dynamic> extends core::Object /*isMixinDeclaration*/ { +} +class Enum1 = dynamic, T2 extends dynamic, T3 extends self::Class = dynamic, T4 extends self::Class = dynamic, T5 extends self::ConcreteClass = dynamic, T6 extends self::Class = dynamic, T7 extends core::Object = dynamic, T8 extends core::int = dynamic, S1 extends self::G> = dynamic, S2 extends self::G = dynamic, S3 extends self::G> = dynamic, S4 extends self::G> = dynamic, S5 extends self::G = dynamic, S6 extends self::G> = dynamic, S7 extends self::G = dynamic, S8 extends self::G = dynamic> extends core::_Enum /*isEnum*/ { + static const field core::List> values = #C4; + static const field self::Enum1, self::G, self::G, self::G, self::G, self::G, self::G, self::G> a = #C3; + const constructor •(core::int index, core::String name) → self::Enum1 + : super core::_Enum::•(index, name) + ; + method toString() → core::String + return "Enum1.${this.{core::_Enum::_name}{core::String}}"; +} +extension Extension, T2 extends dynamic, T3 extends self::Class, T4 extends self::Class, T5 extends self::ConcreteClass, T6 extends self::Class, T7 extends core::Object, T8 extends core::int, S1 extends self::G>, S2 extends self::G, S3 extends self::G>, S4 extends self::G>, S5 extends self::G, S6 extends self::G>, S7 extends self::G, S8 extends self::G> on self::Class { +} +static method method1 = dynamic, T2 extends dynamic, T3 extends self::Class = dynamic, T4 extends self::Class = dynamic, T5 extends self::ConcreteClass = dynamic, T6 extends self::Class = dynamic, T7 extends core::Object = dynamic, T8 extends core::int = dynamic, S1 extends self::G> = dynamic, S2 extends self::G = dynamic, S3 extends self::G> = dynamic, S4 extends self::G> = dynamic, S5 extends self::G = dynamic, S6 extends self::G> = dynamic, S7 extends self::G = dynamic, S8 extends self::G = dynamic>() → void {} +static method test() → dynamic { + function local1, T2 extends dynamic, T3 extends self::Class, T4 extends self::Class, T5 extends self::ConcreteClass, T6 extends self::Class, T7 extends core::Object, T8 extends core::int, S1 extends self::G>, S2 extends self::G, S3 extends self::G>, S4 extends self::G>, S5 extends self::G, S6 extends self::G>, S7 extends self::G, S8 extends self::G>() → void {} + , T2 extends dynamic, T3 extends self::Class, T4 extends self::Class, T5 extends self::ConcreteClass, T6 extends self::Class, T7 extends core::Object, T8 extends core::int, S1 extends self::G>, S2 extends self::G, S3 extends self::G>, S4 extends self::G>, S5 extends self::G, S6 extends self::G>, S7 extends self::G, S8 extends self::G>() → void local; +} +static method main() → dynamic {} + +constants { + #C1 = 0 + #C2 = "a" + #C3 = self::Enum1*, self::G*, self::G*, self::G*, self::G*, self::G*, self::G*, self::G*> {index:#C1, _name:#C2} + #C4 = *>[#C3] +} + + +Constructor coverage from constants: +org-dartlang-testcase:///bounds_type_parameters.dart: +- Enum1. (from org-dartlang-testcase:///bounds_type_parameters.dart:129:6) +- _Enum. (from org-dartlang-sdk:///sdk/lib/core/enum.dart:103:9) +- Object. (from org-dartlang-sdk:///sdk/lib/core/object.dart:25:9) diff --git a/pkg/front_end/testcases/general/bounds_variables.dart b/pkg/front_end/testcases/general/bounds_variables.dart new file mode 100644 index 00000000000..244219f5d7f --- /dev/null +++ b/pkg/front_end/testcases/general/bounds_variables.dart @@ -0,0 +1,110 @@ +// Copyright (c) 2022, 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. + +class Class {} + +class ConcreteClass implements Class {} + +typedef F> = X; + +class G> {} + +test1() { + F local1a, local1b; // Ok + F local2a, local2b; // Ok + F local3a, local3b; // Ok + F> local4a, local4b; // Ok + F local5a, local5b; // Ok + F> local6a, local6b; // Ok + F local7a, local7b; // Error + F local8a, local8b; // Error + G local1c, local1d; // Ok + G local2c, local2d; // Ok + G local3c, local3d; // Ok + G> local4c, local4d; // Ok + G local5c, local5d; // Ok + G> local6c, local6d; // Ok + G local7c, local8d; // Error + G local8c, local7d; // Error +} + +test2() { + void Function(F) local1a, local1b; // Ok + void Function(F) local2a, local2b; // Ok + void Function(F) local3a, local3b; // Ok + void Function(F>) local4a, local4b; // Ok + void Function(F) local5a, local5b; // Ok + void Function(F>) local6a, local6b; // Ok + void Function(F) local7a, local7b; // Error + void Function(F) local8a, local8b; // Error + void Function(G) local1c, local1d; // Ok + void Function(G) local2c, local2d; // Ok + void Function(G) local3c, local3d; // Ok + void Function(G>) local4c, local4d; // Ok + void Function(G) local5c, local5d; // Ok + void Function(G>) local6c, local6d; // Ok + void Function(G) local7c, local8d; // Error + void Function(G) local8c, local7d; // Error +} + +test3() { + void Function(F f) local1a, local1b; // Ok + void Function(F f) local2a, local2b; // Ok + void Function(F f) local3a, local3b; // Ok + void Function(F> f) local4a, local4b; // Ok + void Function(F f) local5a, local5b; // Ok + void Function(F> f) local6a, local6b; // Ok + void Function(F f) local7a, local7b; // Error + void Function(F f) local8a, local8b; // Error + void Function(G g) local1c, local1d; // Ok + void Function(G g) local2c, local2d; // Ok + void Function(G g) local3c, local3d; // Ok + void Function(G> g) local4c, local4d; // Ok + void Function(G g) local5c, local5d; // Ok + void Function(G> g) local6c, local6d; // Ok + void Function(G g) local7c, local8d; // Error + void Function(G g) local8c, local7d; // Error +} + +test4() { + void Function(void Function(F)) local1a, local1b; // Ok + void Function(void Function(F)) local2a, local2b; // Ok + void Function(void Function(F)) local3a, local3b; // Ok + void Function(void Function(F>)) local4a, local4b; // Ok + void Function(void Function(F)) local5a, local5b; // Ok + void Function(void Function(F>)) local6a, local6b; // Ok + void Function(void Function(F)) local7a, local7b; // Error + void Function(void Function(F)) local8a, local8b; // Error + void Function(void Function(G)) local1c, local1d; // Ok + void Function(void Function(G)) local2c, local2d; // Ok + void Function(void Function(G)) local3c, local3d; // Ok + void Function(void Function(G>)) local4c, local4d; // Ok + void Function(void Function(G)) local5c, local5d; // Ok + void Function(void Function(G>)) local6c, local6d; // Ok + void Function(void Function(G)) local7c, local8d; // Error + void Function(void Function(G)) local8c, local7d; // Error +} + +test5() { + void Function(void Function(F f) f) local1a, local1b; // Ok + void Function(void Function(F f) f) local2a, local2b; // Ok + void Function(void Function(F f) f) local3a, local3b; // Ok + void Function(void Function(F> f) f) local4a, local4b; // Ok + void Function(void Function(F f) f) local5a, local5b; // Ok + void Function(void Function(F> f) f) local6a, + local6b; // Ok + void Function(void Function(F f) f) local7a, local7b; // Error + void Function(void Function(F f) f) local8a, local8b; // Error + void Function(void Function(G g) g) local1c, local1d; // Ok + void Function(void Function(G g) g) local2c, local2d; // Ok + void Function(void Function(G g) g) local3c, local3d; // Ok + void Function(void Function(G> g) g) local4c, local4d; // Ok + void Function(void Function(G g) g) local5c, local5d; // Ok + void Function(void Function(G> g) g) local6c, + local6d; // Ok + void Function(void Function(G g) g) local7c, local8d; // Error + void Function(void Function(G g) g) local8c, local7d; // Error +} + +main() {} diff --git a/pkg/front_end/testcases/general/bounds_variables.dart.textual_outline.expect b/pkg/front_end/testcases/general/bounds_variables.dart.textual_outline.expect new file mode 100644 index 00000000000..27ec92ed063 --- /dev/null +++ b/pkg/front_end/testcases/general/bounds_variables.dart.textual_outline.expect @@ -0,0 +1,14 @@ +class Class {} + +class ConcreteClass implements Class {} + +typedef F> = X; + +class G> {} + +test1() {} +test2() {} +test3() {} +test4() {} +test5() {} +main() {} diff --git a/pkg/front_end/testcases/general/bounds_variables.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/general/bounds_variables.dart.textual_outline_modelled.expect new file mode 100644 index 00000000000..61c13bb6d7e --- /dev/null +++ b/pkg/front_end/testcases/general/bounds_variables.dart.textual_outline_modelled.expect @@ -0,0 +1,13 @@ +class Class {} + +class ConcreteClass implements Class {} + +class G> {} + +main() {} +test1() {} +test2() {} +test3() {} +test4() {} +test5() {} +typedef F> = X; diff --git a/pkg/front_end/testcases/general/bounds_variables.dart.weak.expect b/pkg/front_end/testcases/general/bounds_variables.dart.weak.expect new file mode 100644 index 00000000000..e0d70463b8e --- /dev/null +++ b/pkg/front_end/testcases/general/bounds_variables.dart.weak.expect @@ -0,0 +1,384 @@ +library /*isNonNullableByDefault*/; +// +// Problems in library: +// +// pkg/front_end/testcases/general/bounds_variables.dart:20:3: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_variables.dart'. +// Try changing type arguments so that they conform to the bounds. +// F local7a, local7b; // Error +// ^ +// pkg/front_end/testcases/general/bounds_variables.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_variables.dart:21:3: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_variables.dart'. +// Try changing type arguments so that they conform to the bounds. +// F local8a, local8b; // Error +// ^ +// pkg/front_end/testcases/general/bounds_variables.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_variables.dart:28:3: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_variables.dart'. +// Try changing type arguments so that they conform to the bounds. +// G local7c, local8d; // Error +// ^ +// pkg/front_end/testcases/general/bounds_variables.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_variables.dart:29:3: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_variables.dart'. +// Try changing type arguments so that they conform to the bounds. +// G local8c, local7d; // Error +// ^ +// pkg/front_end/testcases/general/bounds_variables.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_variables.dart:39:17: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_variables.dart'. +// Try changing type arguments so that they conform to the bounds. +// void Function(F) local7a, local7b; // Error +// ^ +// pkg/front_end/testcases/general/bounds_variables.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_variables.dart:40:17: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_variables.dart'. +// Try changing type arguments so that they conform to the bounds. +// void Function(F) local8a, local8b; // Error +// ^ +// pkg/front_end/testcases/general/bounds_variables.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_variables.dart:47:17: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_variables.dart'. +// Try changing type arguments so that they conform to the bounds. +// void Function(G) local7c, local8d; // Error +// ^ +// pkg/front_end/testcases/general/bounds_variables.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_variables.dart:48:17: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_variables.dart'. +// Try changing type arguments so that they conform to the bounds. +// void Function(G) local8c, local7d; // Error +// ^ +// pkg/front_end/testcases/general/bounds_variables.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_variables.dart:58:17: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_variables.dart'. +// Try changing type arguments so that they conform to the bounds. +// void Function(F f) local7a, local7b; // Error +// ^ +// pkg/front_end/testcases/general/bounds_variables.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_variables.dart:59:17: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_variables.dart'. +// Try changing type arguments so that they conform to the bounds. +// void Function(F f) local8a, local8b; // Error +// ^ +// pkg/front_end/testcases/general/bounds_variables.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_variables.dart:66:17: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_variables.dart'. +// Try changing type arguments so that they conform to the bounds. +// void Function(G g) local7c, local8d; // Error +// ^ +// pkg/front_end/testcases/general/bounds_variables.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_variables.dart:67:17: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_variables.dart'. +// Try changing type arguments so that they conform to the bounds. +// void Function(G g) local8c, local7d; // Error +// ^ +// pkg/front_end/testcases/general/bounds_variables.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_variables.dart:77:31: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_variables.dart'. +// Try changing type arguments so that they conform to the bounds. +// void Function(void Function(F)) local7a, local7b; // Error +// ^ +// pkg/front_end/testcases/general/bounds_variables.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_variables.dart:78:31: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_variables.dart'. +// Try changing type arguments so that they conform to the bounds. +// void Function(void Function(F)) local8a, local8b; // Error +// ^ +// pkg/front_end/testcases/general/bounds_variables.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_variables.dart:85:31: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_variables.dart'. +// Try changing type arguments so that they conform to the bounds. +// void Function(void Function(G)) local7c, local8d; // Error +// ^ +// pkg/front_end/testcases/general/bounds_variables.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_variables.dart:86:31: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_variables.dart'. +// Try changing type arguments so that they conform to the bounds. +// void Function(void Function(G)) local8c, local7d; // Error +// ^ +// pkg/front_end/testcases/general/bounds_variables.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_variables.dart:97:31: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_variables.dart'. +// Try changing type arguments so that they conform to the bounds. +// void Function(void Function(F f) f) local7a, local7b; // Error +// ^ +// pkg/front_end/testcases/general/bounds_variables.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_variables.dart:98:31: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_variables.dart'. +// Try changing type arguments so that they conform to the bounds. +// void Function(void Function(F f) f) local8a, local8b; // Error +// ^ +// pkg/front_end/testcases/general/bounds_variables.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_variables.dart:106:31: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_variables.dart'. +// Try changing type arguments so that they conform to the bounds. +// void Function(void Function(G g) g) local7c, local8d; // Error +// ^ +// pkg/front_end/testcases/general/bounds_variables.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_variables.dart:107:31: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_variables.dart'. +// Try changing type arguments so that they conform to the bounds. +// void Function(void Function(G g) g) local8c, local7d; // Error +// ^ +// pkg/front_end/testcases/general/bounds_variables.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +import self as self; +import "dart:core" as core; + +typedef F = self::Class> = X; +class Class extends core::Object { + synthetic constructor •() → self::Class + : super core::Object::•() + ; +} +class ConcreteClass extends core::Object implements self::Class { + synthetic constructor •() → self::ConcreteClass + : super core::Object::•() + ; +} +class G = self::Class> extends core::Object { + synthetic constructor •() → self::G + : super core::Object::•() + ; +} +static method test1() → dynamic { + self::Class local1a; + self::Class local1b; + dynamic local2a; + dynamic local2b; + self::Class local3a; + self::Class local3b; + self::Class local4a; + self::Class local4b; + self::ConcreteClass local5a; + self::ConcreteClass local5b; + self::Class local6a; + self::Class local6b; + core::Object local7a; + core::Object local7b; + core::int local8a; + core::int local8b; + self::G> local1c; + self::G> local1d; + self::G local2c; + self::G local2d; + self::G> local3c; + self::G> local3d; + self::G> local4c; + self::G> local4d; + self::G local5c; + self::G local5d; + self::G> local6c; + self::G> local6d; + self::G local7c; + self::G local8d; + self::G local8c; + self::G local7d; +} +static method test2() → dynamic { + (self::Class) → void local1a; + (self::Class) → void local1b; + (dynamic) → void local2a; + (dynamic) → void local2b; + (self::Class) → void local3a; + (self::Class) → void local3b; + (self::Class) → void local4a; + (self::Class) → void local4b; + (self::ConcreteClass) → void local5a; + (self::ConcreteClass) → void local5b; + (self::Class) → void local6a; + (self::Class) → void local6b; + (core::Object) → void local7a; + (core::Object) → void local7b; + (core::int) → void local8a; + (core::int) → void local8b; + (self::G>) → void local1c; + (self::G>) → void local1d; + (self::G) → void local2c; + (self::G) → void local2d; + (self::G>) → void local3c; + (self::G>) → void local3d; + (self::G>) → void local4c; + (self::G>) → void local4d; + (self::G) → void local5c; + (self::G) → void local5d; + (self::G>) → void local6c; + (self::G>) → void local6d; + (self::G) → void local7c; + (self::G) → void local8d; + (self::G) → void local8c; + (self::G) → void local7d; +} +static method test3() → dynamic { + (self::Class) → void local1a; + (self::Class) → void local1b; + (dynamic) → void local2a; + (dynamic) → void local2b; + (self::Class) → void local3a; + (self::Class) → void local3b; + (self::Class) → void local4a; + (self::Class) → void local4b; + (self::ConcreteClass) → void local5a; + (self::ConcreteClass) → void local5b; + (self::Class) → void local6a; + (self::Class) → void local6b; + (core::Object) → void local7a; + (core::Object) → void local7b; + (core::int) → void local8a; + (core::int) → void local8b; + (self::G>) → void local1c; + (self::G>) → void local1d; + (self::G) → void local2c; + (self::G) → void local2d; + (self::G>) → void local3c; + (self::G>) → void local3d; + (self::G>) → void local4c; + (self::G>) → void local4d; + (self::G) → void local5c; + (self::G) → void local5d; + (self::G>) → void local6c; + (self::G>) → void local6d; + (self::G) → void local7c; + (self::G) → void local8d; + (self::G) → void local8c; + (self::G) → void local7d; +} +static method test4() → dynamic { + ((self::Class) → void) → void local1a; + ((self::Class) → void) → void local1b; + ((dynamic) → void) → void local2a; + ((dynamic) → void) → void local2b; + ((self::Class) → void) → void local3a; + ((self::Class) → void) → void local3b; + ((self::Class) → void) → void local4a; + ((self::Class) → void) → void local4b; + ((self::ConcreteClass) → void) → void local5a; + ((self::ConcreteClass) → void) → void local5b; + ((self::Class) → void) → void local6a; + ((self::Class) → void) → void local6b; + ((core::Object) → void) → void local7a; + ((core::Object) → void) → void local7b; + ((core::int) → void) → void local8a; + ((core::int) → void) → void local8b; + ((self::G>) → void) → void local1c; + ((self::G>) → void) → void local1d; + ((self::G) → void) → void local2c; + ((self::G) → void) → void local2d; + ((self::G>) → void) → void local3c; + ((self::G>) → void) → void local3d; + ((self::G>) → void) → void local4c; + ((self::G>) → void) → void local4d; + ((self::G) → void) → void local5c; + ((self::G) → void) → void local5d; + ((self::G>) → void) → void local6c; + ((self::G>) → void) → void local6d; + ((self::G) → void) → void local7c; + ((self::G) → void) → void local8d; + ((self::G) → void) → void local8c; + ((self::G) → void) → void local7d; +} +static method test5() → dynamic { + ((self::Class) → void) → void local1a; + ((self::Class) → void) → void local1b; + ((dynamic) → void) → void local2a; + ((dynamic) → void) → void local2b; + ((self::Class) → void) → void local3a; + ((self::Class) → void) → void local3b; + ((self::Class) → void) → void local4a; + ((self::Class) → void) → void local4b; + ((self::ConcreteClass) → void) → void local5a; + ((self::ConcreteClass) → void) → void local5b; + ((self::Class) → void) → void local6a; + ((self::Class) → void) → void local6b; + ((core::Object) → void) → void local7a; + ((core::Object) → void) → void local7b; + ((core::int) → void) → void local8a; + ((core::int) → void) → void local8b; + ((self::G>) → void) → void local1c; + ((self::G>) → void) → void local1d; + ((self::G) → void) → void local2c; + ((self::G) → void) → void local2d; + ((self::G>) → void) → void local3c; + ((self::G>) → void) → void local3d; + ((self::G>) → void) → void local4c; + ((self::G>) → void) → void local4d; + ((self::G) → void) → void local5c; + ((self::G) → void) → void local5d; + ((self::G>) → void) → void local6c; + ((self::G>) → void) → void local6d; + ((self::G) → void) → void local7c; + ((self::G) → void) → void local8d; + ((self::G) → void) → void local8c; + ((self::G) → void) → void local7d; +} +static method main() → dynamic {} diff --git a/pkg/front_end/testcases/general/bounds_variables.dart.weak.modular.expect b/pkg/front_end/testcases/general/bounds_variables.dart.weak.modular.expect new file mode 100644 index 00000000000..e0d70463b8e --- /dev/null +++ b/pkg/front_end/testcases/general/bounds_variables.dart.weak.modular.expect @@ -0,0 +1,384 @@ +library /*isNonNullableByDefault*/; +// +// Problems in library: +// +// pkg/front_end/testcases/general/bounds_variables.dart:20:3: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_variables.dart'. +// Try changing type arguments so that they conform to the bounds. +// F local7a, local7b; // Error +// ^ +// pkg/front_end/testcases/general/bounds_variables.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_variables.dart:21:3: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_variables.dart'. +// Try changing type arguments so that they conform to the bounds. +// F local8a, local8b; // Error +// ^ +// pkg/front_end/testcases/general/bounds_variables.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_variables.dart:28:3: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_variables.dart'. +// Try changing type arguments so that they conform to the bounds. +// G local7c, local8d; // Error +// ^ +// pkg/front_end/testcases/general/bounds_variables.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_variables.dart:29:3: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_variables.dart'. +// Try changing type arguments so that they conform to the bounds. +// G local8c, local7d; // Error +// ^ +// pkg/front_end/testcases/general/bounds_variables.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_variables.dart:39:17: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_variables.dart'. +// Try changing type arguments so that they conform to the bounds. +// void Function(F) local7a, local7b; // Error +// ^ +// pkg/front_end/testcases/general/bounds_variables.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_variables.dart:40:17: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_variables.dart'. +// Try changing type arguments so that they conform to the bounds. +// void Function(F) local8a, local8b; // Error +// ^ +// pkg/front_end/testcases/general/bounds_variables.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_variables.dart:47:17: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_variables.dart'. +// Try changing type arguments so that they conform to the bounds. +// void Function(G) local7c, local8d; // Error +// ^ +// pkg/front_end/testcases/general/bounds_variables.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_variables.dart:48:17: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_variables.dart'. +// Try changing type arguments so that they conform to the bounds. +// void Function(G) local8c, local7d; // Error +// ^ +// pkg/front_end/testcases/general/bounds_variables.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_variables.dart:58:17: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_variables.dart'. +// Try changing type arguments so that they conform to the bounds. +// void Function(F f) local7a, local7b; // Error +// ^ +// pkg/front_end/testcases/general/bounds_variables.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_variables.dart:59:17: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_variables.dart'. +// Try changing type arguments so that they conform to the bounds. +// void Function(F f) local8a, local8b; // Error +// ^ +// pkg/front_end/testcases/general/bounds_variables.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_variables.dart:66:17: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_variables.dart'. +// Try changing type arguments so that they conform to the bounds. +// void Function(G g) local7c, local8d; // Error +// ^ +// pkg/front_end/testcases/general/bounds_variables.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_variables.dart:67:17: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_variables.dart'. +// Try changing type arguments so that they conform to the bounds. +// void Function(G g) local8c, local7d; // Error +// ^ +// pkg/front_end/testcases/general/bounds_variables.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_variables.dart:77:31: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_variables.dart'. +// Try changing type arguments so that they conform to the bounds. +// void Function(void Function(F)) local7a, local7b; // Error +// ^ +// pkg/front_end/testcases/general/bounds_variables.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_variables.dart:78:31: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_variables.dart'. +// Try changing type arguments so that they conform to the bounds. +// void Function(void Function(F)) local8a, local8b; // Error +// ^ +// pkg/front_end/testcases/general/bounds_variables.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_variables.dart:85:31: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_variables.dart'. +// Try changing type arguments so that they conform to the bounds. +// void Function(void Function(G)) local7c, local8d; // Error +// ^ +// pkg/front_end/testcases/general/bounds_variables.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_variables.dart:86:31: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_variables.dart'. +// Try changing type arguments so that they conform to the bounds. +// void Function(void Function(G)) local8c, local7d; // Error +// ^ +// pkg/front_end/testcases/general/bounds_variables.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_variables.dart:97:31: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_variables.dart'. +// Try changing type arguments so that they conform to the bounds. +// void Function(void Function(F f) f) local7a, local7b; // Error +// ^ +// pkg/front_end/testcases/general/bounds_variables.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_variables.dart:98:31: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_variables.dart'. +// Try changing type arguments so that they conform to the bounds. +// void Function(void Function(F f) f) local8a, local8b; // Error +// ^ +// pkg/front_end/testcases/general/bounds_variables.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_variables.dart:106:31: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_variables.dart'. +// Try changing type arguments so that they conform to the bounds. +// void Function(void Function(G g) g) local7c, local8d; // Error +// ^ +// pkg/front_end/testcases/general/bounds_variables.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_variables.dart:107:31: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_variables.dart'. +// Try changing type arguments so that they conform to the bounds. +// void Function(void Function(G g) g) local8c, local7d; // Error +// ^ +// pkg/front_end/testcases/general/bounds_variables.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +import self as self; +import "dart:core" as core; + +typedef F = self::Class> = X; +class Class extends core::Object { + synthetic constructor •() → self::Class + : super core::Object::•() + ; +} +class ConcreteClass extends core::Object implements self::Class { + synthetic constructor •() → self::ConcreteClass + : super core::Object::•() + ; +} +class G = self::Class> extends core::Object { + synthetic constructor •() → self::G + : super core::Object::•() + ; +} +static method test1() → dynamic { + self::Class local1a; + self::Class local1b; + dynamic local2a; + dynamic local2b; + self::Class local3a; + self::Class local3b; + self::Class local4a; + self::Class local4b; + self::ConcreteClass local5a; + self::ConcreteClass local5b; + self::Class local6a; + self::Class local6b; + core::Object local7a; + core::Object local7b; + core::int local8a; + core::int local8b; + self::G> local1c; + self::G> local1d; + self::G local2c; + self::G local2d; + self::G> local3c; + self::G> local3d; + self::G> local4c; + self::G> local4d; + self::G local5c; + self::G local5d; + self::G> local6c; + self::G> local6d; + self::G local7c; + self::G local8d; + self::G local8c; + self::G local7d; +} +static method test2() → dynamic { + (self::Class) → void local1a; + (self::Class) → void local1b; + (dynamic) → void local2a; + (dynamic) → void local2b; + (self::Class) → void local3a; + (self::Class) → void local3b; + (self::Class) → void local4a; + (self::Class) → void local4b; + (self::ConcreteClass) → void local5a; + (self::ConcreteClass) → void local5b; + (self::Class) → void local6a; + (self::Class) → void local6b; + (core::Object) → void local7a; + (core::Object) → void local7b; + (core::int) → void local8a; + (core::int) → void local8b; + (self::G>) → void local1c; + (self::G>) → void local1d; + (self::G) → void local2c; + (self::G) → void local2d; + (self::G>) → void local3c; + (self::G>) → void local3d; + (self::G>) → void local4c; + (self::G>) → void local4d; + (self::G) → void local5c; + (self::G) → void local5d; + (self::G>) → void local6c; + (self::G>) → void local6d; + (self::G) → void local7c; + (self::G) → void local8d; + (self::G) → void local8c; + (self::G) → void local7d; +} +static method test3() → dynamic { + (self::Class) → void local1a; + (self::Class) → void local1b; + (dynamic) → void local2a; + (dynamic) → void local2b; + (self::Class) → void local3a; + (self::Class) → void local3b; + (self::Class) → void local4a; + (self::Class) → void local4b; + (self::ConcreteClass) → void local5a; + (self::ConcreteClass) → void local5b; + (self::Class) → void local6a; + (self::Class) → void local6b; + (core::Object) → void local7a; + (core::Object) → void local7b; + (core::int) → void local8a; + (core::int) → void local8b; + (self::G>) → void local1c; + (self::G>) → void local1d; + (self::G) → void local2c; + (self::G) → void local2d; + (self::G>) → void local3c; + (self::G>) → void local3d; + (self::G>) → void local4c; + (self::G>) → void local4d; + (self::G) → void local5c; + (self::G) → void local5d; + (self::G>) → void local6c; + (self::G>) → void local6d; + (self::G) → void local7c; + (self::G) → void local8d; + (self::G) → void local8c; + (self::G) → void local7d; +} +static method test4() → dynamic { + ((self::Class) → void) → void local1a; + ((self::Class) → void) → void local1b; + ((dynamic) → void) → void local2a; + ((dynamic) → void) → void local2b; + ((self::Class) → void) → void local3a; + ((self::Class) → void) → void local3b; + ((self::Class) → void) → void local4a; + ((self::Class) → void) → void local4b; + ((self::ConcreteClass) → void) → void local5a; + ((self::ConcreteClass) → void) → void local5b; + ((self::Class) → void) → void local6a; + ((self::Class) → void) → void local6b; + ((core::Object) → void) → void local7a; + ((core::Object) → void) → void local7b; + ((core::int) → void) → void local8a; + ((core::int) → void) → void local8b; + ((self::G>) → void) → void local1c; + ((self::G>) → void) → void local1d; + ((self::G) → void) → void local2c; + ((self::G) → void) → void local2d; + ((self::G>) → void) → void local3c; + ((self::G>) → void) → void local3d; + ((self::G>) → void) → void local4c; + ((self::G>) → void) → void local4d; + ((self::G) → void) → void local5c; + ((self::G) → void) → void local5d; + ((self::G>) → void) → void local6c; + ((self::G>) → void) → void local6d; + ((self::G) → void) → void local7c; + ((self::G) → void) → void local8d; + ((self::G) → void) → void local8c; + ((self::G) → void) → void local7d; +} +static method test5() → dynamic { + ((self::Class) → void) → void local1a; + ((self::Class) → void) → void local1b; + ((dynamic) → void) → void local2a; + ((dynamic) → void) → void local2b; + ((self::Class) → void) → void local3a; + ((self::Class) → void) → void local3b; + ((self::Class) → void) → void local4a; + ((self::Class) → void) → void local4b; + ((self::ConcreteClass) → void) → void local5a; + ((self::ConcreteClass) → void) → void local5b; + ((self::Class) → void) → void local6a; + ((self::Class) → void) → void local6b; + ((core::Object) → void) → void local7a; + ((core::Object) → void) → void local7b; + ((core::int) → void) → void local8a; + ((core::int) → void) → void local8b; + ((self::G>) → void) → void local1c; + ((self::G>) → void) → void local1d; + ((self::G) → void) → void local2c; + ((self::G) → void) → void local2d; + ((self::G>) → void) → void local3c; + ((self::G>) → void) → void local3d; + ((self::G>) → void) → void local4c; + ((self::G>) → void) → void local4d; + ((self::G) → void) → void local5c; + ((self::G) → void) → void local5d; + ((self::G>) → void) → void local6c; + ((self::G>) → void) → void local6d; + ((self::G) → void) → void local7c; + ((self::G) → void) → void local8d; + ((self::G) → void) → void local8c; + ((self::G) → void) → void local7d; +} +static method main() → dynamic {} diff --git a/pkg/front_end/testcases/general/bounds_variables.dart.weak.outline.expect b/pkg/front_end/testcases/general/bounds_variables.dart.weak.outline.expect new file mode 100644 index 00000000000..786cea68120 --- /dev/null +++ b/pkg/front_end/testcases/general/bounds_variables.dart.weak.outline.expect @@ -0,0 +1,29 @@ +library /*isNonNullableByDefault*/; +import self as self; +import "dart:core" as core; + +typedef F = self::Class> = X; +class Class extends core::Object { + synthetic constructor •() → self::Class + ; +} +class ConcreteClass extends core::Object implements self::Class { + synthetic constructor •() → self::ConcreteClass + ; +} +class G = self::Class> extends core::Object { + synthetic constructor •() → self::G + ; +} +static method test1() → dynamic + ; +static method test2() → dynamic + ; +static method test3() → dynamic + ; +static method test4() → dynamic + ; +static method test5() → dynamic + ; +static method main() → dynamic + ; diff --git a/pkg/front_end/testcases/general/bounds_variables.dart.weak.transformed.expect b/pkg/front_end/testcases/general/bounds_variables.dart.weak.transformed.expect new file mode 100644 index 00000000000..e0d70463b8e --- /dev/null +++ b/pkg/front_end/testcases/general/bounds_variables.dart.weak.transformed.expect @@ -0,0 +1,384 @@ +library /*isNonNullableByDefault*/; +// +// Problems in library: +// +// pkg/front_end/testcases/general/bounds_variables.dart:20:3: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_variables.dart'. +// Try changing type arguments so that they conform to the bounds. +// F local7a, local7b; // Error +// ^ +// pkg/front_end/testcases/general/bounds_variables.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_variables.dart:21:3: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_variables.dart'. +// Try changing type arguments so that they conform to the bounds. +// F local8a, local8b; // Error +// ^ +// pkg/front_end/testcases/general/bounds_variables.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_variables.dart:28:3: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_variables.dart'. +// Try changing type arguments so that they conform to the bounds. +// G local7c, local8d; // Error +// ^ +// pkg/front_end/testcases/general/bounds_variables.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_variables.dart:29:3: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_variables.dart'. +// Try changing type arguments so that they conform to the bounds. +// G local8c, local7d; // Error +// ^ +// pkg/front_end/testcases/general/bounds_variables.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_variables.dart:39:17: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_variables.dart'. +// Try changing type arguments so that they conform to the bounds. +// void Function(F) local7a, local7b; // Error +// ^ +// pkg/front_end/testcases/general/bounds_variables.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_variables.dart:40:17: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_variables.dart'. +// Try changing type arguments so that they conform to the bounds. +// void Function(F) local8a, local8b; // Error +// ^ +// pkg/front_end/testcases/general/bounds_variables.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_variables.dart:47:17: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_variables.dart'. +// Try changing type arguments so that they conform to the bounds. +// void Function(G) local7c, local8d; // Error +// ^ +// pkg/front_end/testcases/general/bounds_variables.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_variables.dart:48:17: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_variables.dart'. +// Try changing type arguments so that they conform to the bounds. +// void Function(G) local8c, local7d; // Error +// ^ +// pkg/front_end/testcases/general/bounds_variables.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_variables.dart:58:17: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_variables.dart'. +// Try changing type arguments so that they conform to the bounds. +// void Function(F f) local7a, local7b; // Error +// ^ +// pkg/front_end/testcases/general/bounds_variables.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_variables.dart:59:17: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_variables.dart'. +// Try changing type arguments so that they conform to the bounds. +// void Function(F f) local8a, local8b; // Error +// ^ +// pkg/front_end/testcases/general/bounds_variables.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_variables.dart:66:17: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_variables.dart'. +// Try changing type arguments so that they conform to the bounds. +// void Function(G g) local7c, local8d; // Error +// ^ +// pkg/front_end/testcases/general/bounds_variables.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_variables.dart:67:17: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_variables.dart'. +// Try changing type arguments so that they conform to the bounds. +// void Function(G g) local8c, local7d; // Error +// ^ +// pkg/front_end/testcases/general/bounds_variables.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_variables.dart:77:31: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_variables.dart'. +// Try changing type arguments so that they conform to the bounds. +// void Function(void Function(F)) local7a, local7b; // Error +// ^ +// pkg/front_end/testcases/general/bounds_variables.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_variables.dart:78:31: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_variables.dart'. +// Try changing type arguments so that they conform to the bounds. +// void Function(void Function(F)) local8a, local8b; // Error +// ^ +// pkg/front_end/testcases/general/bounds_variables.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_variables.dart:85:31: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_variables.dart'. +// Try changing type arguments so that they conform to the bounds. +// void Function(void Function(G)) local7c, local8d; // Error +// ^ +// pkg/front_end/testcases/general/bounds_variables.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_variables.dart:86:31: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_variables.dart'. +// Try changing type arguments so that they conform to the bounds. +// void Function(void Function(G)) local8c, local7d; // Error +// ^ +// pkg/front_end/testcases/general/bounds_variables.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_variables.dart:97:31: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_variables.dart'. +// Try changing type arguments so that they conform to the bounds. +// void Function(void Function(F f) f) local7a, local7b; // Error +// ^ +// pkg/front_end/testcases/general/bounds_variables.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_variables.dart:98:31: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'F'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_variables.dart'. +// Try changing type arguments so that they conform to the bounds. +// void Function(void Function(F f) f) local8a, local8b; // Error +// ^ +// pkg/front_end/testcases/general/bounds_variables.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F> = X; +// ^ +// +// pkg/front_end/testcases/general/bounds_variables.dart:106:31: Error: Type argument 'Object' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Object' is from 'dart:core'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_variables.dart'. +// Try changing type arguments so that they conform to the bounds. +// void Function(void Function(G g) g) local7c, local8d; // Error +// ^ +// pkg/front_end/testcases/general/bounds_variables.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +// pkg/front_end/testcases/general/bounds_variables.dart:107:31: Error: Type argument 'int' doesn't conform to the bound 'Class' of the type variable 'X' on 'G'. +// - 'Class' is from 'pkg/front_end/testcases/general/bounds_variables.dart'. +// Try changing type arguments so that they conform to the bounds. +// void Function(void Function(G g) g) local8c, local7d; // Error +// ^ +// pkg/front_end/testcases/general/bounds_variables.dart:11:9: Context: This is the type variable whose bound isn't conformed to. +// class G> {} +// ^ +// +import self as self; +import "dart:core" as core; + +typedef F = self::Class> = X; +class Class extends core::Object { + synthetic constructor •() → self::Class + : super core::Object::•() + ; +} +class ConcreteClass extends core::Object implements self::Class { + synthetic constructor •() → self::ConcreteClass + : super core::Object::•() + ; +} +class G = self::Class> extends core::Object { + synthetic constructor •() → self::G + : super core::Object::•() + ; +} +static method test1() → dynamic { + self::Class local1a; + self::Class local1b; + dynamic local2a; + dynamic local2b; + self::Class local3a; + self::Class local3b; + self::Class local4a; + self::Class local4b; + self::ConcreteClass local5a; + self::ConcreteClass local5b; + self::Class local6a; + self::Class local6b; + core::Object local7a; + core::Object local7b; + core::int local8a; + core::int local8b; + self::G> local1c; + self::G> local1d; + self::G local2c; + self::G local2d; + self::G> local3c; + self::G> local3d; + self::G> local4c; + self::G> local4d; + self::G local5c; + self::G local5d; + self::G> local6c; + self::G> local6d; + self::G local7c; + self::G local8d; + self::G local8c; + self::G local7d; +} +static method test2() → dynamic { + (self::Class) → void local1a; + (self::Class) → void local1b; + (dynamic) → void local2a; + (dynamic) → void local2b; + (self::Class) → void local3a; + (self::Class) → void local3b; + (self::Class) → void local4a; + (self::Class) → void local4b; + (self::ConcreteClass) → void local5a; + (self::ConcreteClass) → void local5b; + (self::Class) → void local6a; + (self::Class) → void local6b; + (core::Object) → void local7a; + (core::Object) → void local7b; + (core::int) → void local8a; + (core::int) → void local8b; + (self::G>) → void local1c; + (self::G>) → void local1d; + (self::G) → void local2c; + (self::G) → void local2d; + (self::G>) → void local3c; + (self::G>) → void local3d; + (self::G>) → void local4c; + (self::G>) → void local4d; + (self::G) → void local5c; + (self::G) → void local5d; + (self::G>) → void local6c; + (self::G>) → void local6d; + (self::G) → void local7c; + (self::G) → void local8d; + (self::G) → void local8c; + (self::G) → void local7d; +} +static method test3() → dynamic { + (self::Class) → void local1a; + (self::Class) → void local1b; + (dynamic) → void local2a; + (dynamic) → void local2b; + (self::Class) → void local3a; + (self::Class) → void local3b; + (self::Class) → void local4a; + (self::Class) → void local4b; + (self::ConcreteClass) → void local5a; + (self::ConcreteClass) → void local5b; + (self::Class) → void local6a; + (self::Class) → void local6b; + (core::Object) → void local7a; + (core::Object) → void local7b; + (core::int) → void local8a; + (core::int) → void local8b; + (self::G>) → void local1c; + (self::G>) → void local1d; + (self::G) → void local2c; + (self::G) → void local2d; + (self::G>) → void local3c; + (self::G>) → void local3d; + (self::G>) → void local4c; + (self::G>) → void local4d; + (self::G) → void local5c; + (self::G) → void local5d; + (self::G>) → void local6c; + (self::G>) → void local6d; + (self::G) → void local7c; + (self::G) → void local8d; + (self::G) → void local8c; + (self::G) → void local7d; +} +static method test4() → dynamic { + ((self::Class) → void) → void local1a; + ((self::Class) → void) → void local1b; + ((dynamic) → void) → void local2a; + ((dynamic) → void) → void local2b; + ((self::Class) → void) → void local3a; + ((self::Class) → void) → void local3b; + ((self::Class) → void) → void local4a; + ((self::Class) → void) → void local4b; + ((self::ConcreteClass) → void) → void local5a; + ((self::ConcreteClass) → void) → void local5b; + ((self::Class) → void) → void local6a; + ((self::Class) → void) → void local6b; + ((core::Object) → void) → void local7a; + ((core::Object) → void) → void local7b; + ((core::int) → void) → void local8a; + ((core::int) → void) → void local8b; + ((self::G>) → void) → void local1c; + ((self::G>) → void) → void local1d; + ((self::G) → void) → void local2c; + ((self::G) → void) → void local2d; + ((self::G>) → void) → void local3c; + ((self::G>) → void) → void local3d; + ((self::G>) → void) → void local4c; + ((self::G>) → void) → void local4d; + ((self::G) → void) → void local5c; + ((self::G) → void) → void local5d; + ((self::G>) → void) → void local6c; + ((self::G>) → void) → void local6d; + ((self::G) → void) → void local7c; + ((self::G) → void) → void local8d; + ((self::G) → void) → void local8c; + ((self::G) → void) → void local7d; +} +static method test5() → dynamic { + ((self::Class) → void) → void local1a; + ((self::Class) → void) → void local1b; + ((dynamic) → void) → void local2a; + ((dynamic) → void) → void local2b; + ((self::Class) → void) → void local3a; + ((self::Class) → void) → void local3b; + ((self::Class) → void) → void local4a; + ((self::Class) → void) → void local4b; + ((self::ConcreteClass) → void) → void local5a; + ((self::ConcreteClass) → void) → void local5b; + ((self::Class) → void) → void local6a; + ((self::Class) → void) → void local6b; + ((core::Object) → void) → void local7a; + ((core::Object) → void) → void local7b; + ((core::int) → void) → void local8a; + ((core::int) → void) → void local8b; + ((self::G>) → void) → void local1c; + ((self::G>) → void) → void local1d; + ((self::G) → void) → void local2c; + ((self::G) → void) → void local2d; + ((self::G>) → void) → void local3c; + ((self::G>) → void) → void local3d; + ((self::G>) → void) → void local4c; + ((self::G>) → void) → void local4d; + ((self::G) → void) → void local5c; + ((self::G) → void) → void local5d; + ((self::G>) → void) → void local6c; + ((self::G>) → void) → void local6d; + ((self::G) → void) → void local7c; + ((self::G) → void) → void local8d; + ((self::G) → void) → void local8c; + ((self::G) → void) → void local7d; +} +static method main() → dynamic {} diff --git a/pkg/front_end/testcases/general/clone_function_type.dart.weak.expect b/pkg/front_end/testcases/general/clone_function_type.dart.weak.expect index 17fbc7cead2..699f60e4d52 100644 --- a/pkg/front_end/testcases/general/clone_function_type.dart.weak.expect +++ b/pkg/front_end/testcases/general/clone_function_type.dart.weak.expect @@ -32,70 +32,70 @@ library /*isNonNullableByDefault*/; // class Ef1 { // ^ // -// pkg/front_end/testcases/general/clone_function_type.dart:67:7: Error: Type argument 'dynamic Function(int)' doesn't conform to the bound 'dynamic Function()' of the type variable 'X' on 'Am2' in the supertype 'Am2' of class 'Object with Am2'. +// pkg/front_end/testcases/general/clone_function_type.dart:67:34: Error: Type argument 'dynamic Function(int)' doesn't conform to the bound 'dynamic Function()' of the type variable 'X' on 'Am2'. // Try changing type arguments so that they conform to the bounds. // class Bm2 extends Object with Am2 {} -// ^ +// ^ // pkg/front_end/testcases/general/clone_function_type.dart:64:11: Context: This is the type variable whose bound isn't conformed to. // class Am2 {} // ^ // -// pkg/front_end/testcases/general/clone_function_type.dart:70:7: Error: Type argument 'dynamic Function(int)' doesn't conform to the bound 'dynamic Function()' of the type variable 'X' on 'Am2' in the supertype 'Am2' of class 'Object with Am2'. +// pkg/front_end/testcases/general/clone_function_type.dart:70:34: Error: Type argument 'dynamic Function(int)' doesn't conform to the bound 'dynamic Function()' of the type variable 'X' on 'Am2'. // Try changing type arguments so that they conform to the bounds. // class Cm2 extends Object with Am2 {} -// ^ +// ^ // pkg/front_end/testcases/general/clone_function_type.dart:64:11: Context: This is the type variable whose bound isn't conformed to. // class Am2 {} // ^ // -// pkg/front_end/testcases/general/clone_function_type.dart:86:7: Error: Type argument 'Function' doesn't conform to the bound 'dynamic Function()' of the type variable 'X' on 'Am2' in the supertype 'Am2' of class 'Object with Am2'. +// pkg/front_end/testcases/general/clone_function_type.dart:86:34: Error: Type argument 'Function' doesn't conform to the bound 'dynamic Function()' of the type variable 'X' on 'Am2'. // - 'Function' is from 'dart:core'. // Try changing type arguments so that they conform to the bounds. // class Jm2 extends Object with Am2 {} -// ^ +// ^ // pkg/front_end/testcases/general/clone_function_type.dart:64:11: Context: This is the type variable whose bound isn't conformed to. // class Am2 {} // ^ // -// pkg/front_end/testcases/general/clone_function_type.dart:89:7: Error: Type argument 'dynamic Function(Function)' doesn't conform to the bound 'dynamic Function()' of the type variable 'X' on 'Am2' in the supertype 'Am2' of class 'Object with Am2'. +// pkg/front_end/testcases/general/clone_function_type.dart:89:34: Error: Type argument 'dynamic Function(Function)' doesn't conform to the bound 'dynamic Function()' of the type variable 'X' on 'Am2'. // - 'Function' is from 'dart:core'. // Try changing type arguments so that they conform to the bounds. // class Km2 extends Object with Am2 {} -// ^ +// ^ // pkg/front_end/testcases/general/clone_function_type.dart:64:11: Context: This is the type variable whose bound isn't conformed to. // class Am2 {} // ^ // -// pkg/front_end/testcases/general/clone_function_type.dart:95:7: Error: Type argument 'dynamic Function(int)' doesn't conform to the bound 'dynamic Function()' of the type variable 'X' on 'Am2' in the supertype 'Am2' of class 'Mm2'. +// pkg/front_end/testcases/general/clone_function_type.dart:95:28: Error: Type argument 'dynamic Function(int)' doesn't conform to the bound 'dynamic Function()' of the type variable 'X' on 'Am2'. // Try changing type arguments so that they conform to the bounds. // class Mm2 = Object with Am2; -// ^ +// ^ // pkg/front_end/testcases/general/clone_function_type.dart:64:11: Context: This is the type variable whose bound isn't conformed to. // class Am2 {} // ^ // -// pkg/front_end/testcases/general/clone_function_type.dart:98:7: Error: Type argument 'dynamic Function(int)' doesn't conform to the bound 'dynamic Function()' of the type variable 'X' on 'Am2' in the supertype 'Am2' of class 'Nm2'. +// pkg/front_end/testcases/general/clone_function_type.dart:98:28: Error: Type argument 'dynamic Function(int)' doesn't conform to the bound 'dynamic Function()' of the type variable 'X' on 'Am2'. // Try changing type arguments so that they conform to the bounds. // class Nm2 = Object with Am2; -// ^ +// ^ // pkg/front_end/testcases/general/clone_function_type.dart:64:11: Context: This is the type variable whose bound isn't conformed to. // class Am2 {} // ^ // -// pkg/front_end/testcases/general/clone_function_type.dart:114:7: Error: Type argument 'Function' doesn't conform to the bound 'dynamic Function()' of the type variable 'X' on 'Am2' in the supertype 'Am2' of class 'Um2'. +// pkg/front_end/testcases/general/clone_function_type.dart:114:28: Error: Type argument 'Function' doesn't conform to the bound 'dynamic Function()' of the type variable 'X' on 'Am2'. // - 'Function' is from 'dart:core'. // Try changing type arguments so that they conform to the bounds. // class Um2 = Object with Am2; -// ^ +// ^ // pkg/front_end/testcases/general/clone_function_type.dart:64:11: Context: This is the type variable whose bound isn't conformed to. // class Am2 {} // ^ // -// pkg/front_end/testcases/general/clone_function_type.dart:117:7: Error: Type argument 'dynamic Function(Function)' doesn't conform to the bound 'dynamic Function()' of the type variable 'X' on 'Am2' in the supertype 'Am2' of class 'Vm2'. +// pkg/front_end/testcases/general/clone_function_type.dart:117:28: Error: Type argument 'dynamic Function(Function)' doesn't conform to the bound 'dynamic Function()' of the type variable 'X' on 'Am2'. // - 'Function' is from 'dart:core'. // Try changing type arguments so that they conform to the bounds. // class Vm2 = Object with Am2; -// ^ +// ^ // pkg/front_end/testcases/general/clone_function_type.dart:64:11: Context: This is the type variable whose bound isn't conformed to. // class Am2 {} // ^ diff --git a/pkg/front_end/testcases/general/clone_function_type.dart.weak.modular.expect b/pkg/front_end/testcases/general/clone_function_type.dart.weak.modular.expect index 17fbc7cead2..699f60e4d52 100644 --- a/pkg/front_end/testcases/general/clone_function_type.dart.weak.modular.expect +++ b/pkg/front_end/testcases/general/clone_function_type.dart.weak.modular.expect @@ -32,70 +32,70 @@ library /*isNonNullableByDefault*/; // class Ef1 { // ^ // -// pkg/front_end/testcases/general/clone_function_type.dart:67:7: Error: Type argument 'dynamic Function(int)' doesn't conform to the bound 'dynamic Function()' of the type variable 'X' on 'Am2' in the supertype 'Am2' of class 'Object with Am2'. +// pkg/front_end/testcases/general/clone_function_type.dart:67:34: Error: Type argument 'dynamic Function(int)' doesn't conform to the bound 'dynamic Function()' of the type variable 'X' on 'Am2'. // Try changing type arguments so that they conform to the bounds. // class Bm2 extends Object with Am2 {} -// ^ +// ^ // pkg/front_end/testcases/general/clone_function_type.dart:64:11: Context: This is the type variable whose bound isn't conformed to. // class Am2 {} // ^ // -// pkg/front_end/testcases/general/clone_function_type.dart:70:7: Error: Type argument 'dynamic Function(int)' doesn't conform to the bound 'dynamic Function()' of the type variable 'X' on 'Am2' in the supertype 'Am2' of class 'Object with Am2'. +// pkg/front_end/testcases/general/clone_function_type.dart:70:34: Error: Type argument 'dynamic Function(int)' doesn't conform to the bound 'dynamic Function()' of the type variable 'X' on 'Am2'. // Try changing type arguments so that they conform to the bounds. // class Cm2 extends Object with Am2 {} -// ^ +// ^ // pkg/front_end/testcases/general/clone_function_type.dart:64:11: Context: This is the type variable whose bound isn't conformed to. // class Am2 {} // ^ // -// pkg/front_end/testcases/general/clone_function_type.dart:86:7: Error: Type argument 'Function' doesn't conform to the bound 'dynamic Function()' of the type variable 'X' on 'Am2' in the supertype 'Am2' of class 'Object with Am2'. +// pkg/front_end/testcases/general/clone_function_type.dart:86:34: Error: Type argument 'Function' doesn't conform to the bound 'dynamic Function()' of the type variable 'X' on 'Am2'. // - 'Function' is from 'dart:core'. // Try changing type arguments so that they conform to the bounds. // class Jm2 extends Object with Am2 {} -// ^ +// ^ // pkg/front_end/testcases/general/clone_function_type.dart:64:11: Context: This is the type variable whose bound isn't conformed to. // class Am2 {} // ^ // -// pkg/front_end/testcases/general/clone_function_type.dart:89:7: Error: Type argument 'dynamic Function(Function)' doesn't conform to the bound 'dynamic Function()' of the type variable 'X' on 'Am2' in the supertype 'Am2' of class 'Object with Am2'. +// pkg/front_end/testcases/general/clone_function_type.dart:89:34: Error: Type argument 'dynamic Function(Function)' doesn't conform to the bound 'dynamic Function()' of the type variable 'X' on 'Am2'. // - 'Function' is from 'dart:core'. // Try changing type arguments so that they conform to the bounds. // class Km2 extends Object with Am2 {} -// ^ +// ^ // pkg/front_end/testcases/general/clone_function_type.dart:64:11: Context: This is the type variable whose bound isn't conformed to. // class Am2 {} // ^ // -// pkg/front_end/testcases/general/clone_function_type.dart:95:7: Error: Type argument 'dynamic Function(int)' doesn't conform to the bound 'dynamic Function()' of the type variable 'X' on 'Am2' in the supertype 'Am2' of class 'Mm2'. +// pkg/front_end/testcases/general/clone_function_type.dart:95:28: Error: Type argument 'dynamic Function(int)' doesn't conform to the bound 'dynamic Function()' of the type variable 'X' on 'Am2'. // Try changing type arguments so that they conform to the bounds. // class Mm2 = Object with Am2; -// ^ +// ^ // pkg/front_end/testcases/general/clone_function_type.dart:64:11: Context: This is the type variable whose bound isn't conformed to. // class Am2 {} // ^ // -// pkg/front_end/testcases/general/clone_function_type.dart:98:7: Error: Type argument 'dynamic Function(int)' doesn't conform to the bound 'dynamic Function()' of the type variable 'X' on 'Am2' in the supertype 'Am2' of class 'Nm2'. +// pkg/front_end/testcases/general/clone_function_type.dart:98:28: Error: Type argument 'dynamic Function(int)' doesn't conform to the bound 'dynamic Function()' of the type variable 'X' on 'Am2'. // Try changing type arguments so that they conform to the bounds. // class Nm2 = Object with Am2; -// ^ +// ^ // pkg/front_end/testcases/general/clone_function_type.dart:64:11: Context: This is the type variable whose bound isn't conformed to. // class Am2 {} // ^ // -// pkg/front_end/testcases/general/clone_function_type.dart:114:7: Error: Type argument 'Function' doesn't conform to the bound 'dynamic Function()' of the type variable 'X' on 'Am2' in the supertype 'Am2' of class 'Um2'. +// pkg/front_end/testcases/general/clone_function_type.dart:114:28: Error: Type argument 'Function' doesn't conform to the bound 'dynamic Function()' of the type variable 'X' on 'Am2'. // - 'Function' is from 'dart:core'. // Try changing type arguments so that they conform to the bounds. // class Um2 = Object with Am2; -// ^ +// ^ // pkg/front_end/testcases/general/clone_function_type.dart:64:11: Context: This is the type variable whose bound isn't conformed to. // class Am2 {} // ^ // -// pkg/front_end/testcases/general/clone_function_type.dart:117:7: Error: Type argument 'dynamic Function(Function)' doesn't conform to the bound 'dynamic Function()' of the type variable 'X' on 'Am2' in the supertype 'Am2' of class 'Vm2'. +// pkg/front_end/testcases/general/clone_function_type.dart:117:28: Error: Type argument 'dynamic Function(Function)' doesn't conform to the bound 'dynamic Function()' of the type variable 'X' on 'Am2'. // - 'Function' is from 'dart:core'. // Try changing type arguments so that they conform to the bounds. // class Vm2 = Object with Am2; -// ^ +// ^ // pkg/front_end/testcases/general/clone_function_type.dart:64:11: Context: This is the type variable whose bound isn't conformed to. // class Am2 {} // ^ diff --git a/pkg/front_end/testcases/general/clone_function_type.dart.weak.outline.expect b/pkg/front_end/testcases/general/clone_function_type.dart.weak.outline.expect index 118b6708fa1..a3766e6a037 100644 --- a/pkg/front_end/testcases/general/clone_function_type.dart.weak.outline.expect +++ b/pkg/front_end/testcases/general/clone_function_type.dart.weak.outline.expect @@ -32,70 +32,70 @@ library /*isNonNullableByDefault*/; // class Ef1 { // ^ // -// pkg/front_end/testcases/general/clone_function_type.dart:67:7: Error: Type argument 'dynamic Function(int)' doesn't conform to the bound 'dynamic Function()' of the type variable 'X' on 'Am2' in the supertype 'Am2' of class 'Object with Am2'. +// pkg/front_end/testcases/general/clone_function_type.dart:67:34: Error: Type argument 'dynamic Function(int)' doesn't conform to the bound 'dynamic Function()' of the type variable 'X' on 'Am2'. // Try changing type arguments so that they conform to the bounds. // class Bm2 extends Object with Am2 {} -// ^ +// ^ // pkg/front_end/testcases/general/clone_function_type.dart:64:11: Context: This is the type variable whose bound isn't conformed to. // class Am2 {} // ^ // -// pkg/front_end/testcases/general/clone_function_type.dart:70:7: Error: Type argument 'dynamic Function(int)' doesn't conform to the bound 'dynamic Function()' of the type variable 'X' on 'Am2' in the supertype 'Am2' of class 'Object with Am2'. +// pkg/front_end/testcases/general/clone_function_type.dart:70:34: Error: Type argument 'dynamic Function(int)' doesn't conform to the bound 'dynamic Function()' of the type variable 'X' on 'Am2'. // Try changing type arguments so that they conform to the bounds. // class Cm2 extends Object with Am2 {} -// ^ +// ^ // pkg/front_end/testcases/general/clone_function_type.dart:64:11: Context: This is the type variable whose bound isn't conformed to. // class Am2 {} // ^ // -// pkg/front_end/testcases/general/clone_function_type.dart:86:7: Error: Type argument 'Function' doesn't conform to the bound 'dynamic Function()' of the type variable 'X' on 'Am2' in the supertype 'Am2' of class 'Object with Am2'. +// pkg/front_end/testcases/general/clone_function_type.dart:86:34: Error: Type argument 'Function' doesn't conform to the bound 'dynamic Function()' of the type variable 'X' on 'Am2'. // - 'Function' is from 'dart:core'. // Try changing type arguments so that they conform to the bounds. // class Jm2 extends Object with Am2 {} -// ^ +// ^ // pkg/front_end/testcases/general/clone_function_type.dart:64:11: Context: This is the type variable whose bound isn't conformed to. // class Am2 {} // ^ // -// pkg/front_end/testcases/general/clone_function_type.dart:89:7: Error: Type argument 'dynamic Function(Function)' doesn't conform to the bound 'dynamic Function()' of the type variable 'X' on 'Am2' in the supertype 'Am2' of class 'Object with Am2'. +// pkg/front_end/testcases/general/clone_function_type.dart:89:34: Error: Type argument 'dynamic Function(Function)' doesn't conform to the bound 'dynamic Function()' of the type variable 'X' on 'Am2'. // - 'Function' is from 'dart:core'. // Try changing type arguments so that they conform to the bounds. // class Km2 extends Object with Am2 {} -// ^ +// ^ // pkg/front_end/testcases/general/clone_function_type.dart:64:11: Context: This is the type variable whose bound isn't conformed to. // class Am2 {} // ^ // -// pkg/front_end/testcases/general/clone_function_type.dart:95:7: Error: Type argument 'dynamic Function(int)' doesn't conform to the bound 'dynamic Function()' of the type variable 'X' on 'Am2' in the supertype 'Am2' of class 'Mm2'. +// pkg/front_end/testcases/general/clone_function_type.dart:95:28: Error: Type argument 'dynamic Function(int)' doesn't conform to the bound 'dynamic Function()' of the type variable 'X' on 'Am2'. // Try changing type arguments so that they conform to the bounds. // class Mm2 = Object with Am2; -// ^ +// ^ // pkg/front_end/testcases/general/clone_function_type.dart:64:11: Context: This is the type variable whose bound isn't conformed to. // class Am2 {} // ^ // -// pkg/front_end/testcases/general/clone_function_type.dart:98:7: Error: Type argument 'dynamic Function(int)' doesn't conform to the bound 'dynamic Function()' of the type variable 'X' on 'Am2' in the supertype 'Am2' of class 'Nm2'. +// pkg/front_end/testcases/general/clone_function_type.dart:98:28: Error: Type argument 'dynamic Function(int)' doesn't conform to the bound 'dynamic Function()' of the type variable 'X' on 'Am2'. // Try changing type arguments so that they conform to the bounds. // class Nm2 = Object with Am2; -// ^ +// ^ // pkg/front_end/testcases/general/clone_function_type.dart:64:11: Context: This is the type variable whose bound isn't conformed to. // class Am2 {} // ^ // -// pkg/front_end/testcases/general/clone_function_type.dart:114:7: Error: Type argument 'Function' doesn't conform to the bound 'dynamic Function()' of the type variable 'X' on 'Am2' in the supertype 'Am2' of class 'Um2'. +// pkg/front_end/testcases/general/clone_function_type.dart:114:28: Error: Type argument 'Function' doesn't conform to the bound 'dynamic Function()' of the type variable 'X' on 'Am2'. // - 'Function' is from 'dart:core'. // Try changing type arguments so that they conform to the bounds. // class Um2 = Object with Am2; -// ^ +// ^ // pkg/front_end/testcases/general/clone_function_type.dart:64:11: Context: This is the type variable whose bound isn't conformed to. // class Am2 {} // ^ // -// pkg/front_end/testcases/general/clone_function_type.dart:117:7: Error: Type argument 'dynamic Function(Function)' doesn't conform to the bound 'dynamic Function()' of the type variable 'X' on 'Am2' in the supertype 'Am2' of class 'Vm2'. +// pkg/front_end/testcases/general/clone_function_type.dart:117:28: Error: Type argument 'dynamic Function(Function)' doesn't conform to the bound 'dynamic Function()' of the type variable 'X' on 'Am2'. // - 'Function' is from 'dart:core'. // Try changing type arguments so that they conform to the bounds. // class Vm2 = Object with Am2; -// ^ +// ^ // pkg/front_end/testcases/general/clone_function_type.dart:64:11: Context: This is the type variable whose bound isn't conformed to. // class Am2 {} // ^ diff --git a/pkg/front_end/testcases/general/clone_function_type.dart.weak.transformed.expect b/pkg/front_end/testcases/general/clone_function_type.dart.weak.transformed.expect index 44336bffff4..6e346c2f9ae 100644 --- a/pkg/front_end/testcases/general/clone_function_type.dart.weak.transformed.expect +++ b/pkg/front_end/testcases/general/clone_function_type.dart.weak.transformed.expect @@ -32,70 +32,70 @@ library /*isNonNullableByDefault*/; // class Ef1 { // ^ // -// pkg/front_end/testcases/general/clone_function_type.dart:67:7: Error: Type argument 'dynamic Function(int)' doesn't conform to the bound 'dynamic Function()' of the type variable 'X' on 'Am2' in the supertype 'Am2' of class 'Object with Am2'. +// pkg/front_end/testcases/general/clone_function_type.dart:67:34: Error: Type argument 'dynamic Function(int)' doesn't conform to the bound 'dynamic Function()' of the type variable 'X' on 'Am2'. // Try changing type arguments so that they conform to the bounds. // class Bm2 extends Object with Am2 {} -// ^ +// ^ // pkg/front_end/testcases/general/clone_function_type.dart:64:11: Context: This is the type variable whose bound isn't conformed to. // class Am2 {} // ^ // -// pkg/front_end/testcases/general/clone_function_type.dart:70:7: Error: Type argument 'dynamic Function(int)' doesn't conform to the bound 'dynamic Function()' of the type variable 'X' on 'Am2' in the supertype 'Am2' of class 'Object with Am2'. +// pkg/front_end/testcases/general/clone_function_type.dart:70:34: Error: Type argument 'dynamic Function(int)' doesn't conform to the bound 'dynamic Function()' of the type variable 'X' on 'Am2'. // Try changing type arguments so that they conform to the bounds. // class Cm2 extends Object with Am2 {} -// ^ +// ^ // pkg/front_end/testcases/general/clone_function_type.dart:64:11: Context: This is the type variable whose bound isn't conformed to. // class Am2 {} // ^ // -// pkg/front_end/testcases/general/clone_function_type.dart:86:7: Error: Type argument 'Function' doesn't conform to the bound 'dynamic Function()' of the type variable 'X' on 'Am2' in the supertype 'Am2' of class 'Object with Am2'. +// pkg/front_end/testcases/general/clone_function_type.dart:86:34: Error: Type argument 'Function' doesn't conform to the bound 'dynamic Function()' of the type variable 'X' on 'Am2'. // - 'Function' is from 'dart:core'. // Try changing type arguments so that they conform to the bounds. // class Jm2 extends Object with Am2 {} -// ^ +// ^ // pkg/front_end/testcases/general/clone_function_type.dart:64:11: Context: This is the type variable whose bound isn't conformed to. // class Am2 {} // ^ // -// pkg/front_end/testcases/general/clone_function_type.dart:89:7: Error: Type argument 'dynamic Function(Function)' doesn't conform to the bound 'dynamic Function()' of the type variable 'X' on 'Am2' in the supertype 'Am2' of class 'Object with Am2'. +// pkg/front_end/testcases/general/clone_function_type.dart:89:34: Error: Type argument 'dynamic Function(Function)' doesn't conform to the bound 'dynamic Function()' of the type variable 'X' on 'Am2'. // - 'Function' is from 'dart:core'. // Try changing type arguments so that they conform to the bounds. // class Km2 extends Object with Am2 {} -// ^ +// ^ // pkg/front_end/testcases/general/clone_function_type.dart:64:11: Context: This is the type variable whose bound isn't conformed to. // class Am2 {} // ^ // -// pkg/front_end/testcases/general/clone_function_type.dart:95:7: Error: Type argument 'dynamic Function(int)' doesn't conform to the bound 'dynamic Function()' of the type variable 'X' on 'Am2' in the supertype 'Am2' of class 'Mm2'. +// pkg/front_end/testcases/general/clone_function_type.dart:95:28: Error: Type argument 'dynamic Function(int)' doesn't conform to the bound 'dynamic Function()' of the type variable 'X' on 'Am2'. // Try changing type arguments so that they conform to the bounds. // class Mm2 = Object with Am2; -// ^ +// ^ // pkg/front_end/testcases/general/clone_function_type.dart:64:11: Context: This is the type variable whose bound isn't conformed to. // class Am2 {} // ^ // -// pkg/front_end/testcases/general/clone_function_type.dart:98:7: Error: Type argument 'dynamic Function(int)' doesn't conform to the bound 'dynamic Function()' of the type variable 'X' on 'Am2' in the supertype 'Am2' of class 'Nm2'. +// pkg/front_end/testcases/general/clone_function_type.dart:98:28: Error: Type argument 'dynamic Function(int)' doesn't conform to the bound 'dynamic Function()' of the type variable 'X' on 'Am2'. // Try changing type arguments so that they conform to the bounds. // class Nm2 = Object with Am2; -// ^ +// ^ // pkg/front_end/testcases/general/clone_function_type.dart:64:11: Context: This is the type variable whose bound isn't conformed to. // class Am2 {} // ^ // -// pkg/front_end/testcases/general/clone_function_type.dart:114:7: Error: Type argument 'Function' doesn't conform to the bound 'dynamic Function()' of the type variable 'X' on 'Am2' in the supertype 'Am2' of class 'Um2'. +// pkg/front_end/testcases/general/clone_function_type.dart:114:28: Error: Type argument 'Function' doesn't conform to the bound 'dynamic Function()' of the type variable 'X' on 'Am2'. // - 'Function' is from 'dart:core'. // Try changing type arguments so that they conform to the bounds. // class Um2 = Object with Am2; -// ^ +// ^ // pkg/front_end/testcases/general/clone_function_type.dart:64:11: Context: This is the type variable whose bound isn't conformed to. // class Am2 {} // ^ // -// pkg/front_end/testcases/general/clone_function_type.dart:117:7: Error: Type argument 'dynamic Function(Function)' doesn't conform to the bound 'dynamic Function()' of the type variable 'X' on 'Am2' in the supertype 'Am2' of class 'Vm2'. +// pkg/front_end/testcases/general/clone_function_type.dart:117:28: Error: Type argument 'dynamic Function(Function)' doesn't conform to the bound 'dynamic Function()' of the type variable 'X' on 'Am2'. // - 'Function' is from 'dart:core'. // Try changing type arguments so that they conform to the bounds. // class Vm2 = Object with Am2; -// ^ +// ^ // pkg/front_end/testcases/general/clone_function_type.dart:64:11: Context: This is the type variable whose bound isn't conformed to. // class Am2 {} // ^ diff --git a/pkg/front_end/testcases/general/inferred_generic_function_type_argument.dart b/pkg/front_end/testcases/general/inferred_generic_function_type_argument.dart new file mode 100644 index 00000000000..a61fd37bc87 --- /dev/null +++ b/pkg/front_end/testcases/general/inferred_generic_function_type_argument.dart @@ -0,0 +1,19 @@ +// Copyright (c) 2022, 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.12 + +typedef F = void Function(); + +T method() => throw ''; + +test(F f) { + f = method(); + var list = [f]; + var set = {f}; + var map1 = {f: 1}; + var map2 = {1: f}; +} + +main() {} diff --git a/pkg/front_end/testcases/general/inferred_generic_function_type_argument.dart.textual_outline.expect b/pkg/front_end/testcases/general/inferred_generic_function_type_argument.dart.textual_outline.expect new file mode 100644 index 00000000000..f825256e894 --- /dev/null +++ b/pkg/front_end/testcases/general/inferred_generic_function_type_argument.dart.textual_outline.expect @@ -0,0 +1,5 @@ +// @dart = 2.12 +typedef F = void Function(); +T method() => throw ''; +test(F f) {} +main() {} diff --git a/pkg/front_end/testcases/general/inferred_generic_function_type_argument.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/general/inferred_generic_function_type_argument.dart.textual_outline_modelled.expect new file mode 100644 index 00000000000..edecddf1bc2 --- /dev/null +++ b/pkg/front_end/testcases/general/inferred_generic_function_type_argument.dart.textual_outline_modelled.expect @@ -0,0 +1,5 @@ +// @dart = 2.12 +T method() => throw ''; +main() {} +test(F f) {} +typedef F = void Function(); diff --git a/pkg/front_end/testcases/general/inferred_generic_function_type_argument.dart.weak.expect b/pkg/front_end/testcases/general/inferred_generic_function_type_argument.dart.weak.expect new file mode 100644 index 00000000000..07471ec634c --- /dev/null +++ b/pkg/front_end/testcases/general/inferred_generic_function_type_argument.dart.weak.expect @@ -0,0 +1,47 @@ +library /*isNonNullableByDefault*/; +// +// Problems in library: +// +// pkg/front_end/testcases/general/inferred_generic_function_type_argument.dart:12:7: Error: Generic function type 'void Function()' inferred as a type argument. +// Try providing a non-generic function type explicitly. +// f = method(); +// ^ +// +// pkg/front_end/testcases/general/inferred_generic_function_type_argument.dart:13:14: Error: Generic function type 'void Function()' inferred as a type argument. +// Try providing a non-generic function type explicitly. +// var list = [f]; +// ^ +// +// pkg/front_end/testcases/general/inferred_generic_function_type_argument.dart:14:13: Error: Generic function type 'void Function()' inferred as a type argument. +// Try providing a non-generic function type explicitly. +// var set = {f}; +// ^ +// +// pkg/front_end/testcases/general/inferred_generic_function_type_argument.dart:15:14: Error: Generic function type 'void Function()' inferred as a type argument. +// Try providing a non-generic function type explicitly. +// var map1 = {f: 1}; +// ^ +// +// pkg/front_end/testcases/general/inferred_generic_function_type_argument.dart:16:14: Error: Generic function type 'void Function()' inferred as a type argument. +// Try providing a non-generic function type explicitly. +// var map2 = {1: f}; +// ^ +// +import self as self; +import "dart:core" as core; +import "dart:collection" as col; + +typedef F = () → void; +static method method() → self::method::T% + return throw ""; +static method test(() → void f) → dynamic { + f = self::method<() → void>(); + core::List<() → void> list = <() → void>[f]; + core::Set<() → void> set = block { + final core::Set<() → void> #t1 = col::LinkedHashSet::•<() → void>(); + #t1.{core::Set::add}{Invariant}(f){(() → void) → core::bool}; + } =>#t1; + core::Map<() → void, core::int> map1 = <() → void, core::int>{f: 1}; + core::Map() → void> map2 = () → void>{1: f}; +} +static method main() → dynamic {} diff --git a/pkg/front_end/testcases/general/inferred_generic_function_type_argument.dart.weak.modular.expect b/pkg/front_end/testcases/general/inferred_generic_function_type_argument.dart.weak.modular.expect new file mode 100644 index 00000000000..07471ec634c --- /dev/null +++ b/pkg/front_end/testcases/general/inferred_generic_function_type_argument.dart.weak.modular.expect @@ -0,0 +1,47 @@ +library /*isNonNullableByDefault*/; +// +// Problems in library: +// +// pkg/front_end/testcases/general/inferred_generic_function_type_argument.dart:12:7: Error: Generic function type 'void Function()' inferred as a type argument. +// Try providing a non-generic function type explicitly. +// f = method(); +// ^ +// +// pkg/front_end/testcases/general/inferred_generic_function_type_argument.dart:13:14: Error: Generic function type 'void Function()' inferred as a type argument. +// Try providing a non-generic function type explicitly. +// var list = [f]; +// ^ +// +// pkg/front_end/testcases/general/inferred_generic_function_type_argument.dart:14:13: Error: Generic function type 'void Function()' inferred as a type argument. +// Try providing a non-generic function type explicitly. +// var set = {f}; +// ^ +// +// pkg/front_end/testcases/general/inferred_generic_function_type_argument.dart:15:14: Error: Generic function type 'void Function()' inferred as a type argument. +// Try providing a non-generic function type explicitly. +// var map1 = {f: 1}; +// ^ +// +// pkg/front_end/testcases/general/inferred_generic_function_type_argument.dart:16:14: Error: Generic function type 'void Function()' inferred as a type argument. +// Try providing a non-generic function type explicitly. +// var map2 = {1: f}; +// ^ +// +import self as self; +import "dart:core" as core; +import "dart:collection" as col; + +typedef F = () → void; +static method method() → self::method::T% + return throw ""; +static method test(() → void f) → dynamic { + f = self::method<() → void>(); + core::List<() → void> list = <() → void>[f]; + core::Set<() → void> set = block { + final core::Set<() → void> #t1 = col::LinkedHashSet::•<() → void>(); + #t1.{core::Set::add}{Invariant}(f){(() → void) → core::bool}; + } =>#t1; + core::Map<() → void, core::int> map1 = <() → void, core::int>{f: 1}; + core::Map() → void> map2 = () → void>{1: f}; +} +static method main() → dynamic {} diff --git a/pkg/front_end/testcases/general/inferred_generic_function_type_argument.dart.weak.outline.expect b/pkg/front_end/testcases/general/inferred_generic_function_type_argument.dart.weak.outline.expect new file mode 100644 index 00000000000..b8d645e9b69 --- /dev/null +++ b/pkg/front_end/testcases/general/inferred_generic_function_type_argument.dart.weak.outline.expect @@ -0,0 +1,11 @@ +library /*isNonNullableByDefault*/; +import self as self; +import "dart:core" as core; + +typedef F = () → void; +static method method() → self::method::T% + ; +static method test(() → void f) → dynamic + ; +static method main() → dynamic + ; diff --git a/pkg/front_end/testcases/general/inferred_generic_function_type_argument.dart.weak.transformed.expect b/pkg/front_end/testcases/general/inferred_generic_function_type_argument.dart.weak.transformed.expect new file mode 100644 index 00000000000..ccf2bceaf97 --- /dev/null +++ b/pkg/front_end/testcases/general/inferred_generic_function_type_argument.dart.weak.transformed.expect @@ -0,0 +1,47 @@ +library /*isNonNullableByDefault*/; +// +// Problems in library: +// +// pkg/front_end/testcases/general/inferred_generic_function_type_argument.dart:12:7: Error: Generic function type 'void Function()' inferred as a type argument. +// Try providing a non-generic function type explicitly. +// f = method(); +// ^ +// +// pkg/front_end/testcases/general/inferred_generic_function_type_argument.dart:13:14: Error: Generic function type 'void Function()' inferred as a type argument. +// Try providing a non-generic function type explicitly. +// var list = [f]; +// ^ +// +// pkg/front_end/testcases/general/inferred_generic_function_type_argument.dart:14:13: Error: Generic function type 'void Function()' inferred as a type argument. +// Try providing a non-generic function type explicitly. +// var set = {f}; +// ^ +// +// pkg/front_end/testcases/general/inferred_generic_function_type_argument.dart:15:14: Error: Generic function type 'void Function()' inferred as a type argument. +// Try providing a non-generic function type explicitly. +// var map1 = {f: 1}; +// ^ +// +// pkg/front_end/testcases/general/inferred_generic_function_type_argument.dart:16:14: Error: Generic function type 'void Function()' inferred as a type argument. +// Try providing a non-generic function type explicitly. +// var map2 = {1: f}; +// ^ +// +import self as self; +import "dart:core" as core; +import "dart:collection" as col; + +typedef F = () → void; +static method method() → self::method::T% + return throw ""; +static method test(() → void f) → dynamic { + f = self::method<() → void>(); + core::List<() → void> list = core::_GrowableList::_literal1<() → void>(f); + core::Set<() → void> set = block { + final core::Set<() → void> #t1 = new col::_CompactLinkedHashSet::•<() → void>(); + #t1.{core::Set::add}{Invariant}(f){(() → void) → core::bool}; + } =>#t1; + core::Map<() → void, core::int> map1 = <() → void, core::int>{f: 1}; + core::Map() → void> map2 = () → void>{1: f}; +} +static method main() → dynamic {} diff --git a/pkg/front_end/testcases/general/issue44476.dart.weak.expect b/pkg/front_end/testcases/general/issue44476.dart.weak.expect index 0f8715b997e..795ef972be0 100644 --- a/pkg/front_end/testcases/general/issue44476.dart.weak.expect +++ b/pkg/front_end/testcases/general/issue44476.dart.weak.expect @@ -2,58 +2,42 @@ library /*isNonNullableByDefault*/; // // Problems in library: // -// pkg/front_end/testcases/general/issue44476.dart:7:12: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'A'. +// pkg/front_end/testcases/general/issue44476.dart:7:5: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'A'. // Try changing type arguments so that they conform to the bounds. // foo(A x) { +// ^ +// pkg/front_end/testcases/general/issue44476.dart:5:9: Context: This is the type variable whose bound isn't conformed to. +// class A {} +// ^ +// +// pkg/front_end/testcases/general/issue44476.dart:8:7: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'A'. +// Try changing type arguments so that they conform to the bounds. +// bar(A y) { +// ^ +// pkg/front_end/testcases/general/issue44476.dart:5:9: Context: This is the type variable whose bound isn't conformed to. +// class A {} +// ^ +// +// pkg/front_end/testcases/general/issue44476.dart:9:12: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'A'. +// Try changing type arguments so that they conform to the bounds. +// barbar(A yy) => null; // ^ // pkg/front_end/testcases/general/issue44476.dart:5:9: Context: This is the type variable whose bound isn't conformed to. // class A {} // ^ // -// pkg/front_end/testcases/general/issue44476.dart:9:19: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'A'. +// pkg/front_end/testcases/general/issue44476.dart:11:14: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'A'. // Try changing type arguments so that they conform to the bounds. -// barbar(A yy) => null; -// ^ -// pkg/front_end/testcases/general/issue44476.dart:5:9: Context: This is the type variable whose bound isn't conformed to. -// class A {} -// ^ -// -// pkg/front_end/testcases/general/issue44476.dart:8:14: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'A'. -// Try changing type arguments so that they conform to the bounds. -// bar(A y) { +// var baz = (A z) { // ^ // pkg/front_end/testcases/general/issue44476.dart:5:9: Context: This is the type variable whose bound isn't conformed to. // class A {} // ^ // -// pkg/front_end/testcases/general/issue44476.dart:12:26: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'A'. +// pkg/front_end/testcases/general/issue44476.dart:12:19: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'A'. // Try changing type arguments so that they conform to the bounds. // var bazbaz = (A zz) => null; -// ^ -// pkg/front_end/testcases/general/issue44476.dart:5:9: Context: This is the type variable whose bound isn't conformed to. -// class A {} -// ^ -// -// pkg/front_end/testcases/general/issue44476.dart:12:9: Error: Inferred type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'A'. -// Try specifying type arguments explicitly so that they conform to the bounds. -// var bazbaz = (A zz) => null; -// ^ -// pkg/front_end/testcases/general/issue44476.dart:5:9: Context: This is the type variable whose bound isn't conformed to. -// class A {} -// ^ -// -// pkg/front_end/testcases/general/issue44476.dart:11:21: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'A'. -// Try changing type arguments so that they conform to the bounds. -// var baz = (A z) { -// ^ -// pkg/front_end/testcases/general/issue44476.dart:5:9: Context: This is the type variable whose bound isn't conformed to. -// class A {} -// ^ -// -// pkg/front_end/testcases/general/issue44476.dart:11:7: Error: Inferred type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'A'. -// Try specifying type arguments explicitly so that they conform to the bounds. -// var baz = (A z) { -// ^ +// ^ // pkg/front_end/testcases/general/issue44476.dart:5:9: Context: This is the type variable whose bound isn't conformed to. // class A {} // ^ diff --git a/pkg/front_end/testcases/general/issue44476.dart.weak.modular.expect b/pkg/front_end/testcases/general/issue44476.dart.weak.modular.expect index 0f8715b997e..795ef972be0 100644 --- a/pkg/front_end/testcases/general/issue44476.dart.weak.modular.expect +++ b/pkg/front_end/testcases/general/issue44476.dart.weak.modular.expect @@ -2,58 +2,42 @@ library /*isNonNullableByDefault*/; // // Problems in library: // -// pkg/front_end/testcases/general/issue44476.dart:7:12: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'A'. +// pkg/front_end/testcases/general/issue44476.dart:7:5: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'A'. // Try changing type arguments so that they conform to the bounds. // foo(A x) { +// ^ +// pkg/front_end/testcases/general/issue44476.dart:5:9: Context: This is the type variable whose bound isn't conformed to. +// class A {} +// ^ +// +// pkg/front_end/testcases/general/issue44476.dart:8:7: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'A'. +// Try changing type arguments so that they conform to the bounds. +// bar(A y) { +// ^ +// pkg/front_end/testcases/general/issue44476.dart:5:9: Context: This is the type variable whose bound isn't conformed to. +// class A {} +// ^ +// +// pkg/front_end/testcases/general/issue44476.dart:9:12: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'A'. +// Try changing type arguments so that they conform to the bounds. +// barbar(A yy) => null; // ^ // pkg/front_end/testcases/general/issue44476.dart:5:9: Context: This is the type variable whose bound isn't conformed to. // class A {} // ^ // -// pkg/front_end/testcases/general/issue44476.dart:9:19: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'A'. +// pkg/front_end/testcases/general/issue44476.dart:11:14: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'A'. // Try changing type arguments so that they conform to the bounds. -// barbar(A yy) => null; -// ^ -// pkg/front_end/testcases/general/issue44476.dart:5:9: Context: This is the type variable whose bound isn't conformed to. -// class A {} -// ^ -// -// pkg/front_end/testcases/general/issue44476.dart:8:14: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'A'. -// Try changing type arguments so that they conform to the bounds. -// bar(A y) { +// var baz = (A z) { // ^ // pkg/front_end/testcases/general/issue44476.dart:5:9: Context: This is the type variable whose bound isn't conformed to. // class A {} // ^ // -// pkg/front_end/testcases/general/issue44476.dart:12:26: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'A'. +// pkg/front_end/testcases/general/issue44476.dart:12:19: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'A'. // Try changing type arguments so that they conform to the bounds. // var bazbaz = (A zz) => null; -// ^ -// pkg/front_end/testcases/general/issue44476.dart:5:9: Context: This is the type variable whose bound isn't conformed to. -// class A {} -// ^ -// -// pkg/front_end/testcases/general/issue44476.dart:12:9: Error: Inferred type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'A'. -// Try specifying type arguments explicitly so that they conform to the bounds. -// var bazbaz = (A zz) => null; -// ^ -// pkg/front_end/testcases/general/issue44476.dart:5:9: Context: This is the type variable whose bound isn't conformed to. -// class A {} -// ^ -// -// pkg/front_end/testcases/general/issue44476.dart:11:21: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'A'. -// Try changing type arguments so that they conform to the bounds. -// var baz = (A z) { -// ^ -// pkg/front_end/testcases/general/issue44476.dart:5:9: Context: This is the type variable whose bound isn't conformed to. -// class A {} -// ^ -// -// pkg/front_end/testcases/general/issue44476.dart:11:7: Error: Inferred type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'A'. -// Try specifying type arguments explicitly so that they conform to the bounds. -// var baz = (A z) { -// ^ +// ^ // pkg/front_end/testcases/general/issue44476.dart:5:9: Context: This is the type variable whose bound isn't conformed to. // class A {} // ^ diff --git a/pkg/front_end/testcases/general/issue44476.dart.weak.outline.expect b/pkg/front_end/testcases/general/issue44476.dart.weak.outline.expect index ab893e2fb77..47fde5e3df6 100644 --- a/pkg/front_end/testcases/general/issue44476.dart.weak.outline.expect +++ b/pkg/front_end/testcases/general/issue44476.dart.weak.outline.expect @@ -2,10 +2,10 @@ library /*isNonNullableByDefault*/; // // Problems in library: // -// pkg/front_end/testcases/general/issue44476.dart:7:12: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'A'. +// pkg/front_end/testcases/general/issue44476.dart:7:5: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'A'. // Try changing type arguments so that they conform to the bounds. // foo(A x) { -// ^ +// ^ // pkg/front_end/testcases/general/issue44476.dart:5:9: Context: This is the type variable whose bound isn't conformed to. // class A {} // ^ diff --git a/pkg/front_end/testcases/general/issue44476.dart.weak.transformed.expect b/pkg/front_end/testcases/general/issue44476.dart.weak.transformed.expect index 0f8715b997e..795ef972be0 100644 --- a/pkg/front_end/testcases/general/issue44476.dart.weak.transformed.expect +++ b/pkg/front_end/testcases/general/issue44476.dart.weak.transformed.expect @@ -2,58 +2,42 @@ library /*isNonNullableByDefault*/; // // Problems in library: // -// pkg/front_end/testcases/general/issue44476.dart:7:12: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'A'. +// pkg/front_end/testcases/general/issue44476.dart:7:5: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'A'. // Try changing type arguments so that they conform to the bounds. // foo(A x) { +// ^ +// pkg/front_end/testcases/general/issue44476.dart:5:9: Context: This is the type variable whose bound isn't conformed to. +// class A {} +// ^ +// +// pkg/front_end/testcases/general/issue44476.dart:8:7: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'A'. +// Try changing type arguments so that they conform to the bounds. +// bar(A y) { +// ^ +// pkg/front_end/testcases/general/issue44476.dart:5:9: Context: This is the type variable whose bound isn't conformed to. +// class A {} +// ^ +// +// pkg/front_end/testcases/general/issue44476.dart:9:12: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'A'. +// Try changing type arguments so that they conform to the bounds. +// barbar(A yy) => null; // ^ // pkg/front_end/testcases/general/issue44476.dart:5:9: Context: This is the type variable whose bound isn't conformed to. // class A {} // ^ // -// pkg/front_end/testcases/general/issue44476.dart:9:19: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'A'. +// pkg/front_end/testcases/general/issue44476.dart:11:14: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'A'. // Try changing type arguments so that they conform to the bounds. -// barbar(A yy) => null; -// ^ -// pkg/front_end/testcases/general/issue44476.dart:5:9: Context: This is the type variable whose bound isn't conformed to. -// class A {} -// ^ -// -// pkg/front_end/testcases/general/issue44476.dart:8:14: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'A'. -// Try changing type arguments so that they conform to the bounds. -// bar(A y) { +// var baz = (A z) { // ^ // pkg/front_end/testcases/general/issue44476.dart:5:9: Context: This is the type variable whose bound isn't conformed to. // class A {} // ^ // -// pkg/front_end/testcases/general/issue44476.dart:12:26: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'A'. +// pkg/front_end/testcases/general/issue44476.dart:12:19: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'A'. // Try changing type arguments so that they conform to the bounds. // var bazbaz = (A zz) => null; -// ^ -// pkg/front_end/testcases/general/issue44476.dart:5:9: Context: This is the type variable whose bound isn't conformed to. -// class A {} -// ^ -// -// pkg/front_end/testcases/general/issue44476.dart:12:9: Error: Inferred type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'A'. -// Try specifying type arguments explicitly so that they conform to the bounds. -// var bazbaz = (A zz) => null; -// ^ -// pkg/front_end/testcases/general/issue44476.dart:5:9: Context: This is the type variable whose bound isn't conformed to. -// class A {} -// ^ -// -// pkg/front_end/testcases/general/issue44476.dart:11:21: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'A'. -// Try changing type arguments so that they conform to the bounds. -// var baz = (A z) { -// ^ -// pkg/front_end/testcases/general/issue44476.dart:5:9: Context: This is the type variable whose bound isn't conformed to. -// class A {} -// ^ -// -// pkg/front_end/testcases/general/issue44476.dart:11:7: Error: Inferred type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'A'. -// Try specifying type arguments explicitly so that they conform to the bounds. -// var baz = (A z) { -// ^ +// ^ // pkg/front_end/testcases/general/issue44476.dart:5:9: Context: This is the type variable whose bound isn't conformed to. // class A {} // ^ diff --git a/pkg/front_end/testcases/general/nested_variance2.dart.weak.expect b/pkg/front_end/testcases/general/nested_variance2.dart.weak.expect index 8c5790bda47..130bce3377c 100644 --- a/pkg/front_end/testcases/general/nested_variance2.dart.weak.expect +++ b/pkg/front_end/testcases/general/nested_variance2.dart.weak.expect @@ -2,64 +2,36 @@ library /*isNonNullableByDefault*/; // // Problems in library: // -// pkg/front_end/testcases/general/nested_variance2.dart:177:21: Error: Type argument 'dynamic Function(Never)' doesn't conform to the bound 'dynamic Function(Y)' of the type variable 'Y' on 'AinvCyclicCoBound'. -// Try changing type arguments so that they conform to the bounds. -// AinvCyclicCoBound source12 = throw ''; //# 02: compile-time error -// ^ -// pkg/front_end/testcases/general/nested_variance2.dart:57:57: Context: This is the type variable whose bound isn't conformed to. -// class AinvCyclicCoBound, Y extends Function(Y)> { -// ^ -// pkg/front_end/testcases/general/nested_variance2.dart:177:21: Context: If you want 'AinvCyclicCoBound' to be a super-bounded type, note that the inverted type 'AinvCyclicCoBound, Never Function(Object?)>' must then satisfy its bounds, which it does not. -// - 'AinvCyclicCoBound' is from 'pkg/front_end/testcases/general/nested_variance2.dart'. -// - 'Object' is from 'dart:core'. -// AinvCyclicCoBound source12 = throw ''; //# 02: compile-time error -// ^ -// -// pkg/front_end/testcases/general/nested_variance2.dart:177:21: Error: Type argument 'dynamic Function(Never)' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FinvCyclicCoBound'. -// Try changing type arguments so that they conform to the bounds. -// AinvCyclicCoBound source12 = throw ''; //# 02: compile-time error -// ^ -// pkg/front_end/testcases/general/nested_variance2.dart:49:27: Context: This is the type variable whose bound isn't conformed to. -// typedef FinvCyclicCoBound = X Function(X); -// ^ -// pkg/front_end/testcases/general/nested_variance2.dart:177:21: Context: If you want 'FinvCyclicCoBound' to be a super-bounded type, note that the inverted type 'AinvCyclicCoBound, Never Function(Object?)>' must then satisfy its bounds, which it does not. -// - 'AinvCyclicCoBound' is from 'pkg/front_end/testcases/general/nested_variance2.dart'. -// - 'Object' is from 'dart:core'. -// AinvCyclicCoBound source12 = throw ''; //# 02: compile-time error -// ^ -// // pkg/front_end/testcases/general/nested_variance2.dart:84:42: Error: A value of type 'void Function>()' can't be assigned to a variable of type 'void Function>()' because 'Null' is nullable and 'Never' isn't. // - 'Acon' is from 'pkg/front_end/testcases/general/nested_variance2.dart'. // F, dynamic>> target2 = fsource2; // ^ // -// pkg/front_end/testcases/general/nested_variance2.dart:236:24: Error: Type argument 'dynamic Function(Never)' doesn't conform to the bound 'dynamic Function(Y)' of the type variable 'Y' on 'AinvCyclicCoBound'. -// Try changing type arguments so that they conform to the bounds. -// B source12 = throw ''; //# 04: compile-time error -// ^ +// pkg/front_end/testcases/general/nested_variance2.dart:177:3: Error: Inferred type argument 'dynamic Function(Never)' doesn't conform to the bound 'dynamic Function(Y)' of the type variable 'Y' on 'AinvCyclicCoBound'. +// Try specifying type arguments explicitly so that they conform to the bounds. +// AinvCyclicCoBound source12 = throw ''; //# 02: compile-time error +// ^ // pkg/front_end/testcases/general/nested_variance2.dart:57:57: Context: This is the type variable whose bound isn't conformed to. // class AinvCyclicCoBound, Y extends Function(Y)> { // ^ -// pkg/front_end/testcases/general/nested_variance2.dart:236:24: Context: If you want 'AinvCyclicCoBound' to be a super-bounded type, note that the inverted type 'B, Never Function(Object?)>>' must then satisfy its bounds, which it does not. +// pkg/front_end/testcases/general/nested_variance2.dart:177:3: Context: If you want 'AinvCyclicCoBound, dynamic Function(Never)>' to be a super-bounded type, note that the inverted type 'AinvCyclicCoBound, Never Function(Object?)>' must then satisfy its bounds, which it does not. // - 'AinvCyclicCoBound' is from 'pkg/front_end/testcases/general/nested_variance2.dart'. -// - 'B' is from 'pkg/front_end/testcases/general/nested_variance2.dart'. // - 'Object' is from 'dart:core'. -// B source12 = throw ''; //# 04: compile-time error -// ^ +// AinvCyclicCoBound source12 = throw ''; //# 02: compile-time error +// ^ // -// pkg/front_end/testcases/general/nested_variance2.dart:236:24: Error: Type argument 'dynamic Function(Never)' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FinvCyclicCoBound'. -// Try changing type arguments so that they conform to the bounds. +// pkg/front_end/testcases/general/nested_variance2.dart:236:5: Error: Inferred type argument 'dynamic Function(Never)' doesn't conform to the bound 'dynamic Function(Y)' of the type variable 'Y' on 'AinvCyclicCoBound'. +// Try specifying type arguments explicitly so that they conform to the bounds. // B source12 = throw ''; //# 04: compile-time error -// ^ -// pkg/front_end/testcases/general/nested_variance2.dart:49:27: Context: This is the type variable whose bound isn't conformed to. -// typedef FinvCyclicCoBound = X Function(X); -// ^ -// pkg/front_end/testcases/general/nested_variance2.dart:236:24: Context: If you want 'FinvCyclicCoBound' to be a super-bounded type, note that the inverted type 'B, Never Function(Object?)>>' must then satisfy its bounds, which it does not. -// - 'B' is from 'pkg/front_end/testcases/general/nested_variance2.dart'. +// ^ +// pkg/front_end/testcases/general/nested_variance2.dart:57:57: Context: This is the type variable whose bound isn't conformed to. +// class AinvCyclicCoBound, Y extends Function(Y)> { +// ^ +// pkg/front_end/testcases/general/nested_variance2.dart:236:5: Context: If you want 'AinvCyclicCoBound, dynamic Function(Never)>' to be a super-bounded type, note that the inverted type 'AinvCyclicCoBound, Never Function(Object?)>' must then satisfy its bounds, which it does not. // - 'AinvCyclicCoBound' is from 'pkg/front_end/testcases/general/nested_variance2.dart'. // - 'Object' is from 'dart:core'. // B source12 = throw ''; //# 04: compile-time error -// ^ +// ^ // import self as self; import "dart:core" as core; diff --git a/pkg/front_end/testcases/general/nested_variance2.dart.weak.modular.expect b/pkg/front_end/testcases/general/nested_variance2.dart.weak.modular.expect index 8c5790bda47..130bce3377c 100644 --- a/pkg/front_end/testcases/general/nested_variance2.dart.weak.modular.expect +++ b/pkg/front_end/testcases/general/nested_variance2.dart.weak.modular.expect @@ -2,64 +2,36 @@ library /*isNonNullableByDefault*/; // // Problems in library: // -// pkg/front_end/testcases/general/nested_variance2.dart:177:21: Error: Type argument 'dynamic Function(Never)' doesn't conform to the bound 'dynamic Function(Y)' of the type variable 'Y' on 'AinvCyclicCoBound'. -// Try changing type arguments so that they conform to the bounds. -// AinvCyclicCoBound source12 = throw ''; //# 02: compile-time error -// ^ -// pkg/front_end/testcases/general/nested_variance2.dart:57:57: Context: This is the type variable whose bound isn't conformed to. -// class AinvCyclicCoBound, Y extends Function(Y)> { -// ^ -// pkg/front_end/testcases/general/nested_variance2.dart:177:21: Context: If you want 'AinvCyclicCoBound' to be a super-bounded type, note that the inverted type 'AinvCyclicCoBound, Never Function(Object?)>' must then satisfy its bounds, which it does not. -// - 'AinvCyclicCoBound' is from 'pkg/front_end/testcases/general/nested_variance2.dart'. -// - 'Object' is from 'dart:core'. -// AinvCyclicCoBound source12 = throw ''; //# 02: compile-time error -// ^ -// -// pkg/front_end/testcases/general/nested_variance2.dart:177:21: Error: Type argument 'dynamic Function(Never)' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FinvCyclicCoBound'. -// Try changing type arguments so that they conform to the bounds. -// AinvCyclicCoBound source12 = throw ''; //# 02: compile-time error -// ^ -// pkg/front_end/testcases/general/nested_variance2.dart:49:27: Context: This is the type variable whose bound isn't conformed to. -// typedef FinvCyclicCoBound = X Function(X); -// ^ -// pkg/front_end/testcases/general/nested_variance2.dart:177:21: Context: If you want 'FinvCyclicCoBound' to be a super-bounded type, note that the inverted type 'AinvCyclicCoBound, Never Function(Object?)>' must then satisfy its bounds, which it does not. -// - 'AinvCyclicCoBound' is from 'pkg/front_end/testcases/general/nested_variance2.dart'. -// - 'Object' is from 'dart:core'. -// AinvCyclicCoBound source12 = throw ''; //# 02: compile-time error -// ^ -// // pkg/front_end/testcases/general/nested_variance2.dart:84:42: Error: A value of type 'void Function>()' can't be assigned to a variable of type 'void Function>()' because 'Null' is nullable and 'Never' isn't. // - 'Acon' is from 'pkg/front_end/testcases/general/nested_variance2.dart'. // F, dynamic>> target2 = fsource2; // ^ // -// pkg/front_end/testcases/general/nested_variance2.dart:236:24: Error: Type argument 'dynamic Function(Never)' doesn't conform to the bound 'dynamic Function(Y)' of the type variable 'Y' on 'AinvCyclicCoBound'. -// Try changing type arguments so that they conform to the bounds. -// B source12 = throw ''; //# 04: compile-time error -// ^ +// pkg/front_end/testcases/general/nested_variance2.dart:177:3: Error: Inferred type argument 'dynamic Function(Never)' doesn't conform to the bound 'dynamic Function(Y)' of the type variable 'Y' on 'AinvCyclicCoBound'. +// Try specifying type arguments explicitly so that they conform to the bounds. +// AinvCyclicCoBound source12 = throw ''; //# 02: compile-time error +// ^ // pkg/front_end/testcases/general/nested_variance2.dart:57:57: Context: This is the type variable whose bound isn't conformed to. // class AinvCyclicCoBound, Y extends Function(Y)> { // ^ -// pkg/front_end/testcases/general/nested_variance2.dart:236:24: Context: If you want 'AinvCyclicCoBound' to be a super-bounded type, note that the inverted type 'B, Never Function(Object?)>>' must then satisfy its bounds, which it does not. +// pkg/front_end/testcases/general/nested_variance2.dart:177:3: Context: If you want 'AinvCyclicCoBound, dynamic Function(Never)>' to be a super-bounded type, note that the inverted type 'AinvCyclicCoBound, Never Function(Object?)>' must then satisfy its bounds, which it does not. // - 'AinvCyclicCoBound' is from 'pkg/front_end/testcases/general/nested_variance2.dart'. -// - 'B' is from 'pkg/front_end/testcases/general/nested_variance2.dart'. // - 'Object' is from 'dart:core'. -// B source12 = throw ''; //# 04: compile-time error -// ^ +// AinvCyclicCoBound source12 = throw ''; //# 02: compile-time error +// ^ // -// pkg/front_end/testcases/general/nested_variance2.dart:236:24: Error: Type argument 'dynamic Function(Never)' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FinvCyclicCoBound'. -// Try changing type arguments so that they conform to the bounds. +// pkg/front_end/testcases/general/nested_variance2.dart:236:5: Error: Inferred type argument 'dynamic Function(Never)' doesn't conform to the bound 'dynamic Function(Y)' of the type variable 'Y' on 'AinvCyclicCoBound'. +// Try specifying type arguments explicitly so that they conform to the bounds. // B source12 = throw ''; //# 04: compile-time error -// ^ -// pkg/front_end/testcases/general/nested_variance2.dart:49:27: Context: This is the type variable whose bound isn't conformed to. -// typedef FinvCyclicCoBound = X Function(X); -// ^ -// pkg/front_end/testcases/general/nested_variance2.dart:236:24: Context: If you want 'FinvCyclicCoBound' to be a super-bounded type, note that the inverted type 'B, Never Function(Object?)>>' must then satisfy its bounds, which it does not. -// - 'B' is from 'pkg/front_end/testcases/general/nested_variance2.dart'. +// ^ +// pkg/front_end/testcases/general/nested_variance2.dart:57:57: Context: This is the type variable whose bound isn't conformed to. +// class AinvCyclicCoBound, Y extends Function(Y)> { +// ^ +// pkg/front_end/testcases/general/nested_variance2.dart:236:5: Context: If you want 'AinvCyclicCoBound, dynamic Function(Never)>' to be a super-bounded type, note that the inverted type 'AinvCyclicCoBound, Never Function(Object?)>' must then satisfy its bounds, which it does not. // - 'AinvCyclicCoBound' is from 'pkg/front_end/testcases/general/nested_variance2.dart'. // - 'Object' is from 'dart:core'. // B source12 = throw ''; //# 04: compile-time error -// ^ +// ^ // import self as self; import "dart:core" as core; diff --git a/pkg/front_end/testcases/general/nested_variance2.dart.weak.transformed.expect b/pkg/front_end/testcases/general/nested_variance2.dart.weak.transformed.expect index 77f1c4c777e..2b81a6e85e3 100644 --- a/pkg/front_end/testcases/general/nested_variance2.dart.weak.transformed.expect +++ b/pkg/front_end/testcases/general/nested_variance2.dart.weak.transformed.expect @@ -2,64 +2,36 @@ library /*isNonNullableByDefault*/; // // Problems in library: // -// pkg/front_end/testcases/general/nested_variance2.dart:177:21: Error: Type argument 'dynamic Function(Never)' doesn't conform to the bound 'dynamic Function(Y)' of the type variable 'Y' on 'AinvCyclicCoBound'. -// Try changing type arguments so that they conform to the bounds. -// AinvCyclicCoBound source12 = throw ''; //# 02: compile-time error -// ^ -// pkg/front_end/testcases/general/nested_variance2.dart:57:57: Context: This is the type variable whose bound isn't conformed to. -// class AinvCyclicCoBound, Y extends Function(Y)> { -// ^ -// pkg/front_end/testcases/general/nested_variance2.dart:177:21: Context: If you want 'AinvCyclicCoBound' to be a super-bounded type, note that the inverted type 'AinvCyclicCoBound, Never Function(Object?)>' must then satisfy its bounds, which it does not. -// - 'AinvCyclicCoBound' is from 'pkg/front_end/testcases/general/nested_variance2.dart'. -// - 'Object' is from 'dart:core'. -// AinvCyclicCoBound source12 = throw ''; //# 02: compile-time error -// ^ -// -// pkg/front_end/testcases/general/nested_variance2.dart:177:21: Error: Type argument 'dynamic Function(Never)' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FinvCyclicCoBound'. -// Try changing type arguments so that they conform to the bounds. -// AinvCyclicCoBound source12 = throw ''; //# 02: compile-time error -// ^ -// pkg/front_end/testcases/general/nested_variance2.dart:49:27: Context: This is the type variable whose bound isn't conformed to. -// typedef FinvCyclicCoBound = X Function(X); -// ^ -// pkg/front_end/testcases/general/nested_variance2.dart:177:21: Context: If you want 'FinvCyclicCoBound' to be a super-bounded type, note that the inverted type 'AinvCyclicCoBound, Never Function(Object?)>' must then satisfy its bounds, which it does not. -// - 'AinvCyclicCoBound' is from 'pkg/front_end/testcases/general/nested_variance2.dart'. -// - 'Object' is from 'dart:core'. -// AinvCyclicCoBound source12 = throw ''; //# 02: compile-time error -// ^ -// // pkg/front_end/testcases/general/nested_variance2.dart:84:42: Error: A value of type 'void Function>()' can't be assigned to a variable of type 'void Function>()' because 'Null' is nullable and 'Never' isn't. // - 'Acon' is from 'pkg/front_end/testcases/general/nested_variance2.dart'. // F, dynamic>> target2 = fsource2; // ^ // -// pkg/front_end/testcases/general/nested_variance2.dart:236:24: Error: Type argument 'dynamic Function(Never)' doesn't conform to the bound 'dynamic Function(Y)' of the type variable 'Y' on 'AinvCyclicCoBound'. -// Try changing type arguments so that they conform to the bounds. -// B source12 = throw ''; //# 04: compile-time error -// ^ +// pkg/front_end/testcases/general/nested_variance2.dart:177:3: Error: Inferred type argument 'dynamic Function(Never)' doesn't conform to the bound 'dynamic Function(Y)' of the type variable 'Y' on 'AinvCyclicCoBound'. +// Try specifying type arguments explicitly so that they conform to the bounds. +// AinvCyclicCoBound source12 = throw ''; //# 02: compile-time error +// ^ // pkg/front_end/testcases/general/nested_variance2.dart:57:57: Context: This is the type variable whose bound isn't conformed to. // class AinvCyclicCoBound, Y extends Function(Y)> { // ^ -// pkg/front_end/testcases/general/nested_variance2.dart:236:24: Context: If you want 'AinvCyclicCoBound' to be a super-bounded type, note that the inverted type 'B, Never Function(Object?)>>' must then satisfy its bounds, which it does not. +// pkg/front_end/testcases/general/nested_variance2.dart:177:3: Context: If you want 'AinvCyclicCoBound, dynamic Function(Never)>' to be a super-bounded type, note that the inverted type 'AinvCyclicCoBound, Never Function(Object?)>' must then satisfy its bounds, which it does not. // - 'AinvCyclicCoBound' is from 'pkg/front_end/testcases/general/nested_variance2.dart'. -// - 'B' is from 'pkg/front_end/testcases/general/nested_variance2.dart'. // - 'Object' is from 'dart:core'. -// B source12 = throw ''; //# 04: compile-time error -// ^ +// AinvCyclicCoBound source12 = throw ''; //# 02: compile-time error +// ^ // -// pkg/front_end/testcases/general/nested_variance2.dart:236:24: Error: Type argument 'dynamic Function(Never)' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FinvCyclicCoBound'. -// Try changing type arguments so that they conform to the bounds. +// pkg/front_end/testcases/general/nested_variance2.dart:236:5: Error: Inferred type argument 'dynamic Function(Never)' doesn't conform to the bound 'dynamic Function(Y)' of the type variable 'Y' on 'AinvCyclicCoBound'. +// Try specifying type arguments explicitly so that they conform to the bounds. // B source12 = throw ''; //# 04: compile-time error -// ^ -// pkg/front_end/testcases/general/nested_variance2.dart:49:27: Context: This is the type variable whose bound isn't conformed to. -// typedef FinvCyclicCoBound = X Function(X); -// ^ -// pkg/front_end/testcases/general/nested_variance2.dart:236:24: Context: If you want 'FinvCyclicCoBound' to be a super-bounded type, note that the inverted type 'B, Never Function(Object?)>>' must then satisfy its bounds, which it does not. -// - 'B' is from 'pkg/front_end/testcases/general/nested_variance2.dart'. +// ^ +// pkg/front_end/testcases/general/nested_variance2.dart:57:57: Context: This is the type variable whose bound isn't conformed to. +// class AinvCyclicCoBound, Y extends Function(Y)> { +// ^ +// pkg/front_end/testcases/general/nested_variance2.dart:236:5: Context: If you want 'AinvCyclicCoBound, dynamic Function(Never)>' to be a super-bounded type, note that the inverted type 'AinvCyclicCoBound, Never Function(Object?)>' must then satisfy its bounds, which it does not. // - 'AinvCyclicCoBound' is from 'pkg/front_end/testcases/general/nested_variance2.dart'. // - 'Object' is from 'dart:core'. // B source12 = throw ''; //# 04: compile-time error -// ^ +// ^ // import self as self; import "dart:core" as core; diff --git a/pkg/front_end/testcases/general/super_bounded.dart b/pkg/front_end/testcases/general/super_bounded.dart new file mode 100644 index 00000000000..6d74f8170c1 --- /dev/null +++ b/pkg/front_end/testcases/general/super_bounded.dart @@ -0,0 +1,13 @@ +// Copyright (c) 2022, 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. + +typedef F = X Function(X); + +class A {} + +class Class> {} + +method(Class c1, Class c2) {} + +main() {} diff --git a/pkg/front_end/testcases/general/super_bounded.dart.textual_outline.expect b/pkg/front_end/testcases/general/super_bounded.dart.textual_outline.expect new file mode 100644 index 00000000000..ca7b1c6dd8d --- /dev/null +++ b/pkg/front_end/testcases/general/super_bounded.dart.textual_outline.expect @@ -0,0 +1,8 @@ +typedef F = X Function(X); + +class A {} + +class Class> {} + +method(Class c1, Class c2) {} +main() {} diff --git a/pkg/front_end/testcases/general/super_bounded.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/general/super_bounded.dart.textual_outline_modelled.expect new file mode 100644 index 00000000000..c1e72c5de1e --- /dev/null +++ b/pkg/front_end/testcases/general/super_bounded.dart.textual_outline_modelled.expect @@ -0,0 +1,7 @@ +class A {} + +class Class> {} + +main() {} +method(Class c1, Class c2) {} +typedef F = X Function(X); diff --git a/pkg/front_end/testcases/general/super_bounded.dart.weak.expect b/pkg/front_end/testcases/general/super_bounded.dart.weak.expect new file mode 100644 index 00000000000..d6a4196b5cc --- /dev/null +++ b/pkg/front_end/testcases/general/super_bounded.dart.weak.expect @@ -0,0 +1,17 @@ +library /*isNonNullableByDefault*/; +import self as self; +import "dart:core" as core; + +typedef F = (X%) → X%; +class A extends core::Object { + synthetic constructor •() → self::A + : super core::Object::•() + ; +} +class Class = self::A> extends core::Object { + synthetic constructor •() → self::Class + : super core::Object::•() + ; +} +static method method(self::Class> c1, self::Class c2) → dynamic {} +static method main() → dynamic {} diff --git a/pkg/front_end/testcases/general/super_bounded.dart.weak.modular.expect b/pkg/front_end/testcases/general/super_bounded.dart.weak.modular.expect new file mode 100644 index 00000000000..d6a4196b5cc --- /dev/null +++ b/pkg/front_end/testcases/general/super_bounded.dart.weak.modular.expect @@ -0,0 +1,17 @@ +library /*isNonNullableByDefault*/; +import self as self; +import "dart:core" as core; + +typedef F = (X%) → X%; +class A extends core::Object { + synthetic constructor •() → self::A + : super core::Object::•() + ; +} +class Class = self::A> extends core::Object { + synthetic constructor •() → self::Class + : super core::Object::•() + ; +} +static method method(self::Class> c1, self::Class c2) → dynamic {} +static method main() → dynamic {} diff --git a/pkg/front_end/testcases/general/super_bounded.dart.weak.outline.expect b/pkg/front_end/testcases/general/super_bounded.dart.weak.outline.expect new file mode 100644 index 00000000000..7bae4771fca --- /dev/null +++ b/pkg/front_end/testcases/general/super_bounded.dart.weak.outline.expect @@ -0,0 +1,17 @@ +library /*isNonNullableByDefault*/; +import self as self; +import "dart:core" as core; + +typedef F = (X%) → X%; +class A extends core::Object { + synthetic constructor •() → self::A + ; +} +class Class = self::A> extends core::Object { + synthetic constructor •() → self::Class + ; +} +static method method(self::Class> c1, self::Class c2) → dynamic + ; +static method main() → dynamic + ; diff --git a/pkg/front_end/testcases/general/super_bounded.dart.weak.transformed.expect b/pkg/front_end/testcases/general/super_bounded.dart.weak.transformed.expect new file mode 100644 index 00000000000..d6a4196b5cc --- /dev/null +++ b/pkg/front_end/testcases/general/super_bounded.dart.weak.transformed.expect @@ -0,0 +1,17 @@ +library /*isNonNullableByDefault*/; +import self as self; +import "dart:core" as core; + +typedef F = (X%) → X%; +class A extends core::Object { + synthetic constructor •() → self::A + : super core::Object::•() + ; +} +class Class = self::A> extends core::Object { + synthetic constructor •() → self::Class + : super core::Object::•() + ; +} +static method method(self::Class> c1, self::Class c2) → dynamic {} +static method main() → dynamic {} diff --git a/pkg/front_end/testcases/general/well_boundness_checks_in_outline.dart.weak.expect b/pkg/front_end/testcases/general/well_boundness_checks_in_outline.dart.weak.expect index 145ed000d20..aae0506aef8 100644 --- a/pkg/front_end/testcases/general/well_boundness_checks_in_outline.dart.weak.expect +++ b/pkg/front_end/testcases/general/well_boundness_checks_in_outline.dart.weak.expect @@ -2,57 +2,57 @@ library; // // Problems in library: // -// pkg/front_end/testcases/general/well_boundness_checks_in_outline.dart:10:10: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'A'. +// pkg/front_end/testcases/general/well_boundness_checks_in_outline.dart:14:23: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'A'. +// Try changing type arguments so that they conform to the bounds. +// extension E> // Error. +// ^ +// pkg/front_end/testcases/general/well_boundness_checks_in_outline.dart:7:9: Context: This is the type variable whose bound isn't conformed to. +// class A {} +// ^ +// +// pkg/front_end/testcases/general/well_boundness_checks_in_outline.dart:19:25: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'A'. +// Try changing type arguments so that they conform to the bounds. +// void bazOfE>() {} // Error. +// ^ +// pkg/front_end/testcases/general/well_boundness_checks_in_outline.dart:7:9: Context: This is the type variable whose bound isn't conformed to. +// class A {} +// ^ +// +// pkg/front_end/testcases/general/well_boundness_checks_in_outline.dart:10:3: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'A'. // Try changing type arguments so that they conform to the bounds. // A fieldOfA; // Error. +// ^ +// pkg/front_end/testcases/general/well_boundness_checks_in_outline.dart:7:9: Context: This is the type variable whose bound isn't conformed to. +// class A {} +// ^ +// +// pkg/front_end/testcases/general/well_boundness_checks_in_outline.dart:11:10: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'A'. +// Try changing type arguments so that they conform to the bounds. +// static A staticFieldOfA; // Error. // ^ // pkg/front_end/testcases/general/well_boundness_checks_in_outline.dart:7:9: Context: This is the type variable whose bound isn't conformed to. // class A {} // ^ // -// pkg/front_end/testcases/general/well_boundness_checks_in_outline.dart:11:17: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'A'. -// Try changing type arguments so that they conform to the bounds. -// static A staticFieldOfA; // Error. -// ^ -// pkg/front_end/testcases/general/well_boundness_checks_in_outline.dart:7:9: Context: This is the type variable whose bound isn't conformed to. -// class A {} -// ^ -// -// pkg/front_end/testcases/general/well_boundness_checks_in_outline.dart:14:13: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'A'. -// Try changing type arguments so that they conform to the bounds. -// extension E> // Error. -// ^ -// pkg/front_end/testcases/general/well_boundness_checks_in_outline.dart:7:9: Context: This is the type variable whose bound isn't conformed to. -// class A {} -// ^ -// -// pkg/front_end/testcases/general/well_boundness_checks_in_outline.dart:16:17: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'A'. +// pkg/front_end/testcases/general/well_boundness_checks_in_outline.dart:16:10: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'A'. // Try changing type arguments so that they conform to the bounds. // static A fieldOfE; // Error. -// ^ +// ^ // pkg/front_end/testcases/general/well_boundness_checks_in_outline.dart:7:9: Context: This is the type variable whose bound isn't conformed to. // class A {} // ^ // -// pkg/front_end/testcases/general/well_boundness_checks_in_outline.dart:17:16: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'A' in the return type. +// pkg/front_end/testcases/general/well_boundness_checks_in_outline.dart:17:3: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'A'. // Try changing type arguments so that they conform to the bounds. // A fooOfE() => null; // Error. -// ^ +// ^ // pkg/front_end/testcases/general/well_boundness_checks_in_outline.dart:7:9: Context: This is the type variable whose bound isn't conformed to. // class A {} // ^ // -// pkg/front_end/testcases/general/well_boundness_checks_in_outline.dart:18:22: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'A'. +// pkg/front_end/testcases/general/well_boundness_checks_in_outline.dart:18:15: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'A'. // Try changing type arguments so that they conform to the bounds. // void barOfE(A a) {} // Error. -// ^ -// pkg/front_end/testcases/general/well_boundness_checks_in_outline.dart:7:9: Context: This is the type variable whose bound isn't conformed to. -// class A {} -// ^ -// -// pkg/front_end/testcases/general/well_boundness_checks_in_outline.dart:19:15: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'A'. -// Try changing type arguments so that they conform to the bounds. -// void bazOfE>() {} // Error. // ^ // pkg/front_end/testcases/general/well_boundness_checks_in_outline.dart:7:9: Context: This is the type variable whose bound isn't conformed to. // class A {} diff --git a/pkg/front_end/testcases/general/well_boundness_checks_in_outline.dart.weak.modular.expect b/pkg/front_end/testcases/general/well_boundness_checks_in_outline.dart.weak.modular.expect index 145ed000d20..aae0506aef8 100644 --- a/pkg/front_end/testcases/general/well_boundness_checks_in_outline.dart.weak.modular.expect +++ b/pkg/front_end/testcases/general/well_boundness_checks_in_outline.dart.weak.modular.expect @@ -2,57 +2,57 @@ library; // // Problems in library: // -// pkg/front_end/testcases/general/well_boundness_checks_in_outline.dart:10:10: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'A'. +// pkg/front_end/testcases/general/well_boundness_checks_in_outline.dart:14:23: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'A'. +// Try changing type arguments so that they conform to the bounds. +// extension E> // Error. +// ^ +// pkg/front_end/testcases/general/well_boundness_checks_in_outline.dart:7:9: Context: This is the type variable whose bound isn't conformed to. +// class A {} +// ^ +// +// pkg/front_end/testcases/general/well_boundness_checks_in_outline.dart:19:25: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'A'. +// Try changing type arguments so that they conform to the bounds. +// void bazOfE>() {} // Error. +// ^ +// pkg/front_end/testcases/general/well_boundness_checks_in_outline.dart:7:9: Context: This is the type variable whose bound isn't conformed to. +// class A {} +// ^ +// +// pkg/front_end/testcases/general/well_boundness_checks_in_outline.dart:10:3: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'A'. // Try changing type arguments so that they conform to the bounds. // A fieldOfA; // Error. +// ^ +// pkg/front_end/testcases/general/well_boundness_checks_in_outline.dart:7:9: Context: This is the type variable whose bound isn't conformed to. +// class A {} +// ^ +// +// pkg/front_end/testcases/general/well_boundness_checks_in_outline.dart:11:10: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'A'. +// Try changing type arguments so that they conform to the bounds. +// static A staticFieldOfA; // Error. // ^ // pkg/front_end/testcases/general/well_boundness_checks_in_outline.dart:7:9: Context: This is the type variable whose bound isn't conformed to. // class A {} // ^ // -// pkg/front_end/testcases/general/well_boundness_checks_in_outline.dart:11:17: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'A'. -// Try changing type arguments so that they conform to the bounds. -// static A staticFieldOfA; // Error. -// ^ -// pkg/front_end/testcases/general/well_boundness_checks_in_outline.dart:7:9: Context: This is the type variable whose bound isn't conformed to. -// class A {} -// ^ -// -// pkg/front_end/testcases/general/well_boundness_checks_in_outline.dart:14:13: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'A'. -// Try changing type arguments so that they conform to the bounds. -// extension E> // Error. -// ^ -// pkg/front_end/testcases/general/well_boundness_checks_in_outline.dart:7:9: Context: This is the type variable whose bound isn't conformed to. -// class A {} -// ^ -// -// pkg/front_end/testcases/general/well_boundness_checks_in_outline.dart:16:17: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'A'. +// pkg/front_end/testcases/general/well_boundness_checks_in_outline.dart:16:10: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'A'. // Try changing type arguments so that they conform to the bounds. // static A fieldOfE; // Error. -// ^ +// ^ // pkg/front_end/testcases/general/well_boundness_checks_in_outline.dart:7:9: Context: This is the type variable whose bound isn't conformed to. // class A {} // ^ // -// pkg/front_end/testcases/general/well_boundness_checks_in_outline.dart:17:16: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'A' in the return type. +// pkg/front_end/testcases/general/well_boundness_checks_in_outline.dart:17:3: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'A'. // Try changing type arguments so that they conform to the bounds. // A fooOfE() => null; // Error. -// ^ +// ^ // pkg/front_end/testcases/general/well_boundness_checks_in_outline.dart:7:9: Context: This is the type variable whose bound isn't conformed to. // class A {} // ^ // -// pkg/front_end/testcases/general/well_boundness_checks_in_outline.dart:18:22: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'A'. +// pkg/front_end/testcases/general/well_boundness_checks_in_outline.dart:18:15: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'A'. // Try changing type arguments so that they conform to the bounds. // void barOfE(A a) {} // Error. -// ^ -// pkg/front_end/testcases/general/well_boundness_checks_in_outline.dart:7:9: Context: This is the type variable whose bound isn't conformed to. -// class A {} -// ^ -// -// pkg/front_end/testcases/general/well_boundness_checks_in_outline.dart:19:15: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'A'. -// Try changing type arguments so that they conform to the bounds. -// void bazOfE>() {} // Error. // ^ // pkg/front_end/testcases/general/well_boundness_checks_in_outline.dart:7:9: Context: This is the type variable whose bound isn't conformed to. // class A {} diff --git a/pkg/front_end/testcases/general/well_boundness_checks_in_outline.dart.weak.outline.expect b/pkg/front_end/testcases/general/well_boundness_checks_in_outline.dart.weak.outline.expect index 401ed4e4594..e65a4dcd516 100644 --- a/pkg/front_end/testcases/general/well_boundness_checks_in_outline.dart.weak.outline.expect +++ b/pkg/front_end/testcases/general/well_boundness_checks_in_outline.dart.weak.outline.expect @@ -2,57 +2,57 @@ library; // // Problems in library: // -// pkg/front_end/testcases/general/well_boundness_checks_in_outline.dart:10:10: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'A'. +// pkg/front_end/testcases/general/well_boundness_checks_in_outline.dart:14:23: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'A'. +// Try changing type arguments so that they conform to the bounds. +// extension E> // Error. +// ^ +// pkg/front_end/testcases/general/well_boundness_checks_in_outline.dart:7:9: Context: This is the type variable whose bound isn't conformed to. +// class A {} +// ^ +// +// pkg/front_end/testcases/general/well_boundness_checks_in_outline.dart:19:25: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'A'. +// Try changing type arguments so that they conform to the bounds. +// void bazOfE>() {} // Error. +// ^ +// pkg/front_end/testcases/general/well_boundness_checks_in_outline.dart:7:9: Context: This is the type variable whose bound isn't conformed to. +// class A {} +// ^ +// +// pkg/front_end/testcases/general/well_boundness_checks_in_outline.dart:10:3: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'A'. // Try changing type arguments so that they conform to the bounds. // A fieldOfA; // Error. +// ^ +// pkg/front_end/testcases/general/well_boundness_checks_in_outline.dart:7:9: Context: This is the type variable whose bound isn't conformed to. +// class A {} +// ^ +// +// pkg/front_end/testcases/general/well_boundness_checks_in_outline.dart:11:10: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'A'. +// Try changing type arguments so that they conform to the bounds. +// static A staticFieldOfA; // Error. // ^ // pkg/front_end/testcases/general/well_boundness_checks_in_outline.dart:7:9: Context: This is the type variable whose bound isn't conformed to. // class A {} // ^ // -// pkg/front_end/testcases/general/well_boundness_checks_in_outline.dart:11:17: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'A'. -// Try changing type arguments so that they conform to the bounds. -// static A staticFieldOfA; // Error. -// ^ -// pkg/front_end/testcases/general/well_boundness_checks_in_outline.dart:7:9: Context: This is the type variable whose bound isn't conformed to. -// class A {} -// ^ -// -// pkg/front_end/testcases/general/well_boundness_checks_in_outline.dart:14:13: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'A'. -// Try changing type arguments so that they conform to the bounds. -// extension E> // Error. -// ^ -// pkg/front_end/testcases/general/well_boundness_checks_in_outline.dart:7:9: Context: This is the type variable whose bound isn't conformed to. -// class A {} -// ^ -// -// pkg/front_end/testcases/general/well_boundness_checks_in_outline.dart:16:17: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'A'. +// pkg/front_end/testcases/general/well_boundness_checks_in_outline.dart:16:10: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'A'. // Try changing type arguments so that they conform to the bounds. // static A fieldOfE; // Error. -// ^ +// ^ // pkg/front_end/testcases/general/well_boundness_checks_in_outline.dart:7:9: Context: This is the type variable whose bound isn't conformed to. // class A {} // ^ // -// pkg/front_end/testcases/general/well_boundness_checks_in_outline.dart:17:16: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'A' in the return type. +// pkg/front_end/testcases/general/well_boundness_checks_in_outline.dart:17:3: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'A'. // Try changing type arguments so that they conform to the bounds. // A fooOfE() => null; // Error. -// ^ +// ^ // pkg/front_end/testcases/general/well_boundness_checks_in_outline.dart:7:9: Context: This is the type variable whose bound isn't conformed to. // class A {} // ^ // -// pkg/front_end/testcases/general/well_boundness_checks_in_outline.dart:18:22: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'A'. +// pkg/front_end/testcases/general/well_boundness_checks_in_outline.dart:18:15: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'A'. // Try changing type arguments so that they conform to the bounds. // void barOfE(A a) {} // Error. -// ^ -// pkg/front_end/testcases/general/well_boundness_checks_in_outline.dart:7:9: Context: This is the type variable whose bound isn't conformed to. -// class A {} -// ^ -// -// pkg/front_end/testcases/general/well_boundness_checks_in_outline.dart:19:15: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'A'. -// Try changing type arguments so that they conform to the bounds. -// void bazOfE>() {} // Error. // ^ // pkg/front_end/testcases/general/well_boundness_checks_in_outline.dart:7:9: Context: This is the type variable whose bound isn't conformed to. // class A {} diff --git a/pkg/front_end/testcases/general/well_boundness_checks_in_outline.dart.weak.transformed.expect b/pkg/front_end/testcases/general/well_boundness_checks_in_outline.dart.weak.transformed.expect index 145ed000d20..aae0506aef8 100644 --- a/pkg/front_end/testcases/general/well_boundness_checks_in_outline.dart.weak.transformed.expect +++ b/pkg/front_end/testcases/general/well_boundness_checks_in_outline.dart.weak.transformed.expect @@ -2,57 +2,57 @@ library; // // Problems in library: // -// pkg/front_end/testcases/general/well_boundness_checks_in_outline.dart:10:10: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'A'. +// pkg/front_end/testcases/general/well_boundness_checks_in_outline.dart:14:23: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'A'. +// Try changing type arguments so that they conform to the bounds. +// extension E> // Error. +// ^ +// pkg/front_end/testcases/general/well_boundness_checks_in_outline.dart:7:9: Context: This is the type variable whose bound isn't conformed to. +// class A {} +// ^ +// +// pkg/front_end/testcases/general/well_boundness_checks_in_outline.dart:19:25: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'A'. +// Try changing type arguments so that they conform to the bounds. +// void bazOfE>() {} // Error. +// ^ +// pkg/front_end/testcases/general/well_boundness_checks_in_outline.dart:7:9: Context: This is the type variable whose bound isn't conformed to. +// class A {} +// ^ +// +// pkg/front_end/testcases/general/well_boundness_checks_in_outline.dart:10:3: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'A'. // Try changing type arguments so that they conform to the bounds. // A fieldOfA; // Error. +// ^ +// pkg/front_end/testcases/general/well_boundness_checks_in_outline.dart:7:9: Context: This is the type variable whose bound isn't conformed to. +// class A {} +// ^ +// +// pkg/front_end/testcases/general/well_boundness_checks_in_outline.dart:11:10: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'A'. +// Try changing type arguments so that they conform to the bounds. +// static A staticFieldOfA; // Error. // ^ // pkg/front_end/testcases/general/well_boundness_checks_in_outline.dart:7:9: Context: This is the type variable whose bound isn't conformed to. // class A {} // ^ // -// pkg/front_end/testcases/general/well_boundness_checks_in_outline.dart:11:17: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'A'. -// Try changing type arguments so that they conform to the bounds. -// static A staticFieldOfA; // Error. -// ^ -// pkg/front_end/testcases/general/well_boundness_checks_in_outline.dart:7:9: Context: This is the type variable whose bound isn't conformed to. -// class A {} -// ^ -// -// pkg/front_end/testcases/general/well_boundness_checks_in_outline.dart:14:13: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'A'. -// Try changing type arguments so that they conform to the bounds. -// extension E> // Error. -// ^ -// pkg/front_end/testcases/general/well_boundness_checks_in_outline.dart:7:9: Context: This is the type variable whose bound isn't conformed to. -// class A {} -// ^ -// -// pkg/front_end/testcases/general/well_boundness_checks_in_outline.dart:16:17: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'A'. +// pkg/front_end/testcases/general/well_boundness_checks_in_outline.dart:16:10: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'A'. // Try changing type arguments so that they conform to the bounds. // static A fieldOfE; // Error. -// ^ +// ^ // pkg/front_end/testcases/general/well_boundness_checks_in_outline.dart:7:9: Context: This is the type variable whose bound isn't conformed to. // class A {} // ^ // -// pkg/front_end/testcases/general/well_boundness_checks_in_outline.dart:17:16: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'A' in the return type. +// pkg/front_end/testcases/general/well_boundness_checks_in_outline.dart:17:3: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'A'. // Try changing type arguments so that they conform to the bounds. // A fooOfE() => null; // Error. -// ^ +// ^ // pkg/front_end/testcases/general/well_boundness_checks_in_outline.dart:7:9: Context: This is the type variable whose bound isn't conformed to. // class A {} // ^ // -// pkg/front_end/testcases/general/well_boundness_checks_in_outline.dart:18:22: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'A'. +// pkg/front_end/testcases/general/well_boundness_checks_in_outline.dart:18:15: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'A'. // Try changing type arguments so that they conform to the bounds. // void barOfE(A a) {} // Error. -// ^ -// pkg/front_end/testcases/general/well_boundness_checks_in_outline.dart:7:9: Context: This is the type variable whose bound isn't conformed to. -// class A {} -// ^ -// -// pkg/front_end/testcases/general/well_boundness_checks_in_outline.dart:19:15: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'A'. -// Try changing type arguments so that they conform to the bounds. -// void bazOfE>() {} // Error. // ^ // pkg/front_end/testcases/general/well_boundness_checks_in_outline.dart:7:9: Context: This is the type variable whose bound isn't conformed to. // class A {} diff --git a/pkg/front_end/testcases/general/well_boundness_checks_in_outline2.dart.weak.expect b/pkg/front_end/testcases/general/well_boundness_checks_in_outline2.dart.weak.expect index c19f798470b..7f9ecea193b 100644 --- a/pkg/front_end/testcases/general/well_boundness_checks_in_outline2.dart.weak.expect +++ b/pkg/front_end/testcases/general/well_boundness_checks_in_outline2.dart.weak.expect @@ -2,57 +2,57 @@ library /*isNonNullableByDefault*/; // // Problems in library: // -// pkg/front_end/testcases/general/well_boundness_checks_in_outline2.dart:8:11: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'A'. -// Try changing type arguments so that they conform to the bounds. -// A? fieldOfA; // Error. -// ^ -// pkg/front_end/testcases/general/well_boundness_checks_in_outline2.dart:5:9: Context: This is the type variable whose bound isn't conformed to. -// class A {} -// ^ -// -// pkg/front_end/testcases/general/well_boundness_checks_in_outline2.dart:9:18: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'A'. -// Try changing type arguments so that they conform to the bounds. -// static A? staticFieldOfA; // Error. -// ^ -// pkg/front_end/testcases/general/well_boundness_checks_in_outline2.dart:5:9: Context: This is the type variable whose bound isn't conformed to. -// class A {} -// ^ -// -// pkg/front_end/testcases/general/well_boundness_checks_in_outline2.dart:12:13: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'A'. +// pkg/front_end/testcases/general/well_boundness_checks_in_outline2.dart:12:23: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'A'. // Try changing type arguments so that they conform to the bounds. // extension E> // Error. -// ^ +// ^ // pkg/front_end/testcases/general/well_boundness_checks_in_outline2.dart:5:9: Context: This is the type variable whose bound isn't conformed to. // class A {} // ^ // -// pkg/front_end/testcases/general/well_boundness_checks_in_outline2.dart:14:18: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'A'. -// Try changing type arguments so that they conform to the bounds. -// static A? fieldOfE; // Error. -// ^ -// pkg/front_end/testcases/general/well_boundness_checks_in_outline2.dart:5:9: Context: This is the type variable whose bound isn't conformed to. -// class A {} -// ^ -// -// pkg/front_end/testcases/general/well_boundness_checks_in_outline2.dart:15:17: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'A' in the return type. -// Try changing type arguments so that they conform to the bounds. -// A? fooOfE() => null; // Error. -// ^ -// pkg/front_end/testcases/general/well_boundness_checks_in_outline2.dart:5:9: Context: This is the type variable whose bound isn't conformed to. -// class A {} -// ^ -// -// pkg/front_end/testcases/general/well_boundness_checks_in_outline2.dart:16:22: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'A'. -// Try changing type arguments so that they conform to the bounds. -// void barOfE(A a) {} // Error. -// ^ -// pkg/front_end/testcases/general/well_boundness_checks_in_outline2.dart:5:9: Context: This is the type variable whose bound isn't conformed to. -// class A {} -// ^ -// -// pkg/front_end/testcases/general/well_boundness_checks_in_outline2.dart:17:15: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'A'. +// pkg/front_end/testcases/general/well_boundness_checks_in_outline2.dart:17:25: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'A'. // Try changing type arguments so that they conform to the bounds. // void bazOfE>() {} // Error. +// ^ +// pkg/front_end/testcases/general/well_boundness_checks_in_outline2.dart:5:9: Context: This is the type variable whose bound isn't conformed to. +// class A {} +// ^ +// +// pkg/front_end/testcases/general/well_boundness_checks_in_outline2.dart:8:3: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'A'. +// Try changing type arguments so that they conform to the bounds. +// A? fieldOfA; // Error. +// ^ +// pkg/front_end/testcases/general/well_boundness_checks_in_outline2.dart:5:9: Context: This is the type variable whose bound isn't conformed to. +// class A {} +// ^ +// +// pkg/front_end/testcases/general/well_boundness_checks_in_outline2.dart:9:10: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'A'. +// Try changing type arguments so that they conform to the bounds. +// static A? staticFieldOfA; // Error. +// ^ +// pkg/front_end/testcases/general/well_boundness_checks_in_outline2.dart:5:9: Context: This is the type variable whose bound isn't conformed to. +// class A {} +// ^ +// +// pkg/front_end/testcases/general/well_boundness_checks_in_outline2.dart:14:10: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'A'. +// Try changing type arguments so that they conform to the bounds. +// static A? fieldOfE; // Error. +// ^ +// pkg/front_end/testcases/general/well_boundness_checks_in_outline2.dart:5:9: Context: This is the type variable whose bound isn't conformed to. +// class A {} +// ^ +// +// pkg/front_end/testcases/general/well_boundness_checks_in_outline2.dart:15:3: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'A'. +// Try changing type arguments so that they conform to the bounds. +// A? fooOfE() => null; // Error. +// ^ +// pkg/front_end/testcases/general/well_boundness_checks_in_outline2.dart:5:9: Context: This is the type variable whose bound isn't conformed to. +// class A {} +// ^ +// +// pkg/front_end/testcases/general/well_boundness_checks_in_outline2.dart:16:15: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'A'. +// Try changing type arguments so that they conform to the bounds. +// void barOfE(A a) {} // Error. // ^ // pkg/front_end/testcases/general/well_boundness_checks_in_outline2.dart:5:9: Context: This is the type variable whose bound isn't conformed to. // class A {} diff --git a/pkg/front_end/testcases/general/well_boundness_checks_in_outline2.dart.weak.modular.expect b/pkg/front_end/testcases/general/well_boundness_checks_in_outline2.dart.weak.modular.expect index c19f798470b..7f9ecea193b 100644 --- a/pkg/front_end/testcases/general/well_boundness_checks_in_outline2.dart.weak.modular.expect +++ b/pkg/front_end/testcases/general/well_boundness_checks_in_outline2.dart.weak.modular.expect @@ -2,57 +2,57 @@ library /*isNonNullableByDefault*/; // // Problems in library: // -// pkg/front_end/testcases/general/well_boundness_checks_in_outline2.dart:8:11: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'A'. -// Try changing type arguments so that they conform to the bounds. -// A? fieldOfA; // Error. -// ^ -// pkg/front_end/testcases/general/well_boundness_checks_in_outline2.dart:5:9: Context: This is the type variable whose bound isn't conformed to. -// class A {} -// ^ -// -// pkg/front_end/testcases/general/well_boundness_checks_in_outline2.dart:9:18: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'A'. -// Try changing type arguments so that they conform to the bounds. -// static A? staticFieldOfA; // Error. -// ^ -// pkg/front_end/testcases/general/well_boundness_checks_in_outline2.dart:5:9: Context: This is the type variable whose bound isn't conformed to. -// class A {} -// ^ -// -// pkg/front_end/testcases/general/well_boundness_checks_in_outline2.dart:12:13: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'A'. +// pkg/front_end/testcases/general/well_boundness_checks_in_outline2.dart:12:23: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'A'. // Try changing type arguments so that they conform to the bounds. // extension E> // Error. -// ^ +// ^ // pkg/front_end/testcases/general/well_boundness_checks_in_outline2.dart:5:9: Context: This is the type variable whose bound isn't conformed to. // class A {} // ^ // -// pkg/front_end/testcases/general/well_boundness_checks_in_outline2.dart:14:18: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'A'. -// Try changing type arguments so that they conform to the bounds. -// static A? fieldOfE; // Error. -// ^ -// pkg/front_end/testcases/general/well_boundness_checks_in_outline2.dart:5:9: Context: This is the type variable whose bound isn't conformed to. -// class A {} -// ^ -// -// pkg/front_end/testcases/general/well_boundness_checks_in_outline2.dart:15:17: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'A' in the return type. -// Try changing type arguments so that they conform to the bounds. -// A? fooOfE() => null; // Error. -// ^ -// pkg/front_end/testcases/general/well_boundness_checks_in_outline2.dart:5:9: Context: This is the type variable whose bound isn't conformed to. -// class A {} -// ^ -// -// pkg/front_end/testcases/general/well_boundness_checks_in_outline2.dart:16:22: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'A'. -// Try changing type arguments so that they conform to the bounds. -// void barOfE(A a) {} // Error. -// ^ -// pkg/front_end/testcases/general/well_boundness_checks_in_outline2.dart:5:9: Context: This is the type variable whose bound isn't conformed to. -// class A {} -// ^ -// -// pkg/front_end/testcases/general/well_boundness_checks_in_outline2.dart:17:15: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'A'. +// pkg/front_end/testcases/general/well_boundness_checks_in_outline2.dart:17:25: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'A'. // Try changing type arguments so that they conform to the bounds. // void bazOfE>() {} // Error. +// ^ +// pkg/front_end/testcases/general/well_boundness_checks_in_outline2.dart:5:9: Context: This is the type variable whose bound isn't conformed to. +// class A {} +// ^ +// +// pkg/front_end/testcases/general/well_boundness_checks_in_outline2.dart:8:3: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'A'. +// Try changing type arguments so that they conform to the bounds. +// A? fieldOfA; // Error. +// ^ +// pkg/front_end/testcases/general/well_boundness_checks_in_outline2.dart:5:9: Context: This is the type variable whose bound isn't conformed to. +// class A {} +// ^ +// +// pkg/front_end/testcases/general/well_boundness_checks_in_outline2.dart:9:10: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'A'. +// Try changing type arguments so that they conform to the bounds. +// static A? staticFieldOfA; // Error. +// ^ +// pkg/front_end/testcases/general/well_boundness_checks_in_outline2.dart:5:9: Context: This is the type variable whose bound isn't conformed to. +// class A {} +// ^ +// +// pkg/front_end/testcases/general/well_boundness_checks_in_outline2.dart:14:10: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'A'. +// Try changing type arguments so that they conform to the bounds. +// static A? fieldOfE; // Error. +// ^ +// pkg/front_end/testcases/general/well_boundness_checks_in_outline2.dart:5:9: Context: This is the type variable whose bound isn't conformed to. +// class A {} +// ^ +// +// pkg/front_end/testcases/general/well_boundness_checks_in_outline2.dart:15:3: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'A'. +// Try changing type arguments so that they conform to the bounds. +// A? fooOfE() => null; // Error. +// ^ +// pkg/front_end/testcases/general/well_boundness_checks_in_outline2.dart:5:9: Context: This is the type variable whose bound isn't conformed to. +// class A {} +// ^ +// +// pkg/front_end/testcases/general/well_boundness_checks_in_outline2.dart:16:15: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'A'. +// Try changing type arguments so that they conform to the bounds. +// void barOfE(A a) {} // Error. // ^ // pkg/front_end/testcases/general/well_boundness_checks_in_outline2.dart:5:9: Context: This is the type variable whose bound isn't conformed to. // class A {} diff --git a/pkg/front_end/testcases/general/well_boundness_checks_in_outline2.dart.weak.outline.expect b/pkg/front_end/testcases/general/well_boundness_checks_in_outline2.dart.weak.outline.expect index ed99e3aee82..30473535a6d 100644 --- a/pkg/front_end/testcases/general/well_boundness_checks_in_outline2.dart.weak.outline.expect +++ b/pkg/front_end/testcases/general/well_boundness_checks_in_outline2.dart.weak.outline.expect @@ -2,57 +2,57 @@ library /*isNonNullableByDefault*/; // // Problems in library: // -// pkg/front_end/testcases/general/well_boundness_checks_in_outline2.dart:8:11: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'A'. -// Try changing type arguments so that they conform to the bounds. -// A? fieldOfA; // Error. -// ^ -// pkg/front_end/testcases/general/well_boundness_checks_in_outline2.dart:5:9: Context: This is the type variable whose bound isn't conformed to. -// class A {} -// ^ -// -// pkg/front_end/testcases/general/well_boundness_checks_in_outline2.dart:9:18: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'A'. -// Try changing type arguments so that they conform to the bounds. -// static A? staticFieldOfA; // Error. -// ^ -// pkg/front_end/testcases/general/well_boundness_checks_in_outline2.dart:5:9: Context: This is the type variable whose bound isn't conformed to. -// class A {} -// ^ -// -// pkg/front_end/testcases/general/well_boundness_checks_in_outline2.dart:12:13: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'A'. +// pkg/front_end/testcases/general/well_boundness_checks_in_outline2.dart:12:23: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'A'. // Try changing type arguments so that they conform to the bounds. // extension E> // Error. -// ^ +// ^ // pkg/front_end/testcases/general/well_boundness_checks_in_outline2.dart:5:9: Context: This is the type variable whose bound isn't conformed to. // class A {} // ^ // -// pkg/front_end/testcases/general/well_boundness_checks_in_outline2.dart:14:18: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'A'. -// Try changing type arguments so that they conform to the bounds. -// static A? fieldOfE; // Error. -// ^ -// pkg/front_end/testcases/general/well_boundness_checks_in_outline2.dart:5:9: Context: This is the type variable whose bound isn't conformed to. -// class A {} -// ^ -// -// pkg/front_end/testcases/general/well_boundness_checks_in_outline2.dart:15:17: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'A' in the return type. -// Try changing type arguments so that they conform to the bounds. -// A? fooOfE() => null; // Error. -// ^ -// pkg/front_end/testcases/general/well_boundness_checks_in_outline2.dart:5:9: Context: This is the type variable whose bound isn't conformed to. -// class A {} -// ^ -// -// pkg/front_end/testcases/general/well_boundness_checks_in_outline2.dart:16:22: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'A'. -// Try changing type arguments so that they conform to the bounds. -// void barOfE(A a) {} // Error. -// ^ -// pkg/front_end/testcases/general/well_boundness_checks_in_outline2.dart:5:9: Context: This is the type variable whose bound isn't conformed to. -// class A {} -// ^ -// -// pkg/front_end/testcases/general/well_boundness_checks_in_outline2.dart:17:15: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'A'. +// pkg/front_end/testcases/general/well_boundness_checks_in_outline2.dart:17:25: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'A'. // Try changing type arguments so that they conform to the bounds. // void bazOfE>() {} // Error. +// ^ +// pkg/front_end/testcases/general/well_boundness_checks_in_outline2.dart:5:9: Context: This is the type variable whose bound isn't conformed to. +// class A {} +// ^ +// +// pkg/front_end/testcases/general/well_boundness_checks_in_outline2.dart:8:3: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'A'. +// Try changing type arguments so that they conform to the bounds. +// A? fieldOfA; // Error. +// ^ +// pkg/front_end/testcases/general/well_boundness_checks_in_outline2.dart:5:9: Context: This is the type variable whose bound isn't conformed to. +// class A {} +// ^ +// +// pkg/front_end/testcases/general/well_boundness_checks_in_outline2.dart:9:10: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'A'. +// Try changing type arguments so that they conform to the bounds. +// static A? staticFieldOfA; // Error. +// ^ +// pkg/front_end/testcases/general/well_boundness_checks_in_outline2.dart:5:9: Context: This is the type variable whose bound isn't conformed to. +// class A {} +// ^ +// +// pkg/front_end/testcases/general/well_boundness_checks_in_outline2.dart:14:10: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'A'. +// Try changing type arguments so that they conform to the bounds. +// static A? fieldOfE; // Error. +// ^ +// pkg/front_end/testcases/general/well_boundness_checks_in_outline2.dart:5:9: Context: This is the type variable whose bound isn't conformed to. +// class A {} +// ^ +// +// pkg/front_end/testcases/general/well_boundness_checks_in_outline2.dart:15:3: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'A'. +// Try changing type arguments so that they conform to the bounds. +// A? fooOfE() => null; // Error. +// ^ +// pkg/front_end/testcases/general/well_boundness_checks_in_outline2.dart:5:9: Context: This is the type variable whose bound isn't conformed to. +// class A {} +// ^ +// +// pkg/front_end/testcases/general/well_boundness_checks_in_outline2.dart:16:15: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'A'. +// Try changing type arguments so that they conform to the bounds. +// void barOfE(A a) {} // Error. // ^ // pkg/front_end/testcases/general/well_boundness_checks_in_outline2.dart:5:9: Context: This is the type variable whose bound isn't conformed to. // class A {} diff --git a/pkg/front_end/testcases/general/well_boundness_checks_in_outline2.dart.weak.transformed.expect b/pkg/front_end/testcases/general/well_boundness_checks_in_outline2.dart.weak.transformed.expect index c19f798470b..7f9ecea193b 100644 --- a/pkg/front_end/testcases/general/well_boundness_checks_in_outline2.dart.weak.transformed.expect +++ b/pkg/front_end/testcases/general/well_boundness_checks_in_outline2.dart.weak.transformed.expect @@ -2,57 +2,57 @@ library /*isNonNullableByDefault*/; // // Problems in library: // -// pkg/front_end/testcases/general/well_boundness_checks_in_outline2.dart:8:11: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'A'. -// Try changing type arguments so that they conform to the bounds. -// A? fieldOfA; // Error. -// ^ -// pkg/front_end/testcases/general/well_boundness_checks_in_outline2.dart:5:9: Context: This is the type variable whose bound isn't conformed to. -// class A {} -// ^ -// -// pkg/front_end/testcases/general/well_boundness_checks_in_outline2.dart:9:18: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'A'. -// Try changing type arguments so that they conform to the bounds. -// static A? staticFieldOfA; // Error. -// ^ -// pkg/front_end/testcases/general/well_boundness_checks_in_outline2.dart:5:9: Context: This is the type variable whose bound isn't conformed to. -// class A {} -// ^ -// -// pkg/front_end/testcases/general/well_boundness_checks_in_outline2.dart:12:13: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'A'. +// pkg/front_end/testcases/general/well_boundness_checks_in_outline2.dart:12:23: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'A'. // Try changing type arguments so that they conform to the bounds. // extension E> // Error. -// ^ +// ^ // pkg/front_end/testcases/general/well_boundness_checks_in_outline2.dart:5:9: Context: This is the type variable whose bound isn't conformed to. // class A {} // ^ // -// pkg/front_end/testcases/general/well_boundness_checks_in_outline2.dart:14:18: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'A'. -// Try changing type arguments so that they conform to the bounds. -// static A? fieldOfE; // Error. -// ^ -// pkg/front_end/testcases/general/well_boundness_checks_in_outline2.dart:5:9: Context: This is the type variable whose bound isn't conformed to. -// class A {} -// ^ -// -// pkg/front_end/testcases/general/well_boundness_checks_in_outline2.dart:15:17: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'A' in the return type. -// Try changing type arguments so that they conform to the bounds. -// A? fooOfE() => null; // Error. -// ^ -// pkg/front_end/testcases/general/well_boundness_checks_in_outline2.dart:5:9: Context: This is the type variable whose bound isn't conformed to. -// class A {} -// ^ -// -// pkg/front_end/testcases/general/well_boundness_checks_in_outline2.dart:16:22: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'A'. -// Try changing type arguments so that they conform to the bounds. -// void barOfE(A a) {} // Error. -// ^ -// pkg/front_end/testcases/general/well_boundness_checks_in_outline2.dart:5:9: Context: This is the type variable whose bound isn't conformed to. -// class A {} -// ^ -// -// pkg/front_end/testcases/general/well_boundness_checks_in_outline2.dart:17:15: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'A'. +// pkg/front_end/testcases/general/well_boundness_checks_in_outline2.dart:17:25: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'A'. // Try changing type arguments so that they conform to the bounds. // void bazOfE>() {} // Error. +// ^ +// pkg/front_end/testcases/general/well_boundness_checks_in_outline2.dart:5:9: Context: This is the type variable whose bound isn't conformed to. +// class A {} +// ^ +// +// pkg/front_end/testcases/general/well_boundness_checks_in_outline2.dart:8:3: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'A'. +// Try changing type arguments so that they conform to the bounds. +// A? fieldOfA; // Error. +// ^ +// pkg/front_end/testcases/general/well_boundness_checks_in_outline2.dart:5:9: Context: This is the type variable whose bound isn't conformed to. +// class A {} +// ^ +// +// pkg/front_end/testcases/general/well_boundness_checks_in_outline2.dart:9:10: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'A'. +// Try changing type arguments so that they conform to the bounds. +// static A? staticFieldOfA; // Error. +// ^ +// pkg/front_end/testcases/general/well_boundness_checks_in_outline2.dart:5:9: Context: This is the type variable whose bound isn't conformed to. +// class A {} +// ^ +// +// pkg/front_end/testcases/general/well_boundness_checks_in_outline2.dart:14:10: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'A'. +// Try changing type arguments so that they conform to the bounds. +// static A? fieldOfE; // Error. +// ^ +// pkg/front_end/testcases/general/well_boundness_checks_in_outline2.dart:5:9: Context: This is the type variable whose bound isn't conformed to. +// class A {} +// ^ +// +// pkg/front_end/testcases/general/well_boundness_checks_in_outline2.dart:15:3: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'A'. +// Try changing type arguments so that they conform to the bounds. +// A? fooOfE() => null; // Error. +// ^ +// pkg/front_end/testcases/general/well_boundness_checks_in_outline2.dart:5:9: Context: This is the type variable whose bound isn't conformed to. +// class A {} +// ^ +// +// pkg/front_end/testcases/general/well_boundness_checks_in_outline2.dart:16:15: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'A'. +// Try changing type arguments so that they conform to the bounds. +// void barOfE(A a) {} // Error. // ^ // pkg/front_end/testcases/general/well_boundness_checks_in_outline2.dart:5:9: Context: This is the type variable whose bound isn't conformed to. // class A {} diff --git a/pkg/front_end/testcases/generic_metadata/alias_from_opt_in.dart b/pkg/front_end/testcases/generic_metadata/alias_from_opt_in.dart new file mode 100644 index 00000000000..314fc2a356e --- /dev/null +++ b/pkg/front_end/testcases/generic_metadata/alias_from_opt_in.dart @@ -0,0 +1,33 @@ +// Copyright (c) 2022, 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.12 + +import 'alias_from_opt_in_lib.dart'; + +test( + T1 t1a, // Ok + List t1b, // Error + void Function(T1) t1c, // Ok + void Function(List) t1d, // Error + T2 t2a, // Ok + List t2b, // // Ok + void Function(T2) t2c, // Ok + void Function(List) t2d, // // Ok + T3 t3a, // Error + List t3b, // Error + void Function(T3) t3c, // Error + void Function(List) t3d, // Error + T4 t4a, // Error, + List t4b, // Error, + void Function(T4) t4c, // Error + void Function(List) t4d, // Error +) { + new T4(); // Error + []; // Error + []; // Error + )>[]; // Error +} + +main() {} diff --git a/pkg/front_end/testcases/generic_metadata/alias_from_opt_in.dart.strong.expect b/pkg/front_end/testcases/generic_metadata/alias_from_opt_in.dart.strong.expect new file mode 100644 index 00000000000..046ad771f1d --- /dev/null +++ b/pkg/front_end/testcases/generic_metadata/alias_from_opt_in.dart.strong.expect @@ -0,0 +1,110 @@ +library /*isNonNullableByDefault*/; +// +// Problems in library: +// +// pkg/front_end/testcases/generic_metadata/alias_from_opt_in.dart:11:3: Error: A generic function type can't be used as a type argument. +// Try using a non-generic function type. +// List t1b, // Error +// ^ +// +// pkg/front_end/testcases/generic_metadata/alias_from_opt_in.dart:13:17: Error: A generic function type can't be used as a type argument. +// Try using a non-generic function type. +// void Function(List) t1d, // Error +// ^ +// +// pkg/front_end/testcases/generic_metadata/alias_from_opt_in.dart:22:3: Error: Generic function type 'void Function(T)' inferred as a type argument. +// Try providing a non-generic function type explicitly. +// T4 t4a, // Error, +// ^ +// +// pkg/front_end/testcases/generic_metadata/alias_from_opt_in.dart:23:8: Error: Generic function type 'void Function(T)' inferred as a type argument. +// Try providing a non-generic function type explicitly. +// List t4b, // Error, +// ^ +// +// pkg/front_end/testcases/generic_metadata/alias_from_opt_in.dart:24:17: Error: Generic function type 'void Function(T)' inferred as a type argument. +// Try providing a non-generic function type explicitly. +// void Function(T4) t4c, // Error +// ^ +// +// pkg/front_end/testcases/generic_metadata/alias_from_opt_in.dart:25:22: Error: Generic function type 'void Function(T)' inferred as a type argument. +// Try providing a non-generic function type explicitly. +// void Function(List) t4d, // Error +// ^ +// +// pkg/front_end/testcases/generic_metadata/alias_from_opt_in.dart:18:3: Error: Generic function type 'List(T)>' used as a type argument through typedef 'T3'. +// - 'List' is from 'dart:core'. +// Try providing a non-generic function type explicitly. +// T3 t3a, // Error +// ^ +// +// pkg/front_end/testcases/generic_metadata/alias_from_opt_in.dart:19:8: Error: Generic function type 'List(T)>' used as a type argument through typedef 'T3'. +// - 'List' is from 'dart:core'. +// Try providing a non-generic function type explicitly. +// List t3b, // Error +// ^ +// +// pkg/front_end/testcases/generic_metadata/alias_from_opt_in.dart:20:17: Error: Generic function type 'List(T)>' used as a type argument through typedef 'T3'. +// - 'List' is from 'dart:core'. +// Try providing a non-generic function type explicitly. +// void Function(T3) t3c, // Error +// ^ +// +// pkg/front_end/testcases/generic_metadata/alias_from_opt_in.dart:21:22: Error: Generic function type 'List(T)>' used as a type argument through typedef 'T3'. +// - 'List' is from 'dart:core'. +// Try providing a non-generic function type explicitly. +// void Function(List) t3d, // Error +// ^ +// +// pkg/front_end/testcases/generic_metadata/alias_from_opt_in.dart:27:7: Error: Generic function type 'void Function(T)' inferred as a type argument. +// Try providing a non-generic function type explicitly. +// new T4(); // Error +// ^ +// +// pkg/front_end/testcases/generic_metadata/alias_from_opt_in.dart:28:4: Error: Generic function type 'void Function(T)' inferred as a type argument. +// Try providing a non-generic function type explicitly. +// []; // Error +// ^ +// +// pkg/front_end/testcases/generic_metadata/alias_from_opt_in.dart:29:18: Error: Generic function type 'void Function(T)' inferred as a type argument. +// Try providing a non-generic function type explicitly. +// []; // Error +// ^ +// +// pkg/front_end/testcases/generic_metadata/alias_from_opt_in.dart:30:23: Error: Generic function type 'void Function(T)' inferred as a type argument. +// Try providing a non-generic function type explicitly. +// )>[]; // Error +// ^ +// +import self as self; +import "dart:core" as core; +import "alias_from_opt_in_lib.dart" as ali; + +import "org-dartlang-testcase:///alias_from_opt_in_lib.dart"; + +static method test((T%) → void t1a, core::List<(T%) → void> t1b, ((T%) → void) → void t1c, (core::List<(T%) → void>) → void t1d, ((T%) → void) → void t2a, core::List<((T%) → void) → void> t2b, (((T%) → void) → void) → void t2c, (core::List<((T%) → void) → void>) → void t2d, core::List<(T%) → void> t3a, core::List(T%) → void>> t3b, (core::List<(T%) → void>) → void t3c, (core::List(T%) → void>>) → void t3d, ali::Class<(T%) → void> t4a, core::List(T%) → void>> t4b, (ali::Class<(T%) → void>) → void t4c, (core::List(T%) → void>>) → void t4d) → dynamic { + new ali::Class::•<(T%) → void>(); + (T%) → void>>[]; + <(ali::Class<(T%) → void>) → void>[]; + <(core::List(T%) → void>>) → void>[]; +} +static method main() → dynamic {} + +library /*isNonNullableByDefault*/; +import self as ali; +import "dart:core" as core; + +typedef T1 = (T%) → void; +typedef T2 = ((T%) → void) → void; +typedef T3 = core::List<(T%) → void>; +typedef T4(T%) → void> = ali::Class; +class Class extends core::Object { + synthetic constructor •() → ali::Class + : super core::Object::•() + ; +} +static method test((T%) → void t1, (T%) → void t2, core::List<(T%) → void> t3) → dynamic { + new ali::Class::•<(T%) → void>(); +} +static method _#T4#new#tearOff(T%) → void>() → ali::Class + return new ali::Class::•(); diff --git a/pkg/front_end/testcases/generic_metadata/alias_from_opt_in.dart.strong.transformed.expect b/pkg/front_end/testcases/generic_metadata/alias_from_opt_in.dart.strong.transformed.expect new file mode 100644 index 00000000000..0ef06739e80 --- /dev/null +++ b/pkg/front_end/testcases/generic_metadata/alias_from_opt_in.dart.strong.transformed.expect @@ -0,0 +1,110 @@ +library /*isNonNullableByDefault*/; +// +// Problems in library: +// +// pkg/front_end/testcases/generic_metadata/alias_from_opt_in.dart:11:3: Error: A generic function type can't be used as a type argument. +// Try using a non-generic function type. +// List t1b, // Error +// ^ +// +// pkg/front_end/testcases/generic_metadata/alias_from_opt_in.dart:13:17: Error: A generic function type can't be used as a type argument. +// Try using a non-generic function type. +// void Function(List) t1d, // Error +// ^ +// +// pkg/front_end/testcases/generic_metadata/alias_from_opt_in.dart:22:3: Error: Generic function type 'void Function(T)' inferred as a type argument. +// Try providing a non-generic function type explicitly. +// T4 t4a, // Error, +// ^ +// +// pkg/front_end/testcases/generic_metadata/alias_from_opt_in.dart:23:8: Error: Generic function type 'void Function(T)' inferred as a type argument. +// Try providing a non-generic function type explicitly. +// List t4b, // Error, +// ^ +// +// pkg/front_end/testcases/generic_metadata/alias_from_opt_in.dart:24:17: Error: Generic function type 'void Function(T)' inferred as a type argument. +// Try providing a non-generic function type explicitly. +// void Function(T4) t4c, // Error +// ^ +// +// pkg/front_end/testcases/generic_metadata/alias_from_opt_in.dart:25:22: Error: Generic function type 'void Function(T)' inferred as a type argument. +// Try providing a non-generic function type explicitly. +// void Function(List) t4d, // Error +// ^ +// +// pkg/front_end/testcases/generic_metadata/alias_from_opt_in.dart:18:3: Error: Generic function type 'List(T)>' used as a type argument through typedef 'T3'. +// - 'List' is from 'dart:core'. +// Try providing a non-generic function type explicitly. +// T3 t3a, // Error +// ^ +// +// pkg/front_end/testcases/generic_metadata/alias_from_opt_in.dart:19:8: Error: Generic function type 'List(T)>' used as a type argument through typedef 'T3'. +// - 'List' is from 'dart:core'. +// Try providing a non-generic function type explicitly. +// List t3b, // Error +// ^ +// +// pkg/front_end/testcases/generic_metadata/alias_from_opt_in.dart:20:17: Error: Generic function type 'List(T)>' used as a type argument through typedef 'T3'. +// - 'List' is from 'dart:core'. +// Try providing a non-generic function type explicitly. +// void Function(T3) t3c, // Error +// ^ +// +// pkg/front_end/testcases/generic_metadata/alias_from_opt_in.dart:21:22: Error: Generic function type 'List(T)>' used as a type argument through typedef 'T3'. +// - 'List' is from 'dart:core'. +// Try providing a non-generic function type explicitly. +// void Function(List) t3d, // Error +// ^ +// +// pkg/front_end/testcases/generic_metadata/alias_from_opt_in.dart:27:7: Error: Generic function type 'void Function(T)' inferred as a type argument. +// Try providing a non-generic function type explicitly. +// new T4(); // Error +// ^ +// +// pkg/front_end/testcases/generic_metadata/alias_from_opt_in.dart:28:4: Error: Generic function type 'void Function(T)' inferred as a type argument. +// Try providing a non-generic function type explicitly. +// []; // Error +// ^ +// +// pkg/front_end/testcases/generic_metadata/alias_from_opt_in.dart:29:18: Error: Generic function type 'void Function(T)' inferred as a type argument. +// Try providing a non-generic function type explicitly. +// []; // Error +// ^ +// +// pkg/front_end/testcases/generic_metadata/alias_from_opt_in.dart:30:23: Error: Generic function type 'void Function(T)' inferred as a type argument. +// Try providing a non-generic function type explicitly. +// )>[]; // Error +// ^ +// +import self as self; +import "dart:core" as core; +import "alias_from_opt_in_lib.dart" as ali; + +import "org-dartlang-testcase:///alias_from_opt_in_lib.dart"; + +static method test((T%) → void t1a, core::List<(T%) → void> t1b, ((T%) → void) → void t1c, (core::List<(T%) → void>) → void t1d, ((T%) → void) → void t2a, core::List<((T%) → void) → void> t2b, (((T%) → void) → void) → void t2c, (core::List<((T%) → void) → void>) → void t2d, core::List<(T%) → void> t3a, core::List(T%) → void>> t3b, (core::List<(T%) → void>) → void t3c, (core::List(T%) → void>>) → void t3d, ali::Class<(T%) → void> t4a, core::List(T%) → void>> t4b, (ali::Class<(T%) → void>) → void t4c, (core::List(T%) → void>>) → void t4d) → dynamic { + new ali::Class::•<(T%) → void>(); + core::_GrowableList::•(T%) → void>>(0); + core::_GrowableList::•<(ali::Class<(T%) → void>) → void>(0); + core::_GrowableList::•<(core::List(T%) → void>>) → void>(0); +} +static method main() → dynamic {} + +library /*isNonNullableByDefault*/; +import self as ali; +import "dart:core" as core; + +typedef T1 = (T%) → void; +typedef T2 = ((T%) → void) → void; +typedef T3 = core::List<(T%) → void>; +typedef T4(T%) → void> = ali::Class; +class Class extends core::Object { + synthetic constructor •() → ali::Class + : super core::Object::•() + ; +} +static method test((T%) → void t1, (T%) → void t2, core::List<(T%) → void> t3) → dynamic { + new ali::Class::•<(T%) → void>(); +} +static method _#T4#new#tearOff(T%) → void>() → ali::Class + return new ali::Class::•(); diff --git a/pkg/front_end/testcases/generic_metadata/alias_from_opt_in.dart.textual_outline.expect b/pkg/front_end/testcases/generic_metadata/alias_from_opt_in.dart.textual_outline.expect new file mode 100644 index 00000000000..bc7045b3b2a --- /dev/null +++ b/pkg/front_end/testcases/generic_metadata/alias_from_opt_in.dart.textual_outline.expect @@ -0,0 +1,22 @@ +// @dart = 2.12 +import 'alias_from_opt_in_lib.dart'; + +test( + T1 t1a, + List t1b, + void Function(T1) t1c, + void Function(List) t1d, + T2 t2a, + List t2b, + void Function(T2) t2c, + void Function(List) t2d, + T3 t3a, + List t3b, + void Function(T3) t3c, + void Function(List) t3d, + T4 t4a, + List t4b, + void Function(T4) t4c, + void Function(List) t4d, +) {} +main() {} diff --git a/pkg/front_end/testcases/generic_metadata/alias_from_opt_in.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/generic_metadata/alias_from_opt_in.dart.textual_outline_modelled.expect new file mode 100644 index 00000000000..803b7714f19 --- /dev/null +++ b/pkg/front_end/testcases/generic_metadata/alias_from_opt_in.dart.textual_outline_modelled.expect @@ -0,0 +1,22 @@ +// @dart = 2.12 +import 'alias_from_opt_in_lib.dart'; + +main() {} +test( + T1 t1a, + List t1b, + void Function(T1) t1c, + void Function(List) t1d, + T2 t2a, + List t2b, + void Function(T2) t2c, + void Function(List) t2d, + T3 t3a, + List t3b, + void Function(T3) t3c, + void Function(List) t3d, + T4 t4a, + List t4b, + void Function(T4) t4c, + void Function(List) t4d, +) {} diff --git a/pkg/front_end/testcases/generic_metadata/alias_from_opt_in.dart.weak.expect b/pkg/front_end/testcases/generic_metadata/alias_from_opt_in.dart.weak.expect new file mode 100644 index 00000000000..046ad771f1d --- /dev/null +++ b/pkg/front_end/testcases/generic_metadata/alias_from_opt_in.dart.weak.expect @@ -0,0 +1,110 @@ +library /*isNonNullableByDefault*/; +// +// Problems in library: +// +// pkg/front_end/testcases/generic_metadata/alias_from_opt_in.dart:11:3: Error: A generic function type can't be used as a type argument. +// Try using a non-generic function type. +// List t1b, // Error +// ^ +// +// pkg/front_end/testcases/generic_metadata/alias_from_opt_in.dart:13:17: Error: A generic function type can't be used as a type argument. +// Try using a non-generic function type. +// void Function(List) t1d, // Error +// ^ +// +// pkg/front_end/testcases/generic_metadata/alias_from_opt_in.dart:22:3: Error: Generic function type 'void Function(T)' inferred as a type argument. +// Try providing a non-generic function type explicitly. +// T4 t4a, // Error, +// ^ +// +// pkg/front_end/testcases/generic_metadata/alias_from_opt_in.dart:23:8: Error: Generic function type 'void Function(T)' inferred as a type argument. +// Try providing a non-generic function type explicitly. +// List t4b, // Error, +// ^ +// +// pkg/front_end/testcases/generic_metadata/alias_from_opt_in.dart:24:17: Error: Generic function type 'void Function(T)' inferred as a type argument. +// Try providing a non-generic function type explicitly. +// void Function(T4) t4c, // Error +// ^ +// +// pkg/front_end/testcases/generic_metadata/alias_from_opt_in.dart:25:22: Error: Generic function type 'void Function(T)' inferred as a type argument. +// Try providing a non-generic function type explicitly. +// void Function(List) t4d, // Error +// ^ +// +// pkg/front_end/testcases/generic_metadata/alias_from_opt_in.dart:18:3: Error: Generic function type 'List(T)>' used as a type argument through typedef 'T3'. +// - 'List' is from 'dart:core'. +// Try providing a non-generic function type explicitly. +// T3 t3a, // Error +// ^ +// +// pkg/front_end/testcases/generic_metadata/alias_from_opt_in.dart:19:8: Error: Generic function type 'List(T)>' used as a type argument through typedef 'T3'. +// - 'List' is from 'dart:core'. +// Try providing a non-generic function type explicitly. +// List t3b, // Error +// ^ +// +// pkg/front_end/testcases/generic_metadata/alias_from_opt_in.dart:20:17: Error: Generic function type 'List(T)>' used as a type argument through typedef 'T3'. +// - 'List' is from 'dart:core'. +// Try providing a non-generic function type explicitly. +// void Function(T3) t3c, // Error +// ^ +// +// pkg/front_end/testcases/generic_metadata/alias_from_opt_in.dart:21:22: Error: Generic function type 'List(T)>' used as a type argument through typedef 'T3'. +// - 'List' is from 'dart:core'. +// Try providing a non-generic function type explicitly. +// void Function(List) t3d, // Error +// ^ +// +// pkg/front_end/testcases/generic_metadata/alias_from_opt_in.dart:27:7: Error: Generic function type 'void Function(T)' inferred as a type argument. +// Try providing a non-generic function type explicitly. +// new T4(); // Error +// ^ +// +// pkg/front_end/testcases/generic_metadata/alias_from_opt_in.dart:28:4: Error: Generic function type 'void Function(T)' inferred as a type argument. +// Try providing a non-generic function type explicitly. +// []; // Error +// ^ +// +// pkg/front_end/testcases/generic_metadata/alias_from_opt_in.dart:29:18: Error: Generic function type 'void Function(T)' inferred as a type argument. +// Try providing a non-generic function type explicitly. +// []; // Error +// ^ +// +// pkg/front_end/testcases/generic_metadata/alias_from_opt_in.dart:30:23: Error: Generic function type 'void Function(T)' inferred as a type argument. +// Try providing a non-generic function type explicitly. +// )>[]; // Error +// ^ +// +import self as self; +import "dart:core" as core; +import "alias_from_opt_in_lib.dart" as ali; + +import "org-dartlang-testcase:///alias_from_opt_in_lib.dart"; + +static method test((T%) → void t1a, core::List<(T%) → void> t1b, ((T%) → void) → void t1c, (core::List<(T%) → void>) → void t1d, ((T%) → void) → void t2a, core::List<((T%) → void) → void> t2b, (((T%) → void) → void) → void t2c, (core::List<((T%) → void) → void>) → void t2d, core::List<(T%) → void> t3a, core::List(T%) → void>> t3b, (core::List<(T%) → void>) → void t3c, (core::List(T%) → void>>) → void t3d, ali::Class<(T%) → void> t4a, core::List(T%) → void>> t4b, (ali::Class<(T%) → void>) → void t4c, (core::List(T%) → void>>) → void t4d) → dynamic { + new ali::Class::•<(T%) → void>(); + (T%) → void>>[]; + <(ali::Class<(T%) → void>) → void>[]; + <(core::List(T%) → void>>) → void>[]; +} +static method main() → dynamic {} + +library /*isNonNullableByDefault*/; +import self as ali; +import "dart:core" as core; + +typedef T1 = (T%) → void; +typedef T2 = ((T%) → void) → void; +typedef T3 = core::List<(T%) → void>; +typedef T4(T%) → void> = ali::Class; +class Class extends core::Object { + synthetic constructor •() → ali::Class + : super core::Object::•() + ; +} +static method test((T%) → void t1, (T%) → void t2, core::List<(T%) → void> t3) → dynamic { + new ali::Class::•<(T%) → void>(); +} +static method _#T4#new#tearOff(T%) → void>() → ali::Class + return new ali::Class::•(); diff --git a/pkg/front_end/testcases/generic_metadata/alias_from_opt_in.dart.weak.modular.expect b/pkg/front_end/testcases/generic_metadata/alias_from_opt_in.dart.weak.modular.expect new file mode 100644 index 00000000000..046ad771f1d --- /dev/null +++ b/pkg/front_end/testcases/generic_metadata/alias_from_opt_in.dart.weak.modular.expect @@ -0,0 +1,110 @@ +library /*isNonNullableByDefault*/; +// +// Problems in library: +// +// pkg/front_end/testcases/generic_metadata/alias_from_opt_in.dart:11:3: Error: A generic function type can't be used as a type argument. +// Try using a non-generic function type. +// List t1b, // Error +// ^ +// +// pkg/front_end/testcases/generic_metadata/alias_from_opt_in.dart:13:17: Error: A generic function type can't be used as a type argument. +// Try using a non-generic function type. +// void Function(List) t1d, // Error +// ^ +// +// pkg/front_end/testcases/generic_metadata/alias_from_opt_in.dart:22:3: Error: Generic function type 'void Function(T)' inferred as a type argument. +// Try providing a non-generic function type explicitly. +// T4 t4a, // Error, +// ^ +// +// pkg/front_end/testcases/generic_metadata/alias_from_opt_in.dart:23:8: Error: Generic function type 'void Function(T)' inferred as a type argument. +// Try providing a non-generic function type explicitly. +// List t4b, // Error, +// ^ +// +// pkg/front_end/testcases/generic_metadata/alias_from_opt_in.dart:24:17: Error: Generic function type 'void Function(T)' inferred as a type argument. +// Try providing a non-generic function type explicitly. +// void Function(T4) t4c, // Error +// ^ +// +// pkg/front_end/testcases/generic_metadata/alias_from_opt_in.dart:25:22: Error: Generic function type 'void Function(T)' inferred as a type argument. +// Try providing a non-generic function type explicitly. +// void Function(List) t4d, // Error +// ^ +// +// pkg/front_end/testcases/generic_metadata/alias_from_opt_in.dart:18:3: Error: Generic function type 'List(T)>' used as a type argument through typedef 'T3'. +// - 'List' is from 'dart:core'. +// Try providing a non-generic function type explicitly. +// T3 t3a, // Error +// ^ +// +// pkg/front_end/testcases/generic_metadata/alias_from_opt_in.dart:19:8: Error: Generic function type 'List(T)>' used as a type argument through typedef 'T3'. +// - 'List' is from 'dart:core'. +// Try providing a non-generic function type explicitly. +// List t3b, // Error +// ^ +// +// pkg/front_end/testcases/generic_metadata/alias_from_opt_in.dart:20:17: Error: Generic function type 'List(T)>' used as a type argument through typedef 'T3'. +// - 'List' is from 'dart:core'. +// Try providing a non-generic function type explicitly. +// void Function(T3) t3c, // Error +// ^ +// +// pkg/front_end/testcases/generic_metadata/alias_from_opt_in.dart:21:22: Error: Generic function type 'List(T)>' used as a type argument through typedef 'T3'. +// - 'List' is from 'dart:core'. +// Try providing a non-generic function type explicitly. +// void Function(List) t3d, // Error +// ^ +// +// pkg/front_end/testcases/generic_metadata/alias_from_opt_in.dart:27:7: Error: Generic function type 'void Function(T)' inferred as a type argument. +// Try providing a non-generic function type explicitly. +// new T4(); // Error +// ^ +// +// pkg/front_end/testcases/generic_metadata/alias_from_opt_in.dart:28:4: Error: Generic function type 'void Function(T)' inferred as a type argument. +// Try providing a non-generic function type explicitly. +// []; // Error +// ^ +// +// pkg/front_end/testcases/generic_metadata/alias_from_opt_in.dart:29:18: Error: Generic function type 'void Function(T)' inferred as a type argument. +// Try providing a non-generic function type explicitly. +// []; // Error +// ^ +// +// pkg/front_end/testcases/generic_metadata/alias_from_opt_in.dart:30:23: Error: Generic function type 'void Function(T)' inferred as a type argument. +// Try providing a non-generic function type explicitly. +// )>[]; // Error +// ^ +// +import self as self; +import "dart:core" as core; +import "alias_from_opt_in_lib.dart" as ali; + +import "org-dartlang-testcase:///alias_from_opt_in_lib.dart"; + +static method test((T%) → void t1a, core::List<(T%) → void> t1b, ((T%) → void) → void t1c, (core::List<(T%) → void>) → void t1d, ((T%) → void) → void t2a, core::List<((T%) → void) → void> t2b, (((T%) → void) → void) → void t2c, (core::List<((T%) → void) → void>) → void t2d, core::List<(T%) → void> t3a, core::List(T%) → void>> t3b, (core::List<(T%) → void>) → void t3c, (core::List(T%) → void>>) → void t3d, ali::Class<(T%) → void> t4a, core::List(T%) → void>> t4b, (ali::Class<(T%) → void>) → void t4c, (core::List(T%) → void>>) → void t4d) → dynamic { + new ali::Class::•<(T%) → void>(); + (T%) → void>>[]; + <(ali::Class<(T%) → void>) → void>[]; + <(core::List(T%) → void>>) → void>[]; +} +static method main() → dynamic {} + +library /*isNonNullableByDefault*/; +import self as ali; +import "dart:core" as core; + +typedef T1 = (T%) → void; +typedef T2 = ((T%) → void) → void; +typedef T3 = core::List<(T%) → void>; +typedef T4(T%) → void> = ali::Class; +class Class extends core::Object { + synthetic constructor •() → ali::Class + : super core::Object::•() + ; +} +static method test((T%) → void t1, (T%) → void t2, core::List<(T%) → void> t3) → dynamic { + new ali::Class::•<(T%) → void>(); +} +static method _#T4#new#tearOff(T%) → void>() → ali::Class + return new ali::Class::•(); diff --git a/pkg/front_end/testcases/generic_metadata/alias_from_opt_in.dart.weak.outline.expect b/pkg/front_end/testcases/generic_metadata/alias_from_opt_in.dart.weak.outline.expect new file mode 100644 index 00000000000..08796caae68 --- /dev/null +++ b/pkg/front_end/testcases/generic_metadata/alias_from_opt_in.dart.weak.outline.expect @@ -0,0 +1,85 @@ +library /*isNonNullableByDefault*/; +// +// Problems in library: +// +// pkg/front_end/testcases/generic_metadata/alias_from_opt_in.dart:11:3: Error: A generic function type can't be used as a type argument. +// Try using a non-generic function type. +// List t1b, // Error +// ^ +// +// pkg/front_end/testcases/generic_metadata/alias_from_opt_in.dart:13:17: Error: A generic function type can't be used as a type argument. +// Try using a non-generic function type. +// void Function(List) t1d, // Error +// ^ +// +// pkg/front_end/testcases/generic_metadata/alias_from_opt_in.dart:22:3: Error: Generic function type 'void Function(T)' inferred as a type argument. +// Try providing a non-generic function type explicitly. +// T4 t4a, // Error, +// ^ +// +// pkg/front_end/testcases/generic_metadata/alias_from_opt_in.dart:23:8: Error: Generic function type 'void Function(T)' inferred as a type argument. +// Try providing a non-generic function type explicitly. +// List t4b, // Error, +// ^ +// +// pkg/front_end/testcases/generic_metadata/alias_from_opt_in.dart:24:17: Error: Generic function type 'void Function(T)' inferred as a type argument. +// Try providing a non-generic function type explicitly. +// void Function(T4) t4c, // Error +// ^ +// +// pkg/front_end/testcases/generic_metadata/alias_from_opt_in.dart:25:22: Error: Generic function type 'void Function(T)' inferred as a type argument. +// Try providing a non-generic function type explicitly. +// void Function(List) t4d, // Error +// ^ +// +// pkg/front_end/testcases/generic_metadata/alias_from_opt_in.dart:18:3: Error: Generic function type 'List(T)>' used as a type argument through typedef 'T3'. +// - 'List' is from 'dart:core'. +// Try providing a non-generic function type explicitly. +// T3 t3a, // Error +// ^ +// +// pkg/front_end/testcases/generic_metadata/alias_from_opt_in.dart:19:8: Error: Generic function type 'List(T)>' used as a type argument through typedef 'T3'. +// - 'List' is from 'dart:core'. +// Try providing a non-generic function type explicitly. +// List t3b, // Error +// ^ +// +// pkg/front_end/testcases/generic_metadata/alias_from_opt_in.dart:20:17: Error: Generic function type 'List(T)>' used as a type argument through typedef 'T3'. +// - 'List' is from 'dart:core'. +// Try providing a non-generic function type explicitly. +// void Function(T3) t3c, // Error +// ^ +// +// pkg/front_end/testcases/generic_metadata/alias_from_opt_in.dart:21:22: Error: Generic function type 'List(T)>' used as a type argument through typedef 'T3'. +// - 'List' is from 'dart:core'. +// Try providing a non-generic function type explicitly. +// void Function(List) t3d, // Error +// ^ +// +import self as self; +import "dart:core" as core; +import "alias_from_opt_in_lib.dart" as ali; + +import "org-dartlang-testcase:///alias_from_opt_in_lib.dart"; + +static method test((T%) → void t1a, core::List<(T%) → void> t1b, ((T%) → void) → void t1c, (core::List<(T%) → void>) → void t1d, ((T%) → void) → void t2a, core::List<((T%) → void) → void> t2b, (((T%) → void) → void) → void t2c, (core::List<((T%) → void) → void>) → void t2d, core::List<(T%) → void> t3a, core::List(T%) → void>> t3b, (core::List<(T%) → void>) → void t3c, (core::List(T%) → void>>) → void t3d, ali::Class<(T%) → void> t4a, core::List(T%) → void>> t4b, (ali::Class<(T%) → void>) → void t4c, (core::List(T%) → void>>) → void t4d) → dynamic + ; +static method main() → dynamic + ; + +library /*isNonNullableByDefault*/; +import self as ali; +import "dart:core" as core; + +typedef T1 = (T%) → void; +typedef T2 = ((T%) → void) → void; +typedef T3 = core::List<(T%) → void>; +typedef T4(T%) → void> = ali::Class; +class Class extends core::Object { + synthetic constructor •() → ali::Class + ; +} +static method test((T%) → void t1, (T%) → void t2, core::List<(T%) → void> t3) → dynamic + ; +static method _#T4#new#tearOff(T%) → void>() → ali::Class + return new ali::Class::•(); diff --git a/pkg/front_end/testcases/generic_metadata/alias_from_opt_in.dart.weak.transformed.expect b/pkg/front_end/testcases/generic_metadata/alias_from_opt_in.dart.weak.transformed.expect new file mode 100644 index 00000000000..0ef06739e80 --- /dev/null +++ b/pkg/front_end/testcases/generic_metadata/alias_from_opt_in.dart.weak.transformed.expect @@ -0,0 +1,110 @@ +library /*isNonNullableByDefault*/; +// +// Problems in library: +// +// pkg/front_end/testcases/generic_metadata/alias_from_opt_in.dart:11:3: Error: A generic function type can't be used as a type argument. +// Try using a non-generic function type. +// List t1b, // Error +// ^ +// +// pkg/front_end/testcases/generic_metadata/alias_from_opt_in.dart:13:17: Error: A generic function type can't be used as a type argument. +// Try using a non-generic function type. +// void Function(List) t1d, // Error +// ^ +// +// pkg/front_end/testcases/generic_metadata/alias_from_opt_in.dart:22:3: Error: Generic function type 'void Function(T)' inferred as a type argument. +// Try providing a non-generic function type explicitly. +// T4 t4a, // Error, +// ^ +// +// pkg/front_end/testcases/generic_metadata/alias_from_opt_in.dart:23:8: Error: Generic function type 'void Function(T)' inferred as a type argument. +// Try providing a non-generic function type explicitly. +// List t4b, // Error, +// ^ +// +// pkg/front_end/testcases/generic_metadata/alias_from_opt_in.dart:24:17: Error: Generic function type 'void Function(T)' inferred as a type argument. +// Try providing a non-generic function type explicitly. +// void Function(T4) t4c, // Error +// ^ +// +// pkg/front_end/testcases/generic_metadata/alias_from_opt_in.dart:25:22: Error: Generic function type 'void Function(T)' inferred as a type argument. +// Try providing a non-generic function type explicitly. +// void Function(List) t4d, // Error +// ^ +// +// pkg/front_end/testcases/generic_metadata/alias_from_opt_in.dart:18:3: Error: Generic function type 'List(T)>' used as a type argument through typedef 'T3'. +// - 'List' is from 'dart:core'. +// Try providing a non-generic function type explicitly. +// T3 t3a, // Error +// ^ +// +// pkg/front_end/testcases/generic_metadata/alias_from_opt_in.dart:19:8: Error: Generic function type 'List(T)>' used as a type argument through typedef 'T3'. +// - 'List' is from 'dart:core'. +// Try providing a non-generic function type explicitly. +// List t3b, // Error +// ^ +// +// pkg/front_end/testcases/generic_metadata/alias_from_opt_in.dart:20:17: Error: Generic function type 'List(T)>' used as a type argument through typedef 'T3'. +// - 'List' is from 'dart:core'. +// Try providing a non-generic function type explicitly. +// void Function(T3) t3c, // Error +// ^ +// +// pkg/front_end/testcases/generic_metadata/alias_from_opt_in.dart:21:22: Error: Generic function type 'List(T)>' used as a type argument through typedef 'T3'. +// - 'List' is from 'dart:core'. +// Try providing a non-generic function type explicitly. +// void Function(List) t3d, // Error +// ^ +// +// pkg/front_end/testcases/generic_metadata/alias_from_opt_in.dart:27:7: Error: Generic function type 'void Function(T)' inferred as a type argument. +// Try providing a non-generic function type explicitly. +// new T4(); // Error +// ^ +// +// pkg/front_end/testcases/generic_metadata/alias_from_opt_in.dart:28:4: Error: Generic function type 'void Function(T)' inferred as a type argument. +// Try providing a non-generic function type explicitly. +// []; // Error +// ^ +// +// pkg/front_end/testcases/generic_metadata/alias_from_opt_in.dart:29:18: Error: Generic function type 'void Function(T)' inferred as a type argument. +// Try providing a non-generic function type explicitly. +// []; // Error +// ^ +// +// pkg/front_end/testcases/generic_metadata/alias_from_opt_in.dart:30:23: Error: Generic function type 'void Function(T)' inferred as a type argument. +// Try providing a non-generic function type explicitly. +// )>[]; // Error +// ^ +// +import self as self; +import "dart:core" as core; +import "alias_from_opt_in_lib.dart" as ali; + +import "org-dartlang-testcase:///alias_from_opt_in_lib.dart"; + +static method test((T%) → void t1a, core::List<(T%) → void> t1b, ((T%) → void) → void t1c, (core::List<(T%) → void>) → void t1d, ((T%) → void) → void t2a, core::List<((T%) → void) → void> t2b, (((T%) → void) → void) → void t2c, (core::List<((T%) → void) → void>) → void t2d, core::List<(T%) → void> t3a, core::List(T%) → void>> t3b, (core::List<(T%) → void>) → void t3c, (core::List(T%) → void>>) → void t3d, ali::Class<(T%) → void> t4a, core::List(T%) → void>> t4b, (ali::Class<(T%) → void>) → void t4c, (core::List(T%) → void>>) → void t4d) → dynamic { + new ali::Class::•<(T%) → void>(); + core::_GrowableList::•(T%) → void>>(0); + core::_GrowableList::•<(ali::Class<(T%) → void>) → void>(0); + core::_GrowableList::•<(core::List(T%) → void>>) → void>(0); +} +static method main() → dynamic {} + +library /*isNonNullableByDefault*/; +import self as ali; +import "dart:core" as core; + +typedef T1 = (T%) → void; +typedef T2 = ((T%) → void) → void; +typedef T3 = core::List<(T%) → void>; +typedef T4(T%) → void> = ali::Class; +class Class extends core::Object { + synthetic constructor •() → ali::Class + : super core::Object::•() + ; +} +static method test((T%) → void t1, (T%) → void t2, core::List<(T%) → void> t3) → dynamic { + new ali::Class::•<(T%) → void>(); +} +static method _#T4#new#tearOff(T%) → void>() → ali::Class + return new ali::Class::•(); diff --git a/pkg/front_end/testcases/generic_metadata/alias_from_opt_in_lib.dart b/pkg/front_end/testcases/generic_metadata/alias_from_opt_in_lib.dart new file mode 100644 index 00000000000..b1b273a0ad2 --- /dev/null +++ b/pkg/front_end/testcases/generic_metadata/alias_from_opt_in_lib.dart @@ -0,0 +1,18 @@ +// Copyright (c) 2022, 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. + +class Class {} + +typedef T1 = void Function(T); +typedef T2 = void Function(void Function(T)); +typedef T3 = List(T)>; +typedef T4(T)> = Class; + +test( + T1 t1, // Ok + T1 t2, // Ok + T3 t3, // Ok +) { + new T4(); // Ok +} diff --git a/pkg/front_end/testcases/inference/constructors_infer_from_arguments_argument_not_assignable.dart.weak.expect b/pkg/front_end/testcases/inference/constructors_infer_from_arguments_argument_not_assignable.dart.weak.expect index 3ed0854f5fa..cdeaa4870d5 100644 --- a/pkg/front_end/testcases/inference/constructors_infer_from_arguments_argument_not_assignable.dart.weak.expect +++ b/pkg/front_end/testcases/inference/constructors_infer_from_arguments_argument_not_assignable.dart.weak.expect @@ -12,16 +12,6 @@ library test; // class C { // ^ // -// pkg/front_end/testcases/inference/constructors_infer_from_arguments_argument_not_assignable.dart:21:29: Error: Inferred type argument 'NotA' doesn't conform to the bound 'A' of the type variable 'T' on 'C'. -// - 'NotA' is from 'pkg/front_end/testcases/inference/constructors_infer_from_arguments_argument_not_assignable.dart'. -// - 'A' is from 'pkg/front_end/testcases/inference/constructors_infer_from_arguments_argument_not_assignable.dart'. -// Try specifying type arguments explicitly so that they conform to the bounds. -// var /*@ type=C* */ x = -// ^ -// pkg/front_end/testcases/inference/constructors_infer_from_arguments_argument_not_assignable.dart:12:9: Context: This is the type variable whose bound isn't conformed to. -// class C { -// ^ -// import self as self; import "dart:core" as core; diff --git a/pkg/front_end/testcases/inference/constructors_infer_from_arguments_argument_not_assignable.dart.weak.modular.expect b/pkg/front_end/testcases/inference/constructors_infer_from_arguments_argument_not_assignable.dart.weak.modular.expect index 3ed0854f5fa..cdeaa4870d5 100644 --- a/pkg/front_end/testcases/inference/constructors_infer_from_arguments_argument_not_assignable.dart.weak.modular.expect +++ b/pkg/front_end/testcases/inference/constructors_infer_from_arguments_argument_not_assignable.dart.weak.modular.expect @@ -12,16 +12,6 @@ library test; // class C { // ^ // -// pkg/front_end/testcases/inference/constructors_infer_from_arguments_argument_not_assignable.dart:21:29: Error: Inferred type argument 'NotA' doesn't conform to the bound 'A' of the type variable 'T' on 'C'. -// - 'NotA' is from 'pkg/front_end/testcases/inference/constructors_infer_from_arguments_argument_not_assignable.dart'. -// - 'A' is from 'pkg/front_end/testcases/inference/constructors_infer_from_arguments_argument_not_assignable.dart'. -// Try specifying type arguments explicitly so that they conform to the bounds. -// var /*@ type=C* */ x = -// ^ -// pkg/front_end/testcases/inference/constructors_infer_from_arguments_argument_not_assignable.dart:12:9: Context: This is the type variable whose bound isn't conformed to. -// class C { -// ^ -// import self as self; import "dart:core" as core; diff --git a/pkg/front_end/testcases/inference/mixin_inference_instantiate_to_bounds_3.dart.weak.expect b/pkg/front_end/testcases/inference/mixin_inference_instantiate_to_bounds_3.dart.weak.expect index 69d5022f72a..05a10e747f0 100644 --- a/pkg/front_end/testcases/inference/mixin_inference_instantiate_to_bounds_3.dart.weak.expect +++ b/pkg/front_end/testcases/inference/mixin_inference_instantiate_to_bounds_3.dart.weak.expect @@ -2,11 +2,11 @@ library; // // Problems in library: // -// pkg/front_end/testcases/inference/mixin_inference_instantiate_to_bounds_3.dart:13:7: Error: Type argument 'Comparable' doesn't conform to the bound 'Comparable' of the type variable 'Y' on 'M0' in the supertype 'M0' of class 'M1 with M0'. +// pkg/front_end/testcases/inference/mixin_inference_instantiate_to_bounds_3.dart:13:25: Error: Inferred type argument 'Comparable' doesn't conform to the bound 'Comparable' of the type variable 'Y' on 'M0'. // - 'Comparable' is from 'dart:core'. -// Try changing type arguments so that they conform to the bounds. +// Try specifying type arguments explicitly so that they conform to the bounds. // class A extends M1 with M0 {} -// ^ +// ^ // pkg/front_end/testcases/inference/mixin_inference_instantiate_to_bounds_3.dart:7:13: Context: This is the type variable whose bound isn't conformed to. // class M0> extends I {} // ^ diff --git a/pkg/front_end/testcases/inference/mixin_inference_instantiate_to_bounds_3.dart.weak.modular.expect b/pkg/front_end/testcases/inference/mixin_inference_instantiate_to_bounds_3.dart.weak.modular.expect index 69d5022f72a..05a10e747f0 100644 --- a/pkg/front_end/testcases/inference/mixin_inference_instantiate_to_bounds_3.dart.weak.modular.expect +++ b/pkg/front_end/testcases/inference/mixin_inference_instantiate_to_bounds_3.dart.weak.modular.expect @@ -2,11 +2,11 @@ library; // // Problems in library: // -// pkg/front_end/testcases/inference/mixin_inference_instantiate_to_bounds_3.dart:13:7: Error: Type argument 'Comparable' doesn't conform to the bound 'Comparable' of the type variable 'Y' on 'M0' in the supertype 'M0' of class 'M1 with M0'. +// pkg/front_end/testcases/inference/mixin_inference_instantiate_to_bounds_3.dart:13:25: Error: Inferred type argument 'Comparable' doesn't conform to the bound 'Comparable' of the type variable 'Y' on 'M0'. // - 'Comparable' is from 'dart:core'. -// Try changing type arguments so that they conform to the bounds. +// Try specifying type arguments explicitly so that they conform to the bounds. // class A extends M1 with M0 {} -// ^ +// ^ // pkg/front_end/testcases/inference/mixin_inference_instantiate_to_bounds_3.dart:7:13: Context: This is the type variable whose bound isn't conformed to. // class M0> extends I {} // ^ diff --git a/pkg/front_end/testcases/inference/mixin_inference_instantiate_to_bounds_3.dart.weak.outline.expect b/pkg/front_end/testcases/inference/mixin_inference_instantiate_to_bounds_3.dart.weak.outline.expect index c88760924da..98c5c87219e 100644 --- a/pkg/front_end/testcases/inference/mixin_inference_instantiate_to_bounds_3.dart.weak.outline.expect +++ b/pkg/front_end/testcases/inference/mixin_inference_instantiate_to_bounds_3.dart.weak.outline.expect @@ -2,11 +2,11 @@ library; // // Problems in library: // -// pkg/front_end/testcases/inference/mixin_inference_instantiate_to_bounds_3.dart:13:7: Error: Type argument 'Comparable' doesn't conform to the bound 'Comparable' of the type variable 'Y' on 'M0' in the supertype 'M0' of class 'M1 with M0'. +// pkg/front_end/testcases/inference/mixin_inference_instantiate_to_bounds_3.dart:13:25: Error: Inferred type argument 'Comparable' doesn't conform to the bound 'Comparable' of the type variable 'Y' on 'M0'. // - 'Comparable' is from 'dart:core'. -// Try changing type arguments so that they conform to the bounds. +// Try specifying type arguments explicitly so that they conform to the bounds. // class A extends M1 with M0 {} -// ^ +// ^ // pkg/front_end/testcases/inference/mixin_inference_instantiate_to_bounds_3.dart:7:13: Context: This is the type variable whose bound isn't conformed to. // class M0> extends I {} // ^ diff --git a/pkg/front_end/testcases/inference/mixin_inference_instantiate_to_bounds_3.dart.weak.transformed.expect b/pkg/front_end/testcases/inference/mixin_inference_instantiate_to_bounds_3.dart.weak.transformed.expect index c133ecb6453..06c64231004 100644 --- a/pkg/front_end/testcases/inference/mixin_inference_instantiate_to_bounds_3.dart.weak.transformed.expect +++ b/pkg/front_end/testcases/inference/mixin_inference_instantiate_to_bounds_3.dart.weak.transformed.expect @@ -2,11 +2,11 @@ library; // // Problems in library: // -// pkg/front_end/testcases/inference/mixin_inference_instantiate_to_bounds_3.dart:13:7: Error: Type argument 'Comparable' doesn't conform to the bound 'Comparable' of the type variable 'Y' on 'M0' in the supertype 'M0' of class 'M1 with M0'. +// pkg/front_end/testcases/inference/mixin_inference_instantiate_to_bounds_3.dart:13:25: Error: Inferred type argument 'Comparable' doesn't conform to the bound 'Comparable' of the type variable 'Y' on 'M0'. // - 'Comparable' is from 'dart:core'. -// Try changing type arguments so that they conform to the bounds. +// Try specifying type arguments explicitly so that they conform to the bounds. // class A extends M1 with M0 {} -// ^ +// ^ // pkg/front_end/testcases/inference/mixin_inference_instantiate_to_bounds_3.dart:7:13: Context: This is the type variable whose bound isn't conformed to. // class M0> extends I {} // ^ diff --git a/pkg/front_end/testcases/modular.status b/pkg/front_end/testcases/modular.status index a3e7ee6676d..b2aa3a119d1 100644 --- a/pkg/front_end/testcases/modular.status +++ b/pkg/front_end/testcases/modular.status @@ -23,6 +23,7 @@ extension_types/type_variable_in_static_context: ExpectationFileMismatchSerializ extensions/extension_setter_error: TypeCheckError general/abstract_members: TypeCheckError general/bounded_implicit_instantiation: TypeCheckError +general/bounds_instances: TypeCheckError general/bug30695: TypeCheckError general/covariant_field: TypeCheckError general/crashes/crash_02/main: Crash diff --git a/pkg/front_end/testcases/nnbd/bounds_checks.dart.strong.expect b/pkg/front_end/testcases/nnbd/bounds_checks.dart.strong.expect index ab741a51c28..0926cb36aac 100644 --- a/pkg/front_end/testcases/nnbd/bounds_checks.dart.strong.expect +++ b/pkg/front_end/testcases/nnbd/bounds_checks.dart.strong.expect @@ -2,42 +2,42 @@ library /*isNonNullableByDefault*/; // // Problems in library: // -// pkg/front_end/testcases/nnbd/bounds_checks.dart:7:13: Error: Type argument 'num?' doesn't conform to the bound 'num' of the type variable 'X' on 'A'. -// Try changing type arguments so that they conform to the bounds. -// foo(A a) {} // Error -// ^ -// pkg/front_end/testcases/nnbd/bounds_checks.dart:5:9: Context: This is the type variable whose bound isn't conformed to. -// class A {} -// ^ -// -// pkg/front_end/testcases/nnbd/bounds_checks.dart:9:13: Error: Type argument 'num?' doesn't conform to the bound 'num' of the type variable 'X' on 'A' in the return type. -// Try changing type arguments so that they conform to the bounds. -// A? bar() {} // Error -// ^ -// pkg/front_end/testcases/nnbd/bounds_checks.dart:5:9: Context: This is the type variable whose bound isn't conformed to. -// class A {} -// ^ -// -// pkg/front_end/testcases/nnbd/bounds_checks.dart:11:5: Error: Type argument 'num?' doesn't conform to the bound 'num' of the type variable 'X' on 'A'. +// pkg/front_end/testcases/nnbd/bounds_checks.dart:11:15: Error: Type argument 'num?' doesn't conform to the bound 'num' of the type variable 'X' on 'A'. // Try changing type arguments so that they conform to the bounds. // baz>() {} // Error +// ^ +// pkg/front_end/testcases/nnbd/bounds_checks.dart:5:9: Context: This is the type variable whose bound isn't conformed to. +// class A {} +// ^ +// +// pkg/front_end/testcases/nnbd/bounds_checks.dart:15:19: Error: Type argument 'num?' doesn't conform to the bound 'num' of the type variable 'X' on 'A'. +// Try changing type arguments so that they conform to the bounds. +// class C> {} // Error +// ^ +// pkg/front_end/testcases/nnbd/bounds_checks.dart:5:9: Context: This is the type variable whose bound isn't conformed to. +// class A {} +// ^ +// +// pkg/front_end/testcases/nnbd/bounds_checks.dart:7:5: Error: Type argument 'num?' doesn't conform to the bound 'num' of the type variable 'X' on 'A'. +// Try changing type arguments so that they conform to the bounds. +// foo(A a) {} // Error // ^ // pkg/front_end/testcases/nnbd/bounds_checks.dart:5:9: Context: This is the type variable whose bound isn't conformed to. // class A {} // ^ // -// pkg/front_end/testcases/nnbd/bounds_checks.dart:13:7: Error: Type argument 'num?' doesn't conform to the bound 'num' of the type variable 'X' on 'A' in the supertype 'A' of class 'B'. +// pkg/front_end/testcases/nnbd/bounds_checks.dart:9:1: Error: Type argument 'num?' doesn't conform to the bound 'num' of the type variable 'X' on 'A'. // Try changing type arguments so that they conform to the bounds. -// class B extends A {} // Error -// ^ +// A? bar() {} // Error +// ^ // pkg/front_end/testcases/nnbd/bounds_checks.dart:5:9: Context: This is the type variable whose bound isn't conformed to. // class A {} // ^ // -// pkg/front_end/testcases/nnbd/bounds_checks.dart:15:9: Error: Type argument 'num?' doesn't conform to the bound 'num' of the type variable 'X' on 'A'. +// pkg/front_end/testcases/nnbd/bounds_checks.dart:13:17: Error: Type argument 'num?' doesn't conform to the bound 'num' of the type variable 'X' on 'A'. // Try changing type arguments so that they conform to the bounds. -// class C> {} // Error -// ^ +// class B extends A {} // Error +// ^ // pkg/front_end/testcases/nnbd/bounds_checks.dart:5:9: Context: This is the type variable whose bound isn't conformed to. // class A {} // ^ diff --git a/pkg/front_end/testcases/nnbd/bounds_checks.dart.strong.transformed.expect b/pkg/front_end/testcases/nnbd/bounds_checks.dart.strong.transformed.expect index ab741a51c28..0926cb36aac 100644 --- a/pkg/front_end/testcases/nnbd/bounds_checks.dart.strong.transformed.expect +++ b/pkg/front_end/testcases/nnbd/bounds_checks.dart.strong.transformed.expect @@ -2,42 +2,42 @@ library /*isNonNullableByDefault*/; // // Problems in library: // -// pkg/front_end/testcases/nnbd/bounds_checks.dart:7:13: Error: Type argument 'num?' doesn't conform to the bound 'num' of the type variable 'X' on 'A'. -// Try changing type arguments so that they conform to the bounds. -// foo(A a) {} // Error -// ^ -// pkg/front_end/testcases/nnbd/bounds_checks.dart:5:9: Context: This is the type variable whose bound isn't conformed to. -// class A {} -// ^ -// -// pkg/front_end/testcases/nnbd/bounds_checks.dart:9:13: Error: Type argument 'num?' doesn't conform to the bound 'num' of the type variable 'X' on 'A' in the return type. -// Try changing type arguments so that they conform to the bounds. -// A? bar() {} // Error -// ^ -// pkg/front_end/testcases/nnbd/bounds_checks.dart:5:9: Context: This is the type variable whose bound isn't conformed to. -// class A {} -// ^ -// -// pkg/front_end/testcases/nnbd/bounds_checks.dart:11:5: Error: Type argument 'num?' doesn't conform to the bound 'num' of the type variable 'X' on 'A'. +// pkg/front_end/testcases/nnbd/bounds_checks.dart:11:15: Error: Type argument 'num?' doesn't conform to the bound 'num' of the type variable 'X' on 'A'. // Try changing type arguments so that they conform to the bounds. // baz>() {} // Error +// ^ +// pkg/front_end/testcases/nnbd/bounds_checks.dart:5:9: Context: This is the type variable whose bound isn't conformed to. +// class A {} +// ^ +// +// pkg/front_end/testcases/nnbd/bounds_checks.dart:15:19: Error: Type argument 'num?' doesn't conform to the bound 'num' of the type variable 'X' on 'A'. +// Try changing type arguments so that they conform to the bounds. +// class C> {} // Error +// ^ +// pkg/front_end/testcases/nnbd/bounds_checks.dart:5:9: Context: This is the type variable whose bound isn't conformed to. +// class A {} +// ^ +// +// pkg/front_end/testcases/nnbd/bounds_checks.dart:7:5: Error: Type argument 'num?' doesn't conform to the bound 'num' of the type variable 'X' on 'A'. +// Try changing type arguments so that they conform to the bounds. +// foo(A a) {} // Error // ^ // pkg/front_end/testcases/nnbd/bounds_checks.dart:5:9: Context: This is the type variable whose bound isn't conformed to. // class A {} // ^ // -// pkg/front_end/testcases/nnbd/bounds_checks.dart:13:7: Error: Type argument 'num?' doesn't conform to the bound 'num' of the type variable 'X' on 'A' in the supertype 'A' of class 'B'. +// pkg/front_end/testcases/nnbd/bounds_checks.dart:9:1: Error: Type argument 'num?' doesn't conform to the bound 'num' of the type variable 'X' on 'A'. // Try changing type arguments so that they conform to the bounds. -// class B extends A {} // Error -// ^ +// A? bar() {} // Error +// ^ // pkg/front_end/testcases/nnbd/bounds_checks.dart:5:9: Context: This is the type variable whose bound isn't conformed to. // class A {} // ^ // -// pkg/front_end/testcases/nnbd/bounds_checks.dart:15:9: Error: Type argument 'num?' doesn't conform to the bound 'num' of the type variable 'X' on 'A'. +// pkg/front_end/testcases/nnbd/bounds_checks.dart:13:17: Error: Type argument 'num?' doesn't conform to the bound 'num' of the type variable 'X' on 'A'. // Try changing type arguments so that they conform to the bounds. -// class C> {} // Error -// ^ +// class B extends A {} // Error +// ^ // pkg/front_end/testcases/nnbd/bounds_checks.dart:5:9: Context: This is the type variable whose bound isn't conformed to. // class A {} // ^ diff --git a/pkg/front_end/testcases/nnbd/bounds_checks.dart.weak.expect b/pkg/front_end/testcases/nnbd/bounds_checks.dart.weak.expect index ab741a51c28..0926cb36aac 100644 --- a/pkg/front_end/testcases/nnbd/bounds_checks.dart.weak.expect +++ b/pkg/front_end/testcases/nnbd/bounds_checks.dart.weak.expect @@ -2,42 +2,42 @@ library /*isNonNullableByDefault*/; // // Problems in library: // -// pkg/front_end/testcases/nnbd/bounds_checks.dart:7:13: Error: Type argument 'num?' doesn't conform to the bound 'num' of the type variable 'X' on 'A'. -// Try changing type arguments so that they conform to the bounds. -// foo(A a) {} // Error -// ^ -// pkg/front_end/testcases/nnbd/bounds_checks.dart:5:9: Context: This is the type variable whose bound isn't conformed to. -// class A {} -// ^ -// -// pkg/front_end/testcases/nnbd/bounds_checks.dart:9:13: Error: Type argument 'num?' doesn't conform to the bound 'num' of the type variable 'X' on 'A' in the return type. -// Try changing type arguments so that they conform to the bounds. -// A? bar() {} // Error -// ^ -// pkg/front_end/testcases/nnbd/bounds_checks.dart:5:9: Context: This is the type variable whose bound isn't conformed to. -// class A {} -// ^ -// -// pkg/front_end/testcases/nnbd/bounds_checks.dart:11:5: Error: Type argument 'num?' doesn't conform to the bound 'num' of the type variable 'X' on 'A'. +// pkg/front_end/testcases/nnbd/bounds_checks.dart:11:15: Error: Type argument 'num?' doesn't conform to the bound 'num' of the type variable 'X' on 'A'. // Try changing type arguments so that they conform to the bounds. // baz>() {} // Error +// ^ +// pkg/front_end/testcases/nnbd/bounds_checks.dart:5:9: Context: This is the type variable whose bound isn't conformed to. +// class A {} +// ^ +// +// pkg/front_end/testcases/nnbd/bounds_checks.dart:15:19: Error: Type argument 'num?' doesn't conform to the bound 'num' of the type variable 'X' on 'A'. +// Try changing type arguments so that they conform to the bounds. +// class C> {} // Error +// ^ +// pkg/front_end/testcases/nnbd/bounds_checks.dart:5:9: Context: This is the type variable whose bound isn't conformed to. +// class A {} +// ^ +// +// pkg/front_end/testcases/nnbd/bounds_checks.dart:7:5: Error: Type argument 'num?' doesn't conform to the bound 'num' of the type variable 'X' on 'A'. +// Try changing type arguments so that they conform to the bounds. +// foo(A a) {} // Error // ^ // pkg/front_end/testcases/nnbd/bounds_checks.dart:5:9: Context: This is the type variable whose bound isn't conformed to. // class A {} // ^ // -// pkg/front_end/testcases/nnbd/bounds_checks.dart:13:7: Error: Type argument 'num?' doesn't conform to the bound 'num' of the type variable 'X' on 'A' in the supertype 'A' of class 'B'. +// pkg/front_end/testcases/nnbd/bounds_checks.dart:9:1: Error: Type argument 'num?' doesn't conform to the bound 'num' of the type variable 'X' on 'A'. // Try changing type arguments so that they conform to the bounds. -// class B extends A {} // Error -// ^ +// A? bar() {} // Error +// ^ // pkg/front_end/testcases/nnbd/bounds_checks.dart:5:9: Context: This is the type variable whose bound isn't conformed to. // class A {} // ^ // -// pkg/front_end/testcases/nnbd/bounds_checks.dart:15:9: Error: Type argument 'num?' doesn't conform to the bound 'num' of the type variable 'X' on 'A'. +// pkg/front_end/testcases/nnbd/bounds_checks.dart:13:17: Error: Type argument 'num?' doesn't conform to the bound 'num' of the type variable 'X' on 'A'. // Try changing type arguments so that they conform to the bounds. -// class C> {} // Error -// ^ +// class B extends A {} // Error +// ^ // pkg/front_end/testcases/nnbd/bounds_checks.dart:5:9: Context: This is the type variable whose bound isn't conformed to. // class A {} // ^ diff --git a/pkg/front_end/testcases/nnbd/bounds_checks.dart.weak.modular.expect b/pkg/front_end/testcases/nnbd/bounds_checks.dart.weak.modular.expect index ab741a51c28..0926cb36aac 100644 --- a/pkg/front_end/testcases/nnbd/bounds_checks.dart.weak.modular.expect +++ b/pkg/front_end/testcases/nnbd/bounds_checks.dart.weak.modular.expect @@ -2,42 +2,42 @@ library /*isNonNullableByDefault*/; // // Problems in library: // -// pkg/front_end/testcases/nnbd/bounds_checks.dart:7:13: Error: Type argument 'num?' doesn't conform to the bound 'num' of the type variable 'X' on 'A'. -// Try changing type arguments so that they conform to the bounds. -// foo(A a) {} // Error -// ^ -// pkg/front_end/testcases/nnbd/bounds_checks.dart:5:9: Context: This is the type variable whose bound isn't conformed to. -// class A {} -// ^ -// -// pkg/front_end/testcases/nnbd/bounds_checks.dart:9:13: Error: Type argument 'num?' doesn't conform to the bound 'num' of the type variable 'X' on 'A' in the return type. -// Try changing type arguments so that they conform to the bounds. -// A? bar() {} // Error -// ^ -// pkg/front_end/testcases/nnbd/bounds_checks.dart:5:9: Context: This is the type variable whose bound isn't conformed to. -// class A {} -// ^ -// -// pkg/front_end/testcases/nnbd/bounds_checks.dart:11:5: Error: Type argument 'num?' doesn't conform to the bound 'num' of the type variable 'X' on 'A'. +// pkg/front_end/testcases/nnbd/bounds_checks.dart:11:15: Error: Type argument 'num?' doesn't conform to the bound 'num' of the type variable 'X' on 'A'. // Try changing type arguments so that they conform to the bounds. // baz>() {} // Error +// ^ +// pkg/front_end/testcases/nnbd/bounds_checks.dart:5:9: Context: This is the type variable whose bound isn't conformed to. +// class A {} +// ^ +// +// pkg/front_end/testcases/nnbd/bounds_checks.dart:15:19: Error: Type argument 'num?' doesn't conform to the bound 'num' of the type variable 'X' on 'A'. +// Try changing type arguments so that they conform to the bounds. +// class C> {} // Error +// ^ +// pkg/front_end/testcases/nnbd/bounds_checks.dart:5:9: Context: This is the type variable whose bound isn't conformed to. +// class A {} +// ^ +// +// pkg/front_end/testcases/nnbd/bounds_checks.dart:7:5: Error: Type argument 'num?' doesn't conform to the bound 'num' of the type variable 'X' on 'A'. +// Try changing type arguments so that they conform to the bounds. +// foo(A a) {} // Error // ^ // pkg/front_end/testcases/nnbd/bounds_checks.dart:5:9: Context: This is the type variable whose bound isn't conformed to. // class A {} // ^ // -// pkg/front_end/testcases/nnbd/bounds_checks.dart:13:7: Error: Type argument 'num?' doesn't conform to the bound 'num' of the type variable 'X' on 'A' in the supertype 'A' of class 'B'. +// pkg/front_end/testcases/nnbd/bounds_checks.dart:9:1: Error: Type argument 'num?' doesn't conform to the bound 'num' of the type variable 'X' on 'A'. // Try changing type arguments so that they conform to the bounds. -// class B extends A {} // Error -// ^ +// A? bar() {} // Error +// ^ // pkg/front_end/testcases/nnbd/bounds_checks.dart:5:9: Context: This is the type variable whose bound isn't conformed to. // class A {} // ^ // -// pkg/front_end/testcases/nnbd/bounds_checks.dart:15:9: Error: Type argument 'num?' doesn't conform to the bound 'num' of the type variable 'X' on 'A'. +// pkg/front_end/testcases/nnbd/bounds_checks.dart:13:17: Error: Type argument 'num?' doesn't conform to the bound 'num' of the type variable 'X' on 'A'. // Try changing type arguments so that they conform to the bounds. -// class C> {} // Error -// ^ +// class B extends A {} // Error +// ^ // pkg/front_end/testcases/nnbd/bounds_checks.dart:5:9: Context: This is the type variable whose bound isn't conformed to. // class A {} // ^ diff --git a/pkg/front_end/testcases/nnbd/bounds_checks.dart.weak.outline.expect b/pkg/front_end/testcases/nnbd/bounds_checks.dart.weak.outline.expect index be5c01ee2ad..47d8657e002 100644 --- a/pkg/front_end/testcases/nnbd/bounds_checks.dart.weak.outline.expect +++ b/pkg/front_end/testcases/nnbd/bounds_checks.dart.weak.outline.expect @@ -2,42 +2,42 @@ library /*isNonNullableByDefault*/; // // Problems in library: // -// pkg/front_end/testcases/nnbd/bounds_checks.dart:7:13: Error: Type argument 'num?' doesn't conform to the bound 'num' of the type variable 'X' on 'A'. -// Try changing type arguments so that they conform to the bounds. -// foo(A a) {} // Error -// ^ -// pkg/front_end/testcases/nnbd/bounds_checks.dart:5:9: Context: This is the type variable whose bound isn't conformed to. -// class A {} -// ^ -// -// pkg/front_end/testcases/nnbd/bounds_checks.dart:9:13: Error: Type argument 'num?' doesn't conform to the bound 'num' of the type variable 'X' on 'A' in the return type. -// Try changing type arguments so that they conform to the bounds. -// A? bar() {} // Error -// ^ -// pkg/front_end/testcases/nnbd/bounds_checks.dart:5:9: Context: This is the type variable whose bound isn't conformed to. -// class A {} -// ^ -// -// pkg/front_end/testcases/nnbd/bounds_checks.dart:11:5: Error: Type argument 'num?' doesn't conform to the bound 'num' of the type variable 'X' on 'A'. +// pkg/front_end/testcases/nnbd/bounds_checks.dart:11:15: Error: Type argument 'num?' doesn't conform to the bound 'num' of the type variable 'X' on 'A'. // Try changing type arguments so that they conform to the bounds. // baz>() {} // Error +// ^ +// pkg/front_end/testcases/nnbd/bounds_checks.dart:5:9: Context: This is the type variable whose bound isn't conformed to. +// class A {} +// ^ +// +// pkg/front_end/testcases/nnbd/bounds_checks.dart:15:19: Error: Type argument 'num?' doesn't conform to the bound 'num' of the type variable 'X' on 'A'. +// Try changing type arguments so that they conform to the bounds. +// class C> {} // Error +// ^ +// pkg/front_end/testcases/nnbd/bounds_checks.dart:5:9: Context: This is the type variable whose bound isn't conformed to. +// class A {} +// ^ +// +// pkg/front_end/testcases/nnbd/bounds_checks.dart:7:5: Error: Type argument 'num?' doesn't conform to the bound 'num' of the type variable 'X' on 'A'. +// Try changing type arguments so that they conform to the bounds. +// foo(A a) {} // Error // ^ // pkg/front_end/testcases/nnbd/bounds_checks.dart:5:9: Context: This is the type variable whose bound isn't conformed to. // class A {} // ^ // -// pkg/front_end/testcases/nnbd/bounds_checks.dart:13:7: Error: Type argument 'num?' doesn't conform to the bound 'num' of the type variable 'X' on 'A' in the supertype 'A' of class 'B'. +// pkg/front_end/testcases/nnbd/bounds_checks.dart:9:1: Error: Type argument 'num?' doesn't conform to the bound 'num' of the type variable 'X' on 'A'. // Try changing type arguments so that they conform to the bounds. -// class B extends A {} // Error -// ^ +// A? bar() {} // Error +// ^ // pkg/front_end/testcases/nnbd/bounds_checks.dart:5:9: Context: This is the type variable whose bound isn't conformed to. // class A {} // ^ // -// pkg/front_end/testcases/nnbd/bounds_checks.dart:15:9: Error: Type argument 'num?' doesn't conform to the bound 'num' of the type variable 'X' on 'A'. +// pkg/front_end/testcases/nnbd/bounds_checks.dart:13:17: Error: Type argument 'num?' doesn't conform to the bound 'num' of the type variable 'X' on 'A'. // Try changing type arguments so that they conform to the bounds. -// class C> {} // Error -// ^ +// class B extends A {} // Error +// ^ // pkg/front_end/testcases/nnbd/bounds_checks.dart:5:9: Context: This is the type variable whose bound isn't conformed to. // class A {} // ^ diff --git a/pkg/front_end/testcases/nnbd/bounds_checks.dart.weak.transformed.expect b/pkg/front_end/testcases/nnbd/bounds_checks.dart.weak.transformed.expect index ab741a51c28..0926cb36aac 100644 --- a/pkg/front_end/testcases/nnbd/bounds_checks.dart.weak.transformed.expect +++ b/pkg/front_end/testcases/nnbd/bounds_checks.dart.weak.transformed.expect @@ -2,42 +2,42 @@ library /*isNonNullableByDefault*/; // // Problems in library: // -// pkg/front_end/testcases/nnbd/bounds_checks.dart:7:13: Error: Type argument 'num?' doesn't conform to the bound 'num' of the type variable 'X' on 'A'. -// Try changing type arguments so that they conform to the bounds. -// foo(A a) {} // Error -// ^ -// pkg/front_end/testcases/nnbd/bounds_checks.dart:5:9: Context: This is the type variable whose bound isn't conformed to. -// class A {} -// ^ -// -// pkg/front_end/testcases/nnbd/bounds_checks.dart:9:13: Error: Type argument 'num?' doesn't conform to the bound 'num' of the type variable 'X' on 'A' in the return type. -// Try changing type arguments so that they conform to the bounds. -// A? bar() {} // Error -// ^ -// pkg/front_end/testcases/nnbd/bounds_checks.dart:5:9: Context: This is the type variable whose bound isn't conformed to. -// class A {} -// ^ -// -// pkg/front_end/testcases/nnbd/bounds_checks.dart:11:5: Error: Type argument 'num?' doesn't conform to the bound 'num' of the type variable 'X' on 'A'. +// pkg/front_end/testcases/nnbd/bounds_checks.dart:11:15: Error: Type argument 'num?' doesn't conform to the bound 'num' of the type variable 'X' on 'A'. // Try changing type arguments so that they conform to the bounds. // baz>() {} // Error +// ^ +// pkg/front_end/testcases/nnbd/bounds_checks.dart:5:9: Context: This is the type variable whose bound isn't conformed to. +// class A {} +// ^ +// +// pkg/front_end/testcases/nnbd/bounds_checks.dart:15:19: Error: Type argument 'num?' doesn't conform to the bound 'num' of the type variable 'X' on 'A'. +// Try changing type arguments so that they conform to the bounds. +// class C> {} // Error +// ^ +// pkg/front_end/testcases/nnbd/bounds_checks.dart:5:9: Context: This is the type variable whose bound isn't conformed to. +// class A {} +// ^ +// +// pkg/front_end/testcases/nnbd/bounds_checks.dart:7:5: Error: Type argument 'num?' doesn't conform to the bound 'num' of the type variable 'X' on 'A'. +// Try changing type arguments so that they conform to the bounds. +// foo(A a) {} // Error // ^ // pkg/front_end/testcases/nnbd/bounds_checks.dart:5:9: Context: This is the type variable whose bound isn't conformed to. // class A {} // ^ // -// pkg/front_end/testcases/nnbd/bounds_checks.dart:13:7: Error: Type argument 'num?' doesn't conform to the bound 'num' of the type variable 'X' on 'A' in the supertype 'A' of class 'B'. +// pkg/front_end/testcases/nnbd/bounds_checks.dart:9:1: Error: Type argument 'num?' doesn't conform to the bound 'num' of the type variable 'X' on 'A'. // Try changing type arguments so that they conform to the bounds. -// class B extends A {} // Error -// ^ +// A? bar() {} // Error +// ^ // pkg/front_end/testcases/nnbd/bounds_checks.dart:5:9: Context: This is the type variable whose bound isn't conformed to. // class A {} // ^ // -// pkg/front_end/testcases/nnbd/bounds_checks.dart:15:9: Error: Type argument 'num?' doesn't conform to the bound 'num' of the type variable 'X' on 'A'. +// pkg/front_end/testcases/nnbd/bounds_checks.dart:13:17: Error: Type argument 'num?' doesn't conform to the bound 'num' of the type variable 'X' on 'A'. // Try changing type arguments so that they conform to the bounds. -// class C> {} // Error -// ^ +// class B extends A {} // Error +// ^ // pkg/front_end/testcases/nnbd/bounds_checks.dart:5:9: Context: This is the type variable whose bound isn't conformed to. // class A {} // ^ diff --git a/pkg/front_end/testcases/nnbd/issue42429.dart.strong.expect b/pkg/front_end/testcases/nnbd/issue42429.dart.strong.expect index 717c8599a83..0cbdeaee6ab 100644 --- a/pkg/front_end/testcases/nnbd/issue42429.dart.strong.expect +++ b/pkg/front_end/testcases/nnbd/issue42429.dart.strong.expect @@ -2,192 +2,192 @@ library /*isNonNullableByDefault*/; // // Problems in library: // -// pkg/front_end/testcases/nnbd/issue42429.dart:13:13: Error: Type argument 'Object' doesn't conform to the bound 'num' of the type variable 'T' on 'A'. +// pkg/front_end/testcases/nnbd/issue42429.dart:13:3: Error: Type argument 'Object' doesn't conform to the bound 'num' of the type variable 'T' on 'A'. // - 'Object' is from 'dart:core'. // Try changing type arguments so that they conform to the bounds. // A aObject; // Error. -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue42429.dart:5:9: Context: This is the type variable whose bound isn't conformed to. // class A {} // ^ // -// pkg/front_end/testcases/nnbd/issue42429.dart:14:11: Error: Type argument 'num?' doesn't conform to the bound 'num' of the type variable 'T' on 'A'. +// pkg/front_end/testcases/nnbd/issue42429.dart:14:3: Error: Type argument 'num?' doesn't conform to the bound 'num' of the type variable 'T' on 'A'. // Try changing type arguments so that they conform to the bounds. // A aNumNullable; // Error. -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue42429.dart:5:9: Context: This is the type variable whose bound isn't conformed to. // class A {} // ^ // -// pkg/front_end/testcases/nnbd/issue42429.dart:15:11: Error: Type argument 'int?' doesn't conform to the bound 'num' of the type variable 'T' on 'A'. +// pkg/front_end/testcases/nnbd/issue42429.dart:15:3: Error: Type argument 'int?' doesn't conform to the bound 'num' of the type variable 'T' on 'A'. // Try changing type arguments so that they conform to the bounds. // A aIntNullable; // Error. -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue42429.dart:5:9: Context: This is the type variable whose bound isn't conformed to. // class A {} // ^ // -// pkg/front_end/testcases/nnbd/issue42429.dart:16:11: Error: Type argument 'Null' doesn't conform to the bound 'num' of the type variable 'T' on 'A'. +// pkg/front_end/testcases/nnbd/issue42429.dart:16:3: Error: Type argument 'Null' doesn't conform to the bound 'num' of the type variable 'T' on 'A'. // Try changing type arguments so that they conform to the bounds. // A aNull; // Error. -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue42429.dart:5:9: Context: This is the type variable whose bound isn't conformed to. // class A {} // ^ // -// pkg/front_end/testcases/nnbd/issue42429.dart:17:21: Error: Type argument 'Object' doesn't conform to the bound 'num' of the type variable 'X' on 'FArgument'. +// pkg/front_end/testcases/nnbd/issue42429.dart:17:3: Error: Type argument 'Object' doesn't conform to the bound 'num' of the type variable 'X' on 'FArgument'. // - 'Object' is from 'dart:core'. // Try changing type arguments so that they conform to the bounds. // FArgument fArgumentObject; // Error. -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue42429.dart:7:19: Context: This is the type variable whose bound isn't conformed to. // typedef FArgument = Function(X); // ^ // -// pkg/front_end/testcases/nnbd/issue42429.dart:18:19: Error: Type argument 'num?' doesn't conform to the bound 'num' of the type variable 'X' on 'FArgument'. +// pkg/front_end/testcases/nnbd/issue42429.dart:18:3: Error: Type argument 'num?' doesn't conform to the bound 'num' of the type variable 'X' on 'FArgument'. // Try changing type arguments so that they conform to the bounds. // FArgument fArgumentNumNullable; // Error. -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue42429.dart:7:19: Context: This is the type variable whose bound isn't conformed to. // typedef FArgument = Function(X); // ^ // -// pkg/front_end/testcases/nnbd/issue42429.dart:19:19: Error: Type argument 'int?' doesn't conform to the bound 'num' of the type variable 'X' on 'FArgument'. +// pkg/front_end/testcases/nnbd/issue42429.dart:19:3: Error: Type argument 'int?' doesn't conform to the bound 'num' of the type variable 'X' on 'FArgument'. // Try changing type arguments so that they conform to the bounds. // FArgument fArgumentIntNullable; // Error. -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue42429.dart:7:19: Context: This is the type variable whose bound isn't conformed to. // typedef FArgument = Function(X); // ^ // -// pkg/front_end/testcases/nnbd/issue42429.dart:20:19: Error: Type argument 'Null' doesn't conform to the bound 'num' of the type variable 'X' on 'FArgument'. +// pkg/front_end/testcases/nnbd/issue42429.dart:20:3: Error: Type argument 'Null' doesn't conform to the bound 'num' of the type variable 'X' on 'FArgument'. // Try changing type arguments so that they conform to the bounds. // FArgument fArgumentNull; // Error. -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue42429.dart:7:19: Context: This is the type variable whose bound isn't conformed to. // typedef FArgument = Function(X); // ^ // -// pkg/front_end/testcases/nnbd/issue42429.dart:21:19: Error: Type argument 'Object' doesn't conform to the bound 'num' of the type variable 'X' on 'FReturn'. +// pkg/front_end/testcases/nnbd/issue42429.dart:21:3: Error: Type argument 'Object' doesn't conform to the bound 'num' of the type variable 'X' on 'FReturn'. // - 'Object' is from 'dart:core'. // Try changing type arguments so that they conform to the bounds. // FReturn fReturnObject; // Error. -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue42429.dart:8:17: Context: This is the type variable whose bound isn't conformed to. // typedef FReturn = X Function(); // ^ // -// pkg/front_end/testcases/nnbd/issue42429.dart:22:17: Error: Type argument 'num?' doesn't conform to the bound 'num' of the type variable 'X' on 'FReturn'. +// pkg/front_end/testcases/nnbd/issue42429.dart:22:3: Error: Type argument 'num?' doesn't conform to the bound 'num' of the type variable 'X' on 'FReturn'. // Try changing type arguments so that they conform to the bounds. // FReturn fReturnNumNullable; // Error. -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue42429.dart:8:17: Context: This is the type variable whose bound isn't conformed to. // typedef FReturn = X Function(); // ^ // -// pkg/front_end/testcases/nnbd/issue42429.dart:23:17: Error: Type argument 'int?' doesn't conform to the bound 'num' of the type variable 'X' on 'FReturn'. +// pkg/front_end/testcases/nnbd/issue42429.dart:23:3: Error: Type argument 'int?' doesn't conform to the bound 'num' of the type variable 'X' on 'FReturn'. // Try changing type arguments so that they conform to the bounds. // FReturn fReturnIntNullable; // Error. -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue42429.dart:8:17: Context: This is the type variable whose bound isn't conformed to. // typedef FReturn = X Function(); // ^ // -// pkg/front_end/testcases/nnbd/issue42429.dart:24:17: Error: Type argument 'Null' doesn't conform to the bound 'num' of the type variable 'X' on 'FReturn'. +// pkg/front_end/testcases/nnbd/issue42429.dart:24:3: Error: Type argument 'Null' doesn't conform to the bound 'num' of the type variable 'X' on 'FReturn'. // Try changing type arguments so that they conform to the bounds. // FReturn fReturnNull; // Error. -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue42429.dart:8:17: Context: This is the type variable whose bound isn't conformed to. // typedef FReturn = X Function(); // ^ // -// pkg/front_end/testcases/nnbd/issue42429.dart:25:17: Error: Type argument 'Object' doesn't conform to the bound 'num' of the type variable 'X' on 'FBoth'. +// pkg/front_end/testcases/nnbd/issue42429.dart:25:3: Error: Type argument 'Object' doesn't conform to the bound 'num' of the type variable 'X' on 'FBoth'. // - 'Object' is from 'dart:core'. // Try changing type arguments so that they conform to the bounds. // FBoth fBothObject; // Error. -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue42429.dart:9:15: Context: This is the type variable whose bound isn't conformed to. // typedef FBoth = X Function(X); // ^ // -// pkg/front_end/testcases/nnbd/issue42429.dart:26:15: Error: Type argument 'num?' doesn't conform to the bound 'num' of the type variable 'X' on 'FBoth'. +// pkg/front_end/testcases/nnbd/issue42429.dart:26:3: Error: Type argument 'num?' doesn't conform to the bound 'num' of the type variable 'X' on 'FBoth'. // Try changing type arguments so that they conform to the bounds. // FBoth fBothNumNullable; // Error. -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue42429.dart:9:15: Context: This is the type variable whose bound isn't conformed to. // typedef FBoth = X Function(X); // ^ // -// pkg/front_end/testcases/nnbd/issue42429.dart:27:15: Error: Type argument 'int?' doesn't conform to the bound 'num' of the type variable 'X' on 'FBoth'. +// pkg/front_end/testcases/nnbd/issue42429.dart:27:3: Error: Type argument 'int?' doesn't conform to the bound 'num' of the type variable 'X' on 'FBoth'. // Try changing type arguments so that they conform to the bounds. // FBoth fBothIntNullable; // Error. -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue42429.dart:9:15: Context: This is the type variable whose bound isn't conformed to. // typedef FBoth = X Function(X); // ^ // -// pkg/front_end/testcases/nnbd/issue42429.dart:28:15: Error: Type argument 'Null' doesn't conform to the bound 'num' of the type variable 'X' on 'FBoth'. +// pkg/front_end/testcases/nnbd/issue42429.dart:28:3: Error: Type argument 'Null' doesn't conform to the bound 'num' of the type variable 'X' on 'FBoth'. // Try changing type arguments so that they conform to the bounds. // FBoth fBothNull; // Error. -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue42429.dart:9:15: Context: This is the type variable whose bound isn't conformed to. // typedef FBoth = X Function(X); // ^ // -// pkg/front_end/testcases/nnbd/issue42429.dart:29:20: Error: Type argument 'Object' doesn't conform to the bound 'num' of the type variable 'X' on 'FNowhere'. +// pkg/front_end/testcases/nnbd/issue42429.dart:29:3: Error: Type argument 'Object' doesn't conform to the bound 'num' of the type variable 'X' on 'FNowhere'. // - 'Object' is from 'dart:core'. // Try changing type arguments so that they conform to the bounds. // FNowhere fNowhereObject; // Error. -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue42429.dart:10:18: Context: This is the type variable whose bound isn't conformed to. // typedef FNowhere = Function(); // ^ // -// pkg/front_end/testcases/nnbd/issue42429.dart:30:18: Error: Type argument 'num?' doesn't conform to the bound 'num' of the type variable 'X' on 'FNowhere'. +// pkg/front_end/testcases/nnbd/issue42429.dart:30:3: Error: Type argument 'num?' doesn't conform to the bound 'num' of the type variable 'X' on 'FNowhere'. // Try changing type arguments so that they conform to the bounds. // FNowhere fNowhereNumNullable; // Error. -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue42429.dart:10:18: Context: This is the type variable whose bound isn't conformed to. // typedef FNowhere = Function(); // ^ // -// pkg/front_end/testcases/nnbd/issue42429.dart:31:18: Error: Type argument 'int?' doesn't conform to the bound 'num' of the type variable 'X' on 'FNowhere'. +// pkg/front_end/testcases/nnbd/issue42429.dart:31:3: Error: Type argument 'int?' doesn't conform to the bound 'num' of the type variable 'X' on 'FNowhere'. // Try changing type arguments so that they conform to the bounds. // FNowhere fNowhereIntNullable; // Error. -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue42429.dart:10:18: Context: This is the type variable whose bound isn't conformed to. // typedef FNowhere = Function(); // ^ // -// pkg/front_end/testcases/nnbd/issue42429.dart:32:18: Error: Type argument 'Null' doesn't conform to the bound 'num' of the type variable 'X' on 'FNowhere'. +// pkg/front_end/testcases/nnbd/issue42429.dart:32:3: Error: Type argument 'Null' doesn't conform to the bound 'num' of the type variable 'X' on 'FNowhere'. // Try changing type arguments so that they conform to the bounds. // FNowhere fNowhereNull; // Error. -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue42429.dart:10:18: Context: This is the type variable whose bound isn't conformed to. // typedef FNowhere = Function(); // ^ // -// pkg/front_end/testcases/nnbd/issue42429.dart:33:22: Error: Type argument 'Object?' doesn't conform to the bound 'num' of the type variable 'X' on 'FArgument'. +// pkg/front_end/testcases/nnbd/issue42429.dart:33:3: Error: Type argument 'Object?' doesn't conform to the bound 'num' of the type variable 'X' on 'FArgument'. // - 'Object' is from 'dart:core'. // Try changing type arguments so that they conform to the bounds. // FArgument fArgumentObjectNullable; // Error. -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue42429.dart:7:19: Context: This is the type variable whose bound isn't conformed to. // typedef FArgument = Function(X); // ^ // -// pkg/front_end/testcases/nnbd/issue42429.dart:34:22: Error: Type argument 'dynamic' doesn't conform to the bound 'num' of the type variable 'X' on 'FArgument'. +// pkg/front_end/testcases/nnbd/issue42429.dart:34:3: Error: Type argument 'dynamic' doesn't conform to the bound 'num' of the type variable 'X' on 'FArgument'. // Try changing type arguments so that they conform to the bounds. // FArgument fArgumentDynamic; // Error. -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue42429.dart:7:19: Context: This is the type variable whose bound isn't conformed to. // typedef FArgument = Function(X); // ^ // -// pkg/front_end/testcases/nnbd/issue42429.dart:35:19: Error: Type argument 'void' doesn't conform to the bound 'num' of the type variable 'X' on 'FArgument'. +// pkg/front_end/testcases/nnbd/issue42429.dart:35:3: Error: Type argument 'void' doesn't conform to the bound 'num' of the type variable 'X' on 'FArgument'. // Try changing type arguments so that they conform to the bounds. // FArgument fArgumentVoid; // Error. -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue42429.dart:7:19: Context: This is the type variable whose bound isn't conformed to. // typedef FArgument = Function(X); // ^ diff --git a/pkg/front_end/testcases/nnbd/issue42429.dart.strong.transformed.expect b/pkg/front_end/testcases/nnbd/issue42429.dart.strong.transformed.expect index 717c8599a83..0cbdeaee6ab 100644 --- a/pkg/front_end/testcases/nnbd/issue42429.dart.strong.transformed.expect +++ b/pkg/front_end/testcases/nnbd/issue42429.dart.strong.transformed.expect @@ -2,192 +2,192 @@ library /*isNonNullableByDefault*/; // // Problems in library: // -// pkg/front_end/testcases/nnbd/issue42429.dart:13:13: Error: Type argument 'Object' doesn't conform to the bound 'num' of the type variable 'T' on 'A'. +// pkg/front_end/testcases/nnbd/issue42429.dart:13:3: Error: Type argument 'Object' doesn't conform to the bound 'num' of the type variable 'T' on 'A'. // - 'Object' is from 'dart:core'. // Try changing type arguments so that they conform to the bounds. // A aObject; // Error. -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue42429.dart:5:9: Context: This is the type variable whose bound isn't conformed to. // class A {} // ^ // -// pkg/front_end/testcases/nnbd/issue42429.dart:14:11: Error: Type argument 'num?' doesn't conform to the bound 'num' of the type variable 'T' on 'A'. +// pkg/front_end/testcases/nnbd/issue42429.dart:14:3: Error: Type argument 'num?' doesn't conform to the bound 'num' of the type variable 'T' on 'A'. // Try changing type arguments so that they conform to the bounds. // A aNumNullable; // Error. -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue42429.dart:5:9: Context: This is the type variable whose bound isn't conformed to. // class A {} // ^ // -// pkg/front_end/testcases/nnbd/issue42429.dart:15:11: Error: Type argument 'int?' doesn't conform to the bound 'num' of the type variable 'T' on 'A'. +// pkg/front_end/testcases/nnbd/issue42429.dart:15:3: Error: Type argument 'int?' doesn't conform to the bound 'num' of the type variable 'T' on 'A'. // Try changing type arguments so that they conform to the bounds. // A aIntNullable; // Error. -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue42429.dart:5:9: Context: This is the type variable whose bound isn't conformed to. // class A {} // ^ // -// pkg/front_end/testcases/nnbd/issue42429.dart:16:11: Error: Type argument 'Null' doesn't conform to the bound 'num' of the type variable 'T' on 'A'. +// pkg/front_end/testcases/nnbd/issue42429.dart:16:3: Error: Type argument 'Null' doesn't conform to the bound 'num' of the type variable 'T' on 'A'. // Try changing type arguments so that they conform to the bounds. // A aNull; // Error. -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue42429.dart:5:9: Context: This is the type variable whose bound isn't conformed to. // class A {} // ^ // -// pkg/front_end/testcases/nnbd/issue42429.dart:17:21: Error: Type argument 'Object' doesn't conform to the bound 'num' of the type variable 'X' on 'FArgument'. +// pkg/front_end/testcases/nnbd/issue42429.dart:17:3: Error: Type argument 'Object' doesn't conform to the bound 'num' of the type variable 'X' on 'FArgument'. // - 'Object' is from 'dart:core'. // Try changing type arguments so that they conform to the bounds. // FArgument fArgumentObject; // Error. -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue42429.dart:7:19: Context: This is the type variable whose bound isn't conformed to. // typedef FArgument = Function(X); // ^ // -// pkg/front_end/testcases/nnbd/issue42429.dart:18:19: Error: Type argument 'num?' doesn't conform to the bound 'num' of the type variable 'X' on 'FArgument'. +// pkg/front_end/testcases/nnbd/issue42429.dart:18:3: Error: Type argument 'num?' doesn't conform to the bound 'num' of the type variable 'X' on 'FArgument'. // Try changing type arguments so that they conform to the bounds. // FArgument fArgumentNumNullable; // Error. -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue42429.dart:7:19: Context: This is the type variable whose bound isn't conformed to. // typedef FArgument = Function(X); // ^ // -// pkg/front_end/testcases/nnbd/issue42429.dart:19:19: Error: Type argument 'int?' doesn't conform to the bound 'num' of the type variable 'X' on 'FArgument'. +// pkg/front_end/testcases/nnbd/issue42429.dart:19:3: Error: Type argument 'int?' doesn't conform to the bound 'num' of the type variable 'X' on 'FArgument'. // Try changing type arguments so that they conform to the bounds. // FArgument fArgumentIntNullable; // Error. -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue42429.dart:7:19: Context: This is the type variable whose bound isn't conformed to. // typedef FArgument = Function(X); // ^ // -// pkg/front_end/testcases/nnbd/issue42429.dart:20:19: Error: Type argument 'Null' doesn't conform to the bound 'num' of the type variable 'X' on 'FArgument'. +// pkg/front_end/testcases/nnbd/issue42429.dart:20:3: Error: Type argument 'Null' doesn't conform to the bound 'num' of the type variable 'X' on 'FArgument'. // Try changing type arguments so that they conform to the bounds. // FArgument fArgumentNull; // Error. -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue42429.dart:7:19: Context: This is the type variable whose bound isn't conformed to. // typedef FArgument = Function(X); // ^ // -// pkg/front_end/testcases/nnbd/issue42429.dart:21:19: Error: Type argument 'Object' doesn't conform to the bound 'num' of the type variable 'X' on 'FReturn'. +// pkg/front_end/testcases/nnbd/issue42429.dart:21:3: Error: Type argument 'Object' doesn't conform to the bound 'num' of the type variable 'X' on 'FReturn'. // - 'Object' is from 'dart:core'. // Try changing type arguments so that they conform to the bounds. // FReturn fReturnObject; // Error. -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue42429.dart:8:17: Context: This is the type variable whose bound isn't conformed to. // typedef FReturn = X Function(); // ^ // -// pkg/front_end/testcases/nnbd/issue42429.dart:22:17: Error: Type argument 'num?' doesn't conform to the bound 'num' of the type variable 'X' on 'FReturn'. +// pkg/front_end/testcases/nnbd/issue42429.dart:22:3: Error: Type argument 'num?' doesn't conform to the bound 'num' of the type variable 'X' on 'FReturn'. // Try changing type arguments so that they conform to the bounds. // FReturn fReturnNumNullable; // Error. -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue42429.dart:8:17: Context: This is the type variable whose bound isn't conformed to. // typedef FReturn = X Function(); // ^ // -// pkg/front_end/testcases/nnbd/issue42429.dart:23:17: Error: Type argument 'int?' doesn't conform to the bound 'num' of the type variable 'X' on 'FReturn'. +// pkg/front_end/testcases/nnbd/issue42429.dart:23:3: Error: Type argument 'int?' doesn't conform to the bound 'num' of the type variable 'X' on 'FReturn'. // Try changing type arguments so that they conform to the bounds. // FReturn fReturnIntNullable; // Error. -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue42429.dart:8:17: Context: This is the type variable whose bound isn't conformed to. // typedef FReturn = X Function(); // ^ // -// pkg/front_end/testcases/nnbd/issue42429.dart:24:17: Error: Type argument 'Null' doesn't conform to the bound 'num' of the type variable 'X' on 'FReturn'. +// pkg/front_end/testcases/nnbd/issue42429.dart:24:3: Error: Type argument 'Null' doesn't conform to the bound 'num' of the type variable 'X' on 'FReturn'. // Try changing type arguments so that they conform to the bounds. // FReturn fReturnNull; // Error. -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue42429.dart:8:17: Context: This is the type variable whose bound isn't conformed to. // typedef FReturn = X Function(); // ^ // -// pkg/front_end/testcases/nnbd/issue42429.dart:25:17: Error: Type argument 'Object' doesn't conform to the bound 'num' of the type variable 'X' on 'FBoth'. +// pkg/front_end/testcases/nnbd/issue42429.dart:25:3: Error: Type argument 'Object' doesn't conform to the bound 'num' of the type variable 'X' on 'FBoth'. // - 'Object' is from 'dart:core'. // Try changing type arguments so that they conform to the bounds. // FBoth fBothObject; // Error. -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue42429.dart:9:15: Context: This is the type variable whose bound isn't conformed to. // typedef FBoth = X Function(X); // ^ // -// pkg/front_end/testcases/nnbd/issue42429.dart:26:15: Error: Type argument 'num?' doesn't conform to the bound 'num' of the type variable 'X' on 'FBoth'. +// pkg/front_end/testcases/nnbd/issue42429.dart:26:3: Error: Type argument 'num?' doesn't conform to the bound 'num' of the type variable 'X' on 'FBoth'. // Try changing type arguments so that they conform to the bounds. // FBoth fBothNumNullable; // Error. -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue42429.dart:9:15: Context: This is the type variable whose bound isn't conformed to. // typedef FBoth = X Function(X); // ^ // -// pkg/front_end/testcases/nnbd/issue42429.dart:27:15: Error: Type argument 'int?' doesn't conform to the bound 'num' of the type variable 'X' on 'FBoth'. +// pkg/front_end/testcases/nnbd/issue42429.dart:27:3: Error: Type argument 'int?' doesn't conform to the bound 'num' of the type variable 'X' on 'FBoth'. // Try changing type arguments so that they conform to the bounds. // FBoth fBothIntNullable; // Error. -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue42429.dart:9:15: Context: This is the type variable whose bound isn't conformed to. // typedef FBoth = X Function(X); // ^ // -// pkg/front_end/testcases/nnbd/issue42429.dart:28:15: Error: Type argument 'Null' doesn't conform to the bound 'num' of the type variable 'X' on 'FBoth'. +// pkg/front_end/testcases/nnbd/issue42429.dart:28:3: Error: Type argument 'Null' doesn't conform to the bound 'num' of the type variable 'X' on 'FBoth'. // Try changing type arguments so that they conform to the bounds. // FBoth fBothNull; // Error. -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue42429.dart:9:15: Context: This is the type variable whose bound isn't conformed to. // typedef FBoth = X Function(X); // ^ // -// pkg/front_end/testcases/nnbd/issue42429.dart:29:20: Error: Type argument 'Object' doesn't conform to the bound 'num' of the type variable 'X' on 'FNowhere'. +// pkg/front_end/testcases/nnbd/issue42429.dart:29:3: Error: Type argument 'Object' doesn't conform to the bound 'num' of the type variable 'X' on 'FNowhere'. // - 'Object' is from 'dart:core'. // Try changing type arguments so that they conform to the bounds. // FNowhere fNowhereObject; // Error. -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue42429.dart:10:18: Context: This is the type variable whose bound isn't conformed to. // typedef FNowhere = Function(); // ^ // -// pkg/front_end/testcases/nnbd/issue42429.dart:30:18: Error: Type argument 'num?' doesn't conform to the bound 'num' of the type variable 'X' on 'FNowhere'. +// pkg/front_end/testcases/nnbd/issue42429.dart:30:3: Error: Type argument 'num?' doesn't conform to the bound 'num' of the type variable 'X' on 'FNowhere'. // Try changing type arguments so that they conform to the bounds. // FNowhere fNowhereNumNullable; // Error. -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue42429.dart:10:18: Context: This is the type variable whose bound isn't conformed to. // typedef FNowhere = Function(); // ^ // -// pkg/front_end/testcases/nnbd/issue42429.dart:31:18: Error: Type argument 'int?' doesn't conform to the bound 'num' of the type variable 'X' on 'FNowhere'. +// pkg/front_end/testcases/nnbd/issue42429.dart:31:3: Error: Type argument 'int?' doesn't conform to the bound 'num' of the type variable 'X' on 'FNowhere'. // Try changing type arguments so that they conform to the bounds. // FNowhere fNowhereIntNullable; // Error. -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue42429.dart:10:18: Context: This is the type variable whose bound isn't conformed to. // typedef FNowhere = Function(); // ^ // -// pkg/front_end/testcases/nnbd/issue42429.dart:32:18: Error: Type argument 'Null' doesn't conform to the bound 'num' of the type variable 'X' on 'FNowhere'. +// pkg/front_end/testcases/nnbd/issue42429.dart:32:3: Error: Type argument 'Null' doesn't conform to the bound 'num' of the type variable 'X' on 'FNowhere'. // Try changing type arguments so that they conform to the bounds. // FNowhere fNowhereNull; // Error. -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue42429.dart:10:18: Context: This is the type variable whose bound isn't conformed to. // typedef FNowhere = Function(); // ^ // -// pkg/front_end/testcases/nnbd/issue42429.dart:33:22: Error: Type argument 'Object?' doesn't conform to the bound 'num' of the type variable 'X' on 'FArgument'. +// pkg/front_end/testcases/nnbd/issue42429.dart:33:3: Error: Type argument 'Object?' doesn't conform to the bound 'num' of the type variable 'X' on 'FArgument'. // - 'Object' is from 'dart:core'. // Try changing type arguments so that they conform to the bounds. // FArgument fArgumentObjectNullable; // Error. -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue42429.dart:7:19: Context: This is the type variable whose bound isn't conformed to. // typedef FArgument = Function(X); // ^ // -// pkg/front_end/testcases/nnbd/issue42429.dart:34:22: Error: Type argument 'dynamic' doesn't conform to the bound 'num' of the type variable 'X' on 'FArgument'. +// pkg/front_end/testcases/nnbd/issue42429.dart:34:3: Error: Type argument 'dynamic' doesn't conform to the bound 'num' of the type variable 'X' on 'FArgument'. // Try changing type arguments so that they conform to the bounds. // FArgument fArgumentDynamic; // Error. -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue42429.dart:7:19: Context: This is the type variable whose bound isn't conformed to. // typedef FArgument = Function(X); // ^ // -// pkg/front_end/testcases/nnbd/issue42429.dart:35:19: Error: Type argument 'void' doesn't conform to the bound 'num' of the type variable 'X' on 'FArgument'. +// pkg/front_end/testcases/nnbd/issue42429.dart:35:3: Error: Type argument 'void' doesn't conform to the bound 'num' of the type variable 'X' on 'FArgument'. // Try changing type arguments so that they conform to the bounds. // FArgument fArgumentVoid; // Error. -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue42429.dart:7:19: Context: This is the type variable whose bound isn't conformed to. // typedef FArgument = Function(X); // ^ diff --git a/pkg/front_end/testcases/nnbd/issue42429.dart.weak.expect b/pkg/front_end/testcases/nnbd/issue42429.dart.weak.expect index 717c8599a83..0cbdeaee6ab 100644 --- a/pkg/front_end/testcases/nnbd/issue42429.dart.weak.expect +++ b/pkg/front_end/testcases/nnbd/issue42429.dart.weak.expect @@ -2,192 +2,192 @@ library /*isNonNullableByDefault*/; // // Problems in library: // -// pkg/front_end/testcases/nnbd/issue42429.dart:13:13: Error: Type argument 'Object' doesn't conform to the bound 'num' of the type variable 'T' on 'A'. +// pkg/front_end/testcases/nnbd/issue42429.dart:13:3: Error: Type argument 'Object' doesn't conform to the bound 'num' of the type variable 'T' on 'A'. // - 'Object' is from 'dart:core'. // Try changing type arguments so that they conform to the bounds. // A aObject; // Error. -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue42429.dart:5:9: Context: This is the type variable whose bound isn't conformed to. // class A {} // ^ // -// pkg/front_end/testcases/nnbd/issue42429.dart:14:11: Error: Type argument 'num?' doesn't conform to the bound 'num' of the type variable 'T' on 'A'. +// pkg/front_end/testcases/nnbd/issue42429.dart:14:3: Error: Type argument 'num?' doesn't conform to the bound 'num' of the type variable 'T' on 'A'. // Try changing type arguments so that they conform to the bounds. // A aNumNullable; // Error. -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue42429.dart:5:9: Context: This is the type variable whose bound isn't conformed to. // class A {} // ^ // -// pkg/front_end/testcases/nnbd/issue42429.dart:15:11: Error: Type argument 'int?' doesn't conform to the bound 'num' of the type variable 'T' on 'A'. +// pkg/front_end/testcases/nnbd/issue42429.dart:15:3: Error: Type argument 'int?' doesn't conform to the bound 'num' of the type variable 'T' on 'A'. // Try changing type arguments so that they conform to the bounds. // A aIntNullable; // Error. -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue42429.dart:5:9: Context: This is the type variable whose bound isn't conformed to. // class A {} // ^ // -// pkg/front_end/testcases/nnbd/issue42429.dart:16:11: Error: Type argument 'Null' doesn't conform to the bound 'num' of the type variable 'T' on 'A'. +// pkg/front_end/testcases/nnbd/issue42429.dart:16:3: Error: Type argument 'Null' doesn't conform to the bound 'num' of the type variable 'T' on 'A'. // Try changing type arguments so that they conform to the bounds. // A aNull; // Error. -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue42429.dart:5:9: Context: This is the type variable whose bound isn't conformed to. // class A {} // ^ // -// pkg/front_end/testcases/nnbd/issue42429.dart:17:21: Error: Type argument 'Object' doesn't conform to the bound 'num' of the type variable 'X' on 'FArgument'. +// pkg/front_end/testcases/nnbd/issue42429.dart:17:3: Error: Type argument 'Object' doesn't conform to the bound 'num' of the type variable 'X' on 'FArgument'. // - 'Object' is from 'dart:core'. // Try changing type arguments so that they conform to the bounds. // FArgument fArgumentObject; // Error. -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue42429.dart:7:19: Context: This is the type variable whose bound isn't conformed to. // typedef FArgument = Function(X); // ^ // -// pkg/front_end/testcases/nnbd/issue42429.dart:18:19: Error: Type argument 'num?' doesn't conform to the bound 'num' of the type variable 'X' on 'FArgument'. +// pkg/front_end/testcases/nnbd/issue42429.dart:18:3: Error: Type argument 'num?' doesn't conform to the bound 'num' of the type variable 'X' on 'FArgument'. // Try changing type arguments so that they conform to the bounds. // FArgument fArgumentNumNullable; // Error. -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue42429.dart:7:19: Context: This is the type variable whose bound isn't conformed to. // typedef FArgument = Function(X); // ^ // -// pkg/front_end/testcases/nnbd/issue42429.dart:19:19: Error: Type argument 'int?' doesn't conform to the bound 'num' of the type variable 'X' on 'FArgument'. +// pkg/front_end/testcases/nnbd/issue42429.dart:19:3: Error: Type argument 'int?' doesn't conform to the bound 'num' of the type variable 'X' on 'FArgument'. // Try changing type arguments so that they conform to the bounds. // FArgument fArgumentIntNullable; // Error. -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue42429.dart:7:19: Context: This is the type variable whose bound isn't conformed to. // typedef FArgument = Function(X); // ^ // -// pkg/front_end/testcases/nnbd/issue42429.dart:20:19: Error: Type argument 'Null' doesn't conform to the bound 'num' of the type variable 'X' on 'FArgument'. +// pkg/front_end/testcases/nnbd/issue42429.dart:20:3: Error: Type argument 'Null' doesn't conform to the bound 'num' of the type variable 'X' on 'FArgument'. // Try changing type arguments so that they conform to the bounds. // FArgument fArgumentNull; // Error. -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue42429.dart:7:19: Context: This is the type variable whose bound isn't conformed to. // typedef FArgument = Function(X); // ^ // -// pkg/front_end/testcases/nnbd/issue42429.dart:21:19: Error: Type argument 'Object' doesn't conform to the bound 'num' of the type variable 'X' on 'FReturn'. +// pkg/front_end/testcases/nnbd/issue42429.dart:21:3: Error: Type argument 'Object' doesn't conform to the bound 'num' of the type variable 'X' on 'FReturn'. // - 'Object' is from 'dart:core'. // Try changing type arguments so that they conform to the bounds. // FReturn fReturnObject; // Error. -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue42429.dart:8:17: Context: This is the type variable whose bound isn't conformed to. // typedef FReturn = X Function(); // ^ // -// pkg/front_end/testcases/nnbd/issue42429.dart:22:17: Error: Type argument 'num?' doesn't conform to the bound 'num' of the type variable 'X' on 'FReturn'. +// pkg/front_end/testcases/nnbd/issue42429.dart:22:3: Error: Type argument 'num?' doesn't conform to the bound 'num' of the type variable 'X' on 'FReturn'. // Try changing type arguments so that they conform to the bounds. // FReturn fReturnNumNullable; // Error. -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue42429.dart:8:17: Context: This is the type variable whose bound isn't conformed to. // typedef FReturn = X Function(); // ^ // -// pkg/front_end/testcases/nnbd/issue42429.dart:23:17: Error: Type argument 'int?' doesn't conform to the bound 'num' of the type variable 'X' on 'FReturn'. +// pkg/front_end/testcases/nnbd/issue42429.dart:23:3: Error: Type argument 'int?' doesn't conform to the bound 'num' of the type variable 'X' on 'FReturn'. // Try changing type arguments so that they conform to the bounds. // FReturn fReturnIntNullable; // Error. -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue42429.dart:8:17: Context: This is the type variable whose bound isn't conformed to. // typedef FReturn = X Function(); // ^ // -// pkg/front_end/testcases/nnbd/issue42429.dart:24:17: Error: Type argument 'Null' doesn't conform to the bound 'num' of the type variable 'X' on 'FReturn'. +// pkg/front_end/testcases/nnbd/issue42429.dart:24:3: Error: Type argument 'Null' doesn't conform to the bound 'num' of the type variable 'X' on 'FReturn'. // Try changing type arguments so that they conform to the bounds. // FReturn fReturnNull; // Error. -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue42429.dart:8:17: Context: This is the type variable whose bound isn't conformed to. // typedef FReturn = X Function(); // ^ // -// pkg/front_end/testcases/nnbd/issue42429.dart:25:17: Error: Type argument 'Object' doesn't conform to the bound 'num' of the type variable 'X' on 'FBoth'. +// pkg/front_end/testcases/nnbd/issue42429.dart:25:3: Error: Type argument 'Object' doesn't conform to the bound 'num' of the type variable 'X' on 'FBoth'. // - 'Object' is from 'dart:core'. // Try changing type arguments so that they conform to the bounds. // FBoth fBothObject; // Error. -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue42429.dart:9:15: Context: This is the type variable whose bound isn't conformed to. // typedef FBoth = X Function(X); // ^ // -// pkg/front_end/testcases/nnbd/issue42429.dart:26:15: Error: Type argument 'num?' doesn't conform to the bound 'num' of the type variable 'X' on 'FBoth'. +// pkg/front_end/testcases/nnbd/issue42429.dart:26:3: Error: Type argument 'num?' doesn't conform to the bound 'num' of the type variable 'X' on 'FBoth'. // Try changing type arguments so that they conform to the bounds. // FBoth fBothNumNullable; // Error. -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue42429.dart:9:15: Context: This is the type variable whose bound isn't conformed to. // typedef FBoth = X Function(X); // ^ // -// pkg/front_end/testcases/nnbd/issue42429.dart:27:15: Error: Type argument 'int?' doesn't conform to the bound 'num' of the type variable 'X' on 'FBoth'. +// pkg/front_end/testcases/nnbd/issue42429.dart:27:3: Error: Type argument 'int?' doesn't conform to the bound 'num' of the type variable 'X' on 'FBoth'. // Try changing type arguments so that they conform to the bounds. // FBoth fBothIntNullable; // Error. -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue42429.dart:9:15: Context: This is the type variable whose bound isn't conformed to. // typedef FBoth = X Function(X); // ^ // -// pkg/front_end/testcases/nnbd/issue42429.dart:28:15: Error: Type argument 'Null' doesn't conform to the bound 'num' of the type variable 'X' on 'FBoth'. +// pkg/front_end/testcases/nnbd/issue42429.dart:28:3: Error: Type argument 'Null' doesn't conform to the bound 'num' of the type variable 'X' on 'FBoth'. // Try changing type arguments so that they conform to the bounds. // FBoth fBothNull; // Error. -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue42429.dart:9:15: Context: This is the type variable whose bound isn't conformed to. // typedef FBoth = X Function(X); // ^ // -// pkg/front_end/testcases/nnbd/issue42429.dart:29:20: Error: Type argument 'Object' doesn't conform to the bound 'num' of the type variable 'X' on 'FNowhere'. +// pkg/front_end/testcases/nnbd/issue42429.dart:29:3: Error: Type argument 'Object' doesn't conform to the bound 'num' of the type variable 'X' on 'FNowhere'. // - 'Object' is from 'dart:core'. // Try changing type arguments so that they conform to the bounds. // FNowhere fNowhereObject; // Error. -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue42429.dart:10:18: Context: This is the type variable whose bound isn't conformed to. // typedef FNowhere = Function(); // ^ // -// pkg/front_end/testcases/nnbd/issue42429.dart:30:18: Error: Type argument 'num?' doesn't conform to the bound 'num' of the type variable 'X' on 'FNowhere'. +// pkg/front_end/testcases/nnbd/issue42429.dart:30:3: Error: Type argument 'num?' doesn't conform to the bound 'num' of the type variable 'X' on 'FNowhere'. // Try changing type arguments so that they conform to the bounds. // FNowhere fNowhereNumNullable; // Error. -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue42429.dart:10:18: Context: This is the type variable whose bound isn't conformed to. // typedef FNowhere = Function(); // ^ // -// pkg/front_end/testcases/nnbd/issue42429.dart:31:18: Error: Type argument 'int?' doesn't conform to the bound 'num' of the type variable 'X' on 'FNowhere'. +// pkg/front_end/testcases/nnbd/issue42429.dart:31:3: Error: Type argument 'int?' doesn't conform to the bound 'num' of the type variable 'X' on 'FNowhere'. // Try changing type arguments so that they conform to the bounds. // FNowhere fNowhereIntNullable; // Error. -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue42429.dart:10:18: Context: This is the type variable whose bound isn't conformed to. // typedef FNowhere = Function(); // ^ // -// pkg/front_end/testcases/nnbd/issue42429.dart:32:18: Error: Type argument 'Null' doesn't conform to the bound 'num' of the type variable 'X' on 'FNowhere'. +// pkg/front_end/testcases/nnbd/issue42429.dart:32:3: Error: Type argument 'Null' doesn't conform to the bound 'num' of the type variable 'X' on 'FNowhere'. // Try changing type arguments so that they conform to the bounds. // FNowhere fNowhereNull; // Error. -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue42429.dart:10:18: Context: This is the type variable whose bound isn't conformed to. // typedef FNowhere = Function(); // ^ // -// pkg/front_end/testcases/nnbd/issue42429.dart:33:22: Error: Type argument 'Object?' doesn't conform to the bound 'num' of the type variable 'X' on 'FArgument'. +// pkg/front_end/testcases/nnbd/issue42429.dart:33:3: Error: Type argument 'Object?' doesn't conform to the bound 'num' of the type variable 'X' on 'FArgument'. // - 'Object' is from 'dart:core'. // Try changing type arguments so that they conform to the bounds. // FArgument fArgumentObjectNullable; // Error. -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue42429.dart:7:19: Context: This is the type variable whose bound isn't conformed to. // typedef FArgument = Function(X); // ^ // -// pkg/front_end/testcases/nnbd/issue42429.dart:34:22: Error: Type argument 'dynamic' doesn't conform to the bound 'num' of the type variable 'X' on 'FArgument'. +// pkg/front_end/testcases/nnbd/issue42429.dart:34:3: Error: Type argument 'dynamic' doesn't conform to the bound 'num' of the type variable 'X' on 'FArgument'. // Try changing type arguments so that they conform to the bounds. // FArgument fArgumentDynamic; // Error. -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue42429.dart:7:19: Context: This is the type variable whose bound isn't conformed to. // typedef FArgument = Function(X); // ^ // -// pkg/front_end/testcases/nnbd/issue42429.dart:35:19: Error: Type argument 'void' doesn't conform to the bound 'num' of the type variable 'X' on 'FArgument'. +// pkg/front_end/testcases/nnbd/issue42429.dart:35:3: Error: Type argument 'void' doesn't conform to the bound 'num' of the type variable 'X' on 'FArgument'. // Try changing type arguments so that they conform to the bounds. // FArgument fArgumentVoid; // Error. -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue42429.dart:7:19: Context: This is the type variable whose bound isn't conformed to. // typedef FArgument = Function(X); // ^ diff --git a/pkg/front_end/testcases/nnbd/issue42429.dart.weak.modular.expect b/pkg/front_end/testcases/nnbd/issue42429.dart.weak.modular.expect index 717c8599a83..0cbdeaee6ab 100644 --- a/pkg/front_end/testcases/nnbd/issue42429.dart.weak.modular.expect +++ b/pkg/front_end/testcases/nnbd/issue42429.dart.weak.modular.expect @@ -2,192 +2,192 @@ library /*isNonNullableByDefault*/; // // Problems in library: // -// pkg/front_end/testcases/nnbd/issue42429.dart:13:13: Error: Type argument 'Object' doesn't conform to the bound 'num' of the type variable 'T' on 'A'. +// pkg/front_end/testcases/nnbd/issue42429.dart:13:3: Error: Type argument 'Object' doesn't conform to the bound 'num' of the type variable 'T' on 'A'. // - 'Object' is from 'dart:core'. // Try changing type arguments so that they conform to the bounds. // A aObject; // Error. -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue42429.dart:5:9: Context: This is the type variable whose bound isn't conformed to. // class A {} // ^ // -// pkg/front_end/testcases/nnbd/issue42429.dart:14:11: Error: Type argument 'num?' doesn't conform to the bound 'num' of the type variable 'T' on 'A'. +// pkg/front_end/testcases/nnbd/issue42429.dart:14:3: Error: Type argument 'num?' doesn't conform to the bound 'num' of the type variable 'T' on 'A'. // Try changing type arguments so that they conform to the bounds. // A aNumNullable; // Error. -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue42429.dart:5:9: Context: This is the type variable whose bound isn't conformed to. // class A {} // ^ // -// pkg/front_end/testcases/nnbd/issue42429.dart:15:11: Error: Type argument 'int?' doesn't conform to the bound 'num' of the type variable 'T' on 'A'. +// pkg/front_end/testcases/nnbd/issue42429.dart:15:3: Error: Type argument 'int?' doesn't conform to the bound 'num' of the type variable 'T' on 'A'. // Try changing type arguments so that they conform to the bounds. // A aIntNullable; // Error. -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue42429.dart:5:9: Context: This is the type variable whose bound isn't conformed to. // class A {} // ^ // -// pkg/front_end/testcases/nnbd/issue42429.dart:16:11: Error: Type argument 'Null' doesn't conform to the bound 'num' of the type variable 'T' on 'A'. +// pkg/front_end/testcases/nnbd/issue42429.dart:16:3: Error: Type argument 'Null' doesn't conform to the bound 'num' of the type variable 'T' on 'A'. // Try changing type arguments so that they conform to the bounds. // A aNull; // Error. -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue42429.dart:5:9: Context: This is the type variable whose bound isn't conformed to. // class A {} // ^ // -// pkg/front_end/testcases/nnbd/issue42429.dart:17:21: Error: Type argument 'Object' doesn't conform to the bound 'num' of the type variable 'X' on 'FArgument'. +// pkg/front_end/testcases/nnbd/issue42429.dart:17:3: Error: Type argument 'Object' doesn't conform to the bound 'num' of the type variable 'X' on 'FArgument'. // - 'Object' is from 'dart:core'. // Try changing type arguments so that they conform to the bounds. // FArgument fArgumentObject; // Error. -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue42429.dart:7:19: Context: This is the type variable whose bound isn't conformed to. // typedef FArgument = Function(X); // ^ // -// pkg/front_end/testcases/nnbd/issue42429.dart:18:19: Error: Type argument 'num?' doesn't conform to the bound 'num' of the type variable 'X' on 'FArgument'. +// pkg/front_end/testcases/nnbd/issue42429.dart:18:3: Error: Type argument 'num?' doesn't conform to the bound 'num' of the type variable 'X' on 'FArgument'. // Try changing type arguments so that they conform to the bounds. // FArgument fArgumentNumNullable; // Error. -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue42429.dart:7:19: Context: This is the type variable whose bound isn't conformed to. // typedef FArgument = Function(X); // ^ // -// pkg/front_end/testcases/nnbd/issue42429.dart:19:19: Error: Type argument 'int?' doesn't conform to the bound 'num' of the type variable 'X' on 'FArgument'. +// pkg/front_end/testcases/nnbd/issue42429.dart:19:3: Error: Type argument 'int?' doesn't conform to the bound 'num' of the type variable 'X' on 'FArgument'. // Try changing type arguments so that they conform to the bounds. // FArgument fArgumentIntNullable; // Error. -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue42429.dart:7:19: Context: This is the type variable whose bound isn't conformed to. // typedef FArgument = Function(X); // ^ // -// pkg/front_end/testcases/nnbd/issue42429.dart:20:19: Error: Type argument 'Null' doesn't conform to the bound 'num' of the type variable 'X' on 'FArgument'. +// pkg/front_end/testcases/nnbd/issue42429.dart:20:3: Error: Type argument 'Null' doesn't conform to the bound 'num' of the type variable 'X' on 'FArgument'. // Try changing type arguments so that they conform to the bounds. // FArgument fArgumentNull; // Error. -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue42429.dart:7:19: Context: This is the type variable whose bound isn't conformed to. // typedef FArgument = Function(X); // ^ // -// pkg/front_end/testcases/nnbd/issue42429.dart:21:19: Error: Type argument 'Object' doesn't conform to the bound 'num' of the type variable 'X' on 'FReturn'. +// pkg/front_end/testcases/nnbd/issue42429.dart:21:3: Error: Type argument 'Object' doesn't conform to the bound 'num' of the type variable 'X' on 'FReturn'. // - 'Object' is from 'dart:core'. // Try changing type arguments so that they conform to the bounds. // FReturn fReturnObject; // Error. -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue42429.dart:8:17: Context: This is the type variable whose bound isn't conformed to. // typedef FReturn = X Function(); // ^ // -// pkg/front_end/testcases/nnbd/issue42429.dart:22:17: Error: Type argument 'num?' doesn't conform to the bound 'num' of the type variable 'X' on 'FReturn'. +// pkg/front_end/testcases/nnbd/issue42429.dart:22:3: Error: Type argument 'num?' doesn't conform to the bound 'num' of the type variable 'X' on 'FReturn'. // Try changing type arguments so that they conform to the bounds. // FReturn fReturnNumNullable; // Error. -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue42429.dart:8:17: Context: This is the type variable whose bound isn't conformed to. // typedef FReturn = X Function(); // ^ // -// pkg/front_end/testcases/nnbd/issue42429.dart:23:17: Error: Type argument 'int?' doesn't conform to the bound 'num' of the type variable 'X' on 'FReturn'. +// pkg/front_end/testcases/nnbd/issue42429.dart:23:3: Error: Type argument 'int?' doesn't conform to the bound 'num' of the type variable 'X' on 'FReturn'. // Try changing type arguments so that they conform to the bounds. // FReturn fReturnIntNullable; // Error. -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue42429.dart:8:17: Context: This is the type variable whose bound isn't conformed to. // typedef FReturn = X Function(); // ^ // -// pkg/front_end/testcases/nnbd/issue42429.dart:24:17: Error: Type argument 'Null' doesn't conform to the bound 'num' of the type variable 'X' on 'FReturn'. +// pkg/front_end/testcases/nnbd/issue42429.dart:24:3: Error: Type argument 'Null' doesn't conform to the bound 'num' of the type variable 'X' on 'FReturn'. // Try changing type arguments so that they conform to the bounds. // FReturn fReturnNull; // Error. -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue42429.dart:8:17: Context: This is the type variable whose bound isn't conformed to. // typedef FReturn = X Function(); // ^ // -// pkg/front_end/testcases/nnbd/issue42429.dart:25:17: Error: Type argument 'Object' doesn't conform to the bound 'num' of the type variable 'X' on 'FBoth'. +// pkg/front_end/testcases/nnbd/issue42429.dart:25:3: Error: Type argument 'Object' doesn't conform to the bound 'num' of the type variable 'X' on 'FBoth'. // - 'Object' is from 'dart:core'. // Try changing type arguments so that they conform to the bounds. // FBoth fBothObject; // Error. -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue42429.dart:9:15: Context: This is the type variable whose bound isn't conformed to. // typedef FBoth = X Function(X); // ^ // -// pkg/front_end/testcases/nnbd/issue42429.dart:26:15: Error: Type argument 'num?' doesn't conform to the bound 'num' of the type variable 'X' on 'FBoth'. +// pkg/front_end/testcases/nnbd/issue42429.dart:26:3: Error: Type argument 'num?' doesn't conform to the bound 'num' of the type variable 'X' on 'FBoth'. // Try changing type arguments so that they conform to the bounds. // FBoth fBothNumNullable; // Error. -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue42429.dart:9:15: Context: This is the type variable whose bound isn't conformed to. // typedef FBoth = X Function(X); // ^ // -// pkg/front_end/testcases/nnbd/issue42429.dart:27:15: Error: Type argument 'int?' doesn't conform to the bound 'num' of the type variable 'X' on 'FBoth'. +// pkg/front_end/testcases/nnbd/issue42429.dart:27:3: Error: Type argument 'int?' doesn't conform to the bound 'num' of the type variable 'X' on 'FBoth'. // Try changing type arguments so that they conform to the bounds. // FBoth fBothIntNullable; // Error. -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue42429.dart:9:15: Context: This is the type variable whose bound isn't conformed to. // typedef FBoth = X Function(X); // ^ // -// pkg/front_end/testcases/nnbd/issue42429.dart:28:15: Error: Type argument 'Null' doesn't conform to the bound 'num' of the type variable 'X' on 'FBoth'. +// pkg/front_end/testcases/nnbd/issue42429.dart:28:3: Error: Type argument 'Null' doesn't conform to the bound 'num' of the type variable 'X' on 'FBoth'. // Try changing type arguments so that they conform to the bounds. // FBoth fBothNull; // Error. -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue42429.dart:9:15: Context: This is the type variable whose bound isn't conformed to. // typedef FBoth = X Function(X); // ^ // -// pkg/front_end/testcases/nnbd/issue42429.dart:29:20: Error: Type argument 'Object' doesn't conform to the bound 'num' of the type variable 'X' on 'FNowhere'. +// pkg/front_end/testcases/nnbd/issue42429.dart:29:3: Error: Type argument 'Object' doesn't conform to the bound 'num' of the type variable 'X' on 'FNowhere'. // - 'Object' is from 'dart:core'. // Try changing type arguments so that they conform to the bounds. // FNowhere fNowhereObject; // Error. -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue42429.dart:10:18: Context: This is the type variable whose bound isn't conformed to. // typedef FNowhere = Function(); // ^ // -// pkg/front_end/testcases/nnbd/issue42429.dart:30:18: Error: Type argument 'num?' doesn't conform to the bound 'num' of the type variable 'X' on 'FNowhere'. +// pkg/front_end/testcases/nnbd/issue42429.dart:30:3: Error: Type argument 'num?' doesn't conform to the bound 'num' of the type variable 'X' on 'FNowhere'. // Try changing type arguments so that they conform to the bounds. // FNowhere fNowhereNumNullable; // Error. -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue42429.dart:10:18: Context: This is the type variable whose bound isn't conformed to. // typedef FNowhere = Function(); // ^ // -// pkg/front_end/testcases/nnbd/issue42429.dart:31:18: Error: Type argument 'int?' doesn't conform to the bound 'num' of the type variable 'X' on 'FNowhere'. +// pkg/front_end/testcases/nnbd/issue42429.dart:31:3: Error: Type argument 'int?' doesn't conform to the bound 'num' of the type variable 'X' on 'FNowhere'. // Try changing type arguments so that they conform to the bounds. // FNowhere fNowhereIntNullable; // Error. -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue42429.dart:10:18: Context: This is the type variable whose bound isn't conformed to. // typedef FNowhere = Function(); // ^ // -// pkg/front_end/testcases/nnbd/issue42429.dart:32:18: Error: Type argument 'Null' doesn't conform to the bound 'num' of the type variable 'X' on 'FNowhere'. +// pkg/front_end/testcases/nnbd/issue42429.dart:32:3: Error: Type argument 'Null' doesn't conform to the bound 'num' of the type variable 'X' on 'FNowhere'. // Try changing type arguments so that they conform to the bounds. // FNowhere fNowhereNull; // Error. -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue42429.dart:10:18: Context: This is the type variable whose bound isn't conformed to. // typedef FNowhere = Function(); // ^ // -// pkg/front_end/testcases/nnbd/issue42429.dart:33:22: Error: Type argument 'Object?' doesn't conform to the bound 'num' of the type variable 'X' on 'FArgument'. +// pkg/front_end/testcases/nnbd/issue42429.dart:33:3: Error: Type argument 'Object?' doesn't conform to the bound 'num' of the type variable 'X' on 'FArgument'. // - 'Object' is from 'dart:core'. // Try changing type arguments so that they conform to the bounds. // FArgument fArgumentObjectNullable; // Error. -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue42429.dart:7:19: Context: This is the type variable whose bound isn't conformed to. // typedef FArgument = Function(X); // ^ // -// pkg/front_end/testcases/nnbd/issue42429.dart:34:22: Error: Type argument 'dynamic' doesn't conform to the bound 'num' of the type variable 'X' on 'FArgument'. +// pkg/front_end/testcases/nnbd/issue42429.dart:34:3: Error: Type argument 'dynamic' doesn't conform to the bound 'num' of the type variable 'X' on 'FArgument'. // Try changing type arguments so that they conform to the bounds. // FArgument fArgumentDynamic; // Error. -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue42429.dart:7:19: Context: This is the type variable whose bound isn't conformed to. // typedef FArgument = Function(X); // ^ // -// pkg/front_end/testcases/nnbd/issue42429.dart:35:19: Error: Type argument 'void' doesn't conform to the bound 'num' of the type variable 'X' on 'FArgument'. +// pkg/front_end/testcases/nnbd/issue42429.dart:35:3: Error: Type argument 'void' doesn't conform to the bound 'num' of the type variable 'X' on 'FArgument'. // Try changing type arguments so that they conform to the bounds. // FArgument fArgumentVoid; // Error. -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue42429.dart:7:19: Context: This is the type variable whose bound isn't conformed to. // typedef FArgument = Function(X); // ^ diff --git a/pkg/front_end/testcases/nnbd/issue42429.dart.weak.transformed.expect b/pkg/front_end/testcases/nnbd/issue42429.dart.weak.transformed.expect index 717c8599a83..0cbdeaee6ab 100644 --- a/pkg/front_end/testcases/nnbd/issue42429.dart.weak.transformed.expect +++ b/pkg/front_end/testcases/nnbd/issue42429.dart.weak.transformed.expect @@ -2,192 +2,192 @@ library /*isNonNullableByDefault*/; // // Problems in library: // -// pkg/front_end/testcases/nnbd/issue42429.dart:13:13: Error: Type argument 'Object' doesn't conform to the bound 'num' of the type variable 'T' on 'A'. +// pkg/front_end/testcases/nnbd/issue42429.dart:13:3: Error: Type argument 'Object' doesn't conform to the bound 'num' of the type variable 'T' on 'A'. // - 'Object' is from 'dart:core'. // Try changing type arguments so that they conform to the bounds. // A aObject; // Error. -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue42429.dart:5:9: Context: This is the type variable whose bound isn't conformed to. // class A {} // ^ // -// pkg/front_end/testcases/nnbd/issue42429.dart:14:11: Error: Type argument 'num?' doesn't conform to the bound 'num' of the type variable 'T' on 'A'. +// pkg/front_end/testcases/nnbd/issue42429.dart:14:3: Error: Type argument 'num?' doesn't conform to the bound 'num' of the type variable 'T' on 'A'. // Try changing type arguments so that they conform to the bounds. // A aNumNullable; // Error. -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue42429.dart:5:9: Context: This is the type variable whose bound isn't conformed to. // class A {} // ^ // -// pkg/front_end/testcases/nnbd/issue42429.dart:15:11: Error: Type argument 'int?' doesn't conform to the bound 'num' of the type variable 'T' on 'A'. +// pkg/front_end/testcases/nnbd/issue42429.dart:15:3: Error: Type argument 'int?' doesn't conform to the bound 'num' of the type variable 'T' on 'A'. // Try changing type arguments so that they conform to the bounds. // A aIntNullable; // Error. -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue42429.dart:5:9: Context: This is the type variable whose bound isn't conformed to. // class A {} // ^ // -// pkg/front_end/testcases/nnbd/issue42429.dart:16:11: Error: Type argument 'Null' doesn't conform to the bound 'num' of the type variable 'T' on 'A'. +// pkg/front_end/testcases/nnbd/issue42429.dart:16:3: Error: Type argument 'Null' doesn't conform to the bound 'num' of the type variable 'T' on 'A'. // Try changing type arguments so that they conform to the bounds. // A aNull; // Error. -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue42429.dart:5:9: Context: This is the type variable whose bound isn't conformed to. // class A {} // ^ // -// pkg/front_end/testcases/nnbd/issue42429.dart:17:21: Error: Type argument 'Object' doesn't conform to the bound 'num' of the type variable 'X' on 'FArgument'. +// pkg/front_end/testcases/nnbd/issue42429.dart:17:3: Error: Type argument 'Object' doesn't conform to the bound 'num' of the type variable 'X' on 'FArgument'. // - 'Object' is from 'dart:core'. // Try changing type arguments so that they conform to the bounds. // FArgument fArgumentObject; // Error. -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue42429.dart:7:19: Context: This is the type variable whose bound isn't conformed to. // typedef FArgument = Function(X); // ^ // -// pkg/front_end/testcases/nnbd/issue42429.dart:18:19: Error: Type argument 'num?' doesn't conform to the bound 'num' of the type variable 'X' on 'FArgument'. +// pkg/front_end/testcases/nnbd/issue42429.dart:18:3: Error: Type argument 'num?' doesn't conform to the bound 'num' of the type variable 'X' on 'FArgument'. // Try changing type arguments so that they conform to the bounds. // FArgument fArgumentNumNullable; // Error. -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue42429.dart:7:19: Context: This is the type variable whose bound isn't conformed to. // typedef FArgument = Function(X); // ^ // -// pkg/front_end/testcases/nnbd/issue42429.dart:19:19: Error: Type argument 'int?' doesn't conform to the bound 'num' of the type variable 'X' on 'FArgument'. +// pkg/front_end/testcases/nnbd/issue42429.dart:19:3: Error: Type argument 'int?' doesn't conform to the bound 'num' of the type variable 'X' on 'FArgument'. // Try changing type arguments so that they conform to the bounds. // FArgument fArgumentIntNullable; // Error. -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue42429.dart:7:19: Context: This is the type variable whose bound isn't conformed to. // typedef FArgument = Function(X); // ^ // -// pkg/front_end/testcases/nnbd/issue42429.dart:20:19: Error: Type argument 'Null' doesn't conform to the bound 'num' of the type variable 'X' on 'FArgument'. +// pkg/front_end/testcases/nnbd/issue42429.dart:20:3: Error: Type argument 'Null' doesn't conform to the bound 'num' of the type variable 'X' on 'FArgument'. // Try changing type arguments so that they conform to the bounds. // FArgument fArgumentNull; // Error. -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue42429.dart:7:19: Context: This is the type variable whose bound isn't conformed to. // typedef FArgument = Function(X); // ^ // -// pkg/front_end/testcases/nnbd/issue42429.dart:21:19: Error: Type argument 'Object' doesn't conform to the bound 'num' of the type variable 'X' on 'FReturn'. +// pkg/front_end/testcases/nnbd/issue42429.dart:21:3: Error: Type argument 'Object' doesn't conform to the bound 'num' of the type variable 'X' on 'FReturn'. // - 'Object' is from 'dart:core'. // Try changing type arguments so that they conform to the bounds. // FReturn fReturnObject; // Error. -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue42429.dart:8:17: Context: This is the type variable whose bound isn't conformed to. // typedef FReturn = X Function(); // ^ // -// pkg/front_end/testcases/nnbd/issue42429.dart:22:17: Error: Type argument 'num?' doesn't conform to the bound 'num' of the type variable 'X' on 'FReturn'. +// pkg/front_end/testcases/nnbd/issue42429.dart:22:3: Error: Type argument 'num?' doesn't conform to the bound 'num' of the type variable 'X' on 'FReturn'. // Try changing type arguments so that they conform to the bounds. // FReturn fReturnNumNullable; // Error. -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue42429.dart:8:17: Context: This is the type variable whose bound isn't conformed to. // typedef FReturn = X Function(); // ^ // -// pkg/front_end/testcases/nnbd/issue42429.dart:23:17: Error: Type argument 'int?' doesn't conform to the bound 'num' of the type variable 'X' on 'FReturn'. +// pkg/front_end/testcases/nnbd/issue42429.dart:23:3: Error: Type argument 'int?' doesn't conform to the bound 'num' of the type variable 'X' on 'FReturn'. // Try changing type arguments so that they conform to the bounds. // FReturn fReturnIntNullable; // Error. -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue42429.dart:8:17: Context: This is the type variable whose bound isn't conformed to. // typedef FReturn = X Function(); // ^ // -// pkg/front_end/testcases/nnbd/issue42429.dart:24:17: Error: Type argument 'Null' doesn't conform to the bound 'num' of the type variable 'X' on 'FReturn'. +// pkg/front_end/testcases/nnbd/issue42429.dart:24:3: Error: Type argument 'Null' doesn't conform to the bound 'num' of the type variable 'X' on 'FReturn'. // Try changing type arguments so that they conform to the bounds. // FReturn fReturnNull; // Error. -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue42429.dart:8:17: Context: This is the type variable whose bound isn't conformed to. // typedef FReturn = X Function(); // ^ // -// pkg/front_end/testcases/nnbd/issue42429.dart:25:17: Error: Type argument 'Object' doesn't conform to the bound 'num' of the type variable 'X' on 'FBoth'. +// pkg/front_end/testcases/nnbd/issue42429.dart:25:3: Error: Type argument 'Object' doesn't conform to the bound 'num' of the type variable 'X' on 'FBoth'. // - 'Object' is from 'dart:core'. // Try changing type arguments so that they conform to the bounds. // FBoth fBothObject; // Error. -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue42429.dart:9:15: Context: This is the type variable whose bound isn't conformed to. // typedef FBoth = X Function(X); // ^ // -// pkg/front_end/testcases/nnbd/issue42429.dart:26:15: Error: Type argument 'num?' doesn't conform to the bound 'num' of the type variable 'X' on 'FBoth'. +// pkg/front_end/testcases/nnbd/issue42429.dart:26:3: Error: Type argument 'num?' doesn't conform to the bound 'num' of the type variable 'X' on 'FBoth'. // Try changing type arguments so that they conform to the bounds. // FBoth fBothNumNullable; // Error. -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue42429.dart:9:15: Context: This is the type variable whose bound isn't conformed to. // typedef FBoth = X Function(X); // ^ // -// pkg/front_end/testcases/nnbd/issue42429.dart:27:15: Error: Type argument 'int?' doesn't conform to the bound 'num' of the type variable 'X' on 'FBoth'. +// pkg/front_end/testcases/nnbd/issue42429.dart:27:3: Error: Type argument 'int?' doesn't conform to the bound 'num' of the type variable 'X' on 'FBoth'. // Try changing type arguments so that they conform to the bounds. // FBoth fBothIntNullable; // Error. -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue42429.dart:9:15: Context: This is the type variable whose bound isn't conformed to. // typedef FBoth = X Function(X); // ^ // -// pkg/front_end/testcases/nnbd/issue42429.dart:28:15: Error: Type argument 'Null' doesn't conform to the bound 'num' of the type variable 'X' on 'FBoth'. +// pkg/front_end/testcases/nnbd/issue42429.dart:28:3: Error: Type argument 'Null' doesn't conform to the bound 'num' of the type variable 'X' on 'FBoth'. // Try changing type arguments so that they conform to the bounds. // FBoth fBothNull; // Error. -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue42429.dart:9:15: Context: This is the type variable whose bound isn't conformed to. // typedef FBoth = X Function(X); // ^ // -// pkg/front_end/testcases/nnbd/issue42429.dart:29:20: Error: Type argument 'Object' doesn't conform to the bound 'num' of the type variable 'X' on 'FNowhere'. +// pkg/front_end/testcases/nnbd/issue42429.dart:29:3: Error: Type argument 'Object' doesn't conform to the bound 'num' of the type variable 'X' on 'FNowhere'. // - 'Object' is from 'dart:core'. // Try changing type arguments so that they conform to the bounds. // FNowhere fNowhereObject; // Error. -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue42429.dart:10:18: Context: This is the type variable whose bound isn't conformed to. // typedef FNowhere = Function(); // ^ // -// pkg/front_end/testcases/nnbd/issue42429.dart:30:18: Error: Type argument 'num?' doesn't conform to the bound 'num' of the type variable 'X' on 'FNowhere'. +// pkg/front_end/testcases/nnbd/issue42429.dart:30:3: Error: Type argument 'num?' doesn't conform to the bound 'num' of the type variable 'X' on 'FNowhere'. // Try changing type arguments so that they conform to the bounds. // FNowhere fNowhereNumNullable; // Error. -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue42429.dart:10:18: Context: This is the type variable whose bound isn't conformed to. // typedef FNowhere = Function(); // ^ // -// pkg/front_end/testcases/nnbd/issue42429.dart:31:18: Error: Type argument 'int?' doesn't conform to the bound 'num' of the type variable 'X' on 'FNowhere'. +// pkg/front_end/testcases/nnbd/issue42429.dart:31:3: Error: Type argument 'int?' doesn't conform to the bound 'num' of the type variable 'X' on 'FNowhere'. // Try changing type arguments so that they conform to the bounds. // FNowhere fNowhereIntNullable; // Error. -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue42429.dart:10:18: Context: This is the type variable whose bound isn't conformed to. // typedef FNowhere = Function(); // ^ // -// pkg/front_end/testcases/nnbd/issue42429.dart:32:18: Error: Type argument 'Null' doesn't conform to the bound 'num' of the type variable 'X' on 'FNowhere'. +// pkg/front_end/testcases/nnbd/issue42429.dart:32:3: Error: Type argument 'Null' doesn't conform to the bound 'num' of the type variable 'X' on 'FNowhere'. // Try changing type arguments so that they conform to the bounds. // FNowhere fNowhereNull; // Error. -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue42429.dart:10:18: Context: This is the type variable whose bound isn't conformed to. // typedef FNowhere = Function(); // ^ // -// pkg/front_end/testcases/nnbd/issue42429.dart:33:22: Error: Type argument 'Object?' doesn't conform to the bound 'num' of the type variable 'X' on 'FArgument'. +// pkg/front_end/testcases/nnbd/issue42429.dart:33:3: Error: Type argument 'Object?' doesn't conform to the bound 'num' of the type variable 'X' on 'FArgument'. // - 'Object' is from 'dart:core'. // Try changing type arguments so that they conform to the bounds. // FArgument fArgumentObjectNullable; // Error. -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue42429.dart:7:19: Context: This is the type variable whose bound isn't conformed to. // typedef FArgument = Function(X); // ^ // -// pkg/front_end/testcases/nnbd/issue42429.dart:34:22: Error: Type argument 'dynamic' doesn't conform to the bound 'num' of the type variable 'X' on 'FArgument'. +// pkg/front_end/testcases/nnbd/issue42429.dart:34:3: Error: Type argument 'dynamic' doesn't conform to the bound 'num' of the type variable 'X' on 'FArgument'. // Try changing type arguments so that they conform to the bounds. // FArgument fArgumentDynamic; // Error. -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue42429.dart:7:19: Context: This is the type variable whose bound isn't conformed to. // typedef FArgument = Function(X); // ^ // -// pkg/front_end/testcases/nnbd/issue42429.dart:35:19: Error: Type argument 'void' doesn't conform to the bound 'num' of the type variable 'X' on 'FArgument'. +// pkg/front_end/testcases/nnbd/issue42429.dart:35:3: Error: Type argument 'void' doesn't conform to the bound 'num' of the type variable 'X' on 'FArgument'. // Try changing type arguments so that they conform to the bounds. // FArgument fArgumentVoid; // Error. -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue42429.dart:7:19: Context: This is the type variable whose bound isn't conformed to. // typedef FArgument = Function(X); // ^ diff --git a/pkg/front_end/testcases/nnbd/issue42434.dart.strong.expect b/pkg/front_end/testcases/nnbd/issue42434.dart.strong.expect index e263ad8722a..1495f437684 100644 --- a/pkg/front_end/testcases/nnbd/issue42434.dart.strong.expect +++ b/pkg/front_end/testcases/nnbd/issue42434.dart.strong.expect @@ -2,13 +2,13 @@ library /*isNonNullableByDefault*/; // // Problems in library: // -// pkg/front_end/testcases/nnbd/issue42434.dart:7:21: Error: Type argument 'X/*1*/' doesn't conform to the bound 'A' of the type variable 'X' on 'A'. +// pkg/front_end/testcases/nnbd/issue42434.dart:7:41: Error: Type argument 'X/*1*/' doesn't conform to the bound 'A' of the type variable 'X' on 'A'. // - 'X/*1*/' is from 'pkg/front_end/testcases/nnbd/issue42434.dart'. // - 'A' is from 'pkg/front_end/testcases/nnbd/issue42434.dart'. // - 'X/*2*/' is from 'pkg/front_end/testcases/nnbd/issue42434.dart'. // Try changing type arguments so that they conform to the bounds. // typedef AAlias = Function> (); -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue42434.dart:5:9: Context: This is the type variable whose bound isn't conformed to. // class A> {} // ^ diff --git a/pkg/front_end/testcases/nnbd/issue42434.dart.strong.transformed.expect b/pkg/front_end/testcases/nnbd/issue42434.dart.strong.transformed.expect index e263ad8722a..1495f437684 100644 --- a/pkg/front_end/testcases/nnbd/issue42434.dart.strong.transformed.expect +++ b/pkg/front_end/testcases/nnbd/issue42434.dart.strong.transformed.expect @@ -2,13 +2,13 @@ library /*isNonNullableByDefault*/; // // Problems in library: // -// pkg/front_end/testcases/nnbd/issue42434.dart:7:21: Error: Type argument 'X/*1*/' doesn't conform to the bound 'A' of the type variable 'X' on 'A'. +// pkg/front_end/testcases/nnbd/issue42434.dart:7:41: Error: Type argument 'X/*1*/' doesn't conform to the bound 'A' of the type variable 'X' on 'A'. // - 'X/*1*/' is from 'pkg/front_end/testcases/nnbd/issue42434.dart'. // - 'A' is from 'pkg/front_end/testcases/nnbd/issue42434.dart'. // - 'X/*2*/' is from 'pkg/front_end/testcases/nnbd/issue42434.dart'. // Try changing type arguments so that they conform to the bounds. // typedef AAlias = Function> (); -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue42434.dart:5:9: Context: This is the type variable whose bound isn't conformed to. // class A> {} // ^ diff --git a/pkg/front_end/testcases/nnbd/issue42434.dart.weak.expect b/pkg/front_end/testcases/nnbd/issue42434.dart.weak.expect index e263ad8722a..1495f437684 100644 --- a/pkg/front_end/testcases/nnbd/issue42434.dart.weak.expect +++ b/pkg/front_end/testcases/nnbd/issue42434.dart.weak.expect @@ -2,13 +2,13 @@ library /*isNonNullableByDefault*/; // // Problems in library: // -// pkg/front_end/testcases/nnbd/issue42434.dart:7:21: Error: Type argument 'X/*1*/' doesn't conform to the bound 'A' of the type variable 'X' on 'A'. +// pkg/front_end/testcases/nnbd/issue42434.dart:7:41: Error: Type argument 'X/*1*/' doesn't conform to the bound 'A' of the type variable 'X' on 'A'. // - 'X/*1*/' is from 'pkg/front_end/testcases/nnbd/issue42434.dart'. // - 'A' is from 'pkg/front_end/testcases/nnbd/issue42434.dart'. // - 'X/*2*/' is from 'pkg/front_end/testcases/nnbd/issue42434.dart'. // Try changing type arguments so that they conform to the bounds. // typedef AAlias = Function> (); -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue42434.dart:5:9: Context: This is the type variable whose bound isn't conformed to. // class A> {} // ^ diff --git a/pkg/front_end/testcases/nnbd/issue42434.dart.weak.modular.expect b/pkg/front_end/testcases/nnbd/issue42434.dart.weak.modular.expect index e263ad8722a..1495f437684 100644 --- a/pkg/front_end/testcases/nnbd/issue42434.dart.weak.modular.expect +++ b/pkg/front_end/testcases/nnbd/issue42434.dart.weak.modular.expect @@ -2,13 +2,13 @@ library /*isNonNullableByDefault*/; // // Problems in library: // -// pkg/front_end/testcases/nnbd/issue42434.dart:7:21: Error: Type argument 'X/*1*/' doesn't conform to the bound 'A' of the type variable 'X' on 'A'. +// pkg/front_end/testcases/nnbd/issue42434.dart:7:41: Error: Type argument 'X/*1*/' doesn't conform to the bound 'A' of the type variable 'X' on 'A'. // - 'X/*1*/' is from 'pkg/front_end/testcases/nnbd/issue42434.dart'. // - 'A' is from 'pkg/front_end/testcases/nnbd/issue42434.dart'. // - 'X/*2*/' is from 'pkg/front_end/testcases/nnbd/issue42434.dart'. // Try changing type arguments so that they conform to the bounds. // typedef AAlias = Function> (); -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue42434.dart:5:9: Context: This is the type variable whose bound isn't conformed to. // class A> {} // ^ diff --git a/pkg/front_end/testcases/nnbd/issue42434.dart.weak.outline.expect b/pkg/front_end/testcases/nnbd/issue42434.dart.weak.outline.expect index 46e4efc7add..ec07cf7d6d1 100644 --- a/pkg/front_end/testcases/nnbd/issue42434.dart.weak.outline.expect +++ b/pkg/front_end/testcases/nnbd/issue42434.dart.weak.outline.expect @@ -2,13 +2,13 @@ library /*isNonNullableByDefault*/; // // Problems in library: // -// pkg/front_end/testcases/nnbd/issue42434.dart:7:21: Error: Type argument 'X/*1*/' doesn't conform to the bound 'A' of the type variable 'X' on 'A'. +// pkg/front_end/testcases/nnbd/issue42434.dart:7:41: Error: Type argument 'X/*1*/' doesn't conform to the bound 'A' of the type variable 'X' on 'A'. // - 'X/*1*/' is from 'pkg/front_end/testcases/nnbd/issue42434.dart'. // - 'A' is from 'pkg/front_end/testcases/nnbd/issue42434.dart'. // - 'X/*2*/' is from 'pkg/front_end/testcases/nnbd/issue42434.dart'. // Try changing type arguments so that they conform to the bounds. // typedef AAlias = Function> (); -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue42434.dart:5:9: Context: This is the type variable whose bound isn't conformed to. // class A> {} // ^ diff --git a/pkg/front_end/testcases/nnbd/issue42434.dart.weak.transformed.expect b/pkg/front_end/testcases/nnbd/issue42434.dart.weak.transformed.expect index e263ad8722a..1495f437684 100644 --- a/pkg/front_end/testcases/nnbd/issue42434.dart.weak.transformed.expect +++ b/pkg/front_end/testcases/nnbd/issue42434.dart.weak.transformed.expect @@ -2,13 +2,13 @@ library /*isNonNullableByDefault*/; // // Problems in library: // -// pkg/front_end/testcases/nnbd/issue42434.dart:7:21: Error: Type argument 'X/*1*/' doesn't conform to the bound 'A' of the type variable 'X' on 'A'. +// pkg/front_end/testcases/nnbd/issue42434.dart:7:41: Error: Type argument 'X/*1*/' doesn't conform to the bound 'A' of the type variable 'X' on 'A'. // - 'X/*1*/' is from 'pkg/front_end/testcases/nnbd/issue42434.dart'. // - 'A' is from 'pkg/front_end/testcases/nnbd/issue42434.dart'. // - 'X/*2*/' is from 'pkg/front_end/testcases/nnbd/issue42434.dart'. // Try changing type arguments so that they conform to the bounds. // typedef AAlias = Function> (); -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue42434.dart:5:9: Context: This is the type variable whose bound isn't conformed to. // class A> {} // ^ diff --git a/pkg/front_end/testcases/nnbd/issue42434_2.dart.strong.expect b/pkg/front_end/testcases/nnbd/issue42434_2.dart.strong.expect index 88588f63824..a478b42f55f 100644 --- a/pkg/front_end/testcases/nnbd/issue42434_2.dart.strong.expect +++ b/pkg/front_end/testcases/nnbd/issue42434_2.dart.strong.expect @@ -2,13 +2,13 @@ library /*isNonNullableByDefault*/; // // Problems in library: // -// pkg/front_end/testcases/nnbd/issue42434_2.dart:5:21: Error: Type argument 'X/*1*/' doesn't conform to the bound 'B' of the type variable 'X' on 'A'. +// pkg/front_end/testcases/nnbd/issue42434_2.dart:5:41: Error: Type argument 'X/*1*/' doesn't conform to the bound 'B' of the type variable 'X' on 'A'. // - 'X/*1*/' is from 'pkg/front_end/testcases/nnbd/issue42434_2.dart'. // - 'B' is from 'pkg/front_end/testcases/nnbd/issue42434_2.dart'. // - 'X/*2*/' is from 'pkg/front_end/testcases/nnbd/issue42434_2.dart'. // Try changing type arguments so that they conform to the bounds. // typedef AAlias = Function> (); -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue42434_2.dart:7:11: Context: This is the type variable whose bound isn't conformed to. // typedef A> = Function(); // ^ diff --git a/pkg/front_end/testcases/nnbd/issue42434_2.dart.strong.transformed.expect b/pkg/front_end/testcases/nnbd/issue42434_2.dart.strong.transformed.expect index 88588f63824..a478b42f55f 100644 --- a/pkg/front_end/testcases/nnbd/issue42434_2.dart.strong.transformed.expect +++ b/pkg/front_end/testcases/nnbd/issue42434_2.dart.strong.transformed.expect @@ -2,13 +2,13 @@ library /*isNonNullableByDefault*/; // // Problems in library: // -// pkg/front_end/testcases/nnbd/issue42434_2.dart:5:21: Error: Type argument 'X/*1*/' doesn't conform to the bound 'B' of the type variable 'X' on 'A'. +// pkg/front_end/testcases/nnbd/issue42434_2.dart:5:41: Error: Type argument 'X/*1*/' doesn't conform to the bound 'B' of the type variable 'X' on 'A'. // - 'X/*1*/' is from 'pkg/front_end/testcases/nnbd/issue42434_2.dart'. // - 'B' is from 'pkg/front_end/testcases/nnbd/issue42434_2.dart'. // - 'X/*2*/' is from 'pkg/front_end/testcases/nnbd/issue42434_2.dart'. // Try changing type arguments so that they conform to the bounds. // typedef AAlias = Function> (); -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue42434_2.dart:7:11: Context: This is the type variable whose bound isn't conformed to. // typedef A> = Function(); // ^ diff --git a/pkg/front_end/testcases/nnbd/issue42434_2.dart.weak.expect b/pkg/front_end/testcases/nnbd/issue42434_2.dart.weak.expect index 88588f63824..a478b42f55f 100644 --- a/pkg/front_end/testcases/nnbd/issue42434_2.dart.weak.expect +++ b/pkg/front_end/testcases/nnbd/issue42434_2.dart.weak.expect @@ -2,13 +2,13 @@ library /*isNonNullableByDefault*/; // // Problems in library: // -// pkg/front_end/testcases/nnbd/issue42434_2.dart:5:21: Error: Type argument 'X/*1*/' doesn't conform to the bound 'B' of the type variable 'X' on 'A'. +// pkg/front_end/testcases/nnbd/issue42434_2.dart:5:41: Error: Type argument 'X/*1*/' doesn't conform to the bound 'B' of the type variable 'X' on 'A'. // - 'X/*1*/' is from 'pkg/front_end/testcases/nnbd/issue42434_2.dart'. // - 'B' is from 'pkg/front_end/testcases/nnbd/issue42434_2.dart'. // - 'X/*2*/' is from 'pkg/front_end/testcases/nnbd/issue42434_2.dart'. // Try changing type arguments so that they conform to the bounds. // typedef AAlias = Function> (); -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue42434_2.dart:7:11: Context: This is the type variable whose bound isn't conformed to. // typedef A> = Function(); // ^ diff --git a/pkg/front_end/testcases/nnbd/issue42434_2.dart.weak.modular.expect b/pkg/front_end/testcases/nnbd/issue42434_2.dart.weak.modular.expect index 88588f63824..a478b42f55f 100644 --- a/pkg/front_end/testcases/nnbd/issue42434_2.dart.weak.modular.expect +++ b/pkg/front_end/testcases/nnbd/issue42434_2.dart.weak.modular.expect @@ -2,13 +2,13 @@ library /*isNonNullableByDefault*/; // // Problems in library: // -// pkg/front_end/testcases/nnbd/issue42434_2.dart:5:21: Error: Type argument 'X/*1*/' doesn't conform to the bound 'B' of the type variable 'X' on 'A'. +// pkg/front_end/testcases/nnbd/issue42434_2.dart:5:41: Error: Type argument 'X/*1*/' doesn't conform to the bound 'B' of the type variable 'X' on 'A'. // - 'X/*1*/' is from 'pkg/front_end/testcases/nnbd/issue42434_2.dart'. // - 'B' is from 'pkg/front_end/testcases/nnbd/issue42434_2.dart'. // - 'X/*2*/' is from 'pkg/front_end/testcases/nnbd/issue42434_2.dart'. // Try changing type arguments so that they conform to the bounds. // typedef AAlias = Function> (); -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue42434_2.dart:7:11: Context: This is the type variable whose bound isn't conformed to. // typedef A> = Function(); // ^ diff --git a/pkg/front_end/testcases/nnbd/issue42434_2.dart.weak.outline.expect b/pkg/front_end/testcases/nnbd/issue42434_2.dart.weak.outline.expect index d3140701df7..7167cc7ed0e 100644 --- a/pkg/front_end/testcases/nnbd/issue42434_2.dart.weak.outline.expect +++ b/pkg/front_end/testcases/nnbd/issue42434_2.dart.weak.outline.expect @@ -2,13 +2,13 @@ library /*isNonNullableByDefault*/; // // Problems in library: // -// pkg/front_end/testcases/nnbd/issue42434_2.dart:5:21: Error: Type argument 'X/*1*/' doesn't conform to the bound 'B' of the type variable 'X' on 'A'. +// pkg/front_end/testcases/nnbd/issue42434_2.dart:5:41: Error: Type argument 'X/*1*/' doesn't conform to the bound 'B' of the type variable 'X' on 'A'. // - 'X/*1*/' is from 'pkg/front_end/testcases/nnbd/issue42434_2.dart'. // - 'B' is from 'pkg/front_end/testcases/nnbd/issue42434_2.dart'. // - 'X/*2*/' is from 'pkg/front_end/testcases/nnbd/issue42434_2.dart'. // Try changing type arguments so that they conform to the bounds. // typedef AAlias = Function> (); -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue42434_2.dart:7:11: Context: This is the type variable whose bound isn't conformed to. // typedef A> = Function(); // ^ diff --git a/pkg/front_end/testcases/nnbd/issue42434_2.dart.weak.transformed.expect b/pkg/front_end/testcases/nnbd/issue42434_2.dart.weak.transformed.expect index 88588f63824..a478b42f55f 100644 --- a/pkg/front_end/testcases/nnbd/issue42434_2.dart.weak.transformed.expect +++ b/pkg/front_end/testcases/nnbd/issue42434_2.dart.weak.transformed.expect @@ -2,13 +2,13 @@ library /*isNonNullableByDefault*/; // // Problems in library: // -// pkg/front_end/testcases/nnbd/issue42434_2.dart:5:21: Error: Type argument 'X/*1*/' doesn't conform to the bound 'B' of the type variable 'X' on 'A'. +// pkg/front_end/testcases/nnbd/issue42434_2.dart:5:41: Error: Type argument 'X/*1*/' doesn't conform to the bound 'B' of the type variable 'X' on 'A'. // - 'X/*1*/' is from 'pkg/front_end/testcases/nnbd/issue42434_2.dart'. // - 'B' is from 'pkg/front_end/testcases/nnbd/issue42434_2.dart'. // - 'X/*2*/' is from 'pkg/front_end/testcases/nnbd/issue42434_2.dart'. // Try changing type arguments so that they conform to the bounds. // typedef AAlias = Function> (); -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue42434_2.dart:7:11: Context: This is the type variable whose bound isn't conformed to. // typedef A> = Function(); // ^ diff --git a/pkg/front_end/testcases/nnbd/issue43211.dart.strong.expect b/pkg/front_end/testcases/nnbd/issue43211.dart.strong.expect index 46f67824d3b..c89209d1a80 100644 --- a/pkg/front_end/testcases/nnbd/issue43211.dart.strong.expect +++ b/pkg/front_end/testcases/nnbd/issue43211.dart.strong.expect @@ -2,27 +2,27 @@ library /*isNonNullableByDefault*/; // // Problems in library: // -// pkg/front_end/testcases/nnbd/issue43211.dart:10:53: Error: Type argument 'A' doesn't conform to the bound 'A?' of the type variable 'X' on 'A'. +// pkg/front_end/testcases/nnbd/issue43211.dart:10:41: Error: Type argument 'A' doesn't conform to the bound 'A?' of the type variable 'X' on 'A'. // - 'A' is from 'pkg/front_end/testcases/nnbd/issue43211.dart'. // Try changing type arguments so that they conform to the bounds. // void method1?>(A a, A>? b) { -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue43211.dart:5:9: Context: This is the type variable whose bound isn't conformed to. // class A?> {} // ^ // -// pkg/front_end/testcases/nnbd/issue43211.dart:15:39: Error: Type argument 'Y' doesn't conform to the bound 'num' of the type variable 'X' on 'D'. +// pkg/front_end/testcases/nnbd/issue43211.dart:15:34: Error: Type argument 'Y' doesn't conform to the bound 'num' of the type variable 'X' on 'D'. // Try changing type arguments so that they conform to the bounds. // void method2(D a, D? b) { -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue43211.dart:7:9: Context: This is the type variable whose bound isn't conformed to. // class D {} // ^ // -// pkg/front_end/testcases/nnbd/issue43211.dart:15:53: Error: Type argument 'String' doesn't conform to the bound 'num' of the type variable 'X' on 'D'. +// pkg/front_end/testcases/nnbd/issue43211.dart:15:42: Error: Type argument 'String' doesn't conform to the bound 'num' of the type variable 'X' on 'D'. // Try changing type arguments so that they conform to the bounds. // void method2(D a, D? b) { -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue43211.dart:7:9: Context: This is the type variable whose bound isn't conformed to. // class D {} // ^ @@ -38,158 +38,158 @@ library /*isNonNullableByDefault*/; // class A?> {} // ^ // -// pkg/front_end/testcases/nnbd/issue43211.dart:23:7: Error: Type argument 'X/*1*/' doesn't conform to the bound 'A?' of the type variable 'X' on 'A' in the supertype 'A' of class 'B'. +// pkg/front_end/testcases/nnbd/issue43211.dart:24:36: Error: Type argument 'Y' doesn't conform to the bound 'A?' of the type variable 'X' on 'A'. +// - 'A' is from 'pkg/front_end/testcases/nnbd/issue43211.dart'. +// Try changing type arguments so that they conform to the bounds. +// void method1?>(A a, A>? b) { +// ^ +// pkg/front_end/testcases/nnbd/issue43211.dart:5:9: Context: This is the type variable whose bound isn't conformed to. +// class A?> {} +// ^ +// +// pkg/front_end/testcases/nnbd/issue43211.dart:24:44: Error: Type argument 'A' doesn't conform to the bound 'A?' of the type variable 'X' on 'A'. +// - 'A' is from 'pkg/front_end/testcases/nnbd/issue43211.dart'. +// Try changing type arguments so that they conform to the bounds. +// void method1?>(A a, A>? b) { +// ^ +// pkg/front_end/testcases/nnbd/issue43211.dart:5:9: Context: This is the type variable whose bound isn't conformed to. +// class A?> {} +// ^ +// +// pkg/front_end/testcases/nnbd/issue43211.dart:29:34: Error: Type argument 'Y' doesn't conform to the bound 'num' of the type variable 'X' on 'D'. +// Try changing type arguments so that they conform to the bounds. +// void method2(D a, D? b) { +// ^ +// pkg/front_end/testcases/nnbd/issue43211.dart:7:9: Context: This is the type variable whose bound isn't conformed to. +// class D {} +// ^ +// +// pkg/front_end/testcases/nnbd/issue43211.dart:29:42: Error: Type argument 'String' doesn't conform to the bound 'num' of the type variable 'X' on 'D'. +// Try changing type arguments so that they conform to the bounds. +// void method2(D a, D? b) { +// ^ +// pkg/front_end/testcases/nnbd/issue43211.dart:7:9: Context: This is the type variable whose bound isn't conformed to. +// class D {} +// ^ +// +// pkg/front_end/testcases/nnbd/issue43211.dart:23:40: Error: Type argument 'X/*1*/' doesn't conform to the bound 'A?' of the type variable 'X' on 'A'. // - 'X/*1*/' is from 'pkg/front_end/testcases/nnbd/issue43211.dart'. // - 'A' is from 'pkg/front_end/testcases/nnbd/issue43211.dart'. // - 'X/*2*/' is from 'pkg/front_end/testcases/nnbd/issue43211.dart'. // Try changing type arguments so that they conform to the bounds. // class B?> implements A { -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue43211.dart:5:9: Context: This is the type variable whose bound isn't conformed to. // class A?> {} // ^ // -// pkg/front_end/testcases/nnbd/issue43211.dart:24:41: Error: Type argument 'Y' doesn't conform to the bound 'A?' of the type variable 'X' on 'A'. -// - 'A' is from 'pkg/front_end/testcases/nnbd/issue43211.dart'. -// Try changing type arguments so that they conform to the bounds. -// void method1?>(A a, A>? b) { -// ^ -// pkg/front_end/testcases/nnbd/issue43211.dart:5:9: Context: This is the type variable whose bound isn't conformed to. -// class A?> {} -// ^ -// -// pkg/front_end/testcases/nnbd/issue43211.dart:24:56: Error: Type argument 'A' doesn't conform to the bound 'A?' of the type variable 'X' on 'A'. -// - 'A' is from 'pkg/front_end/testcases/nnbd/issue43211.dart'. -// Try changing type arguments so that they conform to the bounds. -// void method1?>(A a, A>? b) { -// ^ -// pkg/front_end/testcases/nnbd/issue43211.dart:5:9: Context: This is the type variable whose bound isn't conformed to. -// class A?> {} -// ^ -// -// pkg/front_end/testcases/nnbd/issue43211.dart:29:39: Error: Type argument 'Y' doesn't conform to the bound 'num' of the type variable 'X' on 'D'. -// Try changing type arguments so that they conform to the bounds. -// void method2(D a, D? b) { -// ^ -// pkg/front_end/testcases/nnbd/issue43211.dart:7:9: Context: This is the type variable whose bound isn't conformed to. -// class D {} -// ^ -// -// pkg/front_end/testcases/nnbd/issue43211.dart:29:53: Error: Type argument 'String' doesn't conform to the bound 'num' of the type variable 'X' on 'D'. -// Try changing type arguments so that they conform to the bounds. -// void method2(D a, D? b) { -// ^ -// pkg/front_end/testcases/nnbd/issue43211.dart:7:9: Context: This is the type variable whose bound isn't conformed to. -// class D {} -// ^ -// -// pkg/front_end/testcases/nnbd/issue43211.dart:36:34: Error: Type argument 'A' doesn't conform to the bound 'A?' of the type variable 'X' on 'A'. +// pkg/front_end/testcases/nnbd/issue43211.dart:36:22: Error: Type argument 'A' doesn't conform to the bound 'A?' of the type variable 'X' on 'A'. // - 'A' is from 'pkg/front_end/testcases/nnbd/issue43211.dart'. // Try changing type arguments so that they conform to the bounds. // factory C.redirect(A>? a) = C.internal; -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue43211.dart:5:9: Context: This is the type variable whose bound isn't conformed to. // class A?> {} // ^ // -// pkg/front_end/testcases/nnbd/issue43211.dart:38:30: Error: Type argument 'A' doesn't conform to the bound 'A?' of the type variable 'X' on 'A'. +// pkg/front_end/testcases/nnbd/issue43211.dart:38:18: Error: Type argument 'A' doesn't conform to the bound 'A?' of the type variable 'X' on 'A'. // - 'A' is from 'pkg/front_end/testcases/nnbd/issue43211.dart'. // Try changing type arguments so that they conform to the bounds. // factory C.fact(A>? a) { -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue43211.dart:5:9: Context: This is the type variable whose bound isn't conformed to. // class A?> {} // ^ // -// pkg/front_end/testcases/nnbd/issue43211.dart:12:17: Error: Type argument 'A' doesn't conform to the bound 'A?' of the type variable 'X' on 'A'. +// pkg/front_end/testcases/nnbd/issue43211.dart:12:5: Error: Type argument 'A' doesn't conform to the bound 'A?' of the type variable 'X' on 'A'. // - 'A' is from 'pkg/front_end/testcases/nnbd/issue43211.dart'. // Try changing type arguments so that they conform to the bounds. // A>? d; -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue43211.dart:5:9: Context: This is the type variable whose bound isn't conformed to. // class A?> {} // ^ // -// pkg/front_end/testcases/nnbd/issue43211.dart:16:11: Error: Type argument 'Y' doesn't conform to the bound 'num' of the type variable 'X' on 'D'. +// pkg/front_end/testcases/nnbd/issue43211.dart:16:5: Error: Type argument 'Y' doesn't conform to the bound 'num' of the type variable 'X' on 'D'. // Try changing type arguments so that they conform to the bounds. // D? c; -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue43211.dart:7:9: Context: This is the type variable whose bound isn't conformed to. // class D {} // ^ // -// pkg/front_end/testcases/nnbd/issue43211.dart:17:16: Error: Type argument 'String' doesn't conform to the bound 'num' of the type variable 'X' on 'D'. +// pkg/front_end/testcases/nnbd/issue43211.dart:17:5: Error: Type argument 'String' doesn't conform to the bound 'num' of the type variable 'X' on 'D'. // Try changing type arguments so that they conform to the bounds. // D? d; -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue43211.dart:7:9: Context: This is the type variable whose bound isn't conformed to. // class D {} // ^ // -// pkg/front_end/testcases/nnbd/issue43211.dart:25:11: Error: Type argument 'Y' doesn't conform to the bound 'A?' of the type variable 'X' on 'A'. +// pkg/front_end/testcases/nnbd/issue43211.dart:25:5: Error: Type argument 'Y' doesn't conform to the bound 'A?' of the type variable 'X' on 'A'. // - 'A' is from 'pkg/front_end/testcases/nnbd/issue43211.dart'. // Try changing type arguments so that they conform to the bounds. // A? c; -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue43211.dart:5:9: Context: This is the type variable whose bound isn't conformed to. // class A?> {} // ^ // -// pkg/front_end/testcases/nnbd/issue43211.dart:26:17: Error: Type argument 'A' doesn't conform to the bound 'A?' of the type variable 'X' on 'A'. +// pkg/front_end/testcases/nnbd/issue43211.dart:26:5: Error: Type argument 'A' doesn't conform to the bound 'A?' of the type variable 'X' on 'A'. // - 'A' is from 'pkg/front_end/testcases/nnbd/issue43211.dart'. // Try changing type arguments so that they conform to the bounds. // A>? d; -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue43211.dart:5:9: Context: This is the type variable whose bound isn't conformed to. // class A?> {} // ^ // -// pkg/front_end/testcases/nnbd/issue43211.dart:30:11: Error: Type argument 'Y' doesn't conform to the bound 'num' of the type variable 'X' on 'D'. +// pkg/front_end/testcases/nnbd/issue43211.dart:30:5: Error: Type argument 'Y' doesn't conform to the bound 'num' of the type variable 'X' on 'D'. // Try changing type arguments so that they conform to the bounds. // D? c; -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue43211.dart:7:9: Context: This is the type variable whose bound isn't conformed to. // class D {} // ^ // -// pkg/front_end/testcases/nnbd/issue43211.dart:31:16: Error: Type argument 'String' doesn't conform to the bound 'num' of the type variable 'X' on 'D'. +// pkg/front_end/testcases/nnbd/issue43211.dart:31:5: Error: Type argument 'String' doesn't conform to the bound 'num' of the type variable 'X' on 'D'. // Try changing type arguments so that they conform to the bounds. // D? d; -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue43211.dart:7:9: Context: This is the type variable whose bound isn't conformed to. // class D {} // ^ // -// pkg/front_end/testcases/nnbd/issue43211.dart:39:17: Error: Type argument 'A' doesn't conform to the bound 'A?' of the type variable 'X' on 'A'. +// pkg/front_end/testcases/nnbd/issue43211.dart:39:5: Error: Type argument 'A' doesn't conform to the bound 'A?' of the type variable 'X' on 'A'. // - 'A' is from 'pkg/front_end/testcases/nnbd/issue43211.dart'. // Try changing type arguments so that they conform to the bounds. // A>? b; -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue43211.dart:5:9: Context: This is the type variable whose bound isn't conformed to. // class A?> {} // ^ // -// pkg/front_end/testcases/nnbd/issue43211.dart:40:16: Error: Type argument 'String' doesn't conform to the bound 'num' of the type variable 'X' on 'D'. +// pkg/front_end/testcases/nnbd/issue43211.dart:40:5: Error: Type argument 'String' doesn't conform to the bound 'num' of the type variable 'X' on 'D'. // Try changing type arguments so that they conform to the bounds. // D? c; -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue43211.dart:7:9: Context: This is the type variable whose bound isn't conformed to. // class D {} // ^ // -// pkg/front_end/testcases/nnbd/issue43211.dart:45:17: Error: Type argument 'A' doesn't conform to the bound 'A?' of the type variable 'X' on 'A'. +// pkg/front_end/testcases/nnbd/issue43211.dart:45:5: Error: Type argument 'A' doesn't conform to the bound 'A?' of the type variable 'X' on 'A'. // - 'A' is from 'pkg/front_end/testcases/nnbd/issue43211.dart'. // Try changing type arguments so that they conform to the bounds. // A>? a; -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue43211.dart:5:9: Context: This is the type variable whose bound isn't conformed to. // class A?> {} // ^ // -// pkg/front_end/testcases/nnbd/issue43211.dart:46:16: Error: Type argument 'String' doesn't conform to the bound 'num' of the type variable 'X' on 'D'. +// pkg/front_end/testcases/nnbd/issue43211.dart:46:5: Error: Type argument 'String' doesn't conform to the bound 'num' of the type variable 'X' on 'D'. // Try changing type arguments so that they conform to the bounds. // D? b; -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue43211.dart:7:9: Context: This is the type variable whose bound isn't conformed to. // class D {} // ^ diff --git a/pkg/front_end/testcases/nnbd/issue43211.dart.strong.transformed.expect b/pkg/front_end/testcases/nnbd/issue43211.dart.strong.transformed.expect index 46f67824d3b..c89209d1a80 100644 --- a/pkg/front_end/testcases/nnbd/issue43211.dart.strong.transformed.expect +++ b/pkg/front_end/testcases/nnbd/issue43211.dart.strong.transformed.expect @@ -2,27 +2,27 @@ library /*isNonNullableByDefault*/; // // Problems in library: // -// pkg/front_end/testcases/nnbd/issue43211.dart:10:53: Error: Type argument 'A' doesn't conform to the bound 'A?' of the type variable 'X' on 'A'. +// pkg/front_end/testcases/nnbd/issue43211.dart:10:41: Error: Type argument 'A' doesn't conform to the bound 'A?' of the type variable 'X' on 'A'. // - 'A' is from 'pkg/front_end/testcases/nnbd/issue43211.dart'. // Try changing type arguments so that they conform to the bounds. // void method1?>(A a, A>? b) { -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue43211.dart:5:9: Context: This is the type variable whose bound isn't conformed to. // class A?> {} // ^ // -// pkg/front_end/testcases/nnbd/issue43211.dart:15:39: Error: Type argument 'Y' doesn't conform to the bound 'num' of the type variable 'X' on 'D'. +// pkg/front_end/testcases/nnbd/issue43211.dart:15:34: Error: Type argument 'Y' doesn't conform to the bound 'num' of the type variable 'X' on 'D'. // Try changing type arguments so that they conform to the bounds. // void method2(D a, D? b) { -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue43211.dart:7:9: Context: This is the type variable whose bound isn't conformed to. // class D {} // ^ // -// pkg/front_end/testcases/nnbd/issue43211.dart:15:53: Error: Type argument 'String' doesn't conform to the bound 'num' of the type variable 'X' on 'D'. +// pkg/front_end/testcases/nnbd/issue43211.dart:15:42: Error: Type argument 'String' doesn't conform to the bound 'num' of the type variable 'X' on 'D'. // Try changing type arguments so that they conform to the bounds. // void method2(D a, D? b) { -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue43211.dart:7:9: Context: This is the type variable whose bound isn't conformed to. // class D {} // ^ @@ -38,158 +38,158 @@ library /*isNonNullableByDefault*/; // class A?> {} // ^ // -// pkg/front_end/testcases/nnbd/issue43211.dart:23:7: Error: Type argument 'X/*1*/' doesn't conform to the bound 'A?' of the type variable 'X' on 'A' in the supertype 'A' of class 'B'. +// pkg/front_end/testcases/nnbd/issue43211.dart:24:36: Error: Type argument 'Y' doesn't conform to the bound 'A?' of the type variable 'X' on 'A'. +// - 'A' is from 'pkg/front_end/testcases/nnbd/issue43211.dart'. +// Try changing type arguments so that they conform to the bounds. +// void method1?>(A a, A>? b) { +// ^ +// pkg/front_end/testcases/nnbd/issue43211.dart:5:9: Context: This is the type variable whose bound isn't conformed to. +// class A?> {} +// ^ +// +// pkg/front_end/testcases/nnbd/issue43211.dart:24:44: Error: Type argument 'A' doesn't conform to the bound 'A?' of the type variable 'X' on 'A'. +// - 'A' is from 'pkg/front_end/testcases/nnbd/issue43211.dart'. +// Try changing type arguments so that they conform to the bounds. +// void method1?>(A a, A>? b) { +// ^ +// pkg/front_end/testcases/nnbd/issue43211.dart:5:9: Context: This is the type variable whose bound isn't conformed to. +// class A?> {} +// ^ +// +// pkg/front_end/testcases/nnbd/issue43211.dart:29:34: Error: Type argument 'Y' doesn't conform to the bound 'num' of the type variable 'X' on 'D'. +// Try changing type arguments so that they conform to the bounds. +// void method2(D a, D? b) { +// ^ +// pkg/front_end/testcases/nnbd/issue43211.dart:7:9: Context: This is the type variable whose bound isn't conformed to. +// class D {} +// ^ +// +// pkg/front_end/testcases/nnbd/issue43211.dart:29:42: Error: Type argument 'String' doesn't conform to the bound 'num' of the type variable 'X' on 'D'. +// Try changing type arguments so that they conform to the bounds. +// void method2(D a, D? b) { +// ^ +// pkg/front_end/testcases/nnbd/issue43211.dart:7:9: Context: This is the type variable whose bound isn't conformed to. +// class D {} +// ^ +// +// pkg/front_end/testcases/nnbd/issue43211.dart:23:40: Error: Type argument 'X/*1*/' doesn't conform to the bound 'A?' of the type variable 'X' on 'A'. // - 'X/*1*/' is from 'pkg/front_end/testcases/nnbd/issue43211.dart'. // - 'A' is from 'pkg/front_end/testcases/nnbd/issue43211.dart'. // - 'X/*2*/' is from 'pkg/front_end/testcases/nnbd/issue43211.dart'. // Try changing type arguments so that they conform to the bounds. // class B?> implements A { -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue43211.dart:5:9: Context: This is the type variable whose bound isn't conformed to. // class A?> {} // ^ // -// pkg/front_end/testcases/nnbd/issue43211.dart:24:41: Error: Type argument 'Y' doesn't conform to the bound 'A?' of the type variable 'X' on 'A'. -// - 'A' is from 'pkg/front_end/testcases/nnbd/issue43211.dart'. -// Try changing type arguments so that they conform to the bounds. -// void method1?>(A a, A>? b) { -// ^ -// pkg/front_end/testcases/nnbd/issue43211.dart:5:9: Context: This is the type variable whose bound isn't conformed to. -// class A?> {} -// ^ -// -// pkg/front_end/testcases/nnbd/issue43211.dart:24:56: Error: Type argument 'A' doesn't conform to the bound 'A?' of the type variable 'X' on 'A'. -// - 'A' is from 'pkg/front_end/testcases/nnbd/issue43211.dart'. -// Try changing type arguments so that they conform to the bounds. -// void method1?>(A a, A>? b) { -// ^ -// pkg/front_end/testcases/nnbd/issue43211.dart:5:9: Context: This is the type variable whose bound isn't conformed to. -// class A?> {} -// ^ -// -// pkg/front_end/testcases/nnbd/issue43211.dart:29:39: Error: Type argument 'Y' doesn't conform to the bound 'num' of the type variable 'X' on 'D'. -// Try changing type arguments so that they conform to the bounds. -// void method2(D a, D? b) { -// ^ -// pkg/front_end/testcases/nnbd/issue43211.dart:7:9: Context: This is the type variable whose bound isn't conformed to. -// class D {} -// ^ -// -// pkg/front_end/testcases/nnbd/issue43211.dart:29:53: Error: Type argument 'String' doesn't conform to the bound 'num' of the type variable 'X' on 'D'. -// Try changing type arguments so that they conform to the bounds. -// void method2(D a, D? b) { -// ^ -// pkg/front_end/testcases/nnbd/issue43211.dart:7:9: Context: This is the type variable whose bound isn't conformed to. -// class D {} -// ^ -// -// pkg/front_end/testcases/nnbd/issue43211.dart:36:34: Error: Type argument 'A' doesn't conform to the bound 'A?' of the type variable 'X' on 'A'. +// pkg/front_end/testcases/nnbd/issue43211.dart:36:22: Error: Type argument 'A' doesn't conform to the bound 'A?' of the type variable 'X' on 'A'. // - 'A' is from 'pkg/front_end/testcases/nnbd/issue43211.dart'. // Try changing type arguments so that they conform to the bounds. // factory C.redirect(A>? a) = C.internal; -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue43211.dart:5:9: Context: This is the type variable whose bound isn't conformed to. // class A?> {} // ^ // -// pkg/front_end/testcases/nnbd/issue43211.dart:38:30: Error: Type argument 'A' doesn't conform to the bound 'A?' of the type variable 'X' on 'A'. +// pkg/front_end/testcases/nnbd/issue43211.dart:38:18: Error: Type argument 'A' doesn't conform to the bound 'A?' of the type variable 'X' on 'A'. // - 'A' is from 'pkg/front_end/testcases/nnbd/issue43211.dart'. // Try changing type arguments so that they conform to the bounds. // factory C.fact(A>? a) { -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue43211.dart:5:9: Context: This is the type variable whose bound isn't conformed to. // class A?> {} // ^ // -// pkg/front_end/testcases/nnbd/issue43211.dart:12:17: Error: Type argument 'A' doesn't conform to the bound 'A?' of the type variable 'X' on 'A'. +// pkg/front_end/testcases/nnbd/issue43211.dart:12:5: Error: Type argument 'A' doesn't conform to the bound 'A?' of the type variable 'X' on 'A'. // - 'A' is from 'pkg/front_end/testcases/nnbd/issue43211.dart'. // Try changing type arguments so that they conform to the bounds. // A>? d; -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue43211.dart:5:9: Context: This is the type variable whose bound isn't conformed to. // class A?> {} // ^ // -// pkg/front_end/testcases/nnbd/issue43211.dart:16:11: Error: Type argument 'Y' doesn't conform to the bound 'num' of the type variable 'X' on 'D'. +// pkg/front_end/testcases/nnbd/issue43211.dart:16:5: Error: Type argument 'Y' doesn't conform to the bound 'num' of the type variable 'X' on 'D'. // Try changing type arguments so that they conform to the bounds. // D? c; -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue43211.dart:7:9: Context: This is the type variable whose bound isn't conformed to. // class D {} // ^ // -// pkg/front_end/testcases/nnbd/issue43211.dart:17:16: Error: Type argument 'String' doesn't conform to the bound 'num' of the type variable 'X' on 'D'. +// pkg/front_end/testcases/nnbd/issue43211.dart:17:5: Error: Type argument 'String' doesn't conform to the bound 'num' of the type variable 'X' on 'D'. // Try changing type arguments so that they conform to the bounds. // D? d; -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue43211.dart:7:9: Context: This is the type variable whose bound isn't conformed to. // class D {} // ^ // -// pkg/front_end/testcases/nnbd/issue43211.dart:25:11: Error: Type argument 'Y' doesn't conform to the bound 'A?' of the type variable 'X' on 'A'. +// pkg/front_end/testcases/nnbd/issue43211.dart:25:5: Error: Type argument 'Y' doesn't conform to the bound 'A?' of the type variable 'X' on 'A'. // - 'A' is from 'pkg/front_end/testcases/nnbd/issue43211.dart'. // Try changing type arguments so that they conform to the bounds. // A? c; -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue43211.dart:5:9: Context: This is the type variable whose bound isn't conformed to. // class A?> {} // ^ // -// pkg/front_end/testcases/nnbd/issue43211.dart:26:17: Error: Type argument 'A' doesn't conform to the bound 'A?' of the type variable 'X' on 'A'. +// pkg/front_end/testcases/nnbd/issue43211.dart:26:5: Error: Type argument 'A' doesn't conform to the bound 'A?' of the type variable 'X' on 'A'. // - 'A' is from 'pkg/front_end/testcases/nnbd/issue43211.dart'. // Try changing type arguments so that they conform to the bounds. // A>? d; -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue43211.dart:5:9: Context: This is the type variable whose bound isn't conformed to. // class A?> {} // ^ // -// pkg/front_end/testcases/nnbd/issue43211.dart:30:11: Error: Type argument 'Y' doesn't conform to the bound 'num' of the type variable 'X' on 'D'. +// pkg/front_end/testcases/nnbd/issue43211.dart:30:5: Error: Type argument 'Y' doesn't conform to the bound 'num' of the type variable 'X' on 'D'. // Try changing type arguments so that they conform to the bounds. // D? c; -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue43211.dart:7:9: Context: This is the type variable whose bound isn't conformed to. // class D {} // ^ // -// pkg/front_end/testcases/nnbd/issue43211.dart:31:16: Error: Type argument 'String' doesn't conform to the bound 'num' of the type variable 'X' on 'D'. +// pkg/front_end/testcases/nnbd/issue43211.dart:31:5: Error: Type argument 'String' doesn't conform to the bound 'num' of the type variable 'X' on 'D'. // Try changing type arguments so that they conform to the bounds. // D? d; -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue43211.dart:7:9: Context: This is the type variable whose bound isn't conformed to. // class D {} // ^ // -// pkg/front_end/testcases/nnbd/issue43211.dart:39:17: Error: Type argument 'A' doesn't conform to the bound 'A?' of the type variable 'X' on 'A'. +// pkg/front_end/testcases/nnbd/issue43211.dart:39:5: Error: Type argument 'A' doesn't conform to the bound 'A?' of the type variable 'X' on 'A'. // - 'A' is from 'pkg/front_end/testcases/nnbd/issue43211.dart'. // Try changing type arguments so that they conform to the bounds. // A>? b; -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue43211.dart:5:9: Context: This is the type variable whose bound isn't conformed to. // class A?> {} // ^ // -// pkg/front_end/testcases/nnbd/issue43211.dart:40:16: Error: Type argument 'String' doesn't conform to the bound 'num' of the type variable 'X' on 'D'. +// pkg/front_end/testcases/nnbd/issue43211.dart:40:5: Error: Type argument 'String' doesn't conform to the bound 'num' of the type variable 'X' on 'D'. // Try changing type arguments so that they conform to the bounds. // D? c; -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue43211.dart:7:9: Context: This is the type variable whose bound isn't conformed to. // class D {} // ^ // -// pkg/front_end/testcases/nnbd/issue43211.dart:45:17: Error: Type argument 'A' doesn't conform to the bound 'A?' of the type variable 'X' on 'A'. +// pkg/front_end/testcases/nnbd/issue43211.dart:45:5: Error: Type argument 'A' doesn't conform to the bound 'A?' of the type variable 'X' on 'A'. // - 'A' is from 'pkg/front_end/testcases/nnbd/issue43211.dart'. // Try changing type arguments so that they conform to the bounds. // A>? a; -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue43211.dart:5:9: Context: This is the type variable whose bound isn't conformed to. // class A?> {} // ^ // -// pkg/front_end/testcases/nnbd/issue43211.dart:46:16: Error: Type argument 'String' doesn't conform to the bound 'num' of the type variable 'X' on 'D'. +// pkg/front_end/testcases/nnbd/issue43211.dart:46:5: Error: Type argument 'String' doesn't conform to the bound 'num' of the type variable 'X' on 'D'. // Try changing type arguments so that they conform to the bounds. // D? b; -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue43211.dart:7:9: Context: This is the type variable whose bound isn't conformed to. // class D {} // ^ diff --git a/pkg/front_end/testcases/nnbd/issue43211.dart.weak.expect b/pkg/front_end/testcases/nnbd/issue43211.dart.weak.expect index 46f67824d3b..c89209d1a80 100644 --- a/pkg/front_end/testcases/nnbd/issue43211.dart.weak.expect +++ b/pkg/front_end/testcases/nnbd/issue43211.dart.weak.expect @@ -2,27 +2,27 @@ library /*isNonNullableByDefault*/; // // Problems in library: // -// pkg/front_end/testcases/nnbd/issue43211.dart:10:53: Error: Type argument 'A' doesn't conform to the bound 'A?' of the type variable 'X' on 'A'. +// pkg/front_end/testcases/nnbd/issue43211.dart:10:41: Error: Type argument 'A' doesn't conform to the bound 'A?' of the type variable 'X' on 'A'. // - 'A' is from 'pkg/front_end/testcases/nnbd/issue43211.dart'. // Try changing type arguments so that they conform to the bounds. // void method1?>(A a, A>? b) { -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue43211.dart:5:9: Context: This is the type variable whose bound isn't conformed to. // class A?> {} // ^ // -// pkg/front_end/testcases/nnbd/issue43211.dart:15:39: Error: Type argument 'Y' doesn't conform to the bound 'num' of the type variable 'X' on 'D'. +// pkg/front_end/testcases/nnbd/issue43211.dart:15:34: Error: Type argument 'Y' doesn't conform to the bound 'num' of the type variable 'X' on 'D'. // Try changing type arguments so that they conform to the bounds. // void method2(D a, D? b) { -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue43211.dart:7:9: Context: This is the type variable whose bound isn't conformed to. // class D {} // ^ // -// pkg/front_end/testcases/nnbd/issue43211.dart:15:53: Error: Type argument 'String' doesn't conform to the bound 'num' of the type variable 'X' on 'D'. +// pkg/front_end/testcases/nnbd/issue43211.dart:15:42: Error: Type argument 'String' doesn't conform to the bound 'num' of the type variable 'X' on 'D'. // Try changing type arguments so that they conform to the bounds. // void method2(D a, D? b) { -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue43211.dart:7:9: Context: This is the type variable whose bound isn't conformed to. // class D {} // ^ @@ -38,158 +38,158 @@ library /*isNonNullableByDefault*/; // class A?> {} // ^ // -// pkg/front_end/testcases/nnbd/issue43211.dart:23:7: Error: Type argument 'X/*1*/' doesn't conform to the bound 'A?' of the type variable 'X' on 'A' in the supertype 'A' of class 'B'. +// pkg/front_end/testcases/nnbd/issue43211.dart:24:36: Error: Type argument 'Y' doesn't conform to the bound 'A?' of the type variable 'X' on 'A'. +// - 'A' is from 'pkg/front_end/testcases/nnbd/issue43211.dart'. +// Try changing type arguments so that they conform to the bounds. +// void method1?>(A a, A>? b) { +// ^ +// pkg/front_end/testcases/nnbd/issue43211.dart:5:9: Context: This is the type variable whose bound isn't conformed to. +// class A?> {} +// ^ +// +// pkg/front_end/testcases/nnbd/issue43211.dart:24:44: Error: Type argument 'A' doesn't conform to the bound 'A?' of the type variable 'X' on 'A'. +// - 'A' is from 'pkg/front_end/testcases/nnbd/issue43211.dart'. +// Try changing type arguments so that they conform to the bounds. +// void method1?>(A a, A>? b) { +// ^ +// pkg/front_end/testcases/nnbd/issue43211.dart:5:9: Context: This is the type variable whose bound isn't conformed to. +// class A?> {} +// ^ +// +// pkg/front_end/testcases/nnbd/issue43211.dart:29:34: Error: Type argument 'Y' doesn't conform to the bound 'num' of the type variable 'X' on 'D'. +// Try changing type arguments so that they conform to the bounds. +// void method2(D a, D? b) { +// ^ +// pkg/front_end/testcases/nnbd/issue43211.dart:7:9: Context: This is the type variable whose bound isn't conformed to. +// class D {} +// ^ +// +// pkg/front_end/testcases/nnbd/issue43211.dart:29:42: Error: Type argument 'String' doesn't conform to the bound 'num' of the type variable 'X' on 'D'. +// Try changing type arguments so that they conform to the bounds. +// void method2(D a, D? b) { +// ^ +// pkg/front_end/testcases/nnbd/issue43211.dart:7:9: Context: This is the type variable whose bound isn't conformed to. +// class D {} +// ^ +// +// pkg/front_end/testcases/nnbd/issue43211.dart:23:40: Error: Type argument 'X/*1*/' doesn't conform to the bound 'A?' of the type variable 'X' on 'A'. // - 'X/*1*/' is from 'pkg/front_end/testcases/nnbd/issue43211.dart'. // - 'A' is from 'pkg/front_end/testcases/nnbd/issue43211.dart'. // - 'X/*2*/' is from 'pkg/front_end/testcases/nnbd/issue43211.dart'. // Try changing type arguments so that they conform to the bounds. // class B?> implements A { -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue43211.dart:5:9: Context: This is the type variable whose bound isn't conformed to. // class A?> {} // ^ // -// pkg/front_end/testcases/nnbd/issue43211.dart:24:41: Error: Type argument 'Y' doesn't conform to the bound 'A?' of the type variable 'X' on 'A'. -// - 'A' is from 'pkg/front_end/testcases/nnbd/issue43211.dart'. -// Try changing type arguments so that they conform to the bounds. -// void method1?>(A a, A>? b) { -// ^ -// pkg/front_end/testcases/nnbd/issue43211.dart:5:9: Context: This is the type variable whose bound isn't conformed to. -// class A?> {} -// ^ -// -// pkg/front_end/testcases/nnbd/issue43211.dart:24:56: Error: Type argument 'A' doesn't conform to the bound 'A?' of the type variable 'X' on 'A'. -// - 'A' is from 'pkg/front_end/testcases/nnbd/issue43211.dart'. -// Try changing type arguments so that they conform to the bounds. -// void method1?>(A a, A>? b) { -// ^ -// pkg/front_end/testcases/nnbd/issue43211.dart:5:9: Context: This is the type variable whose bound isn't conformed to. -// class A?> {} -// ^ -// -// pkg/front_end/testcases/nnbd/issue43211.dart:29:39: Error: Type argument 'Y' doesn't conform to the bound 'num' of the type variable 'X' on 'D'. -// Try changing type arguments so that they conform to the bounds. -// void method2(D a, D? b) { -// ^ -// pkg/front_end/testcases/nnbd/issue43211.dart:7:9: Context: This is the type variable whose bound isn't conformed to. -// class D {} -// ^ -// -// pkg/front_end/testcases/nnbd/issue43211.dart:29:53: Error: Type argument 'String' doesn't conform to the bound 'num' of the type variable 'X' on 'D'. -// Try changing type arguments so that they conform to the bounds. -// void method2(D a, D? b) { -// ^ -// pkg/front_end/testcases/nnbd/issue43211.dart:7:9: Context: This is the type variable whose bound isn't conformed to. -// class D {} -// ^ -// -// pkg/front_end/testcases/nnbd/issue43211.dart:36:34: Error: Type argument 'A' doesn't conform to the bound 'A?' of the type variable 'X' on 'A'. +// pkg/front_end/testcases/nnbd/issue43211.dart:36:22: Error: Type argument 'A' doesn't conform to the bound 'A?' of the type variable 'X' on 'A'. // - 'A' is from 'pkg/front_end/testcases/nnbd/issue43211.dart'. // Try changing type arguments so that they conform to the bounds. // factory C.redirect(A>? a) = C.internal; -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue43211.dart:5:9: Context: This is the type variable whose bound isn't conformed to. // class A?> {} // ^ // -// pkg/front_end/testcases/nnbd/issue43211.dart:38:30: Error: Type argument 'A' doesn't conform to the bound 'A?' of the type variable 'X' on 'A'. +// pkg/front_end/testcases/nnbd/issue43211.dart:38:18: Error: Type argument 'A' doesn't conform to the bound 'A?' of the type variable 'X' on 'A'. // - 'A' is from 'pkg/front_end/testcases/nnbd/issue43211.dart'. // Try changing type arguments so that they conform to the bounds. // factory C.fact(A>? a) { -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue43211.dart:5:9: Context: This is the type variable whose bound isn't conformed to. // class A?> {} // ^ // -// pkg/front_end/testcases/nnbd/issue43211.dart:12:17: Error: Type argument 'A' doesn't conform to the bound 'A?' of the type variable 'X' on 'A'. +// pkg/front_end/testcases/nnbd/issue43211.dart:12:5: Error: Type argument 'A' doesn't conform to the bound 'A?' of the type variable 'X' on 'A'. // - 'A' is from 'pkg/front_end/testcases/nnbd/issue43211.dart'. // Try changing type arguments so that they conform to the bounds. // A>? d; -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue43211.dart:5:9: Context: This is the type variable whose bound isn't conformed to. // class A?> {} // ^ // -// pkg/front_end/testcases/nnbd/issue43211.dart:16:11: Error: Type argument 'Y' doesn't conform to the bound 'num' of the type variable 'X' on 'D'. +// pkg/front_end/testcases/nnbd/issue43211.dart:16:5: Error: Type argument 'Y' doesn't conform to the bound 'num' of the type variable 'X' on 'D'. // Try changing type arguments so that they conform to the bounds. // D? c; -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue43211.dart:7:9: Context: This is the type variable whose bound isn't conformed to. // class D {} // ^ // -// pkg/front_end/testcases/nnbd/issue43211.dart:17:16: Error: Type argument 'String' doesn't conform to the bound 'num' of the type variable 'X' on 'D'. +// pkg/front_end/testcases/nnbd/issue43211.dart:17:5: Error: Type argument 'String' doesn't conform to the bound 'num' of the type variable 'X' on 'D'. // Try changing type arguments so that they conform to the bounds. // D? d; -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue43211.dart:7:9: Context: This is the type variable whose bound isn't conformed to. // class D {} // ^ // -// pkg/front_end/testcases/nnbd/issue43211.dart:25:11: Error: Type argument 'Y' doesn't conform to the bound 'A?' of the type variable 'X' on 'A'. +// pkg/front_end/testcases/nnbd/issue43211.dart:25:5: Error: Type argument 'Y' doesn't conform to the bound 'A?' of the type variable 'X' on 'A'. // - 'A' is from 'pkg/front_end/testcases/nnbd/issue43211.dart'. // Try changing type arguments so that they conform to the bounds. // A? c; -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue43211.dart:5:9: Context: This is the type variable whose bound isn't conformed to. // class A?> {} // ^ // -// pkg/front_end/testcases/nnbd/issue43211.dart:26:17: Error: Type argument 'A' doesn't conform to the bound 'A?' of the type variable 'X' on 'A'. +// pkg/front_end/testcases/nnbd/issue43211.dart:26:5: Error: Type argument 'A' doesn't conform to the bound 'A?' of the type variable 'X' on 'A'. // - 'A' is from 'pkg/front_end/testcases/nnbd/issue43211.dart'. // Try changing type arguments so that they conform to the bounds. // A>? d; -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue43211.dart:5:9: Context: This is the type variable whose bound isn't conformed to. // class A?> {} // ^ // -// pkg/front_end/testcases/nnbd/issue43211.dart:30:11: Error: Type argument 'Y' doesn't conform to the bound 'num' of the type variable 'X' on 'D'. +// pkg/front_end/testcases/nnbd/issue43211.dart:30:5: Error: Type argument 'Y' doesn't conform to the bound 'num' of the type variable 'X' on 'D'. // Try changing type arguments so that they conform to the bounds. // D? c; -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue43211.dart:7:9: Context: This is the type variable whose bound isn't conformed to. // class D {} // ^ // -// pkg/front_end/testcases/nnbd/issue43211.dart:31:16: Error: Type argument 'String' doesn't conform to the bound 'num' of the type variable 'X' on 'D'. +// pkg/front_end/testcases/nnbd/issue43211.dart:31:5: Error: Type argument 'String' doesn't conform to the bound 'num' of the type variable 'X' on 'D'. // Try changing type arguments so that they conform to the bounds. // D? d; -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue43211.dart:7:9: Context: This is the type variable whose bound isn't conformed to. // class D {} // ^ // -// pkg/front_end/testcases/nnbd/issue43211.dart:39:17: Error: Type argument 'A' doesn't conform to the bound 'A?' of the type variable 'X' on 'A'. +// pkg/front_end/testcases/nnbd/issue43211.dart:39:5: Error: Type argument 'A' doesn't conform to the bound 'A?' of the type variable 'X' on 'A'. // - 'A' is from 'pkg/front_end/testcases/nnbd/issue43211.dart'. // Try changing type arguments so that they conform to the bounds. // A>? b; -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue43211.dart:5:9: Context: This is the type variable whose bound isn't conformed to. // class A?> {} // ^ // -// pkg/front_end/testcases/nnbd/issue43211.dart:40:16: Error: Type argument 'String' doesn't conform to the bound 'num' of the type variable 'X' on 'D'. +// pkg/front_end/testcases/nnbd/issue43211.dart:40:5: Error: Type argument 'String' doesn't conform to the bound 'num' of the type variable 'X' on 'D'. // Try changing type arguments so that they conform to the bounds. // D? c; -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue43211.dart:7:9: Context: This is the type variable whose bound isn't conformed to. // class D {} // ^ // -// pkg/front_end/testcases/nnbd/issue43211.dart:45:17: Error: Type argument 'A' doesn't conform to the bound 'A?' of the type variable 'X' on 'A'. +// pkg/front_end/testcases/nnbd/issue43211.dart:45:5: Error: Type argument 'A' doesn't conform to the bound 'A?' of the type variable 'X' on 'A'. // - 'A' is from 'pkg/front_end/testcases/nnbd/issue43211.dart'. // Try changing type arguments so that they conform to the bounds. // A>? a; -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue43211.dart:5:9: Context: This is the type variable whose bound isn't conformed to. // class A?> {} // ^ // -// pkg/front_end/testcases/nnbd/issue43211.dart:46:16: Error: Type argument 'String' doesn't conform to the bound 'num' of the type variable 'X' on 'D'. +// pkg/front_end/testcases/nnbd/issue43211.dart:46:5: Error: Type argument 'String' doesn't conform to the bound 'num' of the type variable 'X' on 'D'. // Try changing type arguments so that they conform to the bounds. // D? b; -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue43211.dart:7:9: Context: This is the type variable whose bound isn't conformed to. // class D {} // ^ diff --git a/pkg/front_end/testcases/nnbd/issue43211.dart.weak.modular.expect b/pkg/front_end/testcases/nnbd/issue43211.dart.weak.modular.expect index 46f67824d3b..c89209d1a80 100644 --- a/pkg/front_end/testcases/nnbd/issue43211.dart.weak.modular.expect +++ b/pkg/front_end/testcases/nnbd/issue43211.dart.weak.modular.expect @@ -2,27 +2,27 @@ library /*isNonNullableByDefault*/; // // Problems in library: // -// pkg/front_end/testcases/nnbd/issue43211.dart:10:53: Error: Type argument 'A' doesn't conform to the bound 'A?' of the type variable 'X' on 'A'. +// pkg/front_end/testcases/nnbd/issue43211.dart:10:41: Error: Type argument 'A' doesn't conform to the bound 'A?' of the type variable 'X' on 'A'. // - 'A' is from 'pkg/front_end/testcases/nnbd/issue43211.dart'. // Try changing type arguments so that they conform to the bounds. // void method1?>(A a, A>? b) { -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue43211.dart:5:9: Context: This is the type variable whose bound isn't conformed to. // class A?> {} // ^ // -// pkg/front_end/testcases/nnbd/issue43211.dart:15:39: Error: Type argument 'Y' doesn't conform to the bound 'num' of the type variable 'X' on 'D'. +// pkg/front_end/testcases/nnbd/issue43211.dart:15:34: Error: Type argument 'Y' doesn't conform to the bound 'num' of the type variable 'X' on 'D'. // Try changing type arguments so that they conform to the bounds. // void method2(D a, D? b) { -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue43211.dart:7:9: Context: This is the type variable whose bound isn't conformed to. // class D {} // ^ // -// pkg/front_end/testcases/nnbd/issue43211.dart:15:53: Error: Type argument 'String' doesn't conform to the bound 'num' of the type variable 'X' on 'D'. +// pkg/front_end/testcases/nnbd/issue43211.dart:15:42: Error: Type argument 'String' doesn't conform to the bound 'num' of the type variable 'X' on 'D'. // Try changing type arguments so that they conform to the bounds. // void method2(D a, D? b) { -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue43211.dart:7:9: Context: This is the type variable whose bound isn't conformed to. // class D {} // ^ @@ -38,158 +38,158 @@ library /*isNonNullableByDefault*/; // class A?> {} // ^ // -// pkg/front_end/testcases/nnbd/issue43211.dart:23:7: Error: Type argument 'X/*1*/' doesn't conform to the bound 'A?' of the type variable 'X' on 'A' in the supertype 'A' of class 'B'. +// pkg/front_end/testcases/nnbd/issue43211.dart:24:36: Error: Type argument 'Y' doesn't conform to the bound 'A?' of the type variable 'X' on 'A'. +// - 'A' is from 'pkg/front_end/testcases/nnbd/issue43211.dart'. +// Try changing type arguments so that they conform to the bounds. +// void method1?>(A a, A>? b) { +// ^ +// pkg/front_end/testcases/nnbd/issue43211.dart:5:9: Context: This is the type variable whose bound isn't conformed to. +// class A?> {} +// ^ +// +// pkg/front_end/testcases/nnbd/issue43211.dart:24:44: Error: Type argument 'A' doesn't conform to the bound 'A?' of the type variable 'X' on 'A'. +// - 'A' is from 'pkg/front_end/testcases/nnbd/issue43211.dart'. +// Try changing type arguments so that they conform to the bounds. +// void method1?>(A a, A>? b) { +// ^ +// pkg/front_end/testcases/nnbd/issue43211.dart:5:9: Context: This is the type variable whose bound isn't conformed to. +// class A?> {} +// ^ +// +// pkg/front_end/testcases/nnbd/issue43211.dart:29:34: Error: Type argument 'Y' doesn't conform to the bound 'num' of the type variable 'X' on 'D'. +// Try changing type arguments so that they conform to the bounds. +// void method2(D a, D? b) { +// ^ +// pkg/front_end/testcases/nnbd/issue43211.dart:7:9: Context: This is the type variable whose bound isn't conformed to. +// class D {} +// ^ +// +// pkg/front_end/testcases/nnbd/issue43211.dart:29:42: Error: Type argument 'String' doesn't conform to the bound 'num' of the type variable 'X' on 'D'. +// Try changing type arguments so that they conform to the bounds. +// void method2(D a, D? b) { +// ^ +// pkg/front_end/testcases/nnbd/issue43211.dart:7:9: Context: This is the type variable whose bound isn't conformed to. +// class D {} +// ^ +// +// pkg/front_end/testcases/nnbd/issue43211.dart:23:40: Error: Type argument 'X/*1*/' doesn't conform to the bound 'A?' of the type variable 'X' on 'A'. // - 'X/*1*/' is from 'pkg/front_end/testcases/nnbd/issue43211.dart'. // - 'A' is from 'pkg/front_end/testcases/nnbd/issue43211.dart'. // - 'X/*2*/' is from 'pkg/front_end/testcases/nnbd/issue43211.dart'. // Try changing type arguments so that they conform to the bounds. // class B?> implements A { -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue43211.dart:5:9: Context: This is the type variable whose bound isn't conformed to. // class A?> {} // ^ // -// pkg/front_end/testcases/nnbd/issue43211.dart:24:41: Error: Type argument 'Y' doesn't conform to the bound 'A?' of the type variable 'X' on 'A'. -// - 'A' is from 'pkg/front_end/testcases/nnbd/issue43211.dart'. -// Try changing type arguments so that they conform to the bounds. -// void method1?>(A a, A>? b) { -// ^ -// pkg/front_end/testcases/nnbd/issue43211.dart:5:9: Context: This is the type variable whose bound isn't conformed to. -// class A?> {} -// ^ -// -// pkg/front_end/testcases/nnbd/issue43211.dart:24:56: Error: Type argument 'A' doesn't conform to the bound 'A?' of the type variable 'X' on 'A'. -// - 'A' is from 'pkg/front_end/testcases/nnbd/issue43211.dart'. -// Try changing type arguments so that they conform to the bounds. -// void method1?>(A a, A>? b) { -// ^ -// pkg/front_end/testcases/nnbd/issue43211.dart:5:9: Context: This is the type variable whose bound isn't conformed to. -// class A?> {} -// ^ -// -// pkg/front_end/testcases/nnbd/issue43211.dart:29:39: Error: Type argument 'Y' doesn't conform to the bound 'num' of the type variable 'X' on 'D'. -// Try changing type arguments so that they conform to the bounds. -// void method2(D a, D? b) { -// ^ -// pkg/front_end/testcases/nnbd/issue43211.dart:7:9: Context: This is the type variable whose bound isn't conformed to. -// class D {} -// ^ -// -// pkg/front_end/testcases/nnbd/issue43211.dart:29:53: Error: Type argument 'String' doesn't conform to the bound 'num' of the type variable 'X' on 'D'. -// Try changing type arguments so that they conform to the bounds. -// void method2(D a, D? b) { -// ^ -// pkg/front_end/testcases/nnbd/issue43211.dart:7:9: Context: This is the type variable whose bound isn't conformed to. -// class D {} -// ^ -// -// pkg/front_end/testcases/nnbd/issue43211.dart:36:34: Error: Type argument 'A' doesn't conform to the bound 'A?' of the type variable 'X' on 'A'. +// pkg/front_end/testcases/nnbd/issue43211.dart:36:22: Error: Type argument 'A' doesn't conform to the bound 'A?' of the type variable 'X' on 'A'. // - 'A' is from 'pkg/front_end/testcases/nnbd/issue43211.dart'. // Try changing type arguments so that they conform to the bounds. // factory C.redirect(A>? a) = C.internal; -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue43211.dart:5:9: Context: This is the type variable whose bound isn't conformed to. // class A?> {} // ^ // -// pkg/front_end/testcases/nnbd/issue43211.dart:38:30: Error: Type argument 'A' doesn't conform to the bound 'A?' of the type variable 'X' on 'A'. +// pkg/front_end/testcases/nnbd/issue43211.dart:38:18: Error: Type argument 'A' doesn't conform to the bound 'A?' of the type variable 'X' on 'A'. // - 'A' is from 'pkg/front_end/testcases/nnbd/issue43211.dart'. // Try changing type arguments so that they conform to the bounds. // factory C.fact(A>? a) { -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue43211.dart:5:9: Context: This is the type variable whose bound isn't conformed to. // class A?> {} // ^ // -// pkg/front_end/testcases/nnbd/issue43211.dart:12:17: Error: Type argument 'A' doesn't conform to the bound 'A?' of the type variable 'X' on 'A'. +// pkg/front_end/testcases/nnbd/issue43211.dart:12:5: Error: Type argument 'A' doesn't conform to the bound 'A?' of the type variable 'X' on 'A'. // - 'A' is from 'pkg/front_end/testcases/nnbd/issue43211.dart'. // Try changing type arguments so that they conform to the bounds. // A>? d; -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue43211.dart:5:9: Context: This is the type variable whose bound isn't conformed to. // class A?> {} // ^ // -// pkg/front_end/testcases/nnbd/issue43211.dart:16:11: Error: Type argument 'Y' doesn't conform to the bound 'num' of the type variable 'X' on 'D'. +// pkg/front_end/testcases/nnbd/issue43211.dart:16:5: Error: Type argument 'Y' doesn't conform to the bound 'num' of the type variable 'X' on 'D'. // Try changing type arguments so that they conform to the bounds. // D? c; -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue43211.dart:7:9: Context: This is the type variable whose bound isn't conformed to. // class D {} // ^ // -// pkg/front_end/testcases/nnbd/issue43211.dart:17:16: Error: Type argument 'String' doesn't conform to the bound 'num' of the type variable 'X' on 'D'. +// pkg/front_end/testcases/nnbd/issue43211.dart:17:5: Error: Type argument 'String' doesn't conform to the bound 'num' of the type variable 'X' on 'D'. // Try changing type arguments so that they conform to the bounds. // D? d; -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue43211.dart:7:9: Context: This is the type variable whose bound isn't conformed to. // class D {} // ^ // -// pkg/front_end/testcases/nnbd/issue43211.dart:25:11: Error: Type argument 'Y' doesn't conform to the bound 'A?' of the type variable 'X' on 'A'. +// pkg/front_end/testcases/nnbd/issue43211.dart:25:5: Error: Type argument 'Y' doesn't conform to the bound 'A?' of the type variable 'X' on 'A'. // - 'A' is from 'pkg/front_end/testcases/nnbd/issue43211.dart'. // Try changing type arguments so that they conform to the bounds. // A? c; -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue43211.dart:5:9: Context: This is the type variable whose bound isn't conformed to. // class A?> {} // ^ // -// pkg/front_end/testcases/nnbd/issue43211.dart:26:17: Error: Type argument 'A' doesn't conform to the bound 'A?' of the type variable 'X' on 'A'. +// pkg/front_end/testcases/nnbd/issue43211.dart:26:5: Error: Type argument 'A' doesn't conform to the bound 'A?' of the type variable 'X' on 'A'. // - 'A' is from 'pkg/front_end/testcases/nnbd/issue43211.dart'. // Try changing type arguments so that they conform to the bounds. // A>? d; -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue43211.dart:5:9: Context: This is the type variable whose bound isn't conformed to. // class A?> {} // ^ // -// pkg/front_end/testcases/nnbd/issue43211.dart:30:11: Error: Type argument 'Y' doesn't conform to the bound 'num' of the type variable 'X' on 'D'. +// pkg/front_end/testcases/nnbd/issue43211.dart:30:5: Error: Type argument 'Y' doesn't conform to the bound 'num' of the type variable 'X' on 'D'. // Try changing type arguments so that they conform to the bounds. // D? c; -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue43211.dart:7:9: Context: This is the type variable whose bound isn't conformed to. // class D {} // ^ // -// pkg/front_end/testcases/nnbd/issue43211.dart:31:16: Error: Type argument 'String' doesn't conform to the bound 'num' of the type variable 'X' on 'D'. +// pkg/front_end/testcases/nnbd/issue43211.dart:31:5: Error: Type argument 'String' doesn't conform to the bound 'num' of the type variable 'X' on 'D'. // Try changing type arguments so that they conform to the bounds. // D? d; -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue43211.dart:7:9: Context: This is the type variable whose bound isn't conformed to. // class D {} // ^ // -// pkg/front_end/testcases/nnbd/issue43211.dart:39:17: Error: Type argument 'A' doesn't conform to the bound 'A?' of the type variable 'X' on 'A'. +// pkg/front_end/testcases/nnbd/issue43211.dart:39:5: Error: Type argument 'A' doesn't conform to the bound 'A?' of the type variable 'X' on 'A'. // - 'A' is from 'pkg/front_end/testcases/nnbd/issue43211.dart'. // Try changing type arguments so that they conform to the bounds. // A>? b; -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue43211.dart:5:9: Context: This is the type variable whose bound isn't conformed to. // class A?> {} // ^ // -// pkg/front_end/testcases/nnbd/issue43211.dart:40:16: Error: Type argument 'String' doesn't conform to the bound 'num' of the type variable 'X' on 'D'. +// pkg/front_end/testcases/nnbd/issue43211.dart:40:5: Error: Type argument 'String' doesn't conform to the bound 'num' of the type variable 'X' on 'D'. // Try changing type arguments so that they conform to the bounds. // D? c; -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue43211.dart:7:9: Context: This is the type variable whose bound isn't conformed to. // class D {} // ^ // -// pkg/front_end/testcases/nnbd/issue43211.dart:45:17: Error: Type argument 'A' doesn't conform to the bound 'A?' of the type variable 'X' on 'A'. +// pkg/front_end/testcases/nnbd/issue43211.dart:45:5: Error: Type argument 'A' doesn't conform to the bound 'A?' of the type variable 'X' on 'A'. // - 'A' is from 'pkg/front_end/testcases/nnbd/issue43211.dart'. // Try changing type arguments so that they conform to the bounds. // A>? a; -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue43211.dart:5:9: Context: This is the type variable whose bound isn't conformed to. // class A?> {} // ^ // -// pkg/front_end/testcases/nnbd/issue43211.dart:46:16: Error: Type argument 'String' doesn't conform to the bound 'num' of the type variable 'X' on 'D'. +// pkg/front_end/testcases/nnbd/issue43211.dart:46:5: Error: Type argument 'String' doesn't conform to the bound 'num' of the type variable 'X' on 'D'. // Try changing type arguments so that they conform to the bounds. // D? b; -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue43211.dart:7:9: Context: This is the type variable whose bound isn't conformed to. // class D {} // ^ diff --git a/pkg/front_end/testcases/nnbd/issue43211.dart.weak.outline.expect b/pkg/front_end/testcases/nnbd/issue43211.dart.weak.outline.expect index ffca4b454b2..07d69b72043 100644 --- a/pkg/front_end/testcases/nnbd/issue43211.dart.weak.outline.expect +++ b/pkg/front_end/testcases/nnbd/issue43211.dart.weak.outline.expect @@ -2,27 +2,27 @@ library /*isNonNullableByDefault*/; // // Problems in library: // -// pkg/front_end/testcases/nnbd/issue43211.dart:10:53: Error: Type argument 'A' doesn't conform to the bound 'A?' of the type variable 'X' on 'A'. +// pkg/front_end/testcases/nnbd/issue43211.dart:10:41: Error: Type argument 'A' doesn't conform to the bound 'A?' of the type variable 'X' on 'A'. // - 'A' is from 'pkg/front_end/testcases/nnbd/issue43211.dart'. // Try changing type arguments so that they conform to the bounds. // void method1?>(A a, A>? b) { -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue43211.dart:5:9: Context: This is the type variable whose bound isn't conformed to. // class A?> {} // ^ // -// pkg/front_end/testcases/nnbd/issue43211.dart:15:39: Error: Type argument 'Y' doesn't conform to the bound 'num' of the type variable 'X' on 'D'. +// pkg/front_end/testcases/nnbd/issue43211.dart:15:34: Error: Type argument 'Y' doesn't conform to the bound 'num' of the type variable 'X' on 'D'. // Try changing type arguments so that they conform to the bounds. // void method2(D a, D? b) { -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue43211.dart:7:9: Context: This is the type variable whose bound isn't conformed to. // class D {} // ^ // -// pkg/front_end/testcases/nnbd/issue43211.dart:15:53: Error: Type argument 'String' doesn't conform to the bound 'num' of the type variable 'X' on 'D'. +// pkg/front_end/testcases/nnbd/issue43211.dart:15:42: Error: Type argument 'String' doesn't conform to the bound 'num' of the type variable 'X' on 'D'. // Try changing type arguments so that they conform to the bounds. // void method2(D a, D? b) { -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue43211.dart:7:9: Context: This is the type variable whose bound isn't conformed to. // class D {} // ^ @@ -38,65 +38,65 @@ library /*isNonNullableByDefault*/; // class A?> {} // ^ // -// pkg/front_end/testcases/nnbd/issue43211.dart:23:7: Error: Type argument 'X/*1*/' doesn't conform to the bound 'A?' of the type variable 'X' on 'A' in the supertype 'A' of class 'B'. +// pkg/front_end/testcases/nnbd/issue43211.dart:24:36: Error: Type argument 'Y' doesn't conform to the bound 'A?' of the type variable 'X' on 'A'. +// - 'A' is from 'pkg/front_end/testcases/nnbd/issue43211.dart'. +// Try changing type arguments so that they conform to the bounds. +// void method1?>(A a, A>? b) { +// ^ +// pkg/front_end/testcases/nnbd/issue43211.dart:5:9: Context: This is the type variable whose bound isn't conformed to. +// class A?> {} +// ^ +// +// pkg/front_end/testcases/nnbd/issue43211.dart:24:44: Error: Type argument 'A' doesn't conform to the bound 'A?' of the type variable 'X' on 'A'. +// - 'A' is from 'pkg/front_end/testcases/nnbd/issue43211.dart'. +// Try changing type arguments so that they conform to the bounds. +// void method1?>(A a, A>? b) { +// ^ +// pkg/front_end/testcases/nnbd/issue43211.dart:5:9: Context: This is the type variable whose bound isn't conformed to. +// class A?> {} +// ^ +// +// pkg/front_end/testcases/nnbd/issue43211.dart:29:34: Error: Type argument 'Y' doesn't conform to the bound 'num' of the type variable 'X' on 'D'. +// Try changing type arguments so that they conform to the bounds. +// void method2(D a, D? b) { +// ^ +// pkg/front_end/testcases/nnbd/issue43211.dart:7:9: Context: This is the type variable whose bound isn't conformed to. +// class D {} +// ^ +// +// pkg/front_end/testcases/nnbd/issue43211.dart:29:42: Error: Type argument 'String' doesn't conform to the bound 'num' of the type variable 'X' on 'D'. +// Try changing type arguments so that they conform to the bounds. +// void method2(D a, D? b) { +// ^ +// pkg/front_end/testcases/nnbd/issue43211.dart:7:9: Context: This is the type variable whose bound isn't conformed to. +// class D {} +// ^ +// +// pkg/front_end/testcases/nnbd/issue43211.dart:23:40: Error: Type argument 'X/*1*/' doesn't conform to the bound 'A?' of the type variable 'X' on 'A'. // - 'X/*1*/' is from 'pkg/front_end/testcases/nnbd/issue43211.dart'. // - 'A' is from 'pkg/front_end/testcases/nnbd/issue43211.dart'. // - 'X/*2*/' is from 'pkg/front_end/testcases/nnbd/issue43211.dart'. // Try changing type arguments so that they conform to the bounds. // class B?> implements A { -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue43211.dart:5:9: Context: This is the type variable whose bound isn't conformed to. // class A?> {} // ^ // -// pkg/front_end/testcases/nnbd/issue43211.dart:24:41: Error: Type argument 'Y' doesn't conform to the bound 'A?' of the type variable 'X' on 'A'. -// - 'A' is from 'pkg/front_end/testcases/nnbd/issue43211.dart'. -// Try changing type arguments so that they conform to the bounds. -// void method1?>(A a, A>? b) { -// ^ -// pkg/front_end/testcases/nnbd/issue43211.dart:5:9: Context: This is the type variable whose bound isn't conformed to. -// class A?> {} -// ^ -// -// pkg/front_end/testcases/nnbd/issue43211.dart:24:56: Error: Type argument 'A' doesn't conform to the bound 'A?' of the type variable 'X' on 'A'. -// - 'A' is from 'pkg/front_end/testcases/nnbd/issue43211.dart'. -// Try changing type arguments so that they conform to the bounds. -// void method1?>(A a, A>? b) { -// ^ -// pkg/front_end/testcases/nnbd/issue43211.dart:5:9: Context: This is the type variable whose bound isn't conformed to. -// class A?> {} -// ^ -// -// pkg/front_end/testcases/nnbd/issue43211.dart:29:39: Error: Type argument 'Y' doesn't conform to the bound 'num' of the type variable 'X' on 'D'. -// Try changing type arguments so that they conform to the bounds. -// void method2(D a, D? b) { -// ^ -// pkg/front_end/testcases/nnbd/issue43211.dart:7:9: Context: This is the type variable whose bound isn't conformed to. -// class D {} -// ^ -// -// pkg/front_end/testcases/nnbd/issue43211.dart:29:53: Error: Type argument 'String' doesn't conform to the bound 'num' of the type variable 'X' on 'D'. -// Try changing type arguments so that they conform to the bounds. -// void method2(D a, D? b) { -// ^ -// pkg/front_end/testcases/nnbd/issue43211.dart:7:9: Context: This is the type variable whose bound isn't conformed to. -// class D {} -// ^ -// -// pkg/front_end/testcases/nnbd/issue43211.dart:36:34: Error: Type argument 'A' doesn't conform to the bound 'A?' of the type variable 'X' on 'A'. +// pkg/front_end/testcases/nnbd/issue43211.dart:36:22: Error: Type argument 'A' doesn't conform to the bound 'A?' of the type variable 'X' on 'A'. // - 'A' is from 'pkg/front_end/testcases/nnbd/issue43211.dart'. // Try changing type arguments so that they conform to the bounds. // factory C.redirect(A>? a) = C.internal; -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue43211.dart:5:9: Context: This is the type variable whose bound isn't conformed to. // class A?> {} // ^ // -// pkg/front_end/testcases/nnbd/issue43211.dart:38:30: Error: Type argument 'A' doesn't conform to the bound 'A?' of the type variable 'X' on 'A'. +// pkg/front_end/testcases/nnbd/issue43211.dart:38:18: Error: Type argument 'A' doesn't conform to the bound 'A?' of the type variable 'X' on 'A'. // - 'A' is from 'pkg/front_end/testcases/nnbd/issue43211.dart'. // Try changing type arguments so that they conform to the bounds. // factory C.fact(A>? a) { -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue43211.dart:5:9: Context: This is the type variable whose bound isn't conformed to. // class A?> {} // ^ diff --git a/pkg/front_end/testcases/nnbd/issue43211.dart.weak.transformed.expect b/pkg/front_end/testcases/nnbd/issue43211.dart.weak.transformed.expect index 46f67824d3b..c89209d1a80 100644 --- a/pkg/front_end/testcases/nnbd/issue43211.dart.weak.transformed.expect +++ b/pkg/front_end/testcases/nnbd/issue43211.dart.weak.transformed.expect @@ -2,27 +2,27 @@ library /*isNonNullableByDefault*/; // // Problems in library: // -// pkg/front_end/testcases/nnbd/issue43211.dart:10:53: Error: Type argument 'A' doesn't conform to the bound 'A?' of the type variable 'X' on 'A'. +// pkg/front_end/testcases/nnbd/issue43211.dart:10:41: Error: Type argument 'A' doesn't conform to the bound 'A?' of the type variable 'X' on 'A'. // - 'A' is from 'pkg/front_end/testcases/nnbd/issue43211.dart'. // Try changing type arguments so that they conform to the bounds. // void method1?>(A a, A>? b) { -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue43211.dart:5:9: Context: This is the type variable whose bound isn't conformed to. // class A?> {} // ^ // -// pkg/front_end/testcases/nnbd/issue43211.dart:15:39: Error: Type argument 'Y' doesn't conform to the bound 'num' of the type variable 'X' on 'D'. +// pkg/front_end/testcases/nnbd/issue43211.dart:15:34: Error: Type argument 'Y' doesn't conform to the bound 'num' of the type variable 'X' on 'D'. // Try changing type arguments so that they conform to the bounds. // void method2(D a, D? b) { -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue43211.dart:7:9: Context: This is the type variable whose bound isn't conformed to. // class D {} // ^ // -// pkg/front_end/testcases/nnbd/issue43211.dart:15:53: Error: Type argument 'String' doesn't conform to the bound 'num' of the type variable 'X' on 'D'. +// pkg/front_end/testcases/nnbd/issue43211.dart:15:42: Error: Type argument 'String' doesn't conform to the bound 'num' of the type variable 'X' on 'D'. // Try changing type arguments so that they conform to the bounds. // void method2(D a, D? b) { -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue43211.dart:7:9: Context: This is the type variable whose bound isn't conformed to. // class D {} // ^ @@ -38,158 +38,158 @@ library /*isNonNullableByDefault*/; // class A?> {} // ^ // -// pkg/front_end/testcases/nnbd/issue43211.dart:23:7: Error: Type argument 'X/*1*/' doesn't conform to the bound 'A?' of the type variable 'X' on 'A' in the supertype 'A' of class 'B'. +// pkg/front_end/testcases/nnbd/issue43211.dart:24:36: Error: Type argument 'Y' doesn't conform to the bound 'A?' of the type variable 'X' on 'A'. +// - 'A' is from 'pkg/front_end/testcases/nnbd/issue43211.dart'. +// Try changing type arguments so that they conform to the bounds. +// void method1?>(A a, A>? b) { +// ^ +// pkg/front_end/testcases/nnbd/issue43211.dart:5:9: Context: This is the type variable whose bound isn't conformed to. +// class A?> {} +// ^ +// +// pkg/front_end/testcases/nnbd/issue43211.dart:24:44: Error: Type argument 'A' doesn't conform to the bound 'A?' of the type variable 'X' on 'A'. +// - 'A' is from 'pkg/front_end/testcases/nnbd/issue43211.dart'. +// Try changing type arguments so that they conform to the bounds. +// void method1?>(A a, A>? b) { +// ^ +// pkg/front_end/testcases/nnbd/issue43211.dart:5:9: Context: This is the type variable whose bound isn't conformed to. +// class A?> {} +// ^ +// +// pkg/front_end/testcases/nnbd/issue43211.dart:29:34: Error: Type argument 'Y' doesn't conform to the bound 'num' of the type variable 'X' on 'D'. +// Try changing type arguments so that they conform to the bounds. +// void method2(D a, D? b) { +// ^ +// pkg/front_end/testcases/nnbd/issue43211.dart:7:9: Context: This is the type variable whose bound isn't conformed to. +// class D {} +// ^ +// +// pkg/front_end/testcases/nnbd/issue43211.dart:29:42: Error: Type argument 'String' doesn't conform to the bound 'num' of the type variable 'X' on 'D'. +// Try changing type arguments so that they conform to the bounds. +// void method2(D a, D? b) { +// ^ +// pkg/front_end/testcases/nnbd/issue43211.dart:7:9: Context: This is the type variable whose bound isn't conformed to. +// class D {} +// ^ +// +// pkg/front_end/testcases/nnbd/issue43211.dart:23:40: Error: Type argument 'X/*1*/' doesn't conform to the bound 'A?' of the type variable 'X' on 'A'. // - 'X/*1*/' is from 'pkg/front_end/testcases/nnbd/issue43211.dart'. // - 'A' is from 'pkg/front_end/testcases/nnbd/issue43211.dart'. // - 'X/*2*/' is from 'pkg/front_end/testcases/nnbd/issue43211.dart'. // Try changing type arguments so that they conform to the bounds. // class B?> implements A { -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue43211.dart:5:9: Context: This is the type variable whose bound isn't conformed to. // class A?> {} // ^ // -// pkg/front_end/testcases/nnbd/issue43211.dart:24:41: Error: Type argument 'Y' doesn't conform to the bound 'A?' of the type variable 'X' on 'A'. -// - 'A' is from 'pkg/front_end/testcases/nnbd/issue43211.dart'. -// Try changing type arguments so that they conform to the bounds. -// void method1?>(A a, A>? b) { -// ^ -// pkg/front_end/testcases/nnbd/issue43211.dart:5:9: Context: This is the type variable whose bound isn't conformed to. -// class A?> {} -// ^ -// -// pkg/front_end/testcases/nnbd/issue43211.dart:24:56: Error: Type argument 'A' doesn't conform to the bound 'A?' of the type variable 'X' on 'A'. -// - 'A' is from 'pkg/front_end/testcases/nnbd/issue43211.dart'. -// Try changing type arguments so that they conform to the bounds. -// void method1?>(A a, A>? b) { -// ^ -// pkg/front_end/testcases/nnbd/issue43211.dart:5:9: Context: This is the type variable whose bound isn't conformed to. -// class A?> {} -// ^ -// -// pkg/front_end/testcases/nnbd/issue43211.dart:29:39: Error: Type argument 'Y' doesn't conform to the bound 'num' of the type variable 'X' on 'D'. -// Try changing type arguments so that they conform to the bounds. -// void method2(D a, D? b) { -// ^ -// pkg/front_end/testcases/nnbd/issue43211.dart:7:9: Context: This is the type variable whose bound isn't conformed to. -// class D {} -// ^ -// -// pkg/front_end/testcases/nnbd/issue43211.dart:29:53: Error: Type argument 'String' doesn't conform to the bound 'num' of the type variable 'X' on 'D'. -// Try changing type arguments so that they conform to the bounds. -// void method2(D a, D? b) { -// ^ -// pkg/front_end/testcases/nnbd/issue43211.dart:7:9: Context: This is the type variable whose bound isn't conformed to. -// class D {} -// ^ -// -// pkg/front_end/testcases/nnbd/issue43211.dart:36:34: Error: Type argument 'A' doesn't conform to the bound 'A?' of the type variable 'X' on 'A'. +// pkg/front_end/testcases/nnbd/issue43211.dart:36:22: Error: Type argument 'A' doesn't conform to the bound 'A?' of the type variable 'X' on 'A'. // - 'A' is from 'pkg/front_end/testcases/nnbd/issue43211.dart'. // Try changing type arguments so that they conform to the bounds. // factory C.redirect(A>? a) = C.internal; -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue43211.dart:5:9: Context: This is the type variable whose bound isn't conformed to. // class A?> {} // ^ // -// pkg/front_end/testcases/nnbd/issue43211.dart:38:30: Error: Type argument 'A' doesn't conform to the bound 'A?' of the type variable 'X' on 'A'. +// pkg/front_end/testcases/nnbd/issue43211.dart:38:18: Error: Type argument 'A' doesn't conform to the bound 'A?' of the type variable 'X' on 'A'. // - 'A' is from 'pkg/front_end/testcases/nnbd/issue43211.dart'. // Try changing type arguments so that they conform to the bounds. // factory C.fact(A>? a) { -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue43211.dart:5:9: Context: This is the type variable whose bound isn't conformed to. // class A?> {} // ^ // -// pkg/front_end/testcases/nnbd/issue43211.dart:12:17: Error: Type argument 'A' doesn't conform to the bound 'A?' of the type variable 'X' on 'A'. +// pkg/front_end/testcases/nnbd/issue43211.dart:12:5: Error: Type argument 'A' doesn't conform to the bound 'A?' of the type variable 'X' on 'A'. // - 'A' is from 'pkg/front_end/testcases/nnbd/issue43211.dart'. // Try changing type arguments so that they conform to the bounds. // A>? d; -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue43211.dart:5:9: Context: This is the type variable whose bound isn't conformed to. // class A?> {} // ^ // -// pkg/front_end/testcases/nnbd/issue43211.dart:16:11: Error: Type argument 'Y' doesn't conform to the bound 'num' of the type variable 'X' on 'D'. +// pkg/front_end/testcases/nnbd/issue43211.dart:16:5: Error: Type argument 'Y' doesn't conform to the bound 'num' of the type variable 'X' on 'D'. // Try changing type arguments so that they conform to the bounds. // D? c; -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue43211.dart:7:9: Context: This is the type variable whose bound isn't conformed to. // class D {} // ^ // -// pkg/front_end/testcases/nnbd/issue43211.dart:17:16: Error: Type argument 'String' doesn't conform to the bound 'num' of the type variable 'X' on 'D'. +// pkg/front_end/testcases/nnbd/issue43211.dart:17:5: Error: Type argument 'String' doesn't conform to the bound 'num' of the type variable 'X' on 'D'. // Try changing type arguments so that they conform to the bounds. // D? d; -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue43211.dart:7:9: Context: This is the type variable whose bound isn't conformed to. // class D {} // ^ // -// pkg/front_end/testcases/nnbd/issue43211.dart:25:11: Error: Type argument 'Y' doesn't conform to the bound 'A?' of the type variable 'X' on 'A'. +// pkg/front_end/testcases/nnbd/issue43211.dart:25:5: Error: Type argument 'Y' doesn't conform to the bound 'A?' of the type variable 'X' on 'A'. // - 'A' is from 'pkg/front_end/testcases/nnbd/issue43211.dart'. // Try changing type arguments so that they conform to the bounds. // A? c; -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue43211.dart:5:9: Context: This is the type variable whose bound isn't conformed to. // class A?> {} // ^ // -// pkg/front_end/testcases/nnbd/issue43211.dart:26:17: Error: Type argument 'A' doesn't conform to the bound 'A?' of the type variable 'X' on 'A'. +// pkg/front_end/testcases/nnbd/issue43211.dart:26:5: Error: Type argument 'A' doesn't conform to the bound 'A?' of the type variable 'X' on 'A'. // - 'A' is from 'pkg/front_end/testcases/nnbd/issue43211.dart'. // Try changing type arguments so that they conform to the bounds. // A>? d; -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue43211.dart:5:9: Context: This is the type variable whose bound isn't conformed to. // class A?> {} // ^ // -// pkg/front_end/testcases/nnbd/issue43211.dart:30:11: Error: Type argument 'Y' doesn't conform to the bound 'num' of the type variable 'X' on 'D'. +// pkg/front_end/testcases/nnbd/issue43211.dart:30:5: Error: Type argument 'Y' doesn't conform to the bound 'num' of the type variable 'X' on 'D'. // Try changing type arguments so that they conform to the bounds. // D? c; -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue43211.dart:7:9: Context: This is the type variable whose bound isn't conformed to. // class D {} // ^ // -// pkg/front_end/testcases/nnbd/issue43211.dart:31:16: Error: Type argument 'String' doesn't conform to the bound 'num' of the type variable 'X' on 'D'. +// pkg/front_end/testcases/nnbd/issue43211.dart:31:5: Error: Type argument 'String' doesn't conform to the bound 'num' of the type variable 'X' on 'D'. // Try changing type arguments so that they conform to the bounds. // D? d; -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue43211.dart:7:9: Context: This is the type variable whose bound isn't conformed to. // class D {} // ^ // -// pkg/front_end/testcases/nnbd/issue43211.dart:39:17: Error: Type argument 'A' doesn't conform to the bound 'A?' of the type variable 'X' on 'A'. +// pkg/front_end/testcases/nnbd/issue43211.dart:39:5: Error: Type argument 'A' doesn't conform to the bound 'A?' of the type variable 'X' on 'A'. // - 'A' is from 'pkg/front_end/testcases/nnbd/issue43211.dart'. // Try changing type arguments so that they conform to the bounds. // A>? b; -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue43211.dart:5:9: Context: This is the type variable whose bound isn't conformed to. // class A?> {} // ^ // -// pkg/front_end/testcases/nnbd/issue43211.dart:40:16: Error: Type argument 'String' doesn't conform to the bound 'num' of the type variable 'X' on 'D'. +// pkg/front_end/testcases/nnbd/issue43211.dart:40:5: Error: Type argument 'String' doesn't conform to the bound 'num' of the type variable 'X' on 'D'. // Try changing type arguments so that they conform to the bounds. // D? c; -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue43211.dart:7:9: Context: This is the type variable whose bound isn't conformed to. // class D {} // ^ // -// pkg/front_end/testcases/nnbd/issue43211.dart:45:17: Error: Type argument 'A' doesn't conform to the bound 'A?' of the type variable 'X' on 'A'. +// pkg/front_end/testcases/nnbd/issue43211.dart:45:5: Error: Type argument 'A' doesn't conform to the bound 'A?' of the type variable 'X' on 'A'. // - 'A' is from 'pkg/front_end/testcases/nnbd/issue43211.dart'. // Try changing type arguments so that they conform to the bounds. // A>? a; -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue43211.dart:5:9: Context: This is the type variable whose bound isn't conformed to. // class A?> {} // ^ // -// pkg/front_end/testcases/nnbd/issue43211.dart:46:16: Error: Type argument 'String' doesn't conform to the bound 'num' of the type variable 'X' on 'D'. +// pkg/front_end/testcases/nnbd/issue43211.dart:46:5: Error: Type argument 'String' doesn't conform to the bound 'num' of the type variable 'X' on 'D'. // Try changing type arguments so that they conform to the bounds. // D? b; -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue43211.dart:7:9: Context: This is the type variable whose bound isn't conformed to. // class D {} // ^ diff --git a/pkg/front_end/testcases/nnbd/issue44455.dart.strong.expect b/pkg/front_end/testcases/nnbd/issue44455.dart.strong.expect index d0065b3db87..4c7be001c69 100644 --- a/pkg/front_end/testcases/nnbd/issue44455.dart.strong.expect +++ b/pkg/front_end/testcases/nnbd/issue44455.dart.strong.expect @@ -2,18 +2,18 @@ library /*isNonNullableByDefault*/; // // Problems in library: // -// pkg/front_end/testcases/nnbd/issue44455.dart:6:9: Error: Type argument 'X' doesn't conform to the bound 'num' of the type variable 'Y' on 'F'. +// pkg/front_end/testcases/nnbd/issue44455.dart:6:19: Error: Type argument 'X' doesn't conform to the bound 'num' of the type variable 'Y' on 'F'. // Try changing type arguments so that they conform to the bounds. // class A> {} -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue44455.dart:5:11: Context: This is the type variable whose bound isn't conformed to. // typedef F = Y Function(); // ^ // -// pkg/front_end/testcases/nnbd/issue44455.dart:8:10: Error: Type argument 'X' doesn't conform to the bound 'num' of the type variable 'Y' on 'F2'. +// pkg/front_end/testcases/nnbd/issue44455.dart:8:20: Error: Type argument 'X' doesn't conform to the bound 'num' of the type variable 'Y' on 'F2'. // Try changing type arguments so that they conform to the bounds. // class A2> {} -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue44455.dart:9:12: Context: This is the type variable whose bound isn't conformed to. // typedef F2 = Y Function(); // ^ diff --git a/pkg/front_end/testcases/nnbd/issue44455.dart.strong.transformed.expect b/pkg/front_end/testcases/nnbd/issue44455.dart.strong.transformed.expect index d0065b3db87..4c7be001c69 100644 --- a/pkg/front_end/testcases/nnbd/issue44455.dart.strong.transformed.expect +++ b/pkg/front_end/testcases/nnbd/issue44455.dart.strong.transformed.expect @@ -2,18 +2,18 @@ library /*isNonNullableByDefault*/; // // Problems in library: // -// pkg/front_end/testcases/nnbd/issue44455.dart:6:9: Error: Type argument 'X' doesn't conform to the bound 'num' of the type variable 'Y' on 'F'. +// pkg/front_end/testcases/nnbd/issue44455.dart:6:19: Error: Type argument 'X' doesn't conform to the bound 'num' of the type variable 'Y' on 'F'. // Try changing type arguments so that they conform to the bounds. // class A> {} -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue44455.dart:5:11: Context: This is the type variable whose bound isn't conformed to. // typedef F = Y Function(); // ^ // -// pkg/front_end/testcases/nnbd/issue44455.dart:8:10: Error: Type argument 'X' doesn't conform to the bound 'num' of the type variable 'Y' on 'F2'. +// pkg/front_end/testcases/nnbd/issue44455.dart:8:20: Error: Type argument 'X' doesn't conform to the bound 'num' of the type variable 'Y' on 'F2'. // Try changing type arguments so that they conform to the bounds. // class A2> {} -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue44455.dart:9:12: Context: This is the type variable whose bound isn't conformed to. // typedef F2 = Y Function(); // ^ diff --git a/pkg/front_end/testcases/nnbd/issue44455.dart.weak.expect b/pkg/front_end/testcases/nnbd/issue44455.dart.weak.expect index d0065b3db87..4c7be001c69 100644 --- a/pkg/front_end/testcases/nnbd/issue44455.dart.weak.expect +++ b/pkg/front_end/testcases/nnbd/issue44455.dart.weak.expect @@ -2,18 +2,18 @@ library /*isNonNullableByDefault*/; // // Problems in library: // -// pkg/front_end/testcases/nnbd/issue44455.dart:6:9: Error: Type argument 'X' doesn't conform to the bound 'num' of the type variable 'Y' on 'F'. +// pkg/front_end/testcases/nnbd/issue44455.dart:6:19: Error: Type argument 'X' doesn't conform to the bound 'num' of the type variable 'Y' on 'F'. // Try changing type arguments so that they conform to the bounds. // class A> {} -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue44455.dart:5:11: Context: This is the type variable whose bound isn't conformed to. // typedef F = Y Function(); // ^ // -// pkg/front_end/testcases/nnbd/issue44455.dart:8:10: Error: Type argument 'X' doesn't conform to the bound 'num' of the type variable 'Y' on 'F2'. +// pkg/front_end/testcases/nnbd/issue44455.dart:8:20: Error: Type argument 'X' doesn't conform to the bound 'num' of the type variable 'Y' on 'F2'. // Try changing type arguments so that they conform to the bounds. // class A2> {} -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue44455.dart:9:12: Context: This is the type variable whose bound isn't conformed to. // typedef F2 = Y Function(); // ^ diff --git a/pkg/front_end/testcases/nnbd/issue44455.dart.weak.modular.expect b/pkg/front_end/testcases/nnbd/issue44455.dart.weak.modular.expect index d0065b3db87..4c7be001c69 100644 --- a/pkg/front_end/testcases/nnbd/issue44455.dart.weak.modular.expect +++ b/pkg/front_end/testcases/nnbd/issue44455.dart.weak.modular.expect @@ -2,18 +2,18 @@ library /*isNonNullableByDefault*/; // // Problems in library: // -// pkg/front_end/testcases/nnbd/issue44455.dart:6:9: Error: Type argument 'X' doesn't conform to the bound 'num' of the type variable 'Y' on 'F'. +// pkg/front_end/testcases/nnbd/issue44455.dart:6:19: Error: Type argument 'X' doesn't conform to the bound 'num' of the type variable 'Y' on 'F'. // Try changing type arguments so that they conform to the bounds. // class A> {} -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue44455.dart:5:11: Context: This is the type variable whose bound isn't conformed to. // typedef F = Y Function(); // ^ // -// pkg/front_end/testcases/nnbd/issue44455.dart:8:10: Error: Type argument 'X' doesn't conform to the bound 'num' of the type variable 'Y' on 'F2'. +// pkg/front_end/testcases/nnbd/issue44455.dart:8:20: Error: Type argument 'X' doesn't conform to the bound 'num' of the type variable 'Y' on 'F2'. // Try changing type arguments so that they conform to the bounds. // class A2> {} -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue44455.dart:9:12: Context: This is the type variable whose bound isn't conformed to. // typedef F2 = Y Function(); // ^ diff --git a/pkg/front_end/testcases/nnbd/issue44455.dart.weak.outline.expect b/pkg/front_end/testcases/nnbd/issue44455.dart.weak.outline.expect index 5fc32cd15c2..2f4ff7f3ab2 100644 --- a/pkg/front_end/testcases/nnbd/issue44455.dart.weak.outline.expect +++ b/pkg/front_end/testcases/nnbd/issue44455.dart.weak.outline.expect @@ -2,18 +2,18 @@ library /*isNonNullableByDefault*/; // // Problems in library: // -// pkg/front_end/testcases/nnbd/issue44455.dart:6:9: Error: Type argument 'X' doesn't conform to the bound 'num' of the type variable 'Y' on 'F'. +// pkg/front_end/testcases/nnbd/issue44455.dart:6:19: Error: Type argument 'X' doesn't conform to the bound 'num' of the type variable 'Y' on 'F'. // Try changing type arguments so that they conform to the bounds. // class A> {} -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue44455.dart:5:11: Context: This is the type variable whose bound isn't conformed to. // typedef F = Y Function(); // ^ // -// pkg/front_end/testcases/nnbd/issue44455.dart:8:10: Error: Type argument 'X' doesn't conform to the bound 'num' of the type variable 'Y' on 'F2'. +// pkg/front_end/testcases/nnbd/issue44455.dart:8:20: Error: Type argument 'X' doesn't conform to the bound 'num' of the type variable 'Y' on 'F2'. // Try changing type arguments so that they conform to the bounds. // class A2> {} -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue44455.dart:9:12: Context: This is the type variable whose bound isn't conformed to. // typedef F2 = Y Function(); // ^ diff --git a/pkg/front_end/testcases/nnbd/issue44455.dart.weak.transformed.expect b/pkg/front_end/testcases/nnbd/issue44455.dart.weak.transformed.expect index d0065b3db87..4c7be001c69 100644 --- a/pkg/front_end/testcases/nnbd/issue44455.dart.weak.transformed.expect +++ b/pkg/front_end/testcases/nnbd/issue44455.dart.weak.transformed.expect @@ -2,18 +2,18 @@ library /*isNonNullableByDefault*/; // // Problems in library: // -// pkg/front_end/testcases/nnbd/issue44455.dart:6:9: Error: Type argument 'X' doesn't conform to the bound 'num' of the type variable 'Y' on 'F'. +// pkg/front_end/testcases/nnbd/issue44455.dart:6:19: Error: Type argument 'X' doesn't conform to the bound 'num' of the type variable 'Y' on 'F'. // Try changing type arguments so that they conform to the bounds. // class A> {} -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue44455.dart:5:11: Context: This is the type variable whose bound isn't conformed to. // typedef F = Y Function(); // ^ // -// pkg/front_end/testcases/nnbd/issue44455.dart:8:10: Error: Type argument 'X' doesn't conform to the bound 'num' of the type variable 'Y' on 'F2'. +// pkg/front_end/testcases/nnbd/issue44455.dart:8:20: Error: Type argument 'X' doesn't conform to the bound 'num' of the type variable 'Y' on 'F2'. // Try changing type arguments so that they conform to the bounds. // class A2> {} -// ^ +// ^ // pkg/front_end/testcases/nnbd/issue44455.dart:9:12: Context: This is the type variable whose bound isn't conformed to. // typedef F2 = Y Function(); // ^ diff --git a/pkg/front_end/testcases/nnbd/super_bounded_hint.dart.strong.expect b/pkg/front_end/testcases/nnbd/super_bounded_hint.dart.strong.expect index 5537cc39e65..8b88b00372b 100644 --- a/pkg/front_end/testcases/nnbd/super_bounded_hint.dart.strong.expect +++ b/pkg/front_end/testcases/nnbd/super_bounded_hint.dart.strong.expect @@ -18,455 +18,425 @@ library /*isNonNullableByDefault*/; // typedef F, Y extends A> = X Function(Y); // ^ // -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:11:31: Error: Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// Try changing type arguments so that they conform to the bounds. -// foo1a(F, A> x) {} -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. -// typedef F, Y extends A> = X Function(Y); -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:11:31: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// - 'Object' is from 'dart:core'. -// foo1a(F, A> x) {} -// ^ -// -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:12:9: Error: Inferred type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// Try specifying type arguments explicitly so that they conform to the bounds. -// foo1b(F x) {} -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. -// typedef F, Y extends A> = X Function(Y); -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:12:9: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// - 'Object' is from 'dart:core'. -// foo1b(F x) {} -// ^ -// -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:14:7: Error: Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:14:17: Error: Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. // - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. // Try changing type arguments so that they conform to the bounds. // foo2a, A>>() {} -// ^ +// ^ // pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. // typedef F, Y extends A> = X Function(Y); // ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:14:7: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:14:17: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. // - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. // - 'Object' is from 'dart:core'. // foo2a, A>>() {} -// ^ +// ^ // -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:15:7: Error: Inferred type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:15:17: Error: Inferred type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. // - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. // Try specifying type arguments explicitly so that they conform to the bounds. // foo2b() {} -// ^ +// ^ // pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. // typedef F, Y extends A> = X Function(Y); // ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:15:7: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:15:17: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. // - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. // - 'Object' is from 'dart:core'. // foo2b() {} -// ^ +// ^ // -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:17:13: Error: Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:17:23: Error: Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. // - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. // Try changing type arguments so that they conform to the bounds. // class Foo3a, A>> {} -// ^ +// ^ // pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. // typedef F, Y extends A> = X Function(Y); // ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:17:13: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:17:23: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. // - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. // - 'Object' is from 'dart:core'. // class Foo3a, A>> {} -// ^ +// ^ // -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:21:30: Error: Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F' in the return type. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// Try changing type arguments so that they conform to the bounds. -// F, A> foo4a() => throw 42; -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. -// typedef F, Y extends A> = X Function(Y); -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:21:30: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// - 'Object' is from 'dart:core'. -// F, A> foo4a() => throw 42; -// ^ -// -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:22:8: Error: Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F' in the return type. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// Try changing type arguments so that they conform to the bounds. -// F foo4b() => throw 42; -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. -// typedef F, Y extends A> = X Function(Y); -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:22:8: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// - 'Object' is from 'dart:core'. -// F foo4b() => throw 42; -// ^ -// -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:24:41: Error: Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// Try changing type arguments so that they conform to the bounds. -// foo5a({required F, A> x}) {} -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. -// typedef F, Y extends A> = X Function(Y); -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:24:41: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// - 'Object' is from 'dart:core'. -// foo5a({required F, A> x}) {} -// ^ -// -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:25:19: Error: Inferred type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:19:23: Error: Inferred type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. // - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. // Try specifying type arguments explicitly so that they conform to the bounds. -// foo5b({required F x}) {} -// ^ +// class Foo3b {} +// ^ // pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. // typedef F, Y extends A> = X Function(Y); // ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:25:19: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:19:23: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. // - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. // - 'Object' is from 'dart:core'. -// foo5b({required F x}) {} -// ^ +// class Foo3b {} +// ^ // -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:47:33: Error: Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:56:16: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'B'. // Try changing type arguments so that they conform to the bounds. -// foo7a([F, A>? x]) {} -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. -// typedef F, Y extends A> = X Function(Y); -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:47:33: Context: If you want 'F, A>?' to be a super-bounded type, note that the inverted type 'F, A>?' must then satisfy its bounds, which it does not. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// - 'Object' is from 'dart:core'. -// foo7a([F, A>? x]) {} -// ^ -// -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:48:11: Error: Inferred type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// Try specifying type arguments explicitly so that they conform to the bounds. -// foo7b([F? x]) {} -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. -// typedef F, Y extends A> = X Function(Y); -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:48:11: Context: If you want 'F, A>?' to be a super-bounded type, note that the inverted type 'F, A>?' must then satisfy its bounds, which it does not. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// - 'Object' is from 'dart:core'. -// foo7b([F? x]) {} -// ^ -// -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:54:13: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'B'. -// Try changing type arguments so that they conform to the bounds. -// bar1(B x) {} -// ^ +// bar2>() {} +// ^ // pkg/front_end/testcases/nnbd/super_bounded_hint.dart:52:9: Context: This is the type variable whose bound isn't conformed to. // class B {} // ^ // -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:56:6: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'B'. +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:58:22: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'B'. // Try changing type arguments so that they conform to the bounds. -// bar2>() {} +// class Bar3> {} +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:52:9: Context: This is the type variable whose bound isn't conformed to. +// class B {} +// ^ +// +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:11:7: Error: Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// Try changing type arguments so that they conform to the bounds. +// foo1a(F, A> x) {} +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F, Y extends A> = X Function(Y); +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:11:7: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// - 'Object' is from 'dart:core'. +// foo1a(F, A> x) {} +// ^ +// +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:12:7: Error: Inferred type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// Try specifying type arguments explicitly so that they conform to the bounds. +// foo1b(F x) {} +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F, Y extends A> = X Function(Y); +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:12:7: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// - 'Object' is from 'dart:core'. +// foo1b(F x) {} +// ^ +// +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:21:1: Error: Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// Try changing type arguments so that they conform to the bounds. +// F, A> foo4a() => throw 42; +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F, Y extends A> = X Function(Y); +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:21:1: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// - 'Object' is from 'dart:core'. +// F, A> foo4a() => throw 42; +// ^ +// +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:22:1: Error: Inferred type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// Try specifying type arguments explicitly so that they conform to the bounds. +// F foo4b() => throw 42; +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F, Y extends A> = X Function(Y); +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:22:1: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// - 'Object' is from 'dart:core'. +// F foo4b() => throw 42; +// ^ +// +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:24:17: Error: Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// Try changing type arguments so that they conform to the bounds. +// foo5a({required F, A> x}) {} +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F, Y extends A> = X Function(Y); +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:24:17: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// - 'Object' is from 'dart:core'. +// foo5a({required F, A> x}) {} +// ^ +// +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:25:17: Error: Inferred type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// Try specifying type arguments explicitly so that they conform to the bounds. +// foo5b({required F x}) {} +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F, Y extends A> = X Function(Y); +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:25:17: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// - 'Object' is from 'dart:core'. +// foo5b({required F x}) {} +// ^ +// +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:47:8: Error: Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// Try changing type arguments so that they conform to the bounds. +// foo7a([F, A>? x]) {} +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F, Y extends A> = X Function(Y); +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:47:8: Context: If you want 'F, A>?' to be a super-bounded type, note that the inverted type 'F, A>?' must then satisfy its bounds, which it does not. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// - 'Object' is from 'dart:core'. +// foo7a([F, A>? x]) {} +// ^ +// +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:48:8: Error: Inferred type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// Try specifying type arguments explicitly so that they conform to the bounds. +// foo7b([F? x]) {} +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F, Y extends A> = X Function(Y); +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:48:8: Context: If you want 'F, A>?' to be a super-bounded type, note that the inverted type 'F, A>?' must then satisfy its bounds, which it does not. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// - 'Object' is from 'dart:core'. +// foo7b([F? x]) {} +// ^ +// +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:54:6: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'B'. +// Try changing type arguments so that they conform to the bounds. +// bar1(B x) {} // ^ // pkg/front_end/testcases/nnbd/super_bounded_hint.dart:52:9: Context: This is the type variable whose bound isn't conformed to. // class B {} // ^ // -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:58:12: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'B'. -// Try changing type arguments so that they conform to the bounds. -// class Bar3> {} -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:52:9: Context: This is the type variable whose bound isn't conformed to. -// class B {} -// ^ -// -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:60:12: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'B' in the return type. +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:60:1: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'B'. // Try changing type arguments so that they conform to the bounds. // B bar4() => throw 42; -// ^ +// ^ // pkg/front_end/testcases/nnbd/super_bounded_hint.dart:52:9: Context: This is the type variable whose bound isn't conformed to. // class B {} // ^ // -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:62:23: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'B'. +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:62:16: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'B'. // Try changing type arguments so that they conform to the bounds. // bar5({required B x}) {} -// ^ +// ^ // pkg/front_end/testcases/nnbd/super_bounded_hint.dart:52:9: Context: This is the type variable whose bound isn't conformed to. // class B {} // ^ // -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:76:15: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'B'. +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:76:7: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'B'. // Try changing type arguments so that they conform to the bounds. // bar7([B? x]) {} -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:52:9: Context: This is the type variable whose bound isn't conformed to. -// class B {} -// ^ -// -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:78:7: Error: Type argument 'dynamic' doesn't conform to the bound 'int' of the type variable 'X' on 'B' in the supertype 'B' of class 'Bar8'. -// Try changing type arguments so that they conform to the bounds. -// class Bar8 extends B {} // ^ // pkg/front_end/testcases/nnbd/super_bounded_hint.dart:52:9: Context: This is the type variable whose bound isn't conformed to. // class B {} // ^ // -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:28:27: Error: Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:78:20: Error: Type argument 'dynamic' doesn't conform to the bound 'int' of the type variable 'X' on 'B'. // Try changing type arguments so that they conform to the bounds. -// F, A> x; -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. -// typedef F, Y extends A> = X Function(Y); -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:28:27: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// - 'Object' is from 'dart:core'. -// F, A> x; -// ^ -// -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:29:32: Error: Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// Try changing type arguments so that they conform to the bounds. -// for (F, A> x in []) {} -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. -// typedef F, Y extends A> = X Function(Y); -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:29:32: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// - 'Object' is from 'dart:core'. -// for (F, A> x in []) {} -// ^ -// -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:29:37: Error: Inferred type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// Try specifying type arguments explicitly so that they conform to the bounds. -// for (F, A> x in []) {} -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. -// typedef F, Y extends A> = X Function(Y); -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:29:37: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// - 'Object' is from 'dart:core'. -// for (F, A> x in []) {} -// ^ -// -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:30:35: Error: Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// Try changing type arguments so that they conform to the bounds. -// fooFoo1(F, A> x) {} -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. -// typedef F, Y extends A> = X Function(Y); -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:30:35: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// - 'Object' is from 'dart:core'. -// fooFoo1(F, A> x) {} -// ^ -// -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:31:11: Error: Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// Try changing type arguments so that they conform to the bounds. -// fooFoo2, A>>() {} -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. -// typedef F, Y extends A> = X Function(Y); -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:31:11: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// - 'Object' is from 'dart:core'. -// fooFoo2, A>>() {} -// ^ -// -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:32:34: Error: Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F' in the return type. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// Try changing type arguments so that they conform to the bounds. -// F, A> fooFoo4() => throw 42; -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. -// typedef F, Y extends A> = X Function(Y); -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:32:34: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// - 'Object' is from 'dart:core'. -// F, A> fooFoo4() => throw 42; -// ^ -// -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:33:45: Error: Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// Try changing type arguments so that they conform to the bounds. -// fooFoo5({required F, A> x}) {} -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. -// typedef F, Y extends A> = X Function(Y); -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:33:45: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// - 'Object' is from 'dart:core'. -// fooFoo5({required F, A> x}) {} -// ^ -// -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:34:37: Error: Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// Try changing type arguments so that they conform to the bounds. -// fooFoo7([F, A>? x]) {} -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. -// typedef F, Y extends A> = X Function(Y); -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:34:37: Context: If you want 'F, A>?' to be a super-bounded type, note that the inverted type 'F, A>?' must then satisfy its bounds, which it does not. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// - 'Object' is from 'dart:core'. -// fooFoo7([F, A>? x]) {} -// ^ -// -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:38:5: Error: Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// Try changing type arguments so that they conform to the bounds. -// F x; -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. -// typedef F, Y extends A> = X Function(Y); -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:38:5: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// - 'Object' is from 'dart:core'. -// F x; -// ^ -// -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:39:10: Error: Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// Try changing type arguments so that they conform to the bounds. -// for (F x in []) {} -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. -// typedef F, Y extends A> = X Function(Y); -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:39:10: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// - 'Object' is from 'dart:core'. -// for (F x in []) {} -// ^ -// -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:39:15: Error: Inferred type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// Try specifying type arguments explicitly so that they conform to the bounds. -// for (F x in []) {} -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. -// typedef F, Y extends A> = X Function(Y); -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:39:15: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// - 'Object' is from 'dart:core'. -// for (F x in []) {} -// ^ -// -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:40:13: Error: Inferred type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// Try specifying type arguments explicitly so that they conform to the bounds. -// fooFoo1(F x) {} -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. -// typedef F, Y extends A> = X Function(Y); -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:40:13: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// - 'Object' is from 'dart:core'. -// fooFoo1(F x) {} -// ^ -// -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:41:11: Error: Inferred type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// Try specifying type arguments explicitly so that they conform to the bounds. -// fooFoo2() {} -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. -// typedef F, Y extends A> = X Function(Y); -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:41:11: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// - 'Object' is from 'dart:core'. -// fooFoo2() {} -// ^ -// -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:42:12: Error: Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F' in the return type. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// Try changing type arguments so that they conform to the bounds. -// F fooFoo4() => throw 42; -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. -// typedef F, Y extends A> = X Function(Y); -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:42:12: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// - 'Object' is from 'dart:core'. -// F fooFoo4() => throw 42; -// ^ -// -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:43:23: Error: Inferred type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// Try specifying type arguments explicitly so that they conform to the bounds. -// fooFoo5({required F x}) {} -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. -// typedef F, Y extends A> = X Function(Y); -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:43:23: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// - 'Object' is from 'dart:core'. -// fooFoo5({required F x}) {} -// ^ -// -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:44:15: Error: Inferred type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// Try specifying type arguments explicitly so that they conform to the bounds. -// fooFoo7([F? x]) {} -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. -// typedef F, Y extends A> = X Function(Y); -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:44:15: Context: If you want 'F, A>?' to be a super-bounded type, note that the inverted type 'F, A>?' must then satisfy its bounds, which it does not. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// - 'Object' is from 'dart:core'. -// fooFoo7([F? x]) {} -// ^ -// -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:65:10: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'B'. -// Try changing type arguments so that they conform to the bounds. -// B x; -// ^ +// class Bar8 extends B {} +// ^ // pkg/front_end/testcases/nnbd/super_bounded_hint.dart:52:9: Context: This is the type variable whose bound isn't conformed to. // class B {} // ^ // -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:66:15: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'B'. +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:28:3: Error: Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. // Try changing type arguments so that they conform to the bounds. -// for (B x in []) {} -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:52:9: Context: This is the type variable whose bound isn't conformed to. -// class B {} -// ^ +// F, A> x; +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F, Y extends A> = X Function(Y); +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:28:3: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// - 'Object' is from 'dart:core'. +// F, A> x; +// ^ +// +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:29:8: Error: Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// Try changing type arguments so that they conform to the bounds. +// for (F, A> x in []) {} +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F, Y extends A> = X Function(Y); +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:29:8: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// - 'Object' is from 'dart:core'. +// for (F, A> x in []) {} +// ^ +// +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:30:11: Error: Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// Try changing type arguments so that they conform to the bounds. +// fooFoo1(F, A> x) {} +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F, Y extends A> = X Function(Y); +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:30:11: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// - 'Object' is from 'dart:core'. +// fooFoo1(F, A> x) {} +// ^ +// +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:31:21: Error: Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// Try changing type arguments so that they conform to the bounds. +// fooFoo2, A>>() {} +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F, Y extends A> = X Function(Y); +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:31:21: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// - 'Object' is from 'dart:core'. +// fooFoo2, A>>() {} +// ^ +// +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:32:3: Error: Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// Try changing type arguments so that they conform to the bounds. +// F, A> fooFoo4() => throw 42; +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F, Y extends A> = X Function(Y); +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:32:3: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// - 'Object' is from 'dart:core'. +// F, A> fooFoo4() => throw 42; +// ^ +// +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:33:21: Error: Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// Try changing type arguments so that they conform to the bounds. +// fooFoo5({required F, A> x}) {} +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F, Y extends A> = X Function(Y); +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:33:21: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// - 'Object' is from 'dart:core'. +// fooFoo5({required F, A> x}) {} +// ^ +// +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:34:12: Error: Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// Try changing type arguments so that they conform to the bounds. +// fooFoo7([F, A>? x]) {} +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F, Y extends A> = X Function(Y); +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:34:12: Context: If you want 'F, A>?' to be a super-bounded type, note that the inverted type 'F, A>?' must then satisfy its bounds, which it does not. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// - 'Object' is from 'dart:core'. +// fooFoo7([F, A>? x]) {} +// ^ +// +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:38:3: Error: Inferred type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// Try specifying type arguments explicitly so that they conform to the bounds. +// F x; +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F, Y extends A> = X Function(Y); +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:38:3: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// - 'Object' is from 'dart:core'. +// F x; +// ^ +// +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:39:8: Error: Inferred type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// Try specifying type arguments explicitly so that they conform to the bounds. +// for (F x in []) {} +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F, Y extends A> = X Function(Y); +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:39:8: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// - 'Object' is from 'dart:core'. +// for (F x in []) {} +// ^ +// +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:40:11: Error: Inferred type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// Try specifying type arguments explicitly so that they conform to the bounds. +// fooFoo1(F x) {} +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F, Y extends A> = X Function(Y); +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:40:11: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// - 'Object' is from 'dart:core'. +// fooFoo1(F x) {} +// ^ +// +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:41:21: Error: Inferred type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// Try specifying type arguments explicitly so that they conform to the bounds. +// fooFoo2() {} +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F, Y extends A> = X Function(Y); +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:41:21: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// - 'Object' is from 'dart:core'. +// fooFoo2() {} +// ^ +// +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:42:3: Error: Inferred type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// Try specifying type arguments explicitly so that they conform to the bounds. +// F fooFoo4() => throw 42; +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F, Y extends A> = X Function(Y); +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:42:3: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// - 'Object' is from 'dart:core'. +// F fooFoo4() => throw 42; +// ^ +// +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:43:21: Error: Inferred type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// Try specifying type arguments explicitly so that they conform to the bounds. +// fooFoo5({required F x}) {} +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F, Y extends A> = X Function(Y); +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:43:21: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// - 'Object' is from 'dart:core'. +// fooFoo5({required F x}) {} +// ^ +// +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:44:12: Error: Inferred type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// Try specifying type arguments explicitly so that they conform to the bounds. +// fooFoo7([F? x]) {} +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F, Y extends A> = X Function(Y); +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:44:12: Context: If you want 'F, A>?' to be a super-bounded type, note that the inverted type 'F, A>?' must then satisfy its bounds, which it does not. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// - 'Object' is from 'dart:core'. +// fooFoo7([F? x]) {} +// ^ // // pkg/front_end/testcases/nnbd/super_bounded_hint.dart:72:7: Error: Type argument 'dynamic' doesn't conform to the bound 'int' of the type variable 'X' on 'B'. // Try changing type arguments so that they conform to the bounds. @@ -476,50 +446,58 @@ library /*isNonNullableByDefault*/; // class B {} // ^ // -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:66:20: Error: Inferred type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'B'. -// Try specifying type arguments explicitly so that they conform to the bounds. -// for (B x in []) {} -// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:65:3: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'B'. +// Try changing type arguments so that they conform to the bounds. +// B x; +// ^ // pkg/front_end/testcases/nnbd/super_bounded_hint.dart:52:9: Context: This is the type variable whose bound isn't conformed to. // class B {} // ^ // -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:67:18: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'B'. +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:66:8: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'B'. +// Try changing type arguments so that they conform to the bounds. +// for (B x in []) {} +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:52:9: Context: This is the type variable whose bound isn't conformed to. +// class B {} +// ^ +// +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:67:11: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'B'. // Try changing type arguments so that they conform to the bounds. // barBar1(B x) {} -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:52:9: Context: This is the type variable whose bound isn't conformed to. -// class B {} -// ^ -// -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:68:11: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'B'. -// Try changing type arguments so that they conform to the bounds. -// barBar2>() {} // ^ // pkg/front_end/testcases/nnbd/super_bounded_hint.dart:52:9: Context: This is the type variable whose bound isn't conformed to. // class B {} // ^ // -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:69:17: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'B' in the return type. +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:68:21: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'B'. +// Try changing type arguments so that they conform to the bounds. +// barBar2>() {} +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:52:9: Context: This is the type variable whose bound isn't conformed to. +// class B {} +// ^ +// +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:69:3: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'B'. // Try changing type arguments so that they conform to the bounds. // B barBar4() => throw 42; -// ^ +// ^ // pkg/front_end/testcases/nnbd/super_bounded_hint.dart:52:9: Context: This is the type variable whose bound isn't conformed to. // class B {} // ^ // -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:70:28: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'B'. +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:70:21: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'B'. // Try changing type arguments so that they conform to the bounds. // barBar5({required B x}) {} -// ^ +// ^ // pkg/front_end/testcases/nnbd/super_bounded_hint.dart:52:9: Context: This is the type variable whose bound isn't conformed to. // class B {} // ^ // -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:71:20: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'B'. +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:71:12: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'B'. // Try changing type arguments so that they conform to the bounds. // barBar7([B? x]) {} -// ^ +// ^ // pkg/front_end/testcases/nnbd/super_bounded_hint.dart:52:9: Context: This is the type variable whose bound isn't conformed to. // class B {} // ^ diff --git a/pkg/front_end/testcases/nnbd/super_bounded_hint.dart.strong.transformed.expect b/pkg/front_end/testcases/nnbd/super_bounded_hint.dart.strong.transformed.expect index c007963be82..96f0d730625 100644 --- a/pkg/front_end/testcases/nnbd/super_bounded_hint.dart.strong.transformed.expect +++ b/pkg/front_end/testcases/nnbd/super_bounded_hint.dart.strong.transformed.expect @@ -18,455 +18,425 @@ library /*isNonNullableByDefault*/; // typedef F, Y extends A> = X Function(Y); // ^ // -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:11:31: Error: Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// Try changing type arguments so that they conform to the bounds. -// foo1a(F, A> x) {} -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. -// typedef F, Y extends A> = X Function(Y); -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:11:31: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// - 'Object' is from 'dart:core'. -// foo1a(F, A> x) {} -// ^ -// -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:12:9: Error: Inferred type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// Try specifying type arguments explicitly so that they conform to the bounds. -// foo1b(F x) {} -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. -// typedef F, Y extends A> = X Function(Y); -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:12:9: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// - 'Object' is from 'dart:core'. -// foo1b(F x) {} -// ^ -// -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:14:7: Error: Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:14:17: Error: Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. // - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. // Try changing type arguments so that they conform to the bounds. // foo2a, A>>() {} -// ^ +// ^ // pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. // typedef F, Y extends A> = X Function(Y); // ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:14:7: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:14:17: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. // - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. // - 'Object' is from 'dart:core'. // foo2a, A>>() {} -// ^ +// ^ // -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:15:7: Error: Inferred type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:15:17: Error: Inferred type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. // - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. // Try specifying type arguments explicitly so that they conform to the bounds. // foo2b() {} -// ^ +// ^ // pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. // typedef F, Y extends A> = X Function(Y); // ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:15:7: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:15:17: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. // - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. // - 'Object' is from 'dart:core'. // foo2b() {} -// ^ +// ^ // -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:17:13: Error: Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:17:23: Error: Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. // - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. // Try changing type arguments so that they conform to the bounds. // class Foo3a, A>> {} -// ^ +// ^ // pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. // typedef F, Y extends A> = X Function(Y); // ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:17:13: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:17:23: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. // - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. // - 'Object' is from 'dart:core'. // class Foo3a, A>> {} -// ^ +// ^ // -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:21:30: Error: Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F' in the return type. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// Try changing type arguments so that they conform to the bounds. -// F, A> foo4a() => throw 42; -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. -// typedef F, Y extends A> = X Function(Y); -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:21:30: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// - 'Object' is from 'dart:core'. -// F, A> foo4a() => throw 42; -// ^ -// -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:22:8: Error: Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F' in the return type. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// Try changing type arguments so that they conform to the bounds. -// F foo4b() => throw 42; -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. -// typedef F, Y extends A> = X Function(Y); -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:22:8: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// - 'Object' is from 'dart:core'. -// F foo4b() => throw 42; -// ^ -// -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:24:41: Error: Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// Try changing type arguments so that they conform to the bounds. -// foo5a({required F, A> x}) {} -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. -// typedef F, Y extends A> = X Function(Y); -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:24:41: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// - 'Object' is from 'dart:core'. -// foo5a({required F, A> x}) {} -// ^ -// -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:25:19: Error: Inferred type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:19:23: Error: Inferred type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. // - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. // Try specifying type arguments explicitly so that they conform to the bounds. -// foo5b({required F x}) {} -// ^ +// class Foo3b {} +// ^ // pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. // typedef F, Y extends A> = X Function(Y); // ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:25:19: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:19:23: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. // - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. // - 'Object' is from 'dart:core'. -// foo5b({required F x}) {} -// ^ +// class Foo3b {} +// ^ // -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:47:33: Error: Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:56:16: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'B'. // Try changing type arguments so that they conform to the bounds. -// foo7a([F, A>? x]) {} -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. -// typedef F, Y extends A> = X Function(Y); -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:47:33: Context: If you want 'F, A>?' to be a super-bounded type, note that the inverted type 'F, A>?' must then satisfy its bounds, which it does not. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// - 'Object' is from 'dart:core'. -// foo7a([F, A>? x]) {} -// ^ -// -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:48:11: Error: Inferred type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// Try specifying type arguments explicitly so that they conform to the bounds. -// foo7b([F? x]) {} -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. -// typedef F, Y extends A> = X Function(Y); -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:48:11: Context: If you want 'F, A>?' to be a super-bounded type, note that the inverted type 'F, A>?' must then satisfy its bounds, which it does not. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// - 'Object' is from 'dart:core'. -// foo7b([F? x]) {} -// ^ -// -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:54:13: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'B'. -// Try changing type arguments so that they conform to the bounds. -// bar1(B x) {} -// ^ +// bar2>() {} +// ^ // pkg/front_end/testcases/nnbd/super_bounded_hint.dart:52:9: Context: This is the type variable whose bound isn't conformed to. // class B {} // ^ // -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:56:6: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'B'. +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:58:22: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'B'. // Try changing type arguments so that they conform to the bounds. -// bar2>() {} +// class Bar3> {} +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:52:9: Context: This is the type variable whose bound isn't conformed to. +// class B {} +// ^ +// +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:11:7: Error: Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// Try changing type arguments so that they conform to the bounds. +// foo1a(F, A> x) {} +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F, Y extends A> = X Function(Y); +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:11:7: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// - 'Object' is from 'dart:core'. +// foo1a(F, A> x) {} +// ^ +// +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:12:7: Error: Inferred type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// Try specifying type arguments explicitly so that they conform to the bounds. +// foo1b(F x) {} +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F, Y extends A> = X Function(Y); +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:12:7: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// - 'Object' is from 'dart:core'. +// foo1b(F x) {} +// ^ +// +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:21:1: Error: Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// Try changing type arguments so that they conform to the bounds. +// F, A> foo4a() => throw 42; +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F, Y extends A> = X Function(Y); +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:21:1: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// - 'Object' is from 'dart:core'. +// F, A> foo4a() => throw 42; +// ^ +// +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:22:1: Error: Inferred type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// Try specifying type arguments explicitly so that they conform to the bounds. +// F foo4b() => throw 42; +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F, Y extends A> = X Function(Y); +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:22:1: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// - 'Object' is from 'dart:core'. +// F foo4b() => throw 42; +// ^ +// +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:24:17: Error: Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// Try changing type arguments so that they conform to the bounds. +// foo5a({required F, A> x}) {} +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F, Y extends A> = X Function(Y); +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:24:17: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// - 'Object' is from 'dart:core'. +// foo5a({required F, A> x}) {} +// ^ +// +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:25:17: Error: Inferred type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// Try specifying type arguments explicitly so that they conform to the bounds. +// foo5b({required F x}) {} +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F, Y extends A> = X Function(Y); +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:25:17: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// - 'Object' is from 'dart:core'. +// foo5b({required F x}) {} +// ^ +// +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:47:8: Error: Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// Try changing type arguments so that they conform to the bounds. +// foo7a([F, A>? x]) {} +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F, Y extends A> = X Function(Y); +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:47:8: Context: If you want 'F, A>?' to be a super-bounded type, note that the inverted type 'F, A>?' must then satisfy its bounds, which it does not. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// - 'Object' is from 'dart:core'. +// foo7a([F, A>? x]) {} +// ^ +// +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:48:8: Error: Inferred type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// Try specifying type arguments explicitly so that they conform to the bounds. +// foo7b([F? x]) {} +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F, Y extends A> = X Function(Y); +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:48:8: Context: If you want 'F, A>?' to be a super-bounded type, note that the inverted type 'F, A>?' must then satisfy its bounds, which it does not. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// - 'Object' is from 'dart:core'. +// foo7b([F? x]) {} +// ^ +// +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:54:6: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'B'. +// Try changing type arguments so that they conform to the bounds. +// bar1(B x) {} // ^ // pkg/front_end/testcases/nnbd/super_bounded_hint.dart:52:9: Context: This is the type variable whose bound isn't conformed to. // class B {} // ^ // -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:58:12: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'B'. -// Try changing type arguments so that they conform to the bounds. -// class Bar3> {} -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:52:9: Context: This is the type variable whose bound isn't conformed to. -// class B {} -// ^ -// -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:60:12: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'B' in the return type. +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:60:1: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'B'. // Try changing type arguments so that they conform to the bounds. // B bar4() => throw 42; -// ^ +// ^ // pkg/front_end/testcases/nnbd/super_bounded_hint.dart:52:9: Context: This is the type variable whose bound isn't conformed to. // class B {} // ^ // -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:62:23: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'B'. +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:62:16: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'B'. // Try changing type arguments so that they conform to the bounds. // bar5({required B x}) {} -// ^ +// ^ // pkg/front_end/testcases/nnbd/super_bounded_hint.dart:52:9: Context: This is the type variable whose bound isn't conformed to. // class B {} // ^ // -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:76:15: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'B'. +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:76:7: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'B'. // Try changing type arguments so that they conform to the bounds. // bar7([B? x]) {} -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:52:9: Context: This is the type variable whose bound isn't conformed to. -// class B {} -// ^ -// -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:78:7: Error: Type argument 'dynamic' doesn't conform to the bound 'int' of the type variable 'X' on 'B' in the supertype 'B' of class 'Bar8'. -// Try changing type arguments so that they conform to the bounds. -// class Bar8 extends B {} // ^ // pkg/front_end/testcases/nnbd/super_bounded_hint.dart:52:9: Context: This is the type variable whose bound isn't conformed to. // class B {} // ^ // -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:28:27: Error: Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:78:20: Error: Type argument 'dynamic' doesn't conform to the bound 'int' of the type variable 'X' on 'B'. // Try changing type arguments so that they conform to the bounds. -// F, A> x; -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. -// typedef F, Y extends A> = X Function(Y); -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:28:27: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// - 'Object' is from 'dart:core'. -// F, A> x; -// ^ -// -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:29:32: Error: Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// Try changing type arguments so that they conform to the bounds. -// for (F, A> x in []) {} -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. -// typedef F, Y extends A> = X Function(Y); -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:29:32: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// - 'Object' is from 'dart:core'. -// for (F, A> x in []) {} -// ^ -// -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:29:37: Error: Inferred type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// Try specifying type arguments explicitly so that they conform to the bounds. -// for (F, A> x in []) {} -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. -// typedef F, Y extends A> = X Function(Y); -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:29:37: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// - 'Object' is from 'dart:core'. -// for (F, A> x in []) {} -// ^ -// -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:30:35: Error: Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// Try changing type arguments so that they conform to the bounds. -// fooFoo1(F, A> x) {} -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. -// typedef F, Y extends A> = X Function(Y); -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:30:35: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// - 'Object' is from 'dart:core'. -// fooFoo1(F, A> x) {} -// ^ -// -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:31:11: Error: Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// Try changing type arguments so that they conform to the bounds. -// fooFoo2, A>>() {} -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. -// typedef F, Y extends A> = X Function(Y); -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:31:11: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// - 'Object' is from 'dart:core'. -// fooFoo2, A>>() {} -// ^ -// -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:32:34: Error: Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F' in the return type. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// Try changing type arguments so that they conform to the bounds. -// F, A> fooFoo4() => throw 42; -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. -// typedef F, Y extends A> = X Function(Y); -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:32:34: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// - 'Object' is from 'dart:core'. -// F, A> fooFoo4() => throw 42; -// ^ -// -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:33:45: Error: Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// Try changing type arguments so that they conform to the bounds. -// fooFoo5({required F, A> x}) {} -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. -// typedef F, Y extends A> = X Function(Y); -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:33:45: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// - 'Object' is from 'dart:core'. -// fooFoo5({required F, A> x}) {} -// ^ -// -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:34:37: Error: Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// Try changing type arguments so that they conform to the bounds. -// fooFoo7([F, A>? x]) {} -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. -// typedef F, Y extends A> = X Function(Y); -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:34:37: Context: If you want 'F, A>?' to be a super-bounded type, note that the inverted type 'F, A>?' must then satisfy its bounds, which it does not. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// - 'Object' is from 'dart:core'. -// fooFoo7([F, A>? x]) {} -// ^ -// -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:38:5: Error: Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// Try changing type arguments so that they conform to the bounds. -// F x; -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. -// typedef F, Y extends A> = X Function(Y); -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:38:5: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// - 'Object' is from 'dart:core'. -// F x; -// ^ -// -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:39:10: Error: Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// Try changing type arguments so that they conform to the bounds. -// for (F x in []) {} -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. -// typedef F, Y extends A> = X Function(Y); -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:39:10: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// - 'Object' is from 'dart:core'. -// for (F x in []) {} -// ^ -// -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:39:15: Error: Inferred type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// Try specifying type arguments explicitly so that they conform to the bounds. -// for (F x in []) {} -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. -// typedef F, Y extends A> = X Function(Y); -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:39:15: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// - 'Object' is from 'dart:core'. -// for (F x in []) {} -// ^ -// -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:40:13: Error: Inferred type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// Try specifying type arguments explicitly so that they conform to the bounds. -// fooFoo1(F x) {} -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. -// typedef F, Y extends A> = X Function(Y); -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:40:13: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// - 'Object' is from 'dart:core'. -// fooFoo1(F x) {} -// ^ -// -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:41:11: Error: Inferred type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// Try specifying type arguments explicitly so that they conform to the bounds. -// fooFoo2() {} -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. -// typedef F, Y extends A> = X Function(Y); -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:41:11: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// - 'Object' is from 'dart:core'. -// fooFoo2() {} -// ^ -// -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:42:12: Error: Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F' in the return type. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// Try changing type arguments so that they conform to the bounds. -// F fooFoo4() => throw 42; -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. -// typedef F, Y extends A> = X Function(Y); -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:42:12: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// - 'Object' is from 'dart:core'. -// F fooFoo4() => throw 42; -// ^ -// -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:43:23: Error: Inferred type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// Try specifying type arguments explicitly so that they conform to the bounds. -// fooFoo5({required F x}) {} -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. -// typedef F, Y extends A> = X Function(Y); -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:43:23: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// - 'Object' is from 'dart:core'. -// fooFoo5({required F x}) {} -// ^ -// -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:44:15: Error: Inferred type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// Try specifying type arguments explicitly so that they conform to the bounds. -// fooFoo7([F? x]) {} -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. -// typedef F, Y extends A> = X Function(Y); -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:44:15: Context: If you want 'F, A>?' to be a super-bounded type, note that the inverted type 'F, A>?' must then satisfy its bounds, which it does not. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// - 'Object' is from 'dart:core'. -// fooFoo7([F? x]) {} -// ^ -// -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:65:10: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'B'. -// Try changing type arguments so that they conform to the bounds. -// B x; -// ^ +// class Bar8 extends B {} +// ^ // pkg/front_end/testcases/nnbd/super_bounded_hint.dart:52:9: Context: This is the type variable whose bound isn't conformed to. // class B {} // ^ // -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:66:15: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'B'. +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:28:3: Error: Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. // Try changing type arguments so that they conform to the bounds. -// for (B x in []) {} -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:52:9: Context: This is the type variable whose bound isn't conformed to. -// class B {} -// ^ +// F, A> x; +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F, Y extends A> = X Function(Y); +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:28:3: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// - 'Object' is from 'dart:core'. +// F, A> x; +// ^ +// +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:29:8: Error: Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// Try changing type arguments so that they conform to the bounds. +// for (F, A> x in []) {} +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F, Y extends A> = X Function(Y); +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:29:8: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// - 'Object' is from 'dart:core'. +// for (F, A> x in []) {} +// ^ +// +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:30:11: Error: Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// Try changing type arguments so that they conform to the bounds. +// fooFoo1(F, A> x) {} +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F, Y extends A> = X Function(Y); +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:30:11: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// - 'Object' is from 'dart:core'. +// fooFoo1(F, A> x) {} +// ^ +// +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:31:21: Error: Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// Try changing type arguments so that they conform to the bounds. +// fooFoo2, A>>() {} +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F, Y extends A> = X Function(Y); +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:31:21: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// - 'Object' is from 'dart:core'. +// fooFoo2, A>>() {} +// ^ +// +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:32:3: Error: Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// Try changing type arguments so that they conform to the bounds. +// F, A> fooFoo4() => throw 42; +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F, Y extends A> = X Function(Y); +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:32:3: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// - 'Object' is from 'dart:core'. +// F, A> fooFoo4() => throw 42; +// ^ +// +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:33:21: Error: Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// Try changing type arguments so that they conform to the bounds. +// fooFoo5({required F, A> x}) {} +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F, Y extends A> = X Function(Y); +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:33:21: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// - 'Object' is from 'dart:core'. +// fooFoo5({required F, A> x}) {} +// ^ +// +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:34:12: Error: Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// Try changing type arguments so that they conform to the bounds. +// fooFoo7([F, A>? x]) {} +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F, Y extends A> = X Function(Y); +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:34:12: Context: If you want 'F, A>?' to be a super-bounded type, note that the inverted type 'F, A>?' must then satisfy its bounds, which it does not. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// - 'Object' is from 'dart:core'. +// fooFoo7([F, A>? x]) {} +// ^ +// +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:38:3: Error: Inferred type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// Try specifying type arguments explicitly so that they conform to the bounds. +// F x; +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F, Y extends A> = X Function(Y); +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:38:3: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// - 'Object' is from 'dart:core'. +// F x; +// ^ +// +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:39:8: Error: Inferred type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// Try specifying type arguments explicitly so that they conform to the bounds. +// for (F x in []) {} +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F, Y extends A> = X Function(Y); +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:39:8: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// - 'Object' is from 'dart:core'. +// for (F x in []) {} +// ^ +// +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:40:11: Error: Inferred type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// Try specifying type arguments explicitly so that they conform to the bounds. +// fooFoo1(F x) {} +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F, Y extends A> = X Function(Y); +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:40:11: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// - 'Object' is from 'dart:core'. +// fooFoo1(F x) {} +// ^ +// +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:41:21: Error: Inferred type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// Try specifying type arguments explicitly so that they conform to the bounds. +// fooFoo2() {} +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F, Y extends A> = X Function(Y); +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:41:21: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// - 'Object' is from 'dart:core'. +// fooFoo2() {} +// ^ +// +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:42:3: Error: Inferred type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// Try specifying type arguments explicitly so that they conform to the bounds. +// F fooFoo4() => throw 42; +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F, Y extends A> = X Function(Y); +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:42:3: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// - 'Object' is from 'dart:core'. +// F fooFoo4() => throw 42; +// ^ +// +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:43:21: Error: Inferred type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// Try specifying type arguments explicitly so that they conform to the bounds. +// fooFoo5({required F x}) {} +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F, Y extends A> = X Function(Y); +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:43:21: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// - 'Object' is from 'dart:core'. +// fooFoo5({required F x}) {} +// ^ +// +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:44:12: Error: Inferred type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// Try specifying type arguments explicitly so that they conform to the bounds. +// fooFoo7([F? x]) {} +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F, Y extends A> = X Function(Y); +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:44:12: Context: If you want 'F, A>?' to be a super-bounded type, note that the inverted type 'F, A>?' must then satisfy its bounds, which it does not. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// - 'Object' is from 'dart:core'. +// fooFoo7([F? x]) {} +// ^ // // pkg/front_end/testcases/nnbd/super_bounded_hint.dart:72:7: Error: Type argument 'dynamic' doesn't conform to the bound 'int' of the type variable 'X' on 'B'. // Try changing type arguments so that they conform to the bounds. @@ -476,50 +446,58 @@ library /*isNonNullableByDefault*/; // class B {} // ^ // -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:66:20: Error: Inferred type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'B'. -// Try specifying type arguments explicitly so that they conform to the bounds. -// for (B x in []) {} -// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:65:3: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'B'. +// Try changing type arguments so that they conform to the bounds. +// B x; +// ^ // pkg/front_end/testcases/nnbd/super_bounded_hint.dart:52:9: Context: This is the type variable whose bound isn't conformed to. // class B {} // ^ // -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:67:18: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'B'. +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:66:8: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'B'. +// Try changing type arguments so that they conform to the bounds. +// for (B x in []) {} +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:52:9: Context: This is the type variable whose bound isn't conformed to. +// class B {} +// ^ +// +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:67:11: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'B'. // Try changing type arguments so that they conform to the bounds. // barBar1(B x) {} -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:52:9: Context: This is the type variable whose bound isn't conformed to. -// class B {} -// ^ -// -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:68:11: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'B'. -// Try changing type arguments so that they conform to the bounds. -// barBar2>() {} // ^ // pkg/front_end/testcases/nnbd/super_bounded_hint.dart:52:9: Context: This is the type variable whose bound isn't conformed to. // class B {} // ^ // -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:69:17: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'B' in the return type. +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:68:21: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'B'. +// Try changing type arguments so that they conform to the bounds. +// barBar2>() {} +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:52:9: Context: This is the type variable whose bound isn't conformed to. +// class B {} +// ^ +// +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:69:3: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'B'. // Try changing type arguments so that they conform to the bounds. // B barBar4() => throw 42; -// ^ +// ^ // pkg/front_end/testcases/nnbd/super_bounded_hint.dart:52:9: Context: This is the type variable whose bound isn't conformed to. // class B {} // ^ // -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:70:28: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'B'. +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:70:21: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'B'. // Try changing type arguments so that they conform to the bounds. // barBar5({required B x}) {} -// ^ +// ^ // pkg/front_end/testcases/nnbd/super_bounded_hint.dart:52:9: Context: This is the type variable whose bound isn't conformed to. // class B {} // ^ // -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:71:20: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'B'. +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:71:12: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'B'. // Try changing type arguments so that they conform to the bounds. // barBar7([B? x]) {} -// ^ +// ^ // pkg/front_end/testcases/nnbd/super_bounded_hint.dart:52:9: Context: This is the type variable whose bound isn't conformed to. // class B {} // ^ diff --git a/pkg/front_end/testcases/nnbd/super_bounded_hint.dart.weak.expect b/pkg/front_end/testcases/nnbd/super_bounded_hint.dart.weak.expect index 5537cc39e65..8b88b00372b 100644 --- a/pkg/front_end/testcases/nnbd/super_bounded_hint.dart.weak.expect +++ b/pkg/front_end/testcases/nnbd/super_bounded_hint.dart.weak.expect @@ -18,455 +18,425 @@ library /*isNonNullableByDefault*/; // typedef F, Y extends A> = X Function(Y); // ^ // -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:11:31: Error: Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// Try changing type arguments so that they conform to the bounds. -// foo1a(F, A> x) {} -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. -// typedef F, Y extends A> = X Function(Y); -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:11:31: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// - 'Object' is from 'dart:core'. -// foo1a(F, A> x) {} -// ^ -// -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:12:9: Error: Inferred type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// Try specifying type arguments explicitly so that they conform to the bounds. -// foo1b(F x) {} -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. -// typedef F, Y extends A> = X Function(Y); -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:12:9: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// - 'Object' is from 'dart:core'. -// foo1b(F x) {} -// ^ -// -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:14:7: Error: Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:14:17: Error: Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. // - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. // Try changing type arguments so that they conform to the bounds. // foo2a, A>>() {} -// ^ +// ^ // pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. // typedef F, Y extends A> = X Function(Y); // ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:14:7: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:14:17: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. // - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. // - 'Object' is from 'dart:core'. // foo2a, A>>() {} -// ^ +// ^ // -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:15:7: Error: Inferred type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:15:17: Error: Inferred type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. // - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. // Try specifying type arguments explicitly so that they conform to the bounds. // foo2b() {} -// ^ +// ^ // pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. // typedef F, Y extends A> = X Function(Y); // ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:15:7: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:15:17: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. // - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. // - 'Object' is from 'dart:core'. // foo2b() {} -// ^ +// ^ // -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:17:13: Error: Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:17:23: Error: Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. // - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. // Try changing type arguments so that they conform to the bounds. // class Foo3a, A>> {} -// ^ +// ^ // pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. // typedef F, Y extends A> = X Function(Y); // ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:17:13: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:17:23: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. // - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. // - 'Object' is from 'dart:core'. // class Foo3a, A>> {} -// ^ +// ^ // -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:21:30: Error: Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F' in the return type. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// Try changing type arguments so that they conform to the bounds. -// F, A> foo4a() => throw 42; -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. -// typedef F, Y extends A> = X Function(Y); -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:21:30: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// - 'Object' is from 'dart:core'. -// F, A> foo4a() => throw 42; -// ^ -// -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:22:8: Error: Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F' in the return type. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// Try changing type arguments so that they conform to the bounds. -// F foo4b() => throw 42; -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. -// typedef F, Y extends A> = X Function(Y); -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:22:8: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// - 'Object' is from 'dart:core'. -// F foo4b() => throw 42; -// ^ -// -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:24:41: Error: Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// Try changing type arguments so that they conform to the bounds. -// foo5a({required F, A> x}) {} -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. -// typedef F, Y extends A> = X Function(Y); -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:24:41: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// - 'Object' is from 'dart:core'. -// foo5a({required F, A> x}) {} -// ^ -// -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:25:19: Error: Inferred type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:19:23: Error: Inferred type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. // - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. // Try specifying type arguments explicitly so that they conform to the bounds. -// foo5b({required F x}) {} -// ^ +// class Foo3b {} +// ^ // pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. // typedef F, Y extends A> = X Function(Y); // ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:25:19: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:19:23: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. // - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. // - 'Object' is from 'dart:core'. -// foo5b({required F x}) {} -// ^ +// class Foo3b {} +// ^ // -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:47:33: Error: Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:56:16: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'B'. // Try changing type arguments so that they conform to the bounds. -// foo7a([F, A>? x]) {} -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. -// typedef F, Y extends A> = X Function(Y); -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:47:33: Context: If you want 'F, A>?' to be a super-bounded type, note that the inverted type 'F, A>?' must then satisfy its bounds, which it does not. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// - 'Object' is from 'dart:core'. -// foo7a([F, A>? x]) {} -// ^ -// -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:48:11: Error: Inferred type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// Try specifying type arguments explicitly so that they conform to the bounds. -// foo7b([F? x]) {} -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. -// typedef F, Y extends A> = X Function(Y); -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:48:11: Context: If you want 'F, A>?' to be a super-bounded type, note that the inverted type 'F, A>?' must then satisfy its bounds, which it does not. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// - 'Object' is from 'dart:core'. -// foo7b([F? x]) {} -// ^ -// -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:54:13: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'B'. -// Try changing type arguments so that they conform to the bounds. -// bar1(B x) {} -// ^ +// bar2>() {} +// ^ // pkg/front_end/testcases/nnbd/super_bounded_hint.dart:52:9: Context: This is the type variable whose bound isn't conformed to. // class B {} // ^ // -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:56:6: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'B'. +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:58:22: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'B'. // Try changing type arguments so that they conform to the bounds. -// bar2>() {} +// class Bar3> {} +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:52:9: Context: This is the type variable whose bound isn't conformed to. +// class B {} +// ^ +// +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:11:7: Error: Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// Try changing type arguments so that they conform to the bounds. +// foo1a(F, A> x) {} +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F, Y extends A> = X Function(Y); +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:11:7: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// - 'Object' is from 'dart:core'. +// foo1a(F, A> x) {} +// ^ +// +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:12:7: Error: Inferred type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// Try specifying type arguments explicitly so that they conform to the bounds. +// foo1b(F x) {} +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F, Y extends A> = X Function(Y); +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:12:7: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// - 'Object' is from 'dart:core'. +// foo1b(F x) {} +// ^ +// +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:21:1: Error: Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// Try changing type arguments so that they conform to the bounds. +// F, A> foo4a() => throw 42; +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F, Y extends A> = X Function(Y); +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:21:1: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// - 'Object' is from 'dart:core'. +// F, A> foo4a() => throw 42; +// ^ +// +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:22:1: Error: Inferred type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// Try specifying type arguments explicitly so that they conform to the bounds. +// F foo4b() => throw 42; +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F, Y extends A> = X Function(Y); +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:22:1: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// - 'Object' is from 'dart:core'. +// F foo4b() => throw 42; +// ^ +// +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:24:17: Error: Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// Try changing type arguments so that they conform to the bounds. +// foo5a({required F, A> x}) {} +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F, Y extends A> = X Function(Y); +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:24:17: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// - 'Object' is from 'dart:core'. +// foo5a({required F, A> x}) {} +// ^ +// +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:25:17: Error: Inferred type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// Try specifying type arguments explicitly so that they conform to the bounds. +// foo5b({required F x}) {} +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F, Y extends A> = X Function(Y); +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:25:17: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// - 'Object' is from 'dart:core'. +// foo5b({required F x}) {} +// ^ +// +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:47:8: Error: Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// Try changing type arguments so that they conform to the bounds. +// foo7a([F, A>? x]) {} +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F, Y extends A> = X Function(Y); +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:47:8: Context: If you want 'F, A>?' to be a super-bounded type, note that the inverted type 'F, A>?' must then satisfy its bounds, which it does not. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// - 'Object' is from 'dart:core'. +// foo7a([F, A>? x]) {} +// ^ +// +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:48:8: Error: Inferred type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// Try specifying type arguments explicitly so that they conform to the bounds. +// foo7b([F? x]) {} +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F, Y extends A> = X Function(Y); +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:48:8: Context: If you want 'F, A>?' to be a super-bounded type, note that the inverted type 'F, A>?' must then satisfy its bounds, which it does not. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// - 'Object' is from 'dart:core'. +// foo7b([F? x]) {} +// ^ +// +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:54:6: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'B'. +// Try changing type arguments so that they conform to the bounds. +// bar1(B x) {} // ^ // pkg/front_end/testcases/nnbd/super_bounded_hint.dart:52:9: Context: This is the type variable whose bound isn't conformed to. // class B {} // ^ // -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:58:12: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'B'. -// Try changing type arguments so that they conform to the bounds. -// class Bar3> {} -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:52:9: Context: This is the type variable whose bound isn't conformed to. -// class B {} -// ^ -// -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:60:12: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'B' in the return type. +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:60:1: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'B'. // Try changing type arguments so that they conform to the bounds. // B bar4() => throw 42; -// ^ +// ^ // pkg/front_end/testcases/nnbd/super_bounded_hint.dart:52:9: Context: This is the type variable whose bound isn't conformed to. // class B {} // ^ // -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:62:23: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'B'. +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:62:16: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'B'. // Try changing type arguments so that they conform to the bounds. // bar5({required B x}) {} -// ^ +// ^ // pkg/front_end/testcases/nnbd/super_bounded_hint.dart:52:9: Context: This is the type variable whose bound isn't conformed to. // class B {} // ^ // -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:76:15: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'B'. +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:76:7: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'B'. // Try changing type arguments so that they conform to the bounds. // bar7([B? x]) {} -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:52:9: Context: This is the type variable whose bound isn't conformed to. -// class B {} -// ^ -// -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:78:7: Error: Type argument 'dynamic' doesn't conform to the bound 'int' of the type variable 'X' on 'B' in the supertype 'B' of class 'Bar8'. -// Try changing type arguments so that they conform to the bounds. -// class Bar8 extends B {} // ^ // pkg/front_end/testcases/nnbd/super_bounded_hint.dart:52:9: Context: This is the type variable whose bound isn't conformed to. // class B {} // ^ // -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:28:27: Error: Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:78:20: Error: Type argument 'dynamic' doesn't conform to the bound 'int' of the type variable 'X' on 'B'. // Try changing type arguments so that they conform to the bounds. -// F, A> x; -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. -// typedef F, Y extends A> = X Function(Y); -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:28:27: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// - 'Object' is from 'dart:core'. -// F, A> x; -// ^ -// -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:29:32: Error: Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// Try changing type arguments so that they conform to the bounds. -// for (F, A> x in []) {} -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. -// typedef F, Y extends A> = X Function(Y); -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:29:32: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// - 'Object' is from 'dart:core'. -// for (F, A> x in []) {} -// ^ -// -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:29:37: Error: Inferred type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// Try specifying type arguments explicitly so that they conform to the bounds. -// for (F, A> x in []) {} -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. -// typedef F, Y extends A> = X Function(Y); -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:29:37: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// - 'Object' is from 'dart:core'. -// for (F, A> x in []) {} -// ^ -// -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:30:35: Error: Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// Try changing type arguments so that they conform to the bounds. -// fooFoo1(F, A> x) {} -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. -// typedef F, Y extends A> = X Function(Y); -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:30:35: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// - 'Object' is from 'dart:core'. -// fooFoo1(F, A> x) {} -// ^ -// -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:31:11: Error: Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// Try changing type arguments so that they conform to the bounds. -// fooFoo2, A>>() {} -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. -// typedef F, Y extends A> = X Function(Y); -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:31:11: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// - 'Object' is from 'dart:core'. -// fooFoo2, A>>() {} -// ^ -// -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:32:34: Error: Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F' in the return type. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// Try changing type arguments so that they conform to the bounds. -// F, A> fooFoo4() => throw 42; -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. -// typedef F, Y extends A> = X Function(Y); -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:32:34: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// - 'Object' is from 'dart:core'. -// F, A> fooFoo4() => throw 42; -// ^ -// -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:33:45: Error: Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// Try changing type arguments so that they conform to the bounds. -// fooFoo5({required F, A> x}) {} -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. -// typedef F, Y extends A> = X Function(Y); -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:33:45: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// - 'Object' is from 'dart:core'. -// fooFoo5({required F, A> x}) {} -// ^ -// -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:34:37: Error: Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// Try changing type arguments so that they conform to the bounds. -// fooFoo7([F, A>? x]) {} -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. -// typedef F, Y extends A> = X Function(Y); -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:34:37: Context: If you want 'F, A>?' to be a super-bounded type, note that the inverted type 'F, A>?' must then satisfy its bounds, which it does not. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// - 'Object' is from 'dart:core'. -// fooFoo7([F, A>? x]) {} -// ^ -// -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:38:5: Error: Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// Try changing type arguments so that they conform to the bounds. -// F x; -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. -// typedef F, Y extends A> = X Function(Y); -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:38:5: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// - 'Object' is from 'dart:core'. -// F x; -// ^ -// -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:39:10: Error: Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// Try changing type arguments so that they conform to the bounds. -// for (F x in []) {} -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. -// typedef F, Y extends A> = X Function(Y); -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:39:10: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// - 'Object' is from 'dart:core'. -// for (F x in []) {} -// ^ -// -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:39:15: Error: Inferred type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// Try specifying type arguments explicitly so that they conform to the bounds. -// for (F x in []) {} -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. -// typedef F, Y extends A> = X Function(Y); -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:39:15: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// - 'Object' is from 'dart:core'. -// for (F x in []) {} -// ^ -// -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:40:13: Error: Inferred type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// Try specifying type arguments explicitly so that they conform to the bounds. -// fooFoo1(F x) {} -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. -// typedef F, Y extends A> = X Function(Y); -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:40:13: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// - 'Object' is from 'dart:core'. -// fooFoo1(F x) {} -// ^ -// -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:41:11: Error: Inferred type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// Try specifying type arguments explicitly so that they conform to the bounds. -// fooFoo2() {} -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. -// typedef F, Y extends A> = X Function(Y); -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:41:11: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// - 'Object' is from 'dart:core'. -// fooFoo2() {} -// ^ -// -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:42:12: Error: Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F' in the return type. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// Try changing type arguments so that they conform to the bounds. -// F fooFoo4() => throw 42; -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. -// typedef F, Y extends A> = X Function(Y); -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:42:12: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// - 'Object' is from 'dart:core'. -// F fooFoo4() => throw 42; -// ^ -// -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:43:23: Error: Inferred type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// Try specifying type arguments explicitly so that they conform to the bounds. -// fooFoo5({required F x}) {} -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. -// typedef F, Y extends A> = X Function(Y); -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:43:23: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// - 'Object' is from 'dart:core'. -// fooFoo5({required F x}) {} -// ^ -// -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:44:15: Error: Inferred type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// Try specifying type arguments explicitly so that they conform to the bounds. -// fooFoo7([F? x]) {} -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. -// typedef F, Y extends A> = X Function(Y); -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:44:15: Context: If you want 'F, A>?' to be a super-bounded type, note that the inverted type 'F, A>?' must then satisfy its bounds, which it does not. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// - 'Object' is from 'dart:core'. -// fooFoo7([F? x]) {} -// ^ -// -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:65:10: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'B'. -// Try changing type arguments so that they conform to the bounds. -// B x; -// ^ +// class Bar8 extends B {} +// ^ // pkg/front_end/testcases/nnbd/super_bounded_hint.dart:52:9: Context: This is the type variable whose bound isn't conformed to. // class B {} // ^ // -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:66:15: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'B'. +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:28:3: Error: Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. // Try changing type arguments so that they conform to the bounds. -// for (B x in []) {} -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:52:9: Context: This is the type variable whose bound isn't conformed to. -// class B {} -// ^ +// F, A> x; +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F, Y extends A> = X Function(Y); +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:28:3: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// - 'Object' is from 'dart:core'. +// F, A> x; +// ^ +// +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:29:8: Error: Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// Try changing type arguments so that they conform to the bounds. +// for (F, A> x in []) {} +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F, Y extends A> = X Function(Y); +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:29:8: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// - 'Object' is from 'dart:core'. +// for (F, A> x in []) {} +// ^ +// +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:30:11: Error: Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// Try changing type arguments so that they conform to the bounds. +// fooFoo1(F, A> x) {} +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F, Y extends A> = X Function(Y); +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:30:11: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// - 'Object' is from 'dart:core'. +// fooFoo1(F, A> x) {} +// ^ +// +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:31:21: Error: Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// Try changing type arguments so that they conform to the bounds. +// fooFoo2, A>>() {} +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F, Y extends A> = X Function(Y); +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:31:21: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// - 'Object' is from 'dart:core'. +// fooFoo2, A>>() {} +// ^ +// +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:32:3: Error: Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// Try changing type arguments so that they conform to the bounds. +// F, A> fooFoo4() => throw 42; +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F, Y extends A> = X Function(Y); +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:32:3: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// - 'Object' is from 'dart:core'. +// F, A> fooFoo4() => throw 42; +// ^ +// +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:33:21: Error: Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// Try changing type arguments so that they conform to the bounds. +// fooFoo5({required F, A> x}) {} +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F, Y extends A> = X Function(Y); +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:33:21: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// - 'Object' is from 'dart:core'. +// fooFoo5({required F, A> x}) {} +// ^ +// +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:34:12: Error: Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// Try changing type arguments so that they conform to the bounds. +// fooFoo7([F, A>? x]) {} +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F, Y extends A> = X Function(Y); +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:34:12: Context: If you want 'F, A>?' to be a super-bounded type, note that the inverted type 'F, A>?' must then satisfy its bounds, which it does not. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// - 'Object' is from 'dart:core'. +// fooFoo7([F, A>? x]) {} +// ^ +// +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:38:3: Error: Inferred type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// Try specifying type arguments explicitly so that they conform to the bounds. +// F x; +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F, Y extends A> = X Function(Y); +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:38:3: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// - 'Object' is from 'dart:core'. +// F x; +// ^ +// +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:39:8: Error: Inferred type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// Try specifying type arguments explicitly so that they conform to the bounds. +// for (F x in []) {} +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F, Y extends A> = X Function(Y); +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:39:8: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// - 'Object' is from 'dart:core'. +// for (F x in []) {} +// ^ +// +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:40:11: Error: Inferred type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// Try specifying type arguments explicitly so that they conform to the bounds. +// fooFoo1(F x) {} +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F, Y extends A> = X Function(Y); +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:40:11: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// - 'Object' is from 'dart:core'. +// fooFoo1(F x) {} +// ^ +// +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:41:21: Error: Inferred type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// Try specifying type arguments explicitly so that they conform to the bounds. +// fooFoo2() {} +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F, Y extends A> = X Function(Y); +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:41:21: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// - 'Object' is from 'dart:core'. +// fooFoo2() {} +// ^ +// +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:42:3: Error: Inferred type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// Try specifying type arguments explicitly so that they conform to the bounds. +// F fooFoo4() => throw 42; +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F, Y extends A> = X Function(Y); +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:42:3: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// - 'Object' is from 'dart:core'. +// F fooFoo4() => throw 42; +// ^ +// +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:43:21: Error: Inferred type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// Try specifying type arguments explicitly so that they conform to the bounds. +// fooFoo5({required F x}) {} +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F, Y extends A> = X Function(Y); +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:43:21: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// - 'Object' is from 'dart:core'. +// fooFoo5({required F x}) {} +// ^ +// +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:44:12: Error: Inferred type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// Try specifying type arguments explicitly so that they conform to the bounds. +// fooFoo7([F? x]) {} +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F, Y extends A> = X Function(Y); +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:44:12: Context: If you want 'F, A>?' to be a super-bounded type, note that the inverted type 'F, A>?' must then satisfy its bounds, which it does not. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// - 'Object' is from 'dart:core'. +// fooFoo7([F? x]) {} +// ^ // // pkg/front_end/testcases/nnbd/super_bounded_hint.dart:72:7: Error: Type argument 'dynamic' doesn't conform to the bound 'int' of the type variable 'X' on 'B'. // Try changing type arguments so that they conform to the bounds. @@ -476,50 +446,58 @@ library /*isNonNullableByDefault*/; // class B {} // ^ // -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:66:20: Error: Inferred type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'B'. -// Try specifying type arguments explicitly so that they conform to the bounds. -// for (B x in []) {} -// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:65:3: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'B'. +// Try changing type arguments so that they conform to the bounds. +// B x; +// ^ // pkg/front_end/testcases/nnbd/super_bounded_hint.dart:52:9: Context: This is the type variable whose bound isn't conformed to. // class B {} // ^ // -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:67:18: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'B'. +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:66:8: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'B'. +// Try changing type arguments so that they conform to the bounds. +// for (B x in []) {} +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:52:9: Context: This is the type variable whose bound isn't conformed to. +// class B {} +// ^ +// +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:67:11: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'B'. // Try changing type arguments so that they conform to the bounds. // barBar1(B x) {} -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:52:9: Context: This is the type variable whose bound isn't conformed to. -// class B {} -// ^ -// -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:68:11: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'B'. -// Try changing type arguments so that they conform to the bounds. -// barBar2>() {} // ^ // pkg/front_end/testcases/nnbd/super_bounded_hint.dart:52:9: Context: This is the type variable whose bound isn't conformed to. // class B {} // ^ // -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:69:17: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'B' in the return type. +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:68:21: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'B'. +// Try changing type arguments so that they conform to the bounds. +// barBar2>() {} +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:52:9: Context: This is the type variable whose bound isn't conformed to. +// class B {} +// ^ +// +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:69:3: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'B'. // Try changing type arguments so that they conform to the bounds. // B barBar4() => throw 42; -// ^ +// ^ // pkg/front_end/testcases/nnbd/super_bounded_hint.dart:52:9: Context: This is the type variable whose bound isn't conformed to. // class B {} // ^ // -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:70:28: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'B'. +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:70:21: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'B'. // Try changing type arguments so that they conform to the bounds. // barBar5({required B x}) {} -// ^ +// ^ // pkg/front_end/testcases/nnbd/super_bounded_hint.dart:52:9: Context: This is the type variable whose bound isn't conformed to. // class B {} // ^ // -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:71:20: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'B'. +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:71:12: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'B'. // Try changing type arguments so that they conform to the bounds. // barBar7([B? x]) {} -// ^ +// ^ // pkg/front_end/testcases/nnbd/super_bounded_hint.dart:52:9: Context: This is the type variable whose bound isn't conformed to. // class B {} // ^ diff --git a/pkg/front_end/testcases/nnbd/super_bounded_hint.dart.weak.modular.expect b/pkg/front_end/testcases/nnbd/super_bounded_hint.dart.weak.modular.expect index 5537cc39e65..8b88b00372b 100644 --- a/pkg/front_end/testcases/nnbd/super_bounded_hint.dart.weak.modular.expect +++ b/pkg/front_end/testcases/nnbd/super_bounded_hint.dart.weak.modular.expect @@ -18,455 +18,425 @@ library /*isNonNullableByDefault*/; // typedef F, Y extends A> = X Function(Y); // ^ // -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:11:31: Error: Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// Try changing type arguments so that they conform to the bounds. -// foo1a(F, A> x) {} -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. -// typedef F, Y extends A> = X Function(Y); -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:11:31: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// - 'Object' is from 'dart:core'. -// foo1a(F, A> x) {} -// ^ -// -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:12:9: Error: Inferred type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// Try specifying type arguments explicitly so that they conform to the bounds. -// foo1b(F x) {} -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. -// typedef F, Y extends A> = X Function(Y); -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:12:9: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// - 'Object' is from 'dart:core'. -// foo1b(F x) {} -// ^ -// -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:14:7: Error: Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:14:17: Error: Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. // - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. // Try changing type arguments so that they conform to the bounds. // foo2a, A>>() {} -// ^ +// ^ // pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. // typedef F, Y extends A> = X Function(Y); // ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:14:7: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:14:17: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. // - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. // - 'Object' is from 'dart:core'. // foo2a, A>>() {} -// ^ +// ^ // -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:15:7: Error: Inferred type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:15:17: Error: Inferred type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. // - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. // Try specifying type arguments explicitly so that they conform to the bounds. // foo2b() {} -// ^ +// ^ // pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. // typedef F, Y extends A> = X Function(Y); // ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:15:7: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:15:17: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. // - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. // - 'Object' is from 'dart:core'. // foo2b() {} -// ^ +// ^ // -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:17:13: Error: Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:17:23: Error: Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. // - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. // Try changing type arguments so that they conform to the bounds. // class Foo3a, A>> {} -// ^ +// ^ // pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. // typedef F, Y extends A> = X Function(Y); // ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:17:13: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:17:23: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. // - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. // - 'Object' is from 'dart:core'. // class Foo3a, A>> {} -// ^ +// ^ // -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:21:30: Error: Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F' in the return type. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// Try changing type arguments so that they conform to the bounds. -// F, A> foo4a() => throw 42; -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. -// typedef F, Y extends A> = X Function(Y); -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:21:30: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// - 'Object' is from 'dart:core'. -// F, A> foo4a() => throw 42; -// ^ -// -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:22:8: Error: Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F' in the return type. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// Try changing type arguments so that they conform to the bounds. -// F foo4b() => throw 42; -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. -// typedef F, Y extends A> = X Function(Y); -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:22:8: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// - 'Object' is from 'dart:core'. -// F foo4b() => throw 42; -// ^ -// -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:24:41: Error: Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// Try changing type arguments so that they conform to the bounds. -// foo5a({required F, A> x}) {} -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. -// typedef F, Y extends A> = X Function(Y); -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:24:41: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// - 'Object' is from 'dart:core'. -// foo5a({required F, A> x}) {} -// ^ -// -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:25:19: Error: Inferred type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:19:23: Error: Inferred type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. // - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. // Try specifying type arguments explicitly so that they conform to the bounds. -// foo5b({required F x}) {} -// ^ +// class Foo3b {} +// ^ // pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. // typedef F, Y extends A> = X Function(Y); // ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:25:19: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:19:23: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. // - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. // - 'Object' is from 'dart:core'. -// foo5b({required F x}) {} -// ^ +// class Foo3b {} +// ^ // -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:47:33: Error: Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:56:16: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'B'. // Try changing type arguments so that they conform to the bounds. -// foo7a([F, A>? x]) {} -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. -// typedef F, Y extends A> = X Function(Y); -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:47:33: Context: If you want 'F, A>?' to be a super-bounded type, note that the inverted type 'F, A>?' must then satisfy its bounds, which it does not. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// - 'Object' is from 'dart:core'. -// foo7a([F, A>? x]) {} -// ^ -// -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:48:11: Error: Inferred type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// Try specifying type arguments explicitly so that they conform to the bounds. -// foo7b([F? x]) {} -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. -// typedef F, Y extends A> = X Function(Y); -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:48:11: Context: If you want 'F, A>?' to be a super-bounded type, note that the inverted type 'F, A>?' must then satisfy its bounds, which it does not. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// - 'Object' is from 'dart:core'. -// foo7b([F? x]) {} -// ^ -// -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:54:13: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'B'. -// Try changing type arguments so that they conform to the bounds. -// bar1(B x) {} -// ^ +// bar2>() {} +// ^ // pkg/front_end/testcases/nnbd/super_bounded_hint.dart:52:9: Context: This is the type variable whose bound isn't conformed to. // class B {} // ^ // -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:56:6: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'B'. +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:58:22: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'B'. // Try changing type arguments so that they conform to the bounds. -// bar2>() {} +// class Bar3> {} +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:52:9: Context: This is the type variable whose bound isn't conformed to. +// class B {} +// ^ +// +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:11:7: Error: Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// Try changing type arguments so that they conform to the bounds. +// foo1a(F, A> x) {} +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F, Y extends A> = X Function(Y); +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:11:7: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// - 'Object' is from 'dart:core'. +// foo1a(F, A> x) {} +// ^ +// +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:12:7: Error: Inferred type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// Try specifying type arguments explicitly so that they conform to the bounds. +// foo1b(F x) {} +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F, Y extends A> = X Function(Y); +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:12:7: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// - 'Object' is from 'dart:core'. +// foo1b(F x) {} +// ^ +// +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:21:1: Error: Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// Try changing type arguments so that they conform to the bounds. +// F, A> foo4a() => throw 42; +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F, Y extends A> = X Function(Y); +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:21:1: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// - 'Object' is from 'dart:core'. +// F, A> foo4a() => throw 42; +// ^ +// +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:22:1: Error: Inferred type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// Try specifying type arguments explicitly so that they conform to the bounds. +// F foo4b() => throw 42; +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F, Y extends A> = X Function(Y); +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:22:1: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// - 'Object' is from 'dart:core'. +// F foo4b() => throw 42; +// ^ +// +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:24:17: Error: Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// Try changing type arguments so that they conform to the bounds. +// foo5a({required F, A> x}) {} +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F, Y extends A> = X Function(Y); +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:24:17: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// - 'Object' is from 'dart:core'. +// foo5a({required F, A> x}) {} +// ^ +// +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:25:17: Error: Inferred type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// Try specifying type arguments explicitly so that they conform to the bounds. +// foo5b({required F x}) {} +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F, Y extends A> = X Function(Y); +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:25:17: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// - 'Object' is from 'dart:core'. +// foo5b({required F x}) {} +// ^ +// +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:47:8: Error: Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// Try changing type arguments so that they conform to the bounds. +// foo7a([F, A>? x]) {} +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F, Y extends A> = X Function(Y); +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:47:8: Context: If you want 'F, A>?' to be a super-bounded type, note that the inverted type 'F, A>?' must then satisfy its bounds, which it does not. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// - 'Object' is from 'dart:core'. +// foo7a([F, A>? x]) {} +// ^ +// +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:48:8: Error: Inferred type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// Try specifying type arguments explicitly so that they conform to the bounds. +// foo7b([F? x]) {} +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F, Y extends A> = X Function(Y); +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:48:8: Context: If you want 'F, A>?' to be a super-bounded type, note that the inverted type 'F, A>?' must then satisfy its bounds, which it does not. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// - 'Object' is from 'dart:core'. +// foo7b([F? x]) {} +// ^ +// +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:54:6: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'B'. +// Try changing type arguments so that they conform to the bounds. +// bar1(B x) {} // ^ // pkg/front_end/testcases/nnbd/super_bounded_hint.dart:52:9: Context: This is the type variable whose bound isn't conformed to. // class B {} // ^ // -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:58:12: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'B'. -// Try changing type arguments so that they conform to the bounds. -// class Bar3> {} -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:52:9: Context: This is the type variable whose bound isn't conformed to. -// class B {} -// ^ -// -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:60:12: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'B' in the return type. +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:60:1: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'B'. // Try changing type arguments so that they conform to the bounds. // B bar4() => throw 42; -// ^ +// ^ // pkg/front_end/testcases/nnbd/super_bounded_hint.dart:52:9: Context: This is the type variable whose bound isn't conformed to. // class B {} // ^ // -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:62:23: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'B'. +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:62:16: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'B'. // Try changing type arguments so that they conform to the bounds. // bar5({required B x}) {} -// ^ +// ^ // pkg/front_end/testcases/nnbd/super_bounded_hint.dart:52:9: Context: This is the type variable whose bound isn't conformed to. // class B {} // ^ // -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:76:15: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'B'. +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:76:7: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'B'. // Try changing type arguments so that they conform to the bounds. // bar7([B? x]) {} -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:52:9: Context: This is the type variable whose bound isn't conformed to. -// class B {} -// ^ -// -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:78:7: Error: Type argument 'dynamic' doesn't conform to the bound 'int' of the type variable 'X' on 'B' in the supertype 'B' of class 'Bar8'. -// Try changing type arguments so that they conform to the bounds. -// class Bar8 extends B {} // ^ // pkg/front_end/testcases/nnbd/super_bounded_hint.dart:52:9: Context: This is the type variable whose bound isn't conformed to. // class B {} // ^ // -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:28:27: Error: Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:78:20: Error: Type argument 'dynamic' doesn't conform to the bound 'int' of the type variable 'X' on 'B'. // Try changing type arguments so that they conform to the bounds. -// F, A> x; -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. -// typedef F, Y extends A> = X Function(Y); -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:28:27: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// - 'Object' is from 'dart:core'. -// F, A> x; -// ^ -// -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:29:32: Error: Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// Try changing type arguments so that they conform to the bounds. -// for (F, A> x in []) {} -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. -// typedef F, Y extends A> = X Function(Y); -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:29:32: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// - 'Object' is from 'dart:core'. -// for (F, A> x in []) {} -// ^ -// -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:29:37: Error: Inferred type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// Try specifying type arguments explicitly so that they conform to the bounds. -// for (F, A> x in []) {} -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. -// typedef F, Y extends A> = X Function(Y); -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:29:37: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// - 'Object' is from 'dart:core'. -// for (F, A> x in []) {} -// ^ -// -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:30:35: Error: Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// Try changing type arguments so that they conform to the bounds. -// fooFoo1(F, A> x) {} -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. -// typedef F, Y extends A> = X Function(Y); -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:30:35: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// - 'Object' is from 'dart:core'. -// fooFoo1(F, A> x) {} -// ^ -// -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:31:11: Error: Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// Try changing type arguments so that they conform to the bounds. -// fooFoo2, A>>() {} -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. -// typedef F, Y extends A> = X Function(Y); -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:31:11: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// - 'Object' is from 'dart:core'. -// fooFoo2, A>>() {} -// ^ -// -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:32:34: Error: Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F' in the return type. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// Try changing type arguments so that they conform to the bounds. -// F, A> fooFoo4() => throw 42; -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. -// typedef F, Y extends A> = X Function(Y); -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:32:34: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// - 'Object' is from 'dart:core'. -// F, A> fooFoo4() => throw 42; -// ^ -// -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:33:45: Error: Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// Try changing type arguments so that they conform to the bounds. -// fooFoo5({required F, A> x}) {} -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. -// typedef F, Y extends A> = X Function(Y); -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:33:45: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// - 'Object' is from 'dart:core'. -// fooFoo5({required F, A> x}) {} -// ^ -// -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:34:37: Error: Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// Try changing type arguments so that they conform to the bounds. -// fooFoo7([F, A>? x]) {} -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. -// typedef F, Y extends A> = X Function(Y); -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:34:37: Context: If you want 'F, A>?' to be a super-bounded type, note that the inverted type 'F, A>?' must then satisfy its bounds, which it does not. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// - 'Object' is from 'dart:core'. -// fooFoo7([F, A>? x]) {} -// ^ -// -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:38:5: Error: Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// Try changing type arguments so that they conform to the bounds. -// F x; -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. -// typedef F, Y extends A> = X Function(Y); -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:38:5: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// - 'Object' is from 'dart:core'. -// F x; -// ^ -// -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:39:10: Error: Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// Try changing type arguments so that they conform to the bounds. -// for (F x in []) {} -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. -// typedef F, Y extends A> = X Function(Y); -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:39:10: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// - 'Object' is from 'dart:core'. -// for (F x in []) {} -// ^ -// -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:39:15: Error: Inferred type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// Try specifying type arguments explicitly so that they conform to the bounds. -// for (F x in []) {} -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. -// typedef F, Y extends A> = X Function(Y); -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:39:15: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// - 'Object' is from 'dart:core'. -// for (F x in []) {} -// ^ -// -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:40:13: Error: Inferred type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// Try specifying type arguments explicitly so that they conform to the bounds. -// fooFoo1(F x) {} -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. -// typedef F, Y extends A> = X Function(Y); -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:40:13: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// - 'Object' is from 'dart:core'. -// fooFoo1(F x) {} -// ^ -// -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:41:11: Error: Inferred type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// Try specifying type arguments explicitly so that they conform to the bounds. -// fooFoo2() {} -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. -// typedef F, Y extends A> = X Function(Y); -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:41:11: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// - 'Object' is from 'dart:core'. -// fooFoo2() {} -// ^ -// -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:42:12: Error: Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F' in the return type. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// Try changing type arguments so that they conform to the bounds. -// F fooFoo4() => throw 42; -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. -// typedef F, Y extends A> = X Function(Y); -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:42:12: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// - 'Object' is from 'dart:core'. -// F fooFoo4() => throw 42; -// ^ -// -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:43:23: Error: Inferred type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// Try specifying type arguments explicitly so that they conform to the bounds. -// fooFoo5({required F x}) {} -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. -// typedef F, Y extends A> = X Function(Y); -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:43:23: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// - 'Object' is from 'dart:core'. -// fooFoo5({required F x}) {} -// ^ -// -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:44:15: Error: Inferred type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// Try specifying type arguments explicitly so that they conform to the bounds. -// fooFoo7([F? x]) {} -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. -// typedef F, Y extends A> = X Function(Y); -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:44:15: Context: If you want 'F, A>?' to be a super-bounded type, note that the inverted type 'F, A>?' must then satisfy its bounds, which it does not. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// - 'Object' is from 'dart:core'. -// fooFoo7([F? x]) {} -// ^ -// -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:65:10: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'B'. -// Try changing type arguments so that they conform to the bounds. -// B x; -// ^ +// class Bar8 extends B {} +// ^ // pkg/front_end/testcases/nnbd/super_bounded_hint.dart:52:9: Context: This is the type variable whose bound isn't conformed to. // class B {} // ^ // -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:66:15: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'B'. +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:28:3: Error: Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. // Try changing type arguments so that they conform to the bounds. -// for (B x in []) {} -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:52:9: Context: This is the type variable whose bound isn't conformed to. -// class B {} -// ^ +// F, A> x; +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F, Y extends A> = X Function(Y); +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:28:3: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// - 'Object' is from 'dart:core'. +// F, A> x; +// ^ +// +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:29:8: Error: Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// Try changing type arguments so that they conform to the bounds. +// for (F, A> x in []) {} +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F, Y extends A> = X Function(Y); +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:29:8: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// - 'Object' is from 'dart:core'. +// for (F, A> x in []) {} +// ^ +// +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:30:11: Error: Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// Try changing type arguments so that they conform to the bounds. +// fooFoo1(F, A> x) {} +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F, Y extends A> = X Function(Y); +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:30:11: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// - 'Object' is from 'dart:core'. +// fooFoo1(F, A> x) {} +// ^ +// +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:31:21: Error: Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// Try changing type arguments so that they conform to the bounds. +// fooFoo2, A>>() {} +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F, Y extends A> = X Function(Y); +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:31:21: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// - 'Object' is from 'dart:core'. +// fooFoo2, A>>() {} +// ^ +// +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:32:3: Error: Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// Try changing type arguments so that they conform to the bounds. +// F, A> fooFoo4() => throw 42; +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F, Y extends A> = X Function(Y); +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:32:3: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// - 'Object' is from 'dart:core'. +// F, A> fooFoo4() => throw 42; +// ^ +// +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:33:21: Error: Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// Try changing type arguments so that they conform to the bounds. +// fooFoo5({required F, A> x}) {} +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F, Y extends A> = X Function(Y); +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:33:21: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// - 'Object' is from 'dart:core'. +// fooFoo5({required F, A> x}) {} +// ^ +// +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:34:12: Error: Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// Try changing type arguments so that they conform to the bounds. +// fooFoo7([F, A>? x]) {} +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F, Y extends A> = X Function(Y); +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:34:12: Context: If you want 'F, A>?' to be a super-bounded type, note that the inverted type 'F, A>?' must then satisfy its bounds, which it does not. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// - 'Object' is from 'dart:core'. +// fooFoo7([F, A>? x]) {} +// ^ +// +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:38:3: Error: Inferred type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// Try specifying type arguments explicitly so that they conform to the bounds. +// F x; +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F, Y extends A> = X Function(Y); +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:38:3: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// - 'Object' is from 'dart:core'. +// F x; +// ^ +// +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:39:8: Error: Inferred type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// Try specifying type arguments explicitly so that they conform to the bounds. +// for (F x in []) {} +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F, Y extends A> = X Function(Y); +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:39:8: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// - 'Object' is from 'dart:core'. +// for (F x in []) {} +// ^ +// +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:40:11: Error: Inferred type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// Try specifying type arguments explicitly so that they conform to the bounds. +// fooFoo1(F x) {} +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F, Y extends A> = X Function(Y); +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:40:11: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// - 'Object' is from 'dart:core'. +// fooFoo1(F x) {} +// ^ +// +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:41:21: Error: Inferred type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// Try specifying type arguments explicitly so that they conform to the bounds. +// fooFoo2() {} +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F, Y extends A> = X Function(Y); +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:41:21: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// - 'Object' is from 'dart:core'. +// fooFoo2() {} +// ^ +// +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:42:3: Error: Inferred type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// Try specifying type arguments explicitly so that they conform to the bounds. +// F fooFoo4() => throw 42; +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F, Y extends A> = X Function(Y); +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:42:3: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// - 'Object' is from 'dart:core'. +// F fooFoo4() => throw 42; +// ^ +// +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:43:21: Error: Inferred type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// Try specifying type arguments explicitly so that they conform to the bounds. +// fooFoo5({required F x}) {} +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F, Y extends A> = X Function(Y); +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:43:21: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// - 'Object' is from 'dart:core'. +// fooFoo5({required F x}) {} +// ^ +// +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:44:12: Error: Inferred type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// Try specifying type arguments explicitly so that they conform to the bounds. +// fooFoo7([F? x]) {} +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F, Y extends A> = X Function(Y); +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:44:12: Context: If you want 'F, A>?' to be a super-bounded type, note that the inverted type 'F, A>?' must then satisfy its bounds, which it does not. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// - 'Object' is from 'dart:core'. +// fooFoo7([F? x]) {} +// ^ // // pkg/front_end/testcases/nnbd/super_bounded_hint.dart:72:7: Error: Type argument 'dynamic' doesn't conform to the bound 'int' of the type variable 'X' on 'B'. // Try changing type arguments so that they conform to the bounds. @@ -476,50 +446,58 @@ library /*isNonNullableByDefault*/; // class B {} // ^ // -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:66:20: Error: Inferred type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'B'. -// Try specifying type arguments explicitly so that they conform to the bounds. -// for (B x in []) {} -// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:65:3: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'B'. +// Try changing type arguments so that they conform to the bounds. +// B x; +// ^ // pkg/front_end/testcases/nnbd/super_bounded_hint.dart:52:9: Context: This is the type variable whose bound isn't conformed to. // class B {} // ^ // -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:67:18: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'B'. +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:66:8: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'B'. +// Try changing type arguments so that they conform to the bounds. +// for (B x in []) {} +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:52:9: Context: This is the type variable whose bound isn't conformed to. +// class B {} +// ^ +// +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:67:11: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'B'. // Try changing type arguments so that they conform to the bounds. // barBar1(B x) {} -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:52:9: Context: This is the type variable whose bound isn't conformed to. -// class B {} -// ^ -// -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:68:11: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'B'. -// Try changing type arguments so that they conform to the bounds. -// barBar2>() {} // ^ // pkg/front_end/testcases/nnbd/super_bounded_hint.dart:52:9: Context: This is the type variable whose bound isn't conformed to. // class B {} // ^ // -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:69:17: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'B' in the return type. +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:68:21: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'B'. +// Try changing type arguments so that they conform to the bounds. +// barBar2>() {} +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:52:9: Context: This is the type variable whose bound isn't conformed to. +// class B {} +// ^ +// +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:69:3: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'B'. // Try changing type arguments so that they conform to the bounds. // B barBar4() => throw 42; -// ^ +// ^ // pkg/front_end/testcases/nnbd/super_bounded_hint.dart:52:9: Context: This is the type variable whose bound isn't conformed to. // class B {} // ^ // -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:70:28: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'B'. +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:70:21: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'B'. // Try changing type arguments so that they conform to the bounds. // barBar5({required B x}) {} -// ^ +// ^ // pkg/front_end/testcases/nnbd/super_bounded_hint.dart:52:9: Context: This is the type variable whose bound isn't conformed to. // class B {} // ^ // -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:71:20: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'B'. +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:71:12: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'B'. // Try changing type arguments so that they conform to the bounds. // barBar7([B? x]) {} -// ^ +// ^ // pkg/front_end/testcases/nnbd/super_bounded_hint.dart:52:9: Context: This is the type variable whose bound isn't conformed to. // class B {} // ^ diff --git a/pkg/front_end/testcases/nnbd/super_bounded_hint.dart.weak.outline.expect b/pkg/front_end/testcases/nnbd/super_bounded_hint.dart.weak.outline.expect index 155fe0cd1b8..b4f6b22a4f8 100644 --- a/pkg/front_end/testcases/nnbd/super_bounded_hint.dart.weak.outline.expect +++ b/pkg/front_end/testcases/nnbd/super_bounded_hint.dart.weak.outline.expect @@ -18,212 +18,226 @@ library /*isNonNullableByDefault*/; // typedef F, Y extends A> = X Function(Y); // ^ // -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:11:31: Error: Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// Try changing type arguments so that they conform to the bounds. -// foo1a(F, A> x) {} -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. -// typedef F, Y extends A> = X Function(Y); -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:11:31: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// - 'Object' is from 'dart:core'. -// foo1a(F, A> x) {} -// ^ -// -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:12:9: Error: Inferred type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// Try specifying type arguments explicitly so that they conform to the bounds. -// foo1b(F x) {} -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. -// typedef F, Y extends A> = X Function(Y); -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:12:9: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// - 'Object' is from 'dart:core'. -// foo1b(F x) {} -// ^ -// -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:14:7: Error: Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:14:17: Error: Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. // - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. // Try changing type arguments so that they conform to the bounds. // foo2a, A>>() {} -// ^ +// ^ // pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. // typedef F, Y extends A> = X Function(Y); // ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:14:7: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:14:17: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. // - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. // - 'Object' is from 'dart:core'. // foo2a, A>>() {} -// ^ +// ^ // -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:15:7: Error: Inferred type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:15:17: Error: Inferred type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. // - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. // Try specifying type arguments explicitly so that they conform to the bounds. // foo2b() {} -// ^ +// ^ // pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. // typedef F, Y extends A> = X Function(Y); // ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:15:7: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:15:17: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. // - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. // - 'Object' is from 'dart:core'. // foo2b() {} -// ^ +// ^ // -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:17:13: Error: Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:17:23: Error: Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. // - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. // Try changing type arguments so that they conform to the bounds. // class Foo3a, A>> {} -// ^ +// ^ // pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. // typedef F, Y extends A> = X Function(Y); // ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:17:13: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:17:23: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. // - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. // - 'Object' is from 'dart:core'. // class Foo3a, A>> {} -// ^ +// ^ // -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:21:30: Error: Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F' in the return type. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// Try changing type arguments so that they conform to the bounds. -// F, A> foo4a() => throw 42; -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. -// typedef F, Y extends A> = X Function(Y); -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:21:30: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// - 'Object' is from 'dart:core'. -// F, A> foo4a() => throw 42; -// ^ -// -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:22:8: Error: Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F' in the return type. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// Try changing type arguments so that they conform to the bounds. -// F foo4b() => throw 42; -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. -// typedef F, Y extends A> = X Function(Y); -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:22:8: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// - 'Object' is from 'dart:core'. -// F foo4b() => throw 42; -// ^ -// -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:24:41: Error: Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// Try changing type arguments so that they conform to the bounds. -// foo5a({required F, A> x}) {} -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. -// typedef F, Y extends A> = X Function(Y); -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:24:41: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// - 'Object' is from 'dart:core'. -// foo5a({required F, A> x}) {} -// ^ -// -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:25:19: Error: Inferred type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:19:23: Error: Inferred type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. // - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. // Try specifying type arguments explicitly so that they conform to the bounds. -// foo5b({required F x}) {} -// ^ +// class Foo3b {} +// ^ // pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. // typedef F, Y extends A> = X Function(Y); // ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:25:19: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:19:23: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. // - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. // - 'Object' is from 'dart:core'. -// foo5b({required F x}) {} -// ^ +// class Foo3b {} +// ^ // -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:47:33: Error: Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:56:16: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'B'. // Try changing type arguments so that they conform to the bounds. -// foo7a([F, A>? x]) {} -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. -// typedef F, Y extends A> = X Function(Y); -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:47:33: Context: If you want 'F, A>?' to be a super-bounded type, note that the inverted type 'F, A>?' must then satisfy its bounds, which it does not. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// - 'Object' is from 'dart:core'. -// foo7a([F, A>? x]) {} -// ^ -// -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:48:11: Error: Inferred type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// Try specifying type arguments explicitly so that they conform to the bounds. -// foo7b([F? x]) {} -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. -// typedef F, Y extends A> = X Function(Y); -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:48:11: Context: If you want 'F, A>?' to be a super-bounded type, note that the inverted type 'F, A>?' must then satisfy its bounds, which it does not. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// - 'Object' is from 'dart:core'. -// foo7b([F? x]) {} -// ^ -// -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:54:13: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'B'. -// Try changing type arguments so that they conform to the bounds. -// bar1(B x) {} -// ^ +// bar2>() {} +// ^ // pkg/front_end/testcases/nnbd/super_bounded_hint.dart:52:9: Context: This is the type variable whose bound isn't conformed to. // class B {} // ^ // -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:56:6: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'B'. +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:58:22: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'B'. // Try changing type arguments so that they conform to the bounds. -// bar2>() {} +// class Bar3> {} +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:52:9: Context: This is the type variable whose bound isn't conformed to. +// class B {} +// ^ +// +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:11:7: Error: Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// Try changing type arguments so that they conform to the bounds. +// foo1a(F, A> x) {} +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F, Y extends A> = X Function(Y); +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:11:7: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// - 'Object' is from 'dart:core'. +// foo1a(F, A> x) {} +// ^ +// +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:12:7: Error: Inferred type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// Try specifying type arguments explicitly so that they conform to the bounds. +// foo1b(F x) {} +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F, Y extends A> = X Function(Y); +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:12:7: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// - 'Object' is from 'dart:core'. +// foo1b(F x) {} +// ^ +// +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:21:1: Error: Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// Try changing type arguments so that they conform to the bounds. +// F, A> foo4a() => throw 42; +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F, Y extends A> = X Function(Y); +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:21:1: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// - 'Object' is from 'dart:core'. +// F, A> foo4a() => throw 42; +// ^ +// +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:22:1: Error: Inferred type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// Try specifying type arguments explicitly so that they conform to the bounds. +// F foo4b() => throw 42; +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F, Y extends A> = X Function(Y); +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:22:1: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// - 'Object' is from 'dart:core'. +// F foo4b() => throw 42; +// ^ +// +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:24:17: Error: Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// Try changing type arguments so that they conform to the bounds. +// foo5a({required F, A> x}) {} +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F, Y extends A> = X Function(Y); +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:24:17: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// - 'Object' is from 'dart:core'. +// foo5a({required F, A> x}) {} +// ^ +// +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:25:17: Error: Inferred type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// Try specifying type arguments explicitly so that they conform to the bounds. +// foo5b({required F x}) {} +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F, Y extends A> = X Function(Y); +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:25:17: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// - 'Object' is from 'dart:core'. +// foo5b({required F x}) {} +// ^ +// +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:47:8: Error: Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// Try changing type arguments so that they conform to the bounds. +// foo7a([F, A>? x]) {} +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F, Y extends A> = X Function(Y); +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:47:8: Context: If you want 'F, A>?' to be a super-bounded type, note that the inverted type 'F, A>?' must then satisfy its bounds, which it does not. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// - 'Object' is from 'dart:core'. +// foo7a([F, A>? x]) {} +// ^ +// +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:48:8: Error: Inferred type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// Try specifying type arguments explicitly so that they conform to the bounds. +// foo7b([F? x]) {} +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F, Y extends A> = X Function(Y); +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:48:8: Context: If you want 'F, A>?' to be a super-bounded type, note that the inverted type 'F, A>?' must then satisfy its bounds, which it does not. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// - 'Object' is from 'dart:core'. +// foo7b([F? x]) {} +// ^ +// +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:54:6: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'B'. +// Try changing type arguments so that they conform to the bounds. +// bar1(B x) {} // ^ // pkg/front_end/testcases/nnbd/super_bounded_hint.dart:52:9: Context: This is the type variable whose bound isn't conformed to. // class B {} // ^ // -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:58:12: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'B'. -// Try changing type arguments so that they conform to the bounds. -// class Bar3> {} -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:52:9: Context: This is the type variable whose bound isn't conformed to. -// class B {} -// ^ -// -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:60:12: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'B' in the return type. +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:60:1: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'B'. // Try changing type arguments so that they conform to the bounds. // B bar4() => throw 42; -// ^ +// ^ // pkg/front_end/testcases/nnbd/super_bounded_hint.dart:52:9: Context: This is the type variable whose bound isn't conformed to. // class B {} // ^ // -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:62:23: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'B'. +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:62:16: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'B'. // Try changing type arguments so that they conform to the bounds. // bar5({required B x}) {} -// ^ +// ^ // pkg/front_end/testcases/nnbd/super_bounded_hint.dart:52:9: Context: This is the type variable whose bound isn't conformed to. // class B {} // ^ // -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:76:15: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'B'. +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:76:7: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'B'. // Try changing type arguments so that they conform to the bounds. // bar7([B? x]) {} -// ^ +// ^ // pkg/front_end/testcases/nnbd/super_bounded_hint.dart:52:9: Context: This is the type variable whose bound isn't conformed to. // class B {} // ^ // -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:78:7: Error: Type argument 'dynamic' doesn't conform to the bound 'int' of the type variable 'X' on 'B' in the supertype 'B' of class 'Bar8'. +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:78:20: Error: Type argument 'dynamic' doesn't conform to the bound 'int' of the type variable 'X' on 'B'. // Try changing type arguments so that they conform to the bounds. // class Bar8 extends B {} -// ^ +// ^ // pkg/front_end/testcases/nnbd/super_bounded_hint.dart:52:9: Context: This is the type variable whose bound isn't conformed to. // class B {} // ^ diff --git a/pkg/front_end/testcases/nnbd/super_bounded_hint.dart.weak.transformed.expect b/pkg/front_end/testcases/nnbd/super_bounded_hint.dart.weak.transformed.expect index c007963be82..96f0d730625 100644 --- a/pkg/front_end/testcases/nnbd/super_bounded_hint.dart.weak.transformed.expect +++ b/pkg/front_end/testcases/nnbd/super_bounded_hint.dart.weak.transformed.expect @@ -18,455 +18,425 @@ library /*isNonNullableByDefault*/; // typedef F, Y extends A> = X Function(Y); // ^ // -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:11:31: Error: Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// Try changing type arguments so that they conform to the bounds. -// foo1a(F, A> x) {} -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. -// typedef F, Y extends A> = X Function(Y); -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:11:31: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// - 'Object' is from 'dart:core'. -// foo1a(F, A> x) {} -// ^ -// -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:12:9: Error: Inferred type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// Try specifying type arguments explicitly so that they conform to the bounds. -// foo1b(F x) {} -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. -// typedef F, Y extends A> = X Function(Y); -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:12:9: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// - 'Object' is from 'dart:core'. -// foo1b(F x) {} -// ^ -// -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:14:7: Error: Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:14:17: Error: Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. // - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. // Try changing type arguments so that they conform to the bounds. // foo2a, A>>() {} -// ^ +// ^ // pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. // typedef F, Y extends A> = X Function(Y); // ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:14:7: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:14:17: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. // - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. // - 'Object' is from 'dart:core'. // foo2a, A>>() {} -// ^ +// ^ // -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:15:7: Error: Inferred type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:15:17: Error: Inferred type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. // - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. // Try specifying type arguments explicitly so that they conform to the bounds. // foo2b() {} -// ^ +// ^ // pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. // typedef F, Y extends A> = X Function(Y); // ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:15:7: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:15:17: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. // - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. // - 'Object' is from 'dart:core'. // foo2b() {} -// ^ +// ^ // -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:17:13: Error: Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:17:23: Error: Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. // - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. // Try changing type arguments so that they conform to the bounds. // class Foo3a, A>> {} -// ^ +// ^ // pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. // typedef F, Y extends A> = X Function(Y); // ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:17:13: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:17:23: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. // - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. // - 'Object' is from 'dart:core'. // class Foo3a, A>> {} -// ^ +// ^ // -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:21:30: Error: Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F' in the return type. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// Try changing type arguments so that they conform to the bounds. -// F, A> foo4a() => throw 42; -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. -// typedef F, Y extends A> = X Function(Y); -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:21:30: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// - 'Object' is from 'dart:core'. -// F, A> foo4a() => throw 42; -// ^ -// -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:22:8: Error: Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F' in the return type. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// Try changing type arguments so that they conform to the bounds. -// F foo4b() => throw 42; -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. -// typedef F, Y extends A> = X Function(Y); -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:22:8: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// - 'Object' is from 'dart:core'. -// F foo4b() => throw 42; -// ^ -// -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:24:41: Error: Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// Try changing type arguments so that they conform to the bounds. -// foo5a({required F, A> x}) {} -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. -// typedef F, Y extends A> = X Function(Y); -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:24:41: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// - 'Object' is from 'dart:core'. -// foo5a({required F, A> x}) {} -// ^ -// -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:25:19: Error: Inferred type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:19:23: Error: Inferred type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. // - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. // Try specifying type arguments explicitly so that they conform to the bounds. -// foo5b({required F x}) {} -// ^ +// class Foo3b {} +// ^ // pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. // typedef F, Y extends A> = X Function(Y); // ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:25:19: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:19:23: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. // - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. // - 'Object' is from 'dart:core'. -// foo5b({required F x}) {} -// ^ +// class Foo3b {} +// ^ // -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:47:33: Error: Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:56:16: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'B'. // Try changing type arguments so that they conform to the bounds. -// foo7a([F, A>? x]) {} -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. -// typedef F, Y extends A> = X Function(Y); -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:47:33: Context: If you want 'F, A>?' to be a super-bounded type, note that the inverted type 'F, A>?' must then satisfy its bounds, which it does not. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// - 'Object' is from 'dart:core'. -// foo7a([F, A>? x]) {} -// ^ -// -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:48:11: Error: Inferred type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// Try specifying type arguments explicitly so that they conform to the bounds. -// foo7b([F? x]) {} -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. -// typedef F, Y extends A> = X Function(Y); -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:48:11: Context: If you want 'F, A>?' to be a super-bounded type, note that the inverted type 'F, A>?' must then satisfy its bounds, which it does not. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// - 'Object' is from 'dart:core'. -// foo7b([F? x]) {} -// ^ -// -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:54:13: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'B'. -// Try changing type arguments so that they conform to the bounds. -// bar1(B x) {} -// ^ +// bar2>() {} +// ^ // pkg/front_end/testcases/nnbd/super_bounded_hint.dart:52:9: Context: This is the type variable whose bound isn't conformed to. // class B {} // ^ // -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:56:6: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'B'. +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:58:22: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'B'. // Try changing type arguments so that they conform to the bounds. -// bar2>() {} +// class Bar3> {} +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:52:9: Context: This is the type variable whose bound isn't conformed to. +// class B {} +// ^ +// +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:11:7: Error: Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// Try changing type arguments so that they conform to the bounds. +// foo1a(F, A> x) {} +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F, Y extends A> = X Function(Y); +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:11:7: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// - 'Object' is from 'dart:core'. +// foo1a(F, A> x) {} +// ^ +// +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:12:7: Error: Inferred type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// Try specifying type arguments explicitly so that they conform to the bounds. +// foo1b(F x) {} +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F, Y extends A> = X Function(Y); +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:12:7: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// - 'Object' is from 'dart:core'. +// foo1b(F x) {} +// ^ +// +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:21:1: Error: Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// Try changing type arguments so that they conform to the bounds. +// F, A> foo4a() => throw 42; +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F, Y extends A> = X Function(Y); +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:21:1: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// - 'Object' is from 'dart:core'. +// F, A> foo4a() => throw 42; +// ^ +// +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:22:1: Error: Inferred type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// Try specifying type arguments explicitly so that they conform to the bounds. +// F foo4b() => throw 42; +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F, Y extends A> = X Function(Y); +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:22:1: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// - 'Object' is from 'dart:core'. +// F foo4b() => throw 42; +// ^ +// +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:24:17: Error: Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// Try changing type arguments so that they conform to the bounds. +// foo5a({required F, A> x}) {} +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F, Y extends A> = X Function(Y); +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:24:17: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// - 'Object' is from 'dart:core'. +// foo5a({required F, A> x}) {} +// ^ +// +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:25:17: Error: Inferred type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// Try specifying type arguments explicitly so that they conform to the bounds. +// foo5b({required F x}) {} +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F, Y extends A> = X Function(Y); +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:25:17: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// - 'Object' is from 'dart:core'. +// foo5b({required F x}) {} +// ^ +// +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:47:8: Error: Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// Try changing type arguments so that they conform to the bounds. +// foo7a([F, A>? x]) {} +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F, Y extends A> = X Function(Y); +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:47:8: Context: If you want 'F, A>?' to be a super-bounded type, note that the inverted type 'F, A>?' must then satisfy its bounds, which it does not. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// - 'Object' is from 'dart:core'. +// foo7a([F, A>? x]) {} +// ^ +// +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:48:8: Error: Inferred type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// Try specifying type arguments explicitly so that they conform to the bounds. +// foo7b([F? x]) {} +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F, Y extends A> = X Function(Y); +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:48:8: Context: If you want 'F, A>?' to be a super-bounded type, note that the inverted type 'F, A>?' must then satisfy its bounds, which it does not. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// - 'Object' is from 'dart:core'. +// foo7b([F? x]) {} +// ^ +// +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:54:6: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'B'. +// Try changing type arguments so that they conform to the bounds. +// bar1(B x) {} // ^ // pkg/front_end/testcases/nnbd/super_bounded_hint.dart:52:9: Context: This is the type variable whose bound isn't conformed to. // class B {} // ^ // -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:58:12: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'B'. -// Try changing type arguments so that they conform to the bounds. -// class Bar3> {} -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:52:9: Context: This is the type variable whose bound isn't conformed to. -// class B {} -// ^ -// -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:60:12: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'B' in the return type. +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:60:1: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'B'. // Try changing type arguments so that they conform to the bounds. // B bar4() => throw 42; -// ^ +// ^ // pkg/front_end/testcases/nnbd/super_bounded_hint.dart:52:9: Context: This is the type variable whose bound isn't conformed to. // class B {} // ^ // -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:62:23: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'B'. +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:62:16: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'B'. // Try changing type arguments so that they conform to the bounds. // bar5({required B x}) {} -// ^ +// ^ // pkg/front_end/testcases/nnbd/super_bounded_hint.dart:52:9: Context: This is the type variable whose bound isn't conformed to. // class B {} // ^ // -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:76:15: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'B'. +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:76:7: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'B'. // Try changing type arguments so that they conform to the bounds. // bar7([B? x]) {} -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:52:9: Context: This is the type variable whose bound isn't conformed to. -// class B {} -// ^ -// -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:78:7: Error: Type argument 'dynamic' doesn't conform to the bound 'int' of the type variable 'X' on 'B' in the supertype 'B' of class 'Bar8'. -// Try changing type arguments so that they conform to the bounds. -// class Bar8 extends B {} // ^ // pkg/front_end/testcases/nnbd/super_bounded_hint.dart:52:9: Context: This is the type variable whose bound isn't conformed to. // class B {} // ^ // -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:28:27: Error: Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:78:20: Error: Type argument 'dynamic' doesn't conform to the bound 'int' of the type variable 'X' on 'B'. // Try changing type arguments so that they conform to the bounds. -// F, A> x; -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. -// typedef F, Y extends A> = X Function(Y); -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:28:27: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// - 'Object' is from 'dart:core'. -// F, A> x; -// ^ -// -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:29:32: Error: Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// Try changing type arguments so that they conform to the bounds. -// for (F, A> x in []) {} -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. -// typedef F, Y extends A> = X Function(Y); -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:29:32: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// - 'Object' is from 'dart:core'. -// for (F, A> x in []) {} -// ^ -// -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:29:37: Error: Inferred type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// Try specifying type arguments explicitly so that they conform to the bounds. -// for (F, A> x in []) {} -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. -// typedef F, Y extends A> = X Function(Y); -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:29:37: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// - 'Object' is from 'dart:core'. -// for (F, A> x in []) {} -// ^ -// -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:30:35: Error: Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// Try changing type arguments so that they conform to the bounds. -// fooFoo1(F, A> x) {} -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. -// typedef F, Y extends A> = X Function(Y); -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:30:35: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// - 'Object' is from 'dart:core'. -// fooFoo1(F, A> x) {} -// ^ -// -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:31:11: Error: Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// Try changing type arguments so that they conform to the bounds. -// fooFoo2, A>>() {} -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. -// typedef F, Y extends A> = X Function(Y); -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:31:11: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// - 'Object' is from 'dart:core'. -// fooFoo2, A>>() {} -// ^ -// -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:32:34: Error: Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F' in the return type. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// Try changing type arguments so that they conform to the bounds. -// F, A> fooFoo4() => throw 42; -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. -// typedef F, Y extends A> = X Function(Y); -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:32:34: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// - 'Object' is from 'dart:core'. -// F, A> fooFoo4() => throw 42; -// ^ -// -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:33:45: Error: Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// Try changing type arguments so that they conform to the bounds. -// fooFoo5({required F, A> x}) {} -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. -// typedef F, Y extends A> = X Function(Y); -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:33:45: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// - 'Object' is from 'dart:core'. -// fooFoo5({required F, A> x}) {} -// ^ -// -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:34:37: Error: Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// Try changing type arguments so that they conform to the bounds. -// fooFoo7([F, A>? x]) {} -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. -// typedef F, Y extends A> = X Function(Y); -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:34:37: Context: If you want 'F, A>?' to be a super-bounded type, note that the inverted type 'F, A>?' must then satisfy its bounds, which it does not. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// - 'Object' is from 'dart:core'. -// fooFoo7([F, A>? x]) {} -// ^ -// -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:38:5: Error: Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// Try changing type arguments so that they conform to the bounds. -// F x; -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. -// typedef F, Y extends A> = X Function(Y); -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:38:5: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// - 'Object' is from 'dart:core'. -// F x; -// ^ -// -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:39:10: Error: Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// Try changing type arguments so that they conform to the bounds. -// for (F x in []) {} -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. -// typedef F, Y extends A> = X Function(Y); -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:39:10: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// - 'Object' is from 'dart:core'. -// for (F x in []) {} -// ^ -// -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:39:15: Error: Inferred type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// Try specifying type arguments explicitly so that they conform to the bounds. -// for (F x in []) {} -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. -// typedef F, Y extends A> = X Function(Y); -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:39:15: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// - 'Object' is from 'dart:core'. -// for (F x in []) {} -// ^ -// -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:40:13: Error: Inferred type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// Try specifying type arguments explicitly so that they conform to the bounds. -// fooFoo1(F x) {} -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. -// typedef F, Y extends A> = X Function(Y); -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:40:13: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// - 'Object' is from 'dart:core'. -// fooFoo1(F x) {} -// ^ -// -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:41:11: Error: Inferred type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// Try specifying type arguments explicitly so that they conform to the bounds. -// fooFoo2() {} -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. -// typedef F, Y extends A> = X Function(Y); -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:41:11: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// - 'Object' is from 'dart:core'. -// fooFoo2() {} -// ^ -// -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:42:12: Error: Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F' in the return type. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// Try changing type arguments so that they conform to the bounds. -// F fooFoo4() => throw 42; -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. -// typedef F, Y extends A> = X Function(Y); -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:42:12: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// - 'Object' is from 'dart:core'. -// F fooFoo4() => throw 42; -// ^ -// -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:43:23: Error: Inferred type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// Try specifying type arguments explicitly so that they conform to the bounds. -// fooFoo5({required F x}) {} -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. -// typedef F, Y extends A> = X Function(Y); -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:43:23: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// - 'Object' is from 'dart:core'. -// fooFoo5({required F x}) {} -// ^ -// -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:44:15: Error: Inferred type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// Try specifying type arguments explicitly so that they conform to the bounds. -// fooFoo7([F? x]) {} -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. -// typedef F, Y extends A> = X Function(Y); -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:44:15: Context: If you want 'F, A>?' to be a super-bounded type, note that the inverted type 'F, A>?' must then satisfy its bounds, which it does not. -// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. -// - 'Object' is from 'dart:core'. -// fooFoo7([F? x]) {} -// ^ -// -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:65:10: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'B'. -// Try changing type arguments so that they conform to the bounds. -// B x; -// ^ +// class Bar8 extends B {} +// ^ // pkg/front_end/testcases/nnbd/super_bounded_hint.dart:52:9: Context: This is the type variable whose bound isn't conformed to. // class B {} // ^ // -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:66:15: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'B'. +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:28:3: Error: Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. // Try changing type arguments so that they conform to the bounds. -// for (B x in []) {} -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:52:9: Context: This is the type variable whose bound isn't conformed to. -// class B {} -// ^ +// F, A> x; +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F, Y extends A> = X Function(Y); +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:28:3: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// - 'Object' is from 'dart:core'. +// F, A> x; +// ^ +// +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:29:8: Error: Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// Try changing type arguments so that they conform to the bounds. +// for (F, A> x in []) {} +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F, Y extends A> = X Function(Y); +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:29:8: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// - 'Object' is from 'dart:core'. +// for (F, A> x in []) {} +// ^ +// +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:30:11: Error: Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// Try changing type arguments so that they conform to the bounds. +// fooFoo1(F, A> x) {} +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F, Y extends A> = X Function(Y); +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:30:11: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// - 'Object' is from 'dart:core'. +// fooFoo1(F, A> x) {} +// ^ +// +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:31:21: Error: Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// Try changing type arguments so that they conform to the bounds. +// fooFoo2, A>>() {} +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F, Y extends A> = X Function(Y); +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:31:21: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// - 'Object' is from 'dart:core'. +// fooFoo2, A>>() {} +// ^ +// +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:32:3: Error: Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// Try changing type arguments so that they conform to the bounds. +// F, A> fooFoo4() => throw 42; +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F, Y extends A> = X Function(Y); +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:32:3: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// - 'Object' is from 'dart:core'. +// F, A> fooFoo4() => throw 42; +// ^ +// +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:33:21: Error: Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// Try changing type arguments so that they conform to the bounds. +// fooFoo5({required F, A> x}) {} +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F, Y extends A> = X Function(Y); +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:33:21: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// - 'Object' is from 'dart:core'. +// fooFoo5({required F, A> x}) {} +// ^ +// +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:34:12: Error: Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// Try changing type arguments so that they conform to the bounds. +// fooFoo7([F, A>? x]) {} +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F, Y extends A> = X Function(Y); +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:34:12: Context: If you want 'F, A>?' to be a super-bounded type, note that the inverted type 'F, A>?' must then satisfy its bounds, which it does not. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// - 'Object' is from 'dart:core'. +// fooFoo7([F, A>? x]) {} +// ^ +// +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:38:3: Error: Inferred type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// Try specifying type arguments explicitly so that they conform to the bounds. +// F x; +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F, Y extends A> = X Function(Y); +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:38:3: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// - 'Object' is from 'dart:core'. +// F x; +// ^ +// +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:39:8: Error: Inferred type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// Try specifying type arguments explicitly so that they conform to the bounds. +// for (F x in []) {} +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F, Y extends A> = X Function(Y); +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:39:8: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// - 'Object' is from 'dart:core'. +// for (F x in []) {} +// ^ +// +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:40:11: Error: Inferred type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// Try specifying type arguments explicitly so that they conform to the bounds. +// fooFoo1(F x) {} +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F, Y extends A> = X Function(Y); +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:40:11: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// - 'Object' is from 'dart:core'. +// fooFoo1(F x) {} +// ^ +// +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:41:21: Error: Inferred type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// Try specifying type arguments explicitly so that they conform to the bounds. +// fooFoo2() {} +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F, Y extends A> = X Function(Y); +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:41:21: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// - 'Object' is from 'dart:core'. +// fooFoo2() {} +// ^ +// +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:42:3: Error: Inferred type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// Try specifying type arguments explicitly so that they conform to the bounds. +// F fooFoo4() => throw 42; +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F, Y extends A> = X Function(Y); +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:42:3: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// - 'Object' is from 'dart:core'. +// F fooFoo4() => throw 42; +// ^ +// +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:43:21: Error: Inferred type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// Try specifying type arguments explicitly so that they conform to the bounds. +// fooFoo5({required F x}) {} +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F, Y extends A> = X Function(Y); +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:43:21: Context: If you want 'F, A>' to be a super-bounded type, note that the inverted type 'F, A>' must then satisfy its bounds, which it does not. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// - 'Object' is from 'dart:core'. +// fooFoo5({required F x}) {} +// ^ +// +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:44:12: Error: Inferred type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'F'. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// Try specifying type arguments explicitly so that they conform to the bounds. +// fooFoo7([F? x]) {} +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:9:11: Context: This is the type variable whose bound isn't conformed to. +// typedef F, Y extends A> = X Function(Y); +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:44:12: Context: If you want 'F, A>?' to be a super-bounded type, note that the inverted type 'F, A>?' must then satisfy its bounds, which it does not. +// - 'A' is from 'pkg/front_end/testcases/nnbd/super_bounded_hint.dart'. +// - 'Object' is from 'dart:core'. +// fooFoo7([F? x]) {} +// ^ // // pkg/front_end/testcases/nnbd/super_bounded_hint.dart:72:7: Error: Type argument 'dynamic' doesn't conform to the bound 'int' of the type variable 'X' on 'B'. // Try changing type arguments so that they conform to the bounds. @@ -476,50 +446,58 @@ library /*isNonNullableByDefault*/; // class B {} // ^ // -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:66:20: Error: Inferred type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'B'. -// Try specifying type arguments explicitly so that they conform to the bounds. -// for (B x in []) {} -// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:65:3: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'B'. +// Try changing type arguments so that they conform to the bounds. +// B x; +// ^ // pkg/front_end/testcases/nnbd/super_bounded_hint.dart:52:9: Context: This is the type variable whose bound isn't conformed to. // class B {} // ^ // -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:67:18: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'B'. +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:66:8: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'B'. +// Try changing type arguments so that they conform to the bounds. +// for (B x in []) {} +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:52:9: Context: This is the type variable whose bound isn't conformed to. +// class B {} +// ^ +// +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:67:11: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'B'. // Try changing type arguments so that they conform to the bounds. // barBar1(B x) {} -// ^ -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:52:9: Context: This is the type variable whose bound isn't conformed to. -// class B {} -// ^ -// -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:68:11: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'B'. -// Try changing type arguments so that they conform to the bounds. -// barBar2>() {} // ^ // pkg/front_end/testcases/nnbd/super_bounded_hint.dart:52:9: Context: This is the type variable whose bound isn't conformed to. // class B {} // ^ // -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:69:17: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'B' in the return type. +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:68:21: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'B'. +// Try changing type arguments so that they conform to the bounds. +// barBar2>() {} +// ^ +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:52:9: Context: This is the type variable whose bound isn't conformed to. +// class B {} +// ^ +// +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:69:3: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'B'. // Try changing type arguments so that they conform to the bounds. // B barBar4() => throw 42; -// ^ +// ^ // pkg/front_end/testcases/nnbd/super_bounded_hint.dart:52:9: Context: This is the type variable whose bound isn't conformed to. // class B {} // ^ // -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:70:28: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'B'. +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:70:21: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'B'. // Try changing type arguments so that they conform to the bounds. // barBar5({required B x}) {} -// ^ +// ^ // pkg/front_end/testcases/nnbd/super_bounded_hint.dart:52:9: Context: This is the type variable whose bound isn't conformed to. // class B {} // ^ // -// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:71:20: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'B'. +// pkg/front_end/testcases/nnbd/super_bounded_hint.dart:71:12: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'X' on 'B'. // Try changing type arguments so that they conform to the bounds. // barBar7([B? x]) {} -// ^ +// ^ // pkg/front_end/testcases/nnbd/super_bounded_hint.dart:52:9: Context: This is the type variable whose bound isn't conformed to. // class B {} // ^ diff --git a/pkg/front_end/testcases/nnbd_mixed/default_type_from_opt_in/main.dart b/pkg/front_end/testcases/nnbd_mixed/default_type_from_opt_in/main.dart new file mode 100644 index 00000000000..cb147572936 --- /dev/null +++ b/pkg/front_end/testcases/nnbd_mixed/default_type_from_opt_in/main.dart @@ -0,0 +1,13 @@ +// Copyright (c) 2022, 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 'main_lib1.dart'; +import 'main_lib2.dart'; + +method1(Class1 c1a, List c1b, Class2 c2a, List c2b) {} +method2(Typedef1 t1a, List t1b, Typedef2 t2a, List t2b) {} + +main() {} diff --git a/pkg/front_end/testcases/nnbd_mixed/default_type_from_opt_in/main.dart.textual_outline.expect b/pkg/front_end/testcases/nnbd_mixed/default_type_from_opt_in/main.dart.textual_outline.expect new file mode 100644 index 00000000000..535336352d8 --- /dev/null +++ b/pkg/front_end/testcases/nnbd_mixed/default_type_from_opt_in/main.dart.textual_outline.expect @@ -0,0 +1,7 @@ +// @dart = 2.9 +import 'main_lib1.dart'; +import 'main_lib2.dart'; + +method1(Class1 c1a, List c1b, Class2 c2a, List c2b) {} +method2(Typedef1 t1a, List t1b, Typedef2 t2a, List t2b) {} +main() {} diff --git a/pkg/front_end/testcases/nnbd_mixed/default_type_from_opt_in/main.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/nnbd_mixed/default_type_from_opt_in/main.dart.textual_outline_modelled.expect new file mode 100644 index 00000000000..914bd7f90f4 --- /dev/null +++ b/pkg/front_end/testcases/nnbd_mixed/default_type_from_opt_in/main.dart.textual_outline_modelled.expect @@ -0,0 +1,7 @@ +// @dart = 2.9 +import 'main_lib1.dart'; +import 'main_lib2.dart'; + +main() {} +method1(Class1 c1a, List c1b, Class2 c2a, List c2b) {} +method2(Typedef1 t1a, List t1b, Typedef2 t2a, List t2b) {} diff --git a/pkg/front_end/testcases/nnbd_mixed/default_type_from_opt_in/main.dart.weak.expect b/pkg/front_end/testcases/nnbd_mixed/default_type_from_opt_in/main.dart.weak.expect new file mode 100644 index 00000000000..52f6f7f1a86 --- /dev/null +++ b/pkg/front_end/testcases/nnbd_mixed/default_type_from_opt_in/main.dart.weak.expect @@ -0,0 +1,38 @@ +library; +import self as self; +import "main_lib1.dart" as mai; +import "dart:core" as core; +import "main_lib2.dart" as mai2; + +import "org-dartlang-testcase:///main_lib1.dart"; +import "org-dartlang-testcase:///main_lib2.dart"; + +static method method1(mai::Class1* c1a, core::List*>* c1b, mai2::Class2* c2a, core::List*>* c2b) → dynamic {} +static method method2(mai::Class1* t1a, core::List*>* t1b, mai2::Class2* t2a, core::List*>* t2b) → dynamic {} +static method main() → dynamic {} + +library /*isNonNullableByDefault*/; +import self as mai; +import "dart:core" as core; + +typedef Typedef1 = mai::Class1; +class Class1 extends core::Object { + synthetic constructor •() → mai::Class1 + : super core::Object::•() + ; +} +static method _#Typedef1#new#tearOff() → mai::Class1 + return new mai::Class1::•(); + +library /*isNonNullableByDefault*/; +import self as mai2; +import "dart:core" as core; + +typedef Typedef2 = mai2::Class2; +class Class2 extends core::Object { + synthetic constructor •() → mai2::Class2 + : super core::Object::•() + ; +} +static method _#Typedef2#new#tearOff() → mai2::Class2 + return new mai2::Class2::•(); diff --git a/pkg/front_end/testcases/nnbd_mixed/default_type_from_opt_in/main.dart.weak.modular.expect b/pkg/front_end/testcases/nnbd_mixed/default_type_from_opt_in/main.dart.weak.modular.expect new file mode 100644 index 00000000000..8313d949177 --- /dev/null +++ b/pkg/front_end/testcases/nnbd_mixed/default_type_from_opt_in/main.dart.weak.modular.expect @@ -0,0 +1,25 @@ +library; +import self as self; +import "main_lib1.dart" as mai; +import "dart:core" as core; +import "main_lib2.dart" as mai2; + +import "org-dartlang-testcase:///main_lib1.dart"; +import "org-dartlang-testcase:///main_lib2.dart"; + +static method method1(mai::Class1* c1a, core::List*>* c1b, mai2::Class2* c2a, core::List*>* c2b) → dynamic {} +static method method2(mai::Class1* t1a, core::List*>* t1b, mai2::Class2* t2a, core::List*>* t2b) → dynamic {} +static method main() → dynamic {} + +library /*isNonNullableByDefault*/; +import self as mai; +import "dart:core" as core; + +typedef Typedef1 = mai::Class1; +class Class1 extends core::Object { + synthetic constructor •() → mai::Class1 + : super core::Object::•() + ; +} +static method _#Typedef1#new#tearOff() → mai::Class1 + return new mai::Class1::•(); diff --git a/pkg/front_end/testcases/nnbd_mixed/default_type_from_opt_in/main.dart.weak.outline.expect b/pkg/front_end/testcases/nnbd_mixed/default_type_from_opt_in/main.dart.weak.outline.expect new file mode 100644 index 00000000000..357068be23b --- /dev/null +++ b/pkg/front_end/testcases/nnbd_mixed/default_type_from_opt_in/main.dart.weak.outline.expect @@ -0,0 +1,39 @@ +library; +import self as self; +import "main_lib1.dart" as mai; +import "dart:core" as core; +import "main_lib2.dart" as mai2; + +import "org-dartlang-testcase:///main_lib1.dart"; +import "org-dartlang-testcase:///main_lib2.dart"; + +static method method1(mai::Class1* c1a, core::List*>* c1b, mai2::Class2* c2a, core::List*>* c2b) → dynamic + ; +static method method2(mai::Class1* t1a, core::List*>* t1b, mai2::Class2* t2a, core::List*>* t2b) → dynamic + ; +static method main() → dynamic + ; + +library /*isNonNullableByDefault*/; +import self as mai; +import "dart:core" as core; + +typedef Typedef1 = mai::Class1; +class Class1 extends core::Object { + synthetic constructor •() → mai::Class1 + ; +} +static method _#Typedef1#new#tearOff() → mai::Class1 + return new mai::Class1::•(); + +library /*isNonNullableByDefault*/; +import self as mai2; +import "dart:core" as core; + +typedef Typedef2 = mai2::Class2; +class Class2 extends core::Object { + synthetic constructor •() → mai2::Class2 + ; +} +static method _#Typedef2#new#tearOff() → mai2::Class2 + return new mai2::Class2::•(); diff --git a/pkg/front_end/testcases/nnbd_mixed/default_type_from_opt_in/main.dart.weak.transformed.expect b/pkg/front_end/testcases/nnbd_mixed/default_type_from_opt_in/main.dart.weak.transformed.expect new file mode 100644 index 00000000000..52f6f7f1a86 --- /dev/null +++ b/pkg/front_end/testcases/nnbd_mixed/default_type_from_opt_in/main.dart.weak.transformed.expect @@ -0,0 +1,38 @@ +library; +import self as self; +import "main_lib1.dart" as mai; +import "dart:core" as core; +import "main_lib2.dart" as mai2; + +import "org-dartlang-testcase:///main_lib1.dart"; +import "org-dartlang-testcase:///main_lib2.dart"; + +static method method1(mai::Class1* c1a, core::List*>* c1b, mai2::Class2* c2a, core::List*>* c2b) → dynamic {} +static method method2(mai::Class1* t1a, core::List*>* t1b, mai2::Class2* t2a, core::List*>* t2b) → dynamic {} +static method main() → dynamic {} + +library /*isNonNullableByDefault*/; +import self as mai; +import "dart:core" as core; + +typedef Typedef1 = mai::Class1; +class Class1 extends core::Object { + synthetic constructor •() → mai::Class1 + : super core::Object::•() + ; +} +static method _#Typedef1#new#tearOff() → mai::Class1 + return new mai::Class1::•(); + +library /*isNonNullableByDefault*/; +import self as mai2; +import "dart:core" as core; + +typedef Typedef2 = mai2::Class2; +class Class2 extends core::Object { + synthetic constructor •() → mai2::Class2 + : super core::Object::•() + ; +} +static method _#Typedef2#new#tearOff() → mai2::Class2 + return new mai2::Class2::•(); diff --git a/pkg/front_end/testcases/nnbd_mixed/default_type_from_opt_in/main_lib1.dart b/pkg/front_end/testcases/nnbd_mixed/default_type_from_opt_in/main_lib1.dart new file mode 100644 index 00000000000..56b80280226 --- /dev/null +++ b/pkg/front_end/testcases/nnbd_mixed/default_type_from_opt_in/main_lib1.dart @@ -0,0 +1,7 @@ +// Copyright (c) 2022, 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. + +class Class1 {} + +typedef Typedef1 = Class1; diff --git a/pkg/front_end/testcases/nnbd_mixed/default_type_from_opt_in/main_lib2.dart b/pkg/front_end/testcases/nnbd_mixed/default_type_from_opt_in/main_lib2.dart new file mode 100644 index 00000000000..6ec94dd0eca --- /dev/null +++ b/pkg/front_end/testcases/nnbd_mixed/default_type_from_opt_in/main_lib2.dart @@ -0,0 +1,7 @@ +// Copyright (c) 2022, 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. + +class Class2 {} + +typedef Typedef2 = Class2; diff --git a/pkg/front_end/testcases/nnbd_mixed/default_type_from_opt_in/test.options b/pkg/front_end/testcases/nnbd_mixed/default_type_from_opt_in/test.options new file mode 100644 index 00000000000..8400751aefe --- /dev/null +++ b/pkg/front_end/testcases/nnbd_mixed/default_type_from_opt_in/test.options @@ -0,0 +1 @@ +main_lib2.dart \ No newline at end of file diff --git a/pkg/front_end/testcases/nnbd_mixed/super_access/main.dart.weak.expect b/pkg/front_end/testcases/nnbd_mixed/super_access/main.dart.weak.expect index 6bf247ed673..6ff4604ff3a 100644 --- a/pkg/front_end/testcases/nnbd_mixed/super_access/main.dart.weak.expect +++ b/pkg/front_end/testcases/nnbd_mixed/super_access/main.dart.weak.expect @@ -2,7 +2,6 @@ library; import self as self; import "dart:core" as core; import "main_lib1.dart" as mai; -import "main_lib2.dart" as mai2; import "org-dartlang-testcase:///main_lib1.dart"; import "org-dartlang-testcase:///main_lib2.dart"; diff --git a/pkg/front_end/testcases/nnbd_mixed/super_access/main.dart.weak.modular.expect b/pkg/front_end/testcases/nnbd_mixed/super_access/main.dart.weak.modular.expect index 864208bfc83..9067a8adb99 100644 --- a/pkg/front_end/testcases/nnbd_mixed/super_access/main.dart.weak.modular.expect +++ b/pkg/front_end/testcases/nnbd_mixed/super_access/main.dart.weak.modular.expect @@ -2,7 +2,6 @@ library; import self as self; import "dart:core" as core; import "main_lib1.dart" as mai; -import "main_lib2.dart" as mai2; import "org-dartlang-testcase:///main_lib1.dart"; import "org-dartlang-testcase:///main_lib2.dart"; diff --git a/pkg/front_end/testcases/nnbd_mixed/super_access/main.dart.weak.outline.expect b/pkg/front_end/testcases/nnbd_mixed/super_access/main.dart.weak.outline.expect index 7f83539f209..8bb74bf7145 100644 --- a/pkg/front_end/testcases/nnbd_mixed/super_access/main.dart.weak.outline.expect +++ b/pkg/front_end/testcases/nnbd_mixed/super_access/main.dart.weak.outline.expect @@ -2,7 +2,6 @@ library; import self as self; import "dart:core" as core; import "main_lib1.dart" as mai; -import "main_lib2.dart" as mai2; import "org-dartlang-testcase:///main_lib1.dart"; import "org-dartlang-testcase:///main_lib2.dart"; diff --git a/pkg/front_end/testcases/nnbd_mixed/super_access/main.dart.weak.transformed.expect b/pkg/front_end/testcases/nnbd_mixed/super_access/main.dart.weak.transformed.expect index 2a72e6aff3e..336a50ef6cc 100644 --- a/pkg/front_end/testcases/nnbd_mixed/super_access/main.dart.weak.transformed.expect +++ b/pkg/front_end/testcases/nnbd_mixed/super_access/main.dart.weak.transformed.expect @@ -2,7 +2,6 @@ library; import self as self; import "dart:core" as core; import "main_lib1.dart" as mai; -import "main_lib2.dart" as mai2; import "org-dartlang-testcase:///main_lib1.dart"; import "org-dartlang-testcase:///main_lib2.dart"; diff --git a/pkg/front_end/testcases/nnbd_mixed/super_access/main.no_link.dart.weak.expect b/pkg/front_end/testcases/nnbd_mixed/super_access/main.no_link.dart.weak.expect index 6bf247ed673..6ff4604ff3a 100644 --- a/pkg/front_end/testcases/nnbd_mixed/super_access/main.no_link.dart.weak.expect +++ b/pkg/front_end/testcases/nnbd_mixed/super_access/main.no_link.dart.weak.expect @@ -2,7 +2,6 @@ library; import self as self; import "dart:core" as core; import "main_lib1.dart" as mai; -import "main_lib2.dart" as mai2; import "org-dartlang-testcase:///main_lib1.dart"; import "org-dartlang-testcase:///main_lib2.dart"; diff --git a/pkg/front_end/testcases/nnbd_mixed/super_access/main.no_link.dart.weak.modular.expect b/pkg/front_end/testcases/nnbd_mixed/super_access/main.no_link.dart.weak.modular.expect index 6bf247ed673..6ff4604ff3a 100644 --- a/pkg/front_end/testcases/nnbd_mixed/super_access/main.no_link.dart.weak.modular.expect +++ b/pkg/front_end/testcases/nnbd_mixed/super_access/main.no_link.dart.weak.modular.expect @@ -2,7 +2,6 @@ library; import self as self; import "dart:core" as core; import "main_lib1.dart" as mai; -import "main_lib2.dart" as mai2; import "org-dartlang-testcase:///main_lib1.dart"; import "org-dartlang-testcase:///main_lib2.dart"; diff --git a/pkg/front_end/testcases/nnbd_mixed/super_access/main.no_link.dart.weak.outline.expect b/pkg/front_end/testcases/nnbd_mixed/super_access/main.no_link.dart.weak.outline.expect index 7f83539f209..8bb74bf7145 100644 --- a/pkg/front_end/testcases/nnbd_mixed/super_access/main.no_link.dart.weak.outline.expect +++ b/pkg/front_end/testcases/nnbd_mixed/super_access/main.no_link.dart.weak.outline.expect @@ -2,7 +2,6 @@ library; import self as self; import "dart:core" as core; import "main_lib1.dart" as mai; -import "main_lib2.dart" as mai2; import "org-dartlang-testcase:///main_lib1.dart"; import "org-dartlang-testcase:///main_lib2.dart"; diff --git a/pkg/front_end/testcases/nnbd_mixed/super_access/main.no_link.dart.weak.transformed.expect b/pkg/front_end/testcases/nnbd_mixed/super_access/main.no_link.dart.weak.transformed.expect index 2a72e6aff3e..336a50ef6cc 100644 --- a/pkg/front_end/testcases/nnbd_mixed/super_access/main.no_link.dart.weak.transformed.expect +++ b/pkg/front_end/testcases/nnbd_mixed/super_access/main.no_link.dart.weak.transformed.expect @@ -2,7 +2,6 @@ library; import self as self; import "dart:core" as core; import "main_lib1.dart" as mai; -import "main_lib2.dart" as mai2; import "org-dartlang-testcase:///main_lib1.dart"; import "org-dartlang-testcase:///main_lib2.dart"; diff --git a/pkg/front_end/testcases/nonfunction_type_aliases/issue45519.dart.strong.expect b/pkg/front_end/testcases/nonfunction_type_aliases/issue45519.dart.strong.expect index 1722631ce4b..929831e97e5 100644 --- a/pkg/front_end/testcases/nonfunction_type_aliases/issue45519.dart.strong.expect +++ b/pkg/front_end/testcases/nonfunction_type_aliases/issue45519.dart.strong.expect @@ -2,7 +2,7 @@ library /*isNonNullableByDefault*/; // // Problems in library: // -// pkg/front_end/testcases/nonfunction_type_aliases/issue45519.dart:13:3: Error: Inferred type argument 'C Function(C)' doesn't conform to the bound 'C Function(C)' of the type variable 'X' on 'A'. +// pkg/front_end/testcases/nonfunction_type_aliases/issue45519.dart:13:3: Error: Inferred type argument 'G>' doesn't conform to the bound 'C Function(C)' of the type variable 'X' on 'A'. // - 'C' is from 'pkg/front_end/testcases/nonfunction_type_aliases/issue45519.dart'. // Try specifying type arguments explicitly so that they conform to the bounds. // A a = throw 42; // Error. @@ -10,11 +10,23 @@ library /*isNonNullableByDefault*/; // pkg/front_end/testcases/nonfunction_type_aliases/issue45519.dart:7:11: Context: This is the type variable whose bound isn't conformed to. // typedef A>> = C; // ^ -// pkg/front_end/testcases/nonfunction_type_aliases/issue45519.dart:13:3: Context: If you want 'A Function(C)>' to be a super-bounded type, note that the inverted type 'A>>' must then satisfy its bounds, which it does not. +// pkg/front_end/testcases/nonfunction_type_aliases/issue45519.dart:13:3: Context: If you want 'A>>' to be a super-bounded type, note that the inverted type 'A>>' must then satisfy its bounds, which it does not. // - 'C' is from 'pkg/front_end/testcases/nonfunction_type_aliases/issue45519.dart'. // A a = throw 42; // Error. // ^ // +// pkg/front_end/testcases/nonfunction_type_aliases/issue45519.dart:14:3: Error: Inferred type argument 'H' doesn't conform to the bound 'C' of the type variable 'X' on 'B'. +// - 'C' is from 'pkg/front_end/testcases/nonfunction_type_aliases/issue45519.dart'. +// Try specifying type arguments explicitly so that they conform to the bounds. +// B b = throw 42; // Error. +// ^ +// pkg/front_end/testcases/nonfunction_type_aliases/issue45519.dart:10:11: Context: This is the type variable whose bound isn't conformed to. +// typedef B> = C; +// ^ +// pkg/front_end/testcases/nonfunction_type_aliases/issue45519.dart:14:3: Context: If you want 'B>' to be a super-bounded type, note that the inverted type 'B>' must then satisfy its bounds, which it does not. +// B b = throw 42; // Error. +// ^ +// import self as self; import "dart:core" as core; diff --git a/pkg/front_end/testcases/nonfunction_type_aliases/issue45519.dart.strong.transformed.expect b/pkg/front_end/testcases/nonfunction_type_aliases/issue45519.dart.strong.transformed.expect index 1722631ce4b..929831e97e5 100644 --- a/pkg/front_end/testcases/nonfunction_type_aliases/issue45519.dart.strong.transformed.expect +++ b/pkg/front_end/testcases/nonfunction_type_aliases/issue45519.dart.strong.transformed.expect @@ -2,7 +2,7 @@ library /*isNonNullableByDefault*/; // // Problems in library: // -// pkg/front_end/testcases/nonfunction_type_aliases/issue45519.dart:13:3: Error: Inferred type argument 'C Function(C)' doesn't conform to the bound 'C Function(C)' of the type variable 'X' on 'A'. +// pkg/front_end/testcases/nonfunction_type_aliases/issue45519.dart:13:3: Error: Inferred type argument 'G>' doesn't conform to the bound 'C Function(C)' of the type variable 'X' on 'A'. // - 'C' is from 'pkg/front_end/testcases/nonfunction_type_aliases/issue45519.dart'. // Try specifying type arguments explicitly so that they conform to the bounds. // A a = throw 42; // Error. @@ -10,11 +10,23 @@ library /*isNonNullableByDefault*/; // pkg/front_end/testcases/nonfunction_type_aliases/issue45519.dart:7:11: Context: This is the type variable whose bound isn't conformed to. // typedef A>> = C; // ^ -// pkg/front_end/testcases/nonfunction_type_aliases/issue45519.dart:13:3: Context: If you want 'A Function(C)>' to be a super-bounded type, note that the inverted type 'A>>' must then satisfy its bounds, which it does not. +// pkg/front_end/testcases/nonfunction_type_aliases/issue45519.dart:13:3: Context: If you want 'A>>' to be a super-bounded type, note that the inverted type 'A>>' must then satisfy its bounds, which it does not. // - 'C' is from 'pkg/front_end/testcases/nonfunction_type_aliases/issue45519.dart'. // A a = throw 42; // Error. // ^ // +// pkg/front_end/testcases/nonfunction_type_aliases/issue45519.dart:14:3: Error: Inferred type argument 'H' doesn't conform to the bound 'C' of the type variable 'X' on 'B'. +// - 'C' is from 'pkg/front_end/testcases/nonfunction_type_aliases/issue45519.dart'. +// Try specifying type arguments explicitly so that they conform to the bounds. +// B b = throw 42; // Error. +// ^ +// pkg/front_end/testcases/nonfunction_type_aliases/issue45519.dart:10:11: Context: This is the type variable whose bound isn't conformed to. +// typedef B> = C; +// ^ +// pkg/front_end/testcases/nonfunction_type_aliases/issue45519.dart:14:3: Context: If you want 'B>' to be a super-bounded type, note that the inverted type 'B>' must then satisfy its bounds, which it does not. +// B b = throw 42; // Error. +// ^ +// import self as self; import "dart:core" as core; diff --git a/pkg/front_end/testcases/nonfunction_type_aliases/issue45519.dart.weak.expect b/pkg/front_end/testcases/nonfunction_type_aliases/issue45519.dart.weak.expect index 1722631ce4b..929831e97e5 100644 --- a/pkg/front_end/testcases/nonfunction_type_aliases/issue45519.dart.weak.expect +++ b/pkg/front_end/testcases/nonfunction_type_aliases/issue45519.dart.weak.expect @@ -2,7 +2,7 @@ library /*isNonNullableByDefault*/; // // Problems in library: // -// pkg/front_end/testcases/nonfunction_type_aliases/issue45519.dart:13:3: Error: Inferred type argument 'C Function(C)' doesn't conform to the bound 'C Function(C)' of the type variable 'X' on 'A'. +// pkg/front_end/testcases/nonfunction_type_aliases/issue45519.dart:13:3: Error: Inferred type argument 'G>' doesn't conform to the bound 'C Function(C)' of the type variable 'X' on 'A'. // - 'C' is from 'pkg/front_end/testcases/nonfunction_type_aliases/issue45519.dart'. // Try specifying type arguments explicitly so that they conform to the bounds. // A a = throw 42; // Error. @@ -10,11 +10,23 @@ library /*isNonNullableByDefault*/; // pkg/front_end/testcases/nonfunction_type_aliases/issue45519.dart:7:11: Context: This is the type variable whose bound isn't conformed to. // typedef A>> = C; // ^ -// pkg/front_end/testcases/nonfunction_type_aliases/issue45519.dart:13:3: Context: If you want 'A Function(C)>' to be a super-bounded type, note that the inverted type 'A>>' must then satisfy its bounds, which it does not. +// pkg/front_end/testcases/nonfunction_type_aliases/issue45519.dart:13:3: Context: If you want 'A>>' to be a super-bounded type, note that the inverted type 'A>>' must then satisfy its bounds, which it does not. // - 'C' is from 'pkg/front_end/testcases/nonfunction_type_aliases/issue45519.dart'. // A a = throw 42; // Error. // ^ // +// pkg/front_end/testcases/nonfunction_type_aliases/issue45519.dart:14:3: Error: Inferred type argument 'H' doesn't conform to the bound 'C' of the type variable 'X' on 'B'. +// - 'C' is from 'pkg/front_end/testcases/nonfunction_type_aliases/issue45519.dart'. +// Try specifying type arguments explicitly so that they conform to the bounds. +// B b = throw 42; // Error. +// ^ +// pkg/front_end/testcases/nonfunction_type_aliases/issue45519.dart:10:11: Context: This is the type variable whose bound isn't conformed to. +// typedef B> = C; +// ^ +// pkg/front_end/testcases/nonfunction_type_aliases/issue45519.dart:14:3: Context: If you want 'B>' to be a super-bounded type, note that the inverted type 'B>' must then satisfy its bounds, which it does not. +// B b = throw 42; // Error. +// ^ +// import self as self; import "dart:core" as core; diff --git a/pkg/front_end/testcases/nonfunction_type_aliases/issue45519.dart.weak.modular.expect b/pkg/front_end/testcases/nonfunction_type_aliases/issue45519.dart.weak.modular.expect index 1722631ce4b..929831e97e5 100644 --- a/pkg/front_end/testcases/nonfunction_type_aliases/issue45519.dart.weak.modular.expect +++ b/pkg/front_end/testcases/nonfunction_type_aliases/issue45519.dart.weak.modular.expect @@ -2,7 +2,7 @@ library /*isNonNullableByDefault*/; // // Problems in library: // -// pkg/front_end/testcases/nonfunction_type_aliases/issue45519.dart:13:3: Error: Inferred type argument 'C Function(C)' doesn't conform to the bound 'C Function(C)' of the type variable 'X' on 'A'. +// pkg/front_end/testcases/nonfunction_type_aliases/issue45519.dart:13:3: Error: Inferred type argument 'G>' doesn't conform to the bound 'C Function(C)' of the type variable 'X' on 'A'. // - 'C' is from 'pkg/front_end/testcases/nonfunction_type_aliases/issue45519.dart'. // Try specifying type arguments explicitly so that they conform to the bounds. // A a = throw 42; // Error. @@ -10,11 +10,23 @@ library /*isNonNullableByDefault*/; // pkg/front_end/testcases/nonfunction_type_aliases/issue45519.dart:7:11: Context: This is the type variable whose bound isn't conformed to. // typedef A>> = C; // ^ -// pkg/front_end/testcases/nonfunction_type_aliases/issue45519.dart:13:3: Context: If you want 'A Function(C)>' to be a super-bounded type, note that the inverted type 'A>>' must then satisfy its bounds, which it does not. +// pkg/front_end/testcases/nonfunction_type_aliases/issue45519.dart:13:3: Context: If you want 'A>>' to be a super-bounded type, note that the inverted type 'A>>' must then satisfy its bounds, which it does not. // - 'C' is from 'pkg/front_end/testcases/nonfunction_type_aliases/issue45519.dart'. // A a = throw 42; // Error. // ^ // +// pkg/front_end/testcases/nonfunction_type_aliases/issue45519.dart:14:3: Error: Inferred type argument 'H' doesn't conform to the bound 'C' of the type variable 'X' on 'B'. +// - 'C' is from 'pkg/front_end/testcases/nonfunction_type_aliases/issue45519.dart'. +// Try specifying type arguments explicitly so that they conform to the bounds. +// B b = throw 42; // Error. +// ^ +// pkg/front_end/testcases/nonfunction_type_aliases/issue45519.dart:10:11: Context: This is the type variable whose bound isn't conformed to. +// typedef B> = C; +// ^ +// pkg/front_end/testcases/nonfunction_type_aliases/issue45519.dart:14:3: Context: If you want 'B>' to be a super-bounded type, note that the inverted type 'B>' must then satisfy its bounds, which it does not. +// B b = throw 42; // Error. +// ^ +// import self as self; import "dart:core" as core; diff --git a/pkg/front_end/testcases/nonfunction_type_aliases/issue45519.dart.weak.transformed.expect b/pkg/front_end/testcases/nonfunction_type_aliases/issue45519.dart.weak.transformed.expect index 1722631ce4b..929831e97e5 100644 --- a/pkg/front_end/testcases/nonfunction_type_aliases/issue45519.dart.weak.transformed.expect +++ b/pkg/front_end/testcases/nonfunction_type_aliases/issue45519.dart.weak.transformed.expect @@ -2,7 +2,7 @@ library /*isNonNullableByDefault*/; // // Problems in library: // -// pkg/front_end/testcases/nonfunction_type_aliases/issue45519.dart:13:3: Error: Inferred type argument 'C Function(C)' doesn't conform to the bound 'C Function(C)' of the type variable 'X' on 'A'. +// pkg/front_end/testcases/nonfunction_type_aliases/issue45519.dart:13:3: Error: Inferred type argument 'G>' doesn't conform to the bound 'C Function(C)' of the type variable 'X' on 'A'. // - 'C' is from 'pkg/front_end/testcases/nonfunction_type_aliases/issue45519.dart'. // Try specifying type arguments explicitly so that they conform to the bounds. // A a = throw 42; // Error. @@ -10,11 +10,23 @@ library /*isNonNullableByDefault*/; // pkg/front_end/testcases/nonfunction_type_aliases/issue45519.dart:7:11: Context: This is the type variable whose bound isn't conformed to. // typedef A>> = C; // ^ -// pkg/front_end/testcases/nonfunction_type_aliases/issue45519.dart:13:3: Context: If you want 'A Function(C)>' to be a super-bounded type, note that the inverted type 'A>>' must then satisfy its bounds, which it does not. +// pkg/front_end/testcases/nonfunction_type_aliases/issue45519.dart:13:3: Context: If you want 'A>>' to be a super-bounded type, note that the inverted type 'A>>' must then satisfy its bounds, which it does not. // - 'C' is from 'pkg/front_end/testcases/nonfunction_type_aliases/issue45519.dart'. // A a = throw 42; // Error. // ^ // +// pkg/front_end/testcases/nonfunction_type_aliases/issue45519.dart:14:3: Error: Inferred type argument 'H' doesn't conform to the bound 'C' of the type variable 'X' on 'B'. +// - 'C' is from 'pkg/front_end/testcases/nonfunction_type_aliases/issue45519.dart'. +// Try specifying type arguments explicitly so that they conform to the bounds. +// B b = throw 42; // Error. +// ^ +// pkg/front_end/testcases/nonfunction_type_aliases/issue45519.dart:10:11: Context: This is the type variable whose bound isn't conformed to. +// typedef B> = C; +// ^ +// pkg/front_end/testcases/nonfunction_type_aliases/issue45519.dart:14:3: Context: If you want 'B>' to be a super-bounded type, note that the inverted type 'B>' must then satisfy its bounds, which it does not. +// B b = throw 42; // Error. +// ^ +// import self as self; import "dart:core" as core; diff --git a/pkg/front_end/testcases/outline.status b/pkg/front_end/testcases/outline.status index a5ff68d0cf8..4e24ada1353 100644 --- a/pkg/front_end/testcases/outline.status +++ b/pkg/front_end/testcases/outline.status @@ -18,6 +18,7 @@ extension_types/simple_setter_resolution: ExpectationFileMismatchSerialized extension_types/simple_show_hide: ExpectationFileMismatchSerialized # Expected. extension_types/type_variable_in_static_context: ExpectationFileMismatchSerialized # Expected. general/abstract_members: TypeCheckError +general/bounds_type_parameters: TypeCheckError general/bug30695: TypeCheckError general/covariant_field: TypeCheckError general/crashes/crash_02/main: Crash diff --git a/pkg/front_end/testcases/text_serialization.status b/pkg/front_end/testcases/text_serialization.status index 2a12a528964..4025cef62b2 100644 --- a/pkg/front_end/testcases/text_serialization.status +++ b/pkg/front_end/testcases/text_serialization.status @@ -34,6 +34,7 @@ general/accessors: RuntimeError general/ambiguous_exports: RuntimeError general/await_in_non_async: RuntimeError general/bounded_implicit_instantiation: TypeCheckError +general/bounds_instances: TypeCheckError general/bug30695: TypeCheckError general/bug31124: RuntimeError general/call: RuntimeError diff --git a/pkg/front_end/testcases/weak.status b/pkg/front_end/testcases/weak.status index 68ae6c17ccb..50e8f900b26 100644 --- a/pkg/front_end/testcases/weak.status +++ b/pkg/front_end/testcases/weak.status @@ -124,6 +124,7 @@ general/accessors: RuntimeError general/ambiguous_exports: RuntimeError # Expected, this file exports two main methods. general/await_in_non_async: RuntimeError # Expected. general/bounded_implicit_instantiation: TypeCheckError +general/bounds_instances: TypeCheckError general/bug30695: TypeCheckError general/bug31124: RuntimeError # Test has no main method (and we shouldn't add one). general/call: RuntimeError diff --git a/pkg/front_end/tool/ast_model.dart b/pkg/front_end/tool/ast_model.dart index 9979dcb41b9..4ae1aee8df1 100644 --- a/pkg/front_end/tool/ast_model.dart +++ b/pkg/front_end/tool/ast_model.dart @@ -174,7 +174,6 @@ const Map> _fieldRuleMap = { }, 'FunctionType': { 'typeParameters': FieldRule(isDeclaration: true), - '_typedefType': FieldRule(name: 'typedefType'), }, 'TypeParameterType': { 'parameter': FieldRule(isDeclaration: false), diff --git a/pkg/kernel/binary.md b/pkg/kernel/binary.md index c9620606a87..4499a086a5e 100644 --- a/pkg/kernel/binary.md +++ b/pkg/kernel/binary.md @@ -147,7 +147,7 @@ type CanonicalName { type ComponentFile { UInt32 magic = 0x90ABCDEF; - UInt32 formatVersion = 79; + UInt32 formatVersion = 80; Byte[10] shortSdkHash; List problemsAsJson; // Described in problems.md. Library[] libraries; @@ -1463,7 +1463,6 @@ type FunctionType extends DartType { UInt totalParameterCount; List positionalParameters; List namedParameters; - Option typedef; DartType returnType; } diff --git a/pkg/kernel/lib/ast.dart b/pkg/kernel/lib/ast.dart index f3f77285aa3..78972bc8874 100644 --- a/pkg/kernel/lib/ast.dart +++ b/pkg/kernel/lib/ast.dart @@ -8752,8 +8752,7 @@ class TypedefTearOff extends Expression { type.positionalParameters, type.returnType, type.declaredNullability, namedParameters: type.namedParameters, typeParameters: freshTypeParameters.freshTypeParameters, - requiredParameterCount: type.requiredParameterCount, - typedefType: null); + requiredParameterCount: type.requiredParameterCount); } @override @@ -11207,8 +11206,6 @@ class FunctionType extends DartType { @override final Nullability declaredNullability; - TypedefType? _typedefType; - final DartType returnType; @override @@ -11218,27 +11215,10 @@ class FunctionType extends DartType { this.declaredNullability, {this.namedParameters: const [], this.typeParameters: const [], - int? requiredParameterCount, - TypedefType? typedefType}) + int? requiredParameterCount}) : this.positionalParameters = positionalParameters, this.requiredParameterCount = - requiredParameterCount ?? positionalParameters.length, - _typedefType = typedefType; - - Reference? get typedefReference => _typedefType?.typedefReference; - - Typedef? get typedef => typedefReference?.asTypedef; - - /// The [Typedef] this function type is created for, if any. - TypedefType? get typedefType => _typedefType; - - void set typedefType(TypedefType? value) { - assert( - _typedefType == null, - "Cannot change an already set FunctionType.typedefType from " - "$_typedefType to $value."); - _typedefType = value; - } + requiredParameterCount ?? positionalParameters.length; @override Nullability get nullability => declaredNullability; @@ -11255,7 +11235,6 @@ class FunctionType extends DartType { visitList(typeParameters, v); visitList(positionalParameters, v); visitList(namedParameters, v); - typedefType?.accept(v); returnType.accept(v); } @@ -11325,8 +11304,7 @@ class FunctionType extends DartType { if (typeParameters.isEmpty) return this; return new FunctionType(positionalParameters, returnType, nullability, requiredParameterCount: requiredParameterCount, - namedParameters: namedParameters, - typedefType: null); + namedParameters: namedParameters); } /// Looks up the type of the named parameter with the given name. @@ -11375,8 +11353,7 @@ class FunctionType extends DartType { positionalParameters, returnType, declaredNullability, namedParameters: namedParameters, typeParameters: typeParameters, - requiredParameterCount: requiredParameterCount, - typedefType: typedefType?.withDeclaredNullability(declaredNullability)); + requiredParameterCount: requiredParameterCount); if (typeParameters.isEmpty) return result; return getFreshTypeParameters(typeParameters).applyToFunctionType(result); } @@ -13485,8 +13462,7 @@ class TypedefTearOffConstant extends Constant { type.positionalParameters, type.returnType, type.declaredNullability, namedParameters: type.namedParameters, typeParameters: freshTypeParameters.freshTypeParameters, - requiredParameterCount: type.requiredParameterCount, - typedefType: null); + requiredParameterCount: type.requiredParameterCount); } } diff --git a/pkg/kernel/lib/binary/ast_from_binary.dart b/pkg/kernel/lib/binary/ast_from_binary.dart index bc9a385ba93..9df6792ab5f 100644 --- a/pkg/kernel/lib/binary/ast_from_binary.dart +++ b/pkg/kernel/lib/binary/ast_from_binary.dart @@ -3089,7 +3089,6 @@ class BinaryBuilder { int totalParameterCount = readUInt30(); List positional = readDartTypeList(); List named = readNamedTypeList(); - TypedefType? typedefType = readDartTypeOption() as TypedefType?; assert(positional.length + named.length == totalParameterCount); DartType returnType = readDartType(); typeParameterStack.length = typeParameterStackHeight; @@ -3097,8 +3096,7 @@ class BinaryBuilder { positional, returnType, Nullability.values[nullabilityIndex], typeParameters: typeParameters, requiredParameterCount: requiredParameterCount, - namedParameters: named, - typedefType: typedefType); + namedParameters: named); } DartType _readSimpleFunctionType() { diff --git a/pkg/kernel/lib/binary/ast_to_binary.dart b/pkg/kernel/lib/binary/ast_to_binary.dart index 3d18bb1a381..1f678e9dda1 100644 --- a/pkg/kernel/lib/binary/ast_to_binary.dart +++ b/pkg/kernel/lib/binary/ast_to_binary.dart @@ -2390,8 +2390,7 @@ class BinaryPrinter implements Visitor, BinarySink { void visitFunctionType(FunctionType node) { if (node.requiredParameterCount == node.positionalParameters.length && node.typeParameters.isEmpty && - node.namedParameters.isEmpty && - node.typedefType == null) { + node.namedParameters.isEmpty) { writeByte(Tag.SimpleFunctionType); writeByte(node.nullability.index); writeNodeList(node.positionalParameters); @@ -2406,7 +2405,6 @@ class BinaryPrinter implements Visitor, BinarySink { node.positionalParameters.length + node.namedParameters.length); writeNodeList(node.positionalParameters); writeNodeList(node.namedParameters); - writeOptionalNode(node.typedefType); writeNode(node.returnType); leaveScope(typeParameters: node.typeParameters); } diff --git a/pkg/kernel/lib/binary/tag.dart b/pkg/kernel/lib/binary/tag.dart index f589ea5b710..aed4155fed5 100644 --- a/pkg/kernel/lib/binary/tag.dart +++ b/pkg/kernel/lib/binary/tag.dart @@ -176,7 +176,7 @@ class Tag { /// Internal version of kernel binary format. /// Bump it when making incompatible changes in kernel binaries. /// Keep in sync with runtime/vm/kernel_binary.h, pkg/kernel/binary.md. - static const int BinaryFormatVersion = 79; + static const int BinaryFormatVersion = 80; } abstract class ConstantTag { diff --git a/pkg/kernel/lib/src/bounds_checks.dart b/pkg/kernel/lib/src/bounds_checks.dart index e40aca5f361..884fe9de0c0 100644 --- a/pkg/kernel/lib/src/bounds_checks.dart +++ b/pkg/kernel/lib/src/bounds_checks.dart @@ -284,16 +284,16 @@ class TypeArgumentIssue { } } -// Finds type arguments that don't follow the rules of well-boundness. +// Finds type arguments that don't follow the rules of well-boundedness. // // [bottomType] should be either Null or Never, depending on what should be // taken for the bottom type at the call site. The bottom type is used in the -// checks for super-boundness for construction of the auxiliary type. For +// checks for super-boundedness for construction of the auxiliary type. For // details see Dart Language Specification, Section 14.3.2 The Instantiation to // Bound Algorithm. List findTypeArgumentIssues(DartType type, TypeEnvironment typeEnvironment, SubtypeCheckMode subtypeCheckMode, - {bool allowSuperBounded = false, + {required bool allowSuperBounded, required bool isNonNullableByDefault, required bool areGenericArgumentsAllowed}) { // ignore: unnecessary_null_comparison @@ -305,26 +305,6 @@ List findTypeArgumentIssues(DartType type, List arguments = const []; List typedefRhsResult = const []; - if (type is FunctionType && type.typedefType != null) { - // [type] is a function type that is an application of a parametrized - // typedef. We need to check both the l.h.s. and the r.h.s. of the - // definition in that case. For details, see [link] - // (https://github.com/dart-lang/sdk/blob/master/docs/language/informal/super-bounded-types.md). - FunctionType functionType = type; - FunctionType cloned = new FunctionType(functionType.positionalParameters, - functionType.returnType, functionType.nullability, - namedParameters: functionType.namedParameters, - typeParameters: functionType.typeParameters, - requiredParameterCount: functionType.requiredParameterCount, - typedefType: null); - typedefRhsResult = findTypeArgumentIssues( - cloned, typeEnvironment, subtypeCheckMode, - allowSuperBounded: true, - isNonNullableByDefault: isNonNullableByDefault, - areGenericArgumentsAllowed: areGenericArgumentsAllowed); - type = functionType.typedefType!; - } - if (type is InterfaceType) { variables = type.classNode.typeParameters; arguments = type.typeArguments; @@ -334,14 +314,6 @@ List findTypeArgumentIssues(DartType type, } else if (type is FunctionType) { List result = []; - for (TypeParameter parameter in type.typeParameters) { - result.addAll(findTypeArgumentIssues( - parameter.bound, typeEnvironment, subtypeCheckMode, - allowSuperBounded: true, - isNonNullableByDefault: isNonNullableByDefault, - areGenericArgumentsAllowed: areGenericArgumentsAllowed)); - } - for (DartType formal in type.positionalParameters) { result.addAll(findTypeArgumentIssues( formal, typeEnvironment, subtypeCheckMode, @@ -401,12 +373,6 @@ List findTypeArgumentIssues(DartType type, // The bound is InvalidType so it's not checked, because an error was // reported already at the time of the creation of InvalidType. } - - argumentsResult.addAll(findTypeArgumentIssues( - argument, typeEnvironment, subtypeCheckMode, - allowSuperBounded: true, - isNonNullableByDefault: isNonNullableByDefault, - areGenericArgumentsAllowed: areGenericArgumentsAllowed)); } result.addAll(argumentsResult); result.addAll(typedefRhsResult); @@ -440,6 +406,8 @@ List findTypeArgumentIssues(DartType type, new Map.fromIterables(variables, arguments); for (int i = 0; i < arguments.length; ++i) { DartType argument = arguments[i]; + // TODO(johnniwinther): Should we check this even when generic functions + // as type arguments is allowed? if (isGenericFunctionTypeOrAlias(argument)) { // Generic function types aren't allowed as type arguments either. isCorrectSuperBounded = false; @@ -517,12 +485,6 @@ List findTypeArgumentIssuesForInvocation( result.add(new TypeArgumentIssue(i, argument, parameters[i], null)); } } - - result.addAll(findTypeArgumentIssues( - argument, typeEnvironment, subtypeCheckMode, - allowSuperBounded: true, - isNonNullableByDefault: isNonNullableByDefault, - areGenericArgumentsAllowed: areGenericArgumentsAllowed)); } return result; } @@ -554,6 +516,7 @@ DartType? convertSuperBoundedToRegularBounded( class _SuperBoundedTypeInverter extends ReplacementVisitor { final TypeEnvironment typeEnvironment; final bool isNonNullableByDefault; + bool isOutermost = true; _SuperBoundedTypeInverter(this.typeEnvironment, {required this.isNonNullableByDefault}) @@ -629,6 +592,7 @@ class _SuperBoundedTypeInverter extends ReplacementVisitor { @override DartType? visitInterfaceType(InterfaceType node, int variance) { + isOutermost = false; // Check for Object-based top types. if (isTop(node) && flipTop(variance)) { return bottomType; @@ -639,6 +603,7 @@ class _SuperBoundedTypeInverter extends ReplacementVisitor { @override DartType? visitFutureOrType(FutureOrType node, int variance) { + isOutermost = false; // Check FutureOr-based top types. if (isTop(node) && flipTop(variance)) { return bottomType; @@ -679,10 +644,12 @@ class _SuperBoundedTypeInverter extends ReplacementVisitor { // TypedefTypes receive special treatment because the variance of their // arguments' positions depend on the opt-in status of the library. - // TODO(cstefantsova): Remove the method when the discrepancy between the - // NNBD modes is resolved. @override DartType? visitTypedefType(TypedefType node, int variance) { + if (!isNonNullableByDefault && !isOutermost) { + return node.unalias.accept1(this, variance); + } + isOutermost = false; Nullability? newNullability = visitNullability(node); List? newTypeArguments = null; for (int i = 0; i < node.typeArguments.length; i++) { @@ -706,13 +673,8 @@ class _SuperBoundedTypeInverter extends ReplacementVisitor { @override DartType? visitFunctionType(FunctionType node, int variance) { - // The variance of the Typedef parameters should be taken into account only - // when for the NNBD code. - if (node.typedefType != null && isNonNullableByDefault) { - return node.typedefType!.accept1(this, variance); - } else { - return super.visitFunctionType(node, variance); - } + isOutermost = false; + return super.visitFunctionType(node, variance); } } @@ -887,3 +849,49 @@ bool isGenericFunctionTypeOrAlias(DartType type) { if (type is TypedefType) type = type.unalias; return type is FunctionType && type.typeParameters.isNotEmpty; } + +bool hasGenericFunctionTypeAsTypeArgument(DartType type) { + return type.accept1( + const _HasGenericFunctionTypeAsTypeArgumentVisitor(), false); +} + +class _HasGenericFunctionTypeAsTypeArgumentVisitor + extends DartTypeVisitor1 { + const _HasGenericFunctionTypeAsTypeArgumentVisitor(); + + @override + bool defaultDartType(DartType node, bool isTypeArgument) => false; + + @override + bool visitFunctionType(FunctionType node, bool isTypeArgument) { + if (isTypeArgument && node.typeParameters.isNotEmpty) { + return true; + } + // TODO(johnniwinther): Should deeply nested generic function types be + // disallowed? + if (node.returnType.accept1(this, false)) return true; + for (DartType parameterType in node.positionalParameters) { + if (parameterType.accept1(this, false)) return true; + } + for (NamedType namedParameterType in node.namedParameters) { + if (namedParameterType.type.accept1(this, false)) return true; + } + return false; + } + + @override + bool visitInterfaceType(InterfaceType node, bool isTypeArgument) { + for (DartType typeArgument in node.typeArguments) { + if (typeArgument.accept1(this, true)) return true; + } + return false; + } + + @override + bool visitTypedefType(TypedefType node, bool isTypeArgument) { + for (DartType typeArgument in node.typeArguments) { + if (typeArgument.accept1(this, true)) return true; + } + return false; + } +} diff --git a/pkg/kernel/lib/src/dart_type_equivalence.dart b/pkg/kernel/lib/src/dart_type_equivalence.dart index aeea30f8196..18a208157b4 100644 --- a/pkg/kernel/lib/src/dart_type_equivalence.dart +++ b/pkg/kernel/lib/src/dart_type_equivalence.dart @@ -44,47 +44,6 @@ class DartTypeEquivalence implements DartTypeVisitor1 { return false; } - // If the two types are un-aliased typedef instantiations, check that - // those instantiations are equal as well. - bool nodeIsUnaliased = node.typedefType != null; - bool otherIsUnaliased = other.typedefType != null; - if (nodeIsUnaliased != otherIsUnaliased) { - return false; - } - if (node.typedefType != null) { - // The assert below checks the implication: if the typedef types are - // equal, their un-aliased types are equal as well. The reverse is not - // true due to possibly unused type parameters F and F may - // be equal when un-aliased if the type parameter of typedef F isn't - // used on the right-hand side of the definition of F. The checked - // proposition in the assert allows to skip checking the function types - // themselves if the typedef types are equal. - assert(() { - DartTypeEquivalence copy = this.copy(); - if (!copy.areEqual(node.typedefType!, other.typedefType!)) { - return true; - } - FunctionType nodeWithoutTypedefType = new FunctionType( - node.positionalParameters, - node.returnType, - node.declaredNullability, - namedParameters: node.namedParameters, - typeParameters: node.typeParameters, - requiredParameterCount: node.requiredParameterCount, - typedefType: null); - FunctionType otherWithoutTypedefType = new FunctionType( - other.positionalParameters, - other.returnType, - other.declaredNullability, - namedParameters: other.namedParameters, - typeParameters: other.typeParameters, - requiredParameterCount: other.requiredParameterCount, - typedefType: null); - return copy.areEqual(nodeWithoutTypedefType, otherWithoutTypedefType); - }()); - return node.typedefType!.accept1(this, other.typedefType); - } - // Perform simple number checks before the checks on parts. if (node.typeParameters.length != other.typeParameters.length) { return false; diff --git a/pkg/kernel/lib/src/equivalence.dart b/pkg/kernel/lib/src/equivalence.dart index 3f11abc39b7..840f85bc831 100644 --- a/pkg/kernel/lib/src/equivalence.dart +++ b/pkg/kernel/lib/src/equivalence.dart @@ -4074,9 +4074,6 @@ class EquivalenceStrategy { if (!checkFunctionType_declaredNullability(visitor, node, other)) { result = visitor.resultOnInequivalence; } - if (!checkFunctionType_typedefType(visitor, node, other)) { - result = visitor.resultOnInequivalence; - } if (!checkFunctionType_returnType(visitor, node, other)) { result = visitor.resultOnInequivalence; } @@ -7122,12 +7119,6 @@ class EquivalenceStrategy { other.declaredNullability, 'declaredNullability'); } - bool checkFunctionType_typedefType( - EquivalenceVisitor visitor, FunctionType node, FunctionType other) { - return visitor.checkNodes( - node.typedefType, other.typedefType, 'typedefType'); - } - bool checkFunctionType_returnType( EquivalenceVisitor visitor, FunctionType node, FunctionType other) { return visitor.checkNodes(node.returnType, other.returnType, 'returnType'); diff --git a/pkg/kernel/lib/src/merge_visitor.dart b/pkg/kernel/lib/src/merge_visitor.dart index fe27f5c2f78..58e18fa58b8 100644 --- a/pkg/kernel/lib/src/merge_visitor.dart +++ b/pkg/kernel/lib/src/merge_visitor.dart @@ -116,19 +116,10 @@ class MergeVisitor implements DartTypeVisitor1 { } newNamedParameters[i] = newNamedType; } - TypedefType? newTypedefType; - if (a.typedefType != null && b.typedefType != null) { - newTypedefType = - mergeTypes(a.typedefType!, b.typedefType!) as TypedefType?; - // If the typedef couldn't be merged we just omit it from the resulting - // function type since the typedef type is only informational. - } - return new FunctionType(newPositionalParameters, newReturnType, nullability, namedParameters: newNamedParameters, typeParameters: newTypeParameters, - requiredParameterCount: a.requiredParameterCount, - typedefType: newTypedefType); + requiredParameterCount: a.requiredParameterCount); } NamedType? mergeNamedTypes(NamedType a, NamedType b, DartType newType) { diff --git a/pkg/kernel/lib/src/replacement_visitor.dart b/pkg/kernel/lib/src/replacement_visitor.dart index 2f625b4950d..5a6035502c1 100644 --- a/pkg/kernel/lib/src/replacement_visitor.dart +++ b/pkg/kernel/lib/src/replacement_visitor.dart @@ -83,17 +83,9 @@ class ReplacementVisitor implements DartTypeVisitor1 { newNamedParameters[i] = newNamedType; } } - TypedefType? newTypedefType = - visitType(node.typedefType, variance) as TypedefType?; - return createFunctionType( - node, - newNullability, - newTypeParameters, - newReturnType, - newPositionalParameters, - newNamedParameters, - newTypedefType); + return createFunctionType(node, newNullability, newTypeParameters, + newReturnType, newPositionalParameters, newNamedParameters); } NamedType? createNamedType(NamedType node, DartType? newType) { @@ -110,13 +102,11 @@ class ReplacementVisitor implements DartTypeVisitor1 { List? newTypeParameters, DartType? newReturnType, List? newPositionalParameters, - List? newNamedParameters, - TypedefType? newTypedefType) { + List? newNamedParameters) { if (newNullability == null && newReturnType == null && newPositionalParameters == null && - newNamedParameters == null && - newTypedefType == null) { + newNamedParameters == null) { // No nullability or types had to be substituted. return null; } else { @@ -126,8 +116,7 @@ class ReplacementVisitor implements DartTypeVisitor1 { newNullability ?? node.nullability, namedParameters: newNamedParameters ?? node.namedParameters, typeParameters: newTypeParameters ?? node.typeParameters, - requiredParameterCount: node.requiredParameterCount, - typedefType: newTypedefType ?? node.typedefType); + requiredParameterCount: node.requiredParameterCount); } } diff --git a/pkg/kernel/lib/src/unaliasing.dart b/pkg/kernel/lib/src/unaliasing.dart new file mode 100644 index 00000000000..107c69634b7 --- /dev/null +++ b/pkg/kernel/lib/src/unaliasing.dart @@ -0,0 +1,111 @@ +// Copyright (c) 2022, 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.md file. + +import 'package:kernel/type_algebra.dart'; + +import '../ast.dart'; +import 'legacy_erasure.dart'; +import 'replacement_visitor.dart'; + +/// Replaces all occurrences of [TypedefType] in [type] with the corresponding +/// unaliased type. +/// +/// If [legacyEraseAliases] is `true`, the unaliased types will be legacy +/// erased. This used when the [TypedefType] was used in a legacy library. +DartType unalias(DartType type, {required bool legacyEraseAliases}) { + return rawUnalias(type, legacyEraseAliases: legacyEraseAliases) ?? type; +} + +/// Replaces all occurrences of [TypedefType] in [types] with the corresponding +/// unaliased types. +/// +/// If [legacyEraseAliases] is `true`, the unaliased types will be legacy +/// erased. This used when the [TypedefType] was used in a legacy library. +List? unaliasTypes(List? types, + {required bool legacyEraseAliases}) { + if (types == null) return null; + return rawUnaliasTypes(types, legacyEraseAliases: legacyEraseAliases) ?? + types; +} + +/// Replaces all occurrences of [TypedefType] in [type] with the corresponding +/// unaliased type, or returns `null` if no [TypedefType]s were found. +/// +/// If [legacyEraseAliases] is `true`, the unaliased types will be legacy +/// erased. This used when the [TypedefType] was used in a legacy library. +DartType? rawUnalias(DartType type, {required bool legacyEraseAliases}) { + return type.accept1( + legacyEraseAliases + ? const _Unalias(legacyEraseAliases: true) + : const _Unalias(legacyEraseAliases: false), + Variance.covariant); +} + +/// Replaces all occurrences of [TypedefType] in [types] with the corresponding +/// unaliased types, or returns `null` if no [TypedefType]s were found. +/// +/// If [legacyEraseAliases] is `true`, the unaliased types will be legacy +/// erased. This used when the [TypedefType] was used in a legacy library. +List? rawUnaliasTypes(List types, + {required bool legacyEraseAliases}) { + List? newTypes; + for (int i = 0; i < types.length; i++) { + DartType typeArgument = types[i]; + DartType? newTypeArgument = + rawUnalias(typeArgument, legacyEraseAliases: legacyEraseAliases); + if (newTypeArgument != null) { + newTypes ??= types.toList(growable: false); + newTypes[i] = newTypeArgument; + } + } + return newTypes; +} + +/// Visitor that replaces all occurrences of [TypedefType] with the +/// corresponding unaliased type, or returns `null` if no type was replaced. +/// +/// If [legacyEraseAliases] is `true`, the unaliased types will be legacy +/// erased. This used when the [TypedefType] was used in a legacy library. +class _Unalias extends ReplacementVisitor { + final bool legacyEraseAliases; + + const _Unalias({required this.legacyEraseAliases}); + + @override + DartType visitTypedefType(TypedefType node, int variance) { + DartType result; + if (node.typeArguments.isNotEmpty) { + List? newTypeArguments = null; + for (int i = 0; i < node.typeArguments.length; i++) { + DartType? substitution = node.typeArguments[i].accept1(this, variance); + if (substitution != null) { + newTypeArguments ??= node.typeArguments.toList(growable: false); + newTypeArguments[i] = substitution; + } + } + if (newTypeArguments != null) { + result = new TypedefType( + node.typedefNode, node.nullability, newTypeArguments) + .unalias; + } else { + result = node.unalias; + } + } else { + result = node.unalias; + } + if (node.nullability == Nullability.legacy || + node.typedefNode.type!.nullability == Nullability.legacy) { + // The typedef is defined or used in an opt-out library so the nullability + // is based on the use site alone. + result = result.withDeclaredNullability(node.nullability); + } else { + result = result.withDeclaredNullability( + uniteNullabilities(node.nullability, result.nullability)); + } + if (legacyEraseAliases) { + result = legacyErasure(result); + } + return result; + } +} diff --git a/pkg/kernel/lib/testing/type_parser_environment.dart b/pkg/kernel/lib/testing/type_parser_environment.dart index 1f9fab5dac9..c550c026681 100644 --- a/pkg/kernel/lib/testing/type_parser_environment.dart +++ b/pkg/kernel/lib/testing/type_parser_environment.dart @@ -414,14 +414,7 @@ class _KernelFromParsedType implements Visitor { f.positionalParameters, f.returnType, Nullability.nonNullable, namedParameters: f.namedParameters, typeParameters: f.typeParameters, - requiredParameterCount: f.requiredParameterCount, - typedefType: new TypedefType( - def, - Nullability.nonNullable, - def.typeParameters - .map((p) => new TypeParameterType( - p, TypeParameterType.computeNullabilityFromBound(p))) - .toList())); + requiredParameterCount: f.requiredParameterCount); } } return def..type = type; diff --git a/pkg/kernel/lib/type_algebra.dart b/pkg/kernel/lib/type_algebra.dart index f776684ad2e..a0ee467abac 100644 --- a/pkg/kernel/lib/type_algebra.dart +++ b/pkg/kernel/lib/type_algebra.dart @@ -168,10 +168,7 @@ class FreshTypeParameters { substitute(type.returnType), type.nullability, namedParameters: type.namedParameters.map(substituteNamed).toList(), typeParameters: freshTypeParameters, - requiredParameterCount: type.requiredParameterCount, - typedefType: type.typedefType == null - ? null - : substitute(type.typedefType!) as TypedefType); + requiredParameterCount: type.requiredParameterCount); } DartType substitute(DartType type) => substitution.substituteType(type); @@ -769,15 +766,11 @@ abstract class _TypeSubstitutor extends DartTypeVisitor { : node.namedParameters.map(inner.visitNamedType).toList(); inner.invertVariance(); DartType returnType = inner.visit(node.returnType); - TypedefType? typedefType = node.typedefType == null - ? null - : inner.visit(node.typedefType!) as TypedefType; if (this.useCounter == before) return node; return new FunctionType(positionalParameters, returnType, node.nullability, namedParameters: namedParameters, typeParameters: typeParameters, - requiredParameterCount: node.requiredParameterCount, - typedefType: typedefType); + requiredParameterCount: node.requiredParameterCount); } void bumpCountersUntil(_TypeSubstitutor target) { @@ -941,7 +934,7 @@ class _FreeFunctionTypeVariableVisitor implements DartTypeVisitor { @override bool defaultDartType(DartType node) { - throw new UnsupportedError("Unsupported type $node (${node.runtimeType}."); + throw new UnsupportedError("Unsupported type $node (${node.runtimeType})."); } bool visitNamedType(NamedType node) { diff --git a/pkg/kernel/lib/type_checker.dart b/pkg/kernel/lib/type_checker.dart index e19ef36da70..293015daef6 100644 --- a/pkg/kernel/lib/type_checker.dart +++ b/pkg/kernel/lib/type_checker.dart @@ -566,8 +566,7 @@ class TypeCheckingVisitor result.declaredNullability, namedParameters: result.namedParameters, typeParameters: freshTypeParameters.freshTypeParameters, - requiredParameterCount: result.requiredParameterCount, - typedefType: null); + requiredParameterCount: result.requiredParameterCount); } @override diff --git a/pkg/kernel/lib/visitor.dart b/pkg/kernel/lib/visitor.dart index cbd116e19a9..d88c2a9dfff 100644 --- a/pkg/kernel/lib/visitor.dart +++ b/pkg/kernel/lib/visitor.dart @@ -726,6 +726,8 @@ abstract class DartTypeVisitor { } abstract class DartTypeVisitor1 { + const DartTypeVisitor1(); + R defaultDartType(DartType node, T arg); R visitInvalidType(InvalidType node, T arg) => defaultDartType(node, arg); diff --git a/pkg/vm/lib/transformations/type_flow/transformer.dart b/pkg/vm/lib/transformations/type_flow/transformer.dart index 209910e13ce..ecf11c71066 100644 --- a/pkg/vm/lib/transformations/type_flow/transformer.dart +++ b/pkg/vm/lib/transformations/type_flow/transformer.dart @@ -989,10 +989,6 @@ class _TreeShakerTypeVisitor extends RecursiveVisitor { @override visitFunctionType(FunctionType node) { node.visitChildren(this); - final typedef = node.typedef; - if (typedef != null) { - shaker.addUsedTypedef(typedef); - } } @override diff --git a/pkg/vm/testcases/transformations/type_flow/transformer/annotation.dart.expect b/pkg/vm/testcases/transformations/type_flow/transformer/annotation.dart.expect index a86774c3946..220d635fd86 100644 --- a/pkg/vm/testcases/transformations/type_flow/transformer/annotation.dart.expect +++ b/pkg/vm/testcases/transformations/type_flow/transformer/annotation.dart.expect @@ -2,7 +2,6 @@ library #lib /*isNonNullableByDefault*/; import self as self; import "dart:core" as core; -typedef SomeType = (core::List) → void; abstract class A extends core::Object { static method staticMethod() → void {} } diff --git a/runtime/vm/compiler/frontend/kernel_fingerprints.cc b/runtime/vm/compiler/frontend/kernel_fingerprints.cc index 21884e4bbfb..3a888c48d92 100644 --- a/runtime/vm/compiler/frontend/kernel_fingerprints.cc +++ b/runtime/vm/compiler/frontend/kernel_fingerprints.cc @@ -310,11 +310,6 @@ void KernelFingerprintHelper::CalculateFunctionTypeFingerprint(bool simple) { } } - if (!simple) { - // TODO(bkonyi): include in hash. - SkipOptionalDartType(); // read typedef type. - } - CalculateDartTypeFingerprint(); // read return type. } diff --git a/runtime/vm/compiler/frontend/kernel_translation_helper.cc b/runtime/vm/compiler/frontend/kernel_translation_helper.cc index 66a054ca90e..e3008020158 100644 --- a/runtime/vm/compiler/frontend/kernel_translation_helper.cc +++ b/runtime/vm/compiler/frontend/kernel_translation_helper.cc @@ -2262,10 +2262,6 @@ void KernelReaderHelper::SkipFunctionType(bool simple) { } } - if (!simple) { - SkipOptionalDartType(); // read typedef type. - } - SkipDartType(); // read return type. } @@ -3262,10 +3258,6 @@ void TypeTranslator::BuildFunctionType(bool simple) { } signature.FinalizeNameArray(); - if (!simple) { - helper_->SkipOptionalDartType(); // read typedef type. - } - BuildTypeInternal(); // read return type. signature.set_result_type(result_); diff --git a/runtime/vm/compiler/frontend/scope_builder.cc b/runtime/vm/compiler/frontend/scope_builder.cc index 6363a5ec873..89d7660eee8 100644 --- a/runtime/vm/compiler/frontend/scope_builder.cc +++ b/runtime/vm/compiler/frontend/scope_builder.cc @@ -1467,10 +1467,6 @@ void ScopeBuilder::VisitFunctionType(bool simple) { } } - if (!simple) { - helper_.SkipOptionalDartType(); // read typedef reference. - } - VisitDartType(); // read return type. } diff --git a/runtime/vm/kernel_binary.h b/runtime/vm/kernel_binary.h index 08d9da7e320..6e6972f3b30 100644 --- a/runtime/vm/kernel_binary.h +++ b/runtime/vm/kernel_binary.h @@ -20,8 +20,8 @@ namespace kernel { static const uint32_t kMagicProgramFile = 0x90ABCDEFu; // Both version numbers are inclusive. -static const uint32_t kMinSupportedKernelFormatVersion = 79; -static const uint32_t kMaxSupportedKernelFormatVersion = 79; +static const uint32_t kMinSupportedKernelFormatVersion = 80; +static const uint32_t kMaxSupportedKernelFormatVersion = 80; // Keep in sync with package:kernel/lib/binary/tag.dart #define KERNEL_TAG_LIST(V) \ diff --git a/tests/language/generic/f_bounded_quantification_test.dart b/tests/language/generic/f_bounded_quantification_test.dart index 4247e7dd731..6b7c5fde0d1 100644 --- a/tests/language/generic/f_bounded_quantification_test.dart +++ b/tests/language/generic/f_bounded_quantification_test.dart @@ -17,10 +17,10 @@ class SubBaz extends Baz {} main() { FBound fb = new FBound(); FBound fsb = new FBound(); +//^ +// [cfe] Type argument 'SubBar' doesn't conform to the bound 'FBound' of the type variable 'F' on 'FBound'. // ^^^^^^ // [analyzer] COMPILE_TIME_ERROR.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS - // ^ - // [cfe] Type argument 'SubBar' doesn't conform to the bound 'FBound' of the type variable 'F' on 'FBound'. // ^ // [cfe] Type argument 'SubBar' doesn't conform to the bound 'FBound' of the type variable 'F' on 'FBound'. // ^^^^^^ @@ -28,10 +28,10 @@ main() { FBound> fbb = new FBound>(); FBound> fsbb = new FBound>(); +//^ +// [cfe] Type argument 'SubBaz' doesn't conform to the bound 'FBound' of the type variable 'F' on 'FBound'. // ^^^^^^^^^^^ // [analyzer] COMPILE_TIME_ERROR.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS - // ^ - // [cfe] Type argument 'SubBaz' doesn't conform to the bound 'FBound' of the type variable 'F' on 'FBound'. // ^ // [cfe] Type argument 'SubBaz' doesn't conform to the bound 'FBound' of the type variable 'F' on 'FBound'. // ^^^^^^^^^^^ diff --git a/tests/language/generic/function_type_as_type_argument_test.dart b/tests/language/generic/function_type_as_type_argument_test.dart index e932d535588..0c4ae2850ee 100644 --- a/tests/language/generic/function_type_as_type_argument_test.dart +++ b/tests/language/generic/function_type_as_type_argument_test.dart @@ -18,17 +18,16 @@ void main() { // Generic function types are not allowed as type arguments. List(T)> typedList = (T)>[foo]; - // ^^^^^^^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.GENERIC_FUNCTION_TYPE_CANNOT_BE_TYPE_ARGUMENT - // ^ - // [cfe] A generic function type can't be used as a type argument. +//^ +// [cfe] A generic function type can't be used as a type argument. +// ^^^^^^^^^^^^^^^^ +// [analyzer] COMPILE_TIME_ERROR.GENERIC_FUNCTION_TYPE_CANNOT_BE_TYPE_ARGUMENT // Type inference must also give an error. var inferredList = [foo]; - // ^ - // [cfe] Generic function type 'T Function(T)' inferred as a type argument. // ^^^^^ // [analyzer] COMPILE_TIME_ERROR.COULD_NOT_INFER + // [cfe] Generic function type 'T Function(T)' inferred as a type argument. // No error if illegal type cannot be inferred. var dynamicList = [foo]; diff --git a/tests/language/generic/super_bounded_types_error2_test.dart b/tests/language/generic/super_bounded_types_error2_test.dart index 39d9d4c23dc..eed2bff3707 100644 --- a/tests/language/generic/super_bounded_types_error2_test.dart +++ b/tests/language/generic/super_bounded_types_error2_test.dart @@ -50,2286 +50,2196 @@ void testContravariantSuperboundError() { FcovCyclicCoBound x1; //^ // [analyzer] unspecified -// ^ // [cfe] Type argument 'dynamic Function(Never?)' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FcovCyclicCoBound'. FcovCyclicCoBound x2; //^ // [analyzer] unspecified -// ^ // [cfe] Type argument 'dynamic Function(Null)' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FcovCyclicCoBound'. FcovCyclicCoBound x3; //^ // [analyzer] unspecified -// ^ // [cfe] Type argument 'dynamic Function(N)' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FcovCyclicCoBound'. CFcon> x4; //^ // [analyzer] unspecified -// ^ -// [cfe] Type argument 'dynamic Function(Never?)' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'CFcon'. +// [cfe] Type argument 'Fcon' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'CFcon'. CFcon> x5; //^ // [analyzer] unspecified -// ^ -// [cfe] Type argument 'dynamic Function(Null)' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'CFcon'. +// [cfe] Type argument 'Fcon' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'CFcon'. CFcon> x6; //^ // [analyzer] unspecified -// ^ -// [cfe] Type argument 'dynamic Function(N)' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'CFcon'. +// [cfe] Type argument 'Fcon' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'CFcon'. CcovCyclicCoBound x7; //^ // [analyzer] unspecified -// ^ // [cfe] Type argument 'dynamic Function(Never?)' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'CcovCyclicCoBound'. CcovCyclicCoBound x8; //^ // [analyzer] unspecified -// ^ // [cfe] Type argument 'dynamic Function(Null)' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'CcovCyclicCoBound'. CcovCyclicCoBound x9; //^ // [analyzer] unspecified -// ^ // [cfe] Type argument 'dynamic Function(N)' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'CcovCyclicCoBound'. // --- Same non-super-bounded types in a context. A> x10; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'dynamic Function(Never?)' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FcovCyclicCoBound'. A> x11; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'dynamic Function(Null)' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FcovCyclicCoBound'. A> x12; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'dynamic Function(N)' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FcovCyclicCoBound'. A>> x13; //^ // [analyzer] unspecified -// ^ -// [cfe] Type argument 'dynamic Function(Never?)' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'CFcon'. +// ^ +// [cfe] Type argument 'Fcon' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'CFcon'. A>> x14; //^ // [analyzer] unspecified -// ^ -// [cfe] Type argument 'dynamic Function(Null)' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'CFcon'. +// ^ +// [cfe] Type argument 'Fcon' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'CFcon'. A>> x15; //^ // [analyzer] unspecified -// ^ -// [cfe] Type argument 'dynamic Function(N)' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'CFcon'. +// ^ +// [cfe] Type argument 'Fcon' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'CFcon'. A> x16; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'dynamic Function(Never?)' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'CcovCyclicCoBound'. A> x17; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'dynamic Function(Null)' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'CcovCyclicCoBound'. A> x18; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'dynamic Function(N)' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'CcovCyclicCoBound'. FcovCyclicCoBound Function() x19; //^ // [analyzer] unspecified -// ^ // [cfe] Type argument 'dynamic Function(Never?)' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FcovCyclicCoBound'. FcovCyclicCoBound Function() x20; //^ // [analyzer] unspecified -// ^ // [cfe] Type argument 'dynamic Function(Null)' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FcovCyclicCoBound'. FcovCyclicCoBound Function() x21; //^ // [analyzer] unspecified -// ^ // [cfe] Type argument 'dynamic Function(N)' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FcovCyclicCoBound'. CFcon> Function() x22; //^ // [analyzer] unspecified -// ^ -// [cfe] Type argument 'dynamic Function(Never?)' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'CFcon'. +// [cfe] Type argument 'Fcon' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'CFcon'. CFcon> Function() x23; //^ // [analyzer] unspecified -// ^ -// [cfe] Type argument 'dynamic Function(Null)' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'CFcon'. +// [cfe] Type argument 'Fcon' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'CFcon'. CFcon> Function() x24; //^ // [analyzer] unspecified -// ^ -// [cfe] Type argument 'dynamic Function(N)' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'CFcon'. +// [cfe] Type argument 'Fcon' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'CFcon'. CcovCyclicCoBound Function() x25; //^ // [analyzer] unspecified -// ^ // [cfe] Type argument 'dynamic Function(Never?)' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'CcovCyclicCoBound'. CcovCyclicCoBound Function() x26; //^ // [analyzer] unspecified -// ^ // [cfe] Type argument 'dynamic Function(Null)' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'CcovCyclicCoBound'. CcovCyclicCoBound Function() x27; //^ // [analyzer] unspecified -// ^ // [cfe] Type argument 'dynamic Function(N)' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'CcovCyclicCoBound'. void Function(void Function(FcovCyclicCoBound)) x28; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'dynamic Function(Never?)' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FcovCyclicCoBound'. void Function(void Function(FcovCyclicCoBound)) x29; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'dynamic Function(Null)' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FcovCyclicCoBound'. void Function(void Function(FcovCyclicCoBound)) x30; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'dynamic Function(N)' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FcovCyclicCoBound'. void Function(void Function(CFcon>)) x31; //^ // [analyzer] unspecified -// ^ -// [cfe] Type argument 'dynamic Function(Never?)' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'CFcon'. +// ^ +// [cfe] Type argument 'Fcon' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'CFcon'. void Function(void Function(CFcon>)) x32; //^ // [analyzer] unspecified -// ^ -// [cfe] Type argument 'dynamic Function(Null)' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'CFcon'. +// ^ +// [cfe] Type argument 'Fcon' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'CFcon'. void Function(void Function(CFcon>)) x33; //^ // [analyzer] unspecified -// ^ -// [cfe] Type argument 'dynamic Function(N)' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'CFcon'. +// ^ +// [cfe] Type argument 'Fcon' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'CFcon'. void Function(void Function(CcovCyclicCoBound)) x34; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'dynamic Function(Never?)' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'CcovCyclicCoBound'. void Function(void Function(CcovCyclicCoBound)) x35; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'dynamic Function(Null)' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'CcovCyclicCoBound'. void Function(void Function(CcovCyclicCoBound)) x36; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'dynamic Function(N)' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'CcovCyclicCoBound'. void Function(FcovCyclicCoBound) x37; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'dynamic Function(Never?)' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FcovCyclicCoBound'. void Function(FcovCyclicCoBound) x38; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'dynamic Function(Null)' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FcovCyclicCoBound'. void Function(FcovCyclicCoBound) x39; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'dynamic Function(N)' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FcovCyclicCoBound'. void Function(CFcon>) x40; //^ // [analyzer] unspecified -// ^ -// [cfe] Type argument 'dynamic Function(Never?)' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'CFcon'. +// ^ +// [cfe] Type argument 'Fcon' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'CFcon'. void Function(CFcon>) x41; //^ // [analyzer] unspecified -// ^ -// [cfe] Type argument 'dynamic Function(Null)' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'CFcon'. +// ^ +// [cfe] Type argument 'Fcon' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'CFcon'. void Function(CFcon>) x42; //^ // [analyzer] unspecified -// ^ -// [cfe] Type argument 'dynamic Function(N)' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'CFcon'. +// ^ +// [cfe] Type argument 'Fcon' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'CFcon'. void Function(CcovCyclicCoBound) x43; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'dynamic Function(Never?)' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'CcovCyclicCoBound'. void Function(CcovCyclicCoBound) x44; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'dynamic Function(Null)' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'CcovCyclicCoBound'. void Function(CcovCyclicCoBound) x45; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'dynamic Function(N)' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'CcovCyclicCoBound'. void Function(FcovCyclicCoBound) Function() x46; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'dynamic Function(Never?)' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FcovCyclicCoBound'. void Function(FcovCyclicCoBound) Function() x47; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'dynamic Function(Null)' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FcovCyclicCoBound'. void Function(FcovCyclicCoBound) Function() x48; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'dynamic Function(N)' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FcovCyclicCoBound'. void Function(CFcon>) Function() x49; //^ // [analyzer] unspecified -// ^ -// [cfe] Type argument 'dynamic Function(Never?)' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'CFcon'. +// ^ +// [cfe] Type argument 'Fcon' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'CFcon'. void Function(CFcon>) Function() x50; //^ // [analyzer] unspecified -// ^ -// [cfe] Type argument 'dynamic Function(Null)' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'CFcon'. +// ^ +// [cfe] Type argument 'Fcon' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'CFcon'. void Function(CFcon>) Function() x51; //^ // [analyzer] unspecified -// ^ -// [cfe] Type argument 'dynamic Function(N)' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'CFcon'. +// ^ +// [cfe] Type argument 'Fcon' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'CFcon'. void Function(CcovCyclicCoBound) Function() x52; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'dynamic Function(Never?)' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'CcovCyclicCoBound'. void Function(CcovCyclicCoBound) Function() x53; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'dynamic Function(Null)' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'CcovCyclicCoBound'. void Function(CcovCyclicCoBound) Function() x54; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'dynamic Function(N)' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'CcovCyclicCoBound'. void Function>() x55; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'dynamic Function(Never?)' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FcovCyclicCoBound'. void Function>() x56; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'dynamic Function(Null)' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FcovCyclicCoBound'. void Function>() x57; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'dynamic Function(N)' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FcovCyclicCoBound'. void Function>>() x58; //^ // [analyzer] unspecified -// ^ -// [cfe] Type argument 'dynamic Function(Never?)' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'CFcon'. +// ^ +// [cfe] Type argument 'Fcon' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'CFcon'. void Function>>() x59; //^ // [analyzer] unspecified -// ^ -// [cfe] Type argument 'dynamic Function(Null)' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'CFcon'. +// ^ +// [cfe] Type argument 'Fcon' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'CFcon'. void Function>>() x60; //^ // [analyzer] unspecified -// ^ -// [cfe] Type argument 'dynamic Function(N)' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'CFcon'. +// ^ +// [cfe] Type argument 'Fcon' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'CFcon'. void Function>() x61; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'dynamic Function(Never?)' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'CcovCyclicCoBound'. void Function>() x62; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'dynamic Function(Null)' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'CcovCyclicCoBound'. void Function>() x63; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'dynamic Function(N)' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'CcovCyclicCoBound'. void Function>>() x64; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'dynamic Function(Never?)' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FcovCyclicCoBound'. void Function>>() x65; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'dynamic Function(Null)' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FcovCyclicCoBound'. void Function>>() x66; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'dynamic Function(N)' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FcovCyclicCoBound'. void Function>>>() x67; //^ // [analyzer] unspecified -// ^ -// [cfe] Type argument 'dynamic Function(Never?)' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'CFcon'. +// ^ +// [cfe] Type argument 'Fcon' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'CFcon'. void Function>>>() x68; //^ // [analyzer] unspecified -// ^ -// [cfe] Type argument 'dynamic Function(Null)' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'CFcon'. +// ^ +// [cfe] Type argument 'Fcon' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'CFcon'. void Function>>>() x69; //^ // [analyzer] unspecified -// ^ -// [cfe] Type argument 'dynamic Function(N)' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'CFcon'. +// ^ +// [cfe] Type argument 'Fcon' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'CFcon'. void Function>>() x70; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'dynamic Function(Never?)' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'CcovCyclicCoBound'. void Function>>() x71; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'dynamic Function(Null)' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'CcovCyclicCoBound'. void Function>>() x72; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'dynamic Function(N)' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'CcovCyclicCoBound'. Finv> x73; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'dynamic Function(Never?)' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FcovCyclicCoBound'. Finv> x74; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'dynamic Function(Null)' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FcovCyclicCoBound'. Finv> x75; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'dynamic Function(N)' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FcovCyclicCoBound'. Finv>> x76; //^ // [analyzer] unspecified -// ^ -// [cfe] Type argument 'dynamic Function(Never?)' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'CFcon'. +// ^ +// [cfe] Type argument 'Fcon' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'CFcon'. Finv>> x77; //^ // [analyzer] unspecified -// ^ -// [cfe] Type argument 'dynamic Function(Null)' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'CFcon'. +// ^ +// [cfe] Type argument 'Fcon' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'CFcon'. Finv>> x78; //^ // [analyzer] unspecified -// ^ -// [cfe] Type argument 'dynamic Function(N)' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'CFcon'. +// ^ +// [cfe] Type argument 'Fcon' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'CFcon'. Finv> x79; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'dynamic Function(Never?)' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'CcovCyclicCoBound'. Finv> x80; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'dynamic Function(Null)' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'CcovCyclicCoBound'. Finv> x81; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'dynamic Function(N)' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'CcovCyclicCoBound'. Funu> x82; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'dynamic Function(Never?)' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FcovCyclicCoBound'. Funu> x83; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'dynamic Function(Null)' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FcovCyclicCoBound'. Funu> x84; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'dynamic Function(N)' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FcovCyclicCoBound'. Funu>> x85; //^ // [analyzer] unspecified -// ^ -// [cfe] Type argument 'dynamic Function(Never?)' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'CFcon'. +// ^ +// [cfe] Type argument 'Fcon' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'CFcon'. Funu>> x86; //^ // [analyzer] unspecified -// ^ -// [cfe] Type argument 'dynamic Function(Null)' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'CFcon'. +// ^ +// [cfe] Type argument 'Fcon' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'CFcon'. Funu>> x87; //^ // [analyzer] unspecified -// ^ -// [cfe] Type argument 'dynamic Function(N)' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'CFcon'. +// ^ +// [cfe] Type argument 'Fcon' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'CFcon'. Funu> x88; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'dynamic Function(Never?)' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'CcovCyclicCoBound'. Funu> x89; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'dynamic Function(Null)' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'CcovCyclicCoBound'. Funu> x90; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'dynamic Function(N)' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'CcovCyclicCoBound'. // --- Top type in a contravariant position, not super-bounded. FconBound x91; //^ // [analyzer] unspecified -// ^ // [cfe] Type argument 'dynamic' doesn't conform to the bound 'num' of the type variable 'X' on 'FconBound'. FconBound x92; //^ // [analyzer] unspecified -// ^ // [cfe] Type argument 'void' doesn't conform to the bound 'num' of the type variable 'X' on 'FconBound'. FconBound x93; //^ // [analyzer] unspecified -// ^ // [cfe] Type argument 'Object?' doesn't conform to the bound 'num' of the type variable 'X' on 'FconBound'. FconBound> x94; //^ // [analyzer] unspecified -// ^ -// [cfe] Type argument 'FutureOr?' doesn't conform to the bound 'num' of the type variable 'X' on 'FconBound'. +// [cfe] Type argument 'FutureOr' doesn't conform to the bound 'num' of the type variable 'X' on 'FconBound'. FconBound> x95; //^ // [analyzer] unspecified -// ^ -// [cfe] Type argument 'FutureOr?' doesn't conform to the bound 'num' of the type variable 'X' on 'FconBound'. +// [cfe] Type argument 'FutureOr' doesn't conform to the bound 'num' of the type variable 'X' on 'FconBound'. FconBound> x96; //^ // [analyzer] unspecified -// ^ -// [cfe] Type argument 'FutureOr?' doesn't conform to the bound 'num' of the type variable 'X' on 'FconBound'. +// [cfe] Type argument 'FutureOr' doesn't conform to the bound 'num' of the type variable 'X' on 'FconBound'. FconCyclicBound x97; //^ // [analyzer] unspecified -// ^ // [cfe] Type argument 'dynamic' doesn't conform to the bound 'A' of the type variable 'X' on 'FconCyclicBound'. FconCyclicBound x98; //^ // [analyzer] unspecified -// ^ // [cfe] Type argument 'void' doesn't conform to the bound 'A' of the type variable 'X' on 'FconCyclicBound'. FconCyclicBound x99; //^ // [analyzer] unspecified -// ^ // [cfe] Type argument 'Object?' doesn't conform to the bound 'A' of the type variable 'X' on 'FconCyclicBound'. FconCyclicBound> x100; //^ // [analyzer] unspecified -// ^ -// [cfe] Type argument 'FutureOr?' doesn't conform to the bound 'A' of the type variable 'X' on 'FconCyclicBound'. +// [cfe] Type argument 'FutureOr' doesn't conform to the bound 'A' of the type variable 'X' on 'FconCyclicBound'. FconCyclicBound> x101; //^ // [analyzer] unspecified -// ^ -// [cfe] Type argument 'FutureOr?' doesn't conform to the bound 'A' of the type variable 'X' on 'FconCyclicBound'. +// [cfe] Type argument 'FutureOr' doesn't conform to the bound 'A' of the type variable 'X' on 'FconCyclicBound'. FconCyclicBound> x102; //^ // [analyzer] unspecified -// ^ -// [cfe] Type argument 'FutureOr?' doesn't conform to the bound 'A' of the type variable 'X' on 'FconCyclicBound'. +// [cfe] Type argument 'FutureOr' doesn't conform to the bound 'A' of the type variable 'X' on 'FconCyclicBound'. FconCyclicBound> x103; //^ // [analyzer] unspecified -// ^ // [cfe] Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'FconCyclicBound'. FconCyclicBound> x104; //^ // [analyzer] unspecified -// ^ // [cfe] Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'FconCyclicBound'. FconCyclicBound> x105; //^ // [analyzer] unspecified -// ^ // [cfe] Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'FconCyclicBound'. FconCyclicBound>> x106; //^ // [analyzer] unspecified -// ^ // [cfe] Type argument 'A>' doesn't conform to the bound 'A' of the type variable 'X' on 'FconCyclicBound'. FconCyclicBound>> x107; //^ // [analyzer] unspecified -// ^ // [cfe] Type argument 'A>' doesn't conform to the bound 'A' of the type variable 'X' on 'FconCyclicBound'. FconCyclicBound>> x108; //^ // [analyzer] unspecified -// ^ // [cfe] Type argument 'A>' doesn't conform to the bound 'A' of the type variable 'X' on 'FconCyclicBound'. FconCyclicBound>> x109; //^ // [analyzer] unspecified -// ^ // [cfe] Type argument 'A>' doesn't conform to the bound 'A' of the type variable 'X' on 'FconCyclicBound'. FconCyclicBound>> x110; //^ // [analyzer] unspecified -// ^ // [cfe] Type argument 'A>' doesn't conform to the bound 'A' of the type variable 'X' on 'FconCyclicBound'. FconCyclicBound>> x111; //^ // [analyzer] unspecified -// ^ // [cfe] Type argument 'A>' doesn't conform to the bound 'A' of the type variable 'X' on 'FconCyclicBound'. FconCyclicBound>>> x112; //^ // [analyzer] unspecified -// ^ // [cfe] Type argument 'A>>' doesn't conform to the bound 'A' of the type variable 'X' on 'FconCyclicBound'. FconCyclicBound>>> x113; //^ // [analyzer] unspecified -// ^ // [cfe] Type argument 'A>>' doesn't conform to the bound 'A' of the type variable 'X' on 'FconCyclicBound'. FconCyclicBound>>> x114; //^ // [analyzer] unspecified -// ^ // [cfe] Type argument 'A>>' doesn't conform to the bound 'A' of the type variable 'X' on 'FconCyclicBound'. FconCyclicCoBound x115; //^ // [analyzer] unspecified -// ^ // [cfe] Type argument 'dynamic' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FconCyclicCoBound'. FconCyclicCoBound x116; //^ // [analyzer] unspecified -// ^ // [cfe] Type argument 'void' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FconCyclicCoBound'. FconCyclicCoBound x117; //^ // [analyzer] unspecified -// ^ // [cfe] Type argument 'Object?' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FconCyclicCoBound'. FconCyclicCoBound> x118; //^ // [analyzer] unspecified -// ^ -// [cfe] Type argument 'FutureOr?' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FconCyclicCoBound'. +// [cfe] Type argument 'FutureOr' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FconCyclicCoBound'. FconCyclicCoBound> x119; //^ // [analyzer] unspecified -// ^ -// [cfe] Type argument 'FutureOr?' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FconCyclicCoBound'. +// [cfe] Type argument 'FutureOr' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FconCyclicCoBound'. FconCyclicCoBound> x120; //^ // [analyzer] unspecified -// ^ -// [cfe] Type argument 'FutureOr?' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FconCyclicCoBound'. +// [cfe] Type argument 'FutureOr' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FconCyclicCoBound'. FconCyclicCoBound x121; //^ // [analyzer] unspecified -// ^ // [cfe] Type argument 'dynamic Function(dynamic Function(dynamic))' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FconCyclicCoBound'. FconCyclicCoBound x122; //^ // [analyzer] unspecified -// ^ // [cfe] Type argument 'dynamic Function(dynamic Function(void))' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FconCyclicCoBound'. FconCyclicCoBound x123; //^ // [analyzer] unspecified -// ^ // [cfe] Type argument 'dynamic Function(dynamic Function(Object?))' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FconCyclicCoBound'. FconCyclicCoBound))> x124; //^ // [analyzer] unspecified -// ^ // [cfe] Type argument 'dynamic Function(dynamic Function(FutureOr))' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FconCyclicCoBound'. FconCyclicCoBound))> x125; //^ // [analyzer] unspecified -// ^ // [cfe] Type argument 'dynamic Function(dynamic Function(FutureOr))' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FconCyclicCoBound'. FconCyclicCoBound))> x126; //^ // [analyzer] unspecified -// ^ // [cfe] Type argument 'dynamic Function(dynamic Function(FutureOr))' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FconCyclicCoBound'. // --- Same non-super-bounded types in a context. A> x127; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'dynamic' doesn't conform to the bound 'num' of the type variable 'X' on 'FconBound'. A> x128; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'void' doesn't conform to the bound 'num' of the type variable 'X' on 'FconBound'. A> x129; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'Object?' doesn't conform to the bound 'num' of the type variable 'X' on 'FconBound'. A>> x130; //^ // [analyzer] unspecified -// ^ -// [cfe] Type argument 'FutureOr?' doesn't conform to the bound 'num' of the type variable 'X' on 'FconBound'. +// ^ +// [cfe] Type argument 'FutureOr' doesn't conform to the bound 'num' of the type variable 'X' on 'FconBound'. A>> x131; //^ // [analyzer] unspecified -// ^ -// [cfe] Type argument 'FutureOr?' doesn't conform to the bound 'num' of the type variable 'X' on 'FconBound'. +// ^ +// [cfe] Type argument 'FutureOr' doesn't conform to the bound 'num' of the type variable 'X' on 'FconBound'. A>> x132; //^ // [analyzer] unspecified -// ^ -// [cfe] Type argument 'FutureOr?' doesn't conform to the bound 'num' of the type variable 'X' on 'FconBound'. +// ^ +// [cfe] Type argument 'FutureOr' doesn't conform to the bound 'num' of the type variable 'X' on 'FconBound'. A> x133; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'dynamic' doesn't conform to the bound 'A' of the type variable 'X' on 'FconCyclicBound'. A> x134; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'void' doesn't conform to the bound 'A' of the type variable 'X' on 'FconCyclicBound'. A> x135; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'Object?' doesn't conform to the bound 'A' of the type variable 'X' on 'FconCyclicBound'. A>> x136; //^ // [analyzer] unspecified -// ^ -// [cfe] Type argument 'FutureOr?' doesn't conform to the bound 'A' of the type variable 'X' on 'FconCyclicBound'. +// ^ +// [cfe] Type argument 'FutureOr' doesn't conform to the bound 'A' of the type variable 'X' on 'FconCyclicBound'. A>> x137; //^ // [analyzer] unspecified -// ^ -// [cfe] Type argument 'FutureOr?' doesn't conform to the bound 'A' of the type variable 'X' on 'FconCyclicBound'. +// ^ +// [cfe] Type argument 'FutureOr' doesn't conform to the bound 'A' of the type variable 'X' on 'FconCyclicBound'. A>> x138; //^ // [analyzer] unspecified -// ^ -// [cfe] Type argument 'FutureOr?' doesn't conform to the bound 'A' of the type variable 'X' on 'FconCyclicBound'. +// ^ +// [cfe] Type argument 'FutureOr' doesn't conform to the bound 'A' of the type variable 'X' on 'FconCyclicBound'. A>> x139; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'FconCyclicBound'. A>> x140; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'FconCyclicBound'. A>> x141; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'FconCyclicBound'. A>>> x142; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A>' doesn't conform to the bound 'A' of the type variable 'X' on 'FconCyclicBound'. A>>> x143; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A>' doesn't conform to the bound 'A' of the type variable 'X' on 'FconCyclicBound'. A>>> x144; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A>' doesn't conform to the bound 'A' of the type variable 'X' on 'FconCyclicBound'. A>>> x145; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A>' doesn't conform to the bound 'A' of the type variable 'X' on 'FconCyclicBound'. A>>> x146; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A>' doesn't conform to the bound 'A' of the type variable 'X' on 'FconCyclicBound'. A>>> x147; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A>' doesn't conform to the bound 'A' of the type variable 'X' on 'FconCyclicBound'. A>>>> x148; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A>>' doesn't conform to the bound 'A' of the type variable 'X' on 'FconCyclicBound'. A>>>> x149; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A>>' doesn't conform to the bound 'A' of the type variable 'X' on 'FconCyclicBound'. A>>>> x150; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A>>' doesn't conform to the bound 'A' of the type variable 'X' on 'FconCyclicBound'. A> x151; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'dynamic' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FconCyclicCoBound'. A> x152; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'void' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FconCyclicCoBound'. A> x153; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'Object?' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FconCyclicCoBound'. A>> x154; //^ // [analyzer] unspecified -// ^ -// [cfe] Type argument 'FutureOr?' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FconCyclicCoBound'. +// ^ +// [cfe] Type argument 'FutureOr' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FconCyclicCoBound'. A>> x155; //^ // [analyzer] unspecified -// ^ -// [cfe] Type argument 'FutureOr?' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FconCyclicCoBound'. +// ^ +// [cfe] Type argument 'FutureOr' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FconCyclicCoBound'. A>> x156; //^ // [analyzer] unspecified -// ^ -// [cfe] Type argument 'FutureOr?' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FconCyclicCoBound'. +// ^ +// [cfe] Type argument 'FutureOr' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FconCyclicCoBound'. A> x157; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'dynamic Function(dynamic Function(dynamic))' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FconCyclicCoBound'. A> x158; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'dynamic Function(dynamic Function(void))' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FconCyclicCoBound'. A> x159; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'dynamic Function(dynamic Function(Object?))' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FconCyclicCoBound'. A))>> x160; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'dynamic Function(dynamic Function(FutureOr))' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FconCyclicCoBound'. A))>> x161; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'dynamic Function(dynamic Function(FutureOr))' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FconCyclicCoBound'. A))>> x162; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'dynamic Function(dynamic Function(FutureOr))' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FconCyclicCoBound'. FconBound Function() x163; //^ // [analyzer] unspecified -// ^ // [cfe] Type argument 'dynamic' doesn't conform to the bound 'num' of the type variable 'X' on 'FconBound'. FconBound Function() x164; //^ // [analyzer] unspecified -// ^ // [cfe] Type argument 'void' doesn't conform to the bound 'num' of the type variable 'X' on 'FconBound'. FconBound Function() x165; //^ // [analyzer] unspecified -// ^ // [cfe] Type argument 'Object?' doesn't conform to the bound 'num' of the type variable 'X' on 'FconBound'. FconBound> Function() x166; //^ // [analyzer] unspecified -// ^ -// [cfe] Type argument 'FutureOr?' doesn't conform to the bound 'num' of the type variable 'X' on 'FconBound'. +// [cfe] Type argument 'FutureOr' doesn't conform to the bound 'num' of the type variable 'X' on 'FconBound'. FconBound> Function() x167; //^ // [analyzer] unspecified -// ^ -// [cfe] Type argument 'FutureOr?' doesn't conform to the bound 'num' of the type variable 'X' on 'FconBound'. +// [cfe] Type argument 'FutureOr' doesn't conform to the bound 'num' of the type variable 'X' on 'FconBound'. FconBound> Function() x168; //^ // [analyzer] unspecified -// ^ -// [cfe] Type argument 'FutureOr?' doesn't conform to the bound 'num' of the type variable 'X' on 'FconBound'. +// [cfe] Type argument 'FutureOr' doesn't conform to the bound 'num' of the type variable 'X' on 'FconBound'. FconCyclicBound Function() x169; //^ // [analyzer] unspecified -// ^ // [cfe] Type argument 'dynamic' doesn't conform to the bound 'A' of the type variable 'X' on 'FconCyclicBound'. FconCyclicBound Function() x170; //^ // [analyzer] unspecified -// ^ // [cfe] Type argument 'void' doesn't conform to the bound 'A' of the type variable 'X' on 'FconCyclicBound'. FconCyclicBound Function() x171; //^ // [analyzer] unspecified -// ^ // [cfe] Type argument 'Object?' doesn't conform to the bound 'A' of the type variable 'X' on 'FconCyclicBound'. FconCyclicBound> Function() x172; //^ // [analyzer] unspecified -// ^ -// [cfe] Type argument 'FutureOr?' doesn't conform to the bound 'A' of the type variable 'X' on 'FconCyclicBound'. +// [cfe] Type argument 'FutureOr' doesn't conform to the bound 'A' of the type variable 'X' on 'FconCyclicBound'. FconCyclicBound> Function() x173; //^ // [analyzer] unspecified -// ^ -// [cfe] Type argument 'FutureOr?' doesn't conform to the bound 'A' of the type variable 'X' on 'FconCyclicBound'. +// [cfe] Type argument 'FutureOr' doesn't conform to the bound 'A' of the type variable 'X' on 'FconCyclicBound'. FconCyclicBound> Function() x174; //^ // [analyzer] unspecified -// ^ -// [cfe] Type argument 'FutureOr?' doesn't conform to the bound 'A' of the type variable 'X' on 'FconCyclicBound'. +// [cfe] Type argument 'FutureOr' doesn't conform to the bound 'A' of the type variable 'X' on 'FconCyclicBound'. FconCyclicBound> Function() x175; //^ // [analyzer] unspecified -// ^ // [cfe] Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'FconCyclicBound'. FconCyclicBound> Function() x176; //^ // [analyzer] unspecified -// ^ // [cfe] Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'FconCyclicBound'. FconCyclicBound> Function() x177; //^ // [analyzer] unspecified -// ^ // [cfe] Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'FconCyclicBound'. FconCyclicBound>> Function() x178; //^ // [analyzer] unspecified -// ^ // [cfe] Type argument 'A>' doesn't conform to the bound 'A' of the type variable 'X' on 'FconCyclicBound'. FconCyclicBound>> Function() x179; //^ // [analyzer] unspecified -// ^ // [cfe] Type argument 'A>' doesn't conform to the bound 'A' of the type variable 'X' on 'FconCyclicBound'. FconCyclicBound>> Function() x180; //^ // [analyzer] unspecified -// ^ // [cfe] Type argument 'A>' doesn't conform to the bound 'A' of the type variable 'X' on 'FconCyclicBound'. FconCyclicBound>> Function() x181; //^ // [analyzer] unspecified -// ^ // [cfe] Type argument 'A>' doesn't conform to the bound 'A' of the type variable 'X' on 'FconCyclicBound'. FconCyclicBound>> Function() x182; //^ // [analyzer] unspecified -// ^ // [cfe] Type argument 'A>' doesn't conform to the bound 'A' of the type variable 'X' on 'FconCyclicBound'. FconCyclicBound>> Function() x183; //^ // [analyzer] unspecified -// ^ // [cfe] Type argument 'A>' doesn't conform to the bound 'A' of the type variable 'X' on 'FconCyclicBound'. FconCyclicBound>>> Function() x184; //^ // [analyzer] unspecified -// ^ // [cfe] Type argument 'A>>' doesn't conform to the bound 'A' of the type variable 'X' on 'FconCyclicBound'. FconCyclicBound>>> Function() x185; //^ // [analyzer] unspecified -// ^ // [cfe] Type argument 'A>>' doesn't conform to the bound 'A' of the type variable 'X' on 'FconCyclicBound'. FconCyclicBound>>> Function() x186; //^ // [analyzer] unspecified -// ^ // [cfe] Type argument 'A>>' doesn't conform to the bound 'A' of the type variable 'X' on 'FconCyclicBound'. FconCyclicCoBound Function() x187; //^ // [analyzer] unspecified -// ^ // [cfe] Type argument 'dynamic' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FconCyclicCoBound'. FconCyclicCoBound Function() x188; //^ // [analyzer] unspecified -// ^ // [cfe] Type argument 'void' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FconCyclicCoBound'. FconCyclicCoBound Function() x189; //^ // [analyzer] unspecified -// ^ // [cfe] Type argument 'Object?' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FconCyclicCoBound'. FconCyclicCoBound> Function() x190; //^ // [analyzer] unspecified -// ^ -// [cfe] Type argument 'FutureOr?' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FconCyclicCoBound'. +// [cfe] Type argument 'FutureOr' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FconCyclicCoBound'. FconCyclicCoBound> Function() x191; //^ // [analyzer] unspecified -// ^ -// [cfe] Type argument 'FutureOr?' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FconCyclicCoBound'. +// [cfe] Type argument 'FutureOr' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FconCyclicCoBound'. FconCyclicCoBound> Function() x192; //^ // [analyzer] unspecified -// ^ -// [cfe] Type argument 'FutureOr?' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FconCyclicCoBound'. +// [cfe] Type argument 'FutureOr' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FconCyclicCoBound'. FconCyclicCoBound Function() x193; //^ // [analyzer] unspecified -// ^ // [cfe] Type argument 'dynamic Function(dynamic Function(dynamic))' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FconCyclicCoBound'. FconCyclicCoBound Function() x194; //^ // [analyzer] unspecified -// ^ // [cfe] Type argument 'dynamic Function(dynamic Function(void))' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FconCyclicCoBound'. FconCyclicCoBound Function() x195; //^ // [analyzer] unspecified -// ^ // [cfe] Type argument 'dynamic Function(dynamic Function(Object?))' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FconCyclicCoBound'. FconCyclicCoBound))> Function() x196; //^ // [analyzer] unspecified -// ^ // [cfe] Type argument 'dynamic Function(dynamic Function(FutureOr))' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FconCyclicCoBound'. FconCyclicCoBound))> Function() x197; //^ // [analyzer] unspecified -// ^ // [cfe] Type argument 'dynamic Function(dynamic Function(FutureOr))' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FconCyclicCoBound'. FconCyclicCoBound))> Function() x198; //^ // [analyzer] unspecified -// ^ // [cfe] Type argument 'dynamic Function(dynamic Function(FutureOr))' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FconCyclicCoBound'. void Function(void Function(FconBound)) x199; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'dynamic' doesn't conform to the bound 'num' of the type variable 'X' on 'FconBound'. void Function(void Function(FconBound)) x200; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'void' doesn't conform to the bound 'num' of the type variable 'X' on 'FconBound'. void Function(void Function(FconBound)) x201; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'Object?' doesn't conform to the bound 'num' of the type variable 'X' on 'FconBound'. void Function(void Function(FconBound>)) x202; //^ // [analyzer] unspecified -// ^ -// [cfe] Type argument 'FutureOr?' doesn't conform to the bound 'num' of the type variable 'X' on 'FconBound'. +// ^ +// [cfe] Type argument 'FutureOr' doesn't conform to the bound 'num' of the type variable 'X' on 'FconBound'. void Function(void Function(FconBound>)) x203; //^ // [analyzer] unspecified -// ^ -// [cfe] Type argument 'FutureOr?' doesn't conform to the bound 'num' of the type variable 'X' on 'FconBound'. +// ^ +// [cfe] Type argument 'FutureOr' doesn't conform to the bound 'num' of the type variable 'X' on 'FconBound'. void Function(void Function(FconBound>)) x204; //^ // [analyzer] unspecified -// ^ -// [cfe] Type argument 'FutureOr?' doesn't conform to the bound 'num' of the type variable 'X' on 'FconBound'. +// ^ +// [cfe] Type argument 'FutureOr' doesn't conform to the bound 'num' of the type variable 'X' on 'FconBound'. void Function(void Function(FconCyclicBound)) x205; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'dynamic' doesn't conform to the bound 'A' of the type variable 'X' on 'FconCyclicBound'. void Function(void Function(FconCyclicBound)) x206; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'void' doesn't conform to the bound 'A' of the type variable 'X' on 'FconCyclicBound'. void Function(void Function(FconCyclicBound)) x207; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'Object?' doesn't conform to the bound 'A' of the type variable 'X' on 'FconCyclicBound'. void Function(void Function(FconCyclicBound>)) x208; //^ // [analyzer] unspecified -// ^ -// [cfe] Type argument 'FutureOr?' doesn't conform to the bound 'A' of the type variable 'X' on 'FconCyclicBound'. +// ^ +// [cfe] Type argument 'FutureOr' doesn't conform to the bound 'A' of the type variable 'X' on 'FconCyclicBound'. void Function(void Function(FconCyclicBound>)) x209; //^ // [analyzer] unspecified -// ^ -// [cfe] Type argument 'FutureOr?' doesn't conform to the bound 'A' of the type variable 'X' on 'FconCyclicBound'. +// ^ +// [cfe] Type argument 'FutureOr' doesn't conform to the bound 'A' of the type variable 'X' on 'FconCyclicBound'. void Function(void Function(FconCyclicBound>)) x210; //^ // [analyzer] unspecified -// ^ -// [cfe] Type argument 'FutureOr?' doesn't conform to the bound 'A' of the type variable 'X' on 'FconCyclicBound'. +// ^ +// [cfe] Type argument 'FutureOr' doesn't conform to the bound 'A' of the type variable 'X' on 'FconCyclicBound'. void Function(void Function(FconCyclicBound>)) x211; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'FconCyclicBound'. void Function(void Function(FconCyclicBound>)) x212; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'FconCyclicBound'. void Function(void Function(FconCyclicBound>)) x213; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'FconCyclicBound'. void Function(void Function(FconCyclicBound>>)) x214; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A>' doesn't conform to the bound 'A' of the type variable 'X' on 'FconCyclicBound'. void Function(void Function(FconCyclicBound>>)) x215; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A>' doesn't conform to the bound 'A' of the type variable 'X' on 'FconCyclicBound'. void Function(void Function(FconCyclicBound>>)) x216; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A>' doesn't conform to the bound 'A' of the type variable 'X' on 'FconCyclicBound'. void Function(void Function(FconCyclicBound>>)) x217; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A>' doesn't conform to the bound 'A' of the type variable 'X' on 'FconCyclicBound'. void Function(void Function(FconCyclicBound>>)) x218; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A>' doesn't conform to the bound 'A' of the type variable 'X' on 'FconCyclicBound'. void Function(void Function(FconCyclicBound>>)) x219; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A>' doesn't conform to the bound 'A' of the type variable 'X' on 'FconCyclicBound'. void Function(void Function(FconCyclicBound>>>)) x220; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A>>' doesn't conform to the bound 'A' of the type variable 'X' on 'FconCyclicBound'. void Function(void Function(FconCyclicBound>>>)) x221; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A>>' doesn't conform to the bound 'A' of the type variable 'X' on 'FconCyclicBound'. void Function(void Function(FconCyclicBound>>>)) x222; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A>>' doesn't conform to the bound 'A' of the type variable 'X' on 'FconCyclicBound'. void Function(void Function(FconCyclicCoBound)) x223; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'dynamic' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FconCyclicCoBound'. void Function(void Function(FconCyclicCoBound)) x224; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'void' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FconCyclicCoBound'. void Function(void Function(FconCyclicCoBound)) x225; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'Object?' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FconCyclicCoBound'. void Function(void Function(FconCyclicCoBound>)) x226; //^ // [analyzer] unspecified -// ^ -// [cfe] Type argument 'FutureOr?' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FconCyclicCoBound'. +// ^ +// [cfe] Type argument 'FutureOr' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FconCyclicCoBound'. void Function(void Function(FconCyclicCoBound>)) x227; //^ // [analyzer] unspecified -// ^ -// [cfe] Type argument 'FutureOr?' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FconCyclicCoBound'. +// ^ +// [cfe] Type argument 'FutureOr' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FconCyclicCoBound'. void Function(void Function(FconCyclicCoBound>)) x228; //^ // [analyzer] unspecified -// ^ -// [cfe] Type argument 'FutureOr?' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FconCyclicCoBound'. +// ^ +// [cfe] Type argument 'FutureOr' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FconCyclicCoBound'. void Function(void Function(FconCyclicCoBound)) //^ // [analyzer] unspecified - x229; -// ^ +// ^ // [cfe] Type argument 'dynamic Function(dynamic Function(dynamic))' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FconCyclicCoBound'. + x229; void Function(void Function(FconCyclicCoBound)) //^ // [analyzer] unspecified - x230; -// ^ +// ^ // [cfe] Type argument 'dynamic Function(dynamic Function(void))' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FconCyclicCoBound'. + x230; void Function(void Function(FconCyclicCoBound)) //^ // [analyzer] unspecified - x231; -// ^ +// ^ // [cfe] Type argument 'dynamic Function(dynamic Function(Object?))' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FconCyclicCoBound'. + x231; void Function( void Function( FconCyclicCoBound))>)) x232; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'dynamic Function(dynamic Function(FutureOr))' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FconCyclicCoBound'. void Function( void Function(FconCyclicCoBound))>)) //^ // [analyzer] unspecified - x233; -// ^ +// ^ // [cfe] Type argument 'dynamic Function(dynamic Function(FutureOr))' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FconCyclicCoBound'. + x233; void Function( void Function( FconCyclicCoBound))>)) x234; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'dynamic Function(dynamic Function(FutureOr))' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FconCyclicCoBound'. void Function(FconBound) x235; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'dynamic' doesn't conform to the bound 'num' of the type variable 'X' on 'FconBound'. void Function(FconBound) x236; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'void' doesn't conform to the bound 'num' of the type variable 'X' on 'FconBound'. void Function(FconBound) x237; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'Object?' doesn't conform to the bound 'num' of the type variable 'X' on 'FconBound'. void Function(FconBound>) x238; //^ // [analyzer] unspecified -// ^ -// [cfe] Type argument 'FutureOr?' doesn't conform to the bound 'num' of the type variable 'X' on 'FconBound'. +// ^ +// [cfe] Type argument 'FutureOr' doesn't conform to the bound 'num' of the type variable 'X' on 'FconBound'. void Function(FconBound>) x239; //^ // [analyzer] unspecified -// ^ -// [cfe] Type argument 'FutureOr?' doesn't conform to the bound 'num' of the type variable 'X' on 'FconBound'. +// ^ +// [cfe] Type argument 'FutureOr' doesn't conform to the bound 'num' of the type variable 'X' on 'FconBound'. void Function(FconBound>) x240; //^ // [analyzer] unspecified -// ^ -// [cfe] Type argument 'FutureOr?' doesn't conform to the bound 'num' of the type variable 'X' on 'FconBound'. +// ^ +// [cfe] Type argument 'FutureOr' doesn't conform to the bound 'num' of the type variable 'X' on 'FconBound'. void Function(FconCyclicBound) x241; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'dynamic' doesn't conform to the bound 'A' of the type variable 'X' on 'FconCyclicBound'. void Function(FconCyclicBound) x242; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'void' doesn't conform to the bound 'A' of the type variable 'X' on 'FconCyclicBound'. void Function(FconCyclicBound) x243; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'Object?' doesn't conform to the bound 'A' of the type variable 'X' on 'FconCyclicBound'. void Function(FconCyclicBound>) x244; //^ // [analyzer] unspecified -// ^ -// [cfe] Type argument 'FutureOr?' doesn't conform to the bound 'A' of the type variable 'X' on 'FconCyclicBound'. +// ^ +// [cfe] Type argument 'FutureOr' doesn't conform to the bound 'A' of the type variable 'X' on 'FconCyclicBound'. void Function(FconCyclicBound>) x245; //^ // [analyzer] unspecified -// ^ -// [cfe] Type argument 'FutureOr?' doesn't conform to the bound 'A' of the type variable 'X' on 'FconCyclicBound'. +// ^ +// [cfe] Type argument 'FutureOr' doesn't conform to the bound 'A' of the type variable 'X' on 'FconCyclicBound'. void Function(FconCyclicBound>) x246; //^ // [analyzer] unspecified -// ^ -// [cfe] Type argument 'FutureOr?' doesn't conform to the bound 'A' of the type variable 'X' on 'FconCyclicBound'. +// ^ +// [cfe] Type argument 'FutureOr' doesn't conform to the bound 'A' of the type variable 'X' on 'FconCyclicBound'. void Function(FconCyclicBound>) x247; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'FconCyclicBound'. void Function(FconCyclicBound>) x248; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'FconCyclicBound'. void Function(FconCyclicBound>) x249; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'FconCyclicBound'. void Function(FconCyclicBound>>) x250; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A>' doesn't conform to the bound 'A' of the type variable 'X' on 'FconCyclicBound'. void Function(FconCyclicBound>>) x251; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A>' doesn't conform to the bound 'A' of the type variable 'X' on 'FconCyclicBound'. void Function(FconCyclicBound>>) x252; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A>' doesn't conform to the bound 'A' of the type variable 'X' on 'FconCyclicBound'. void Function(FconCyclicBound>>) x253; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A>' doesn't conform to the bound 'A' of the type variable 'X' on 'FconCyclicBound'. void Function(FconCyclicBound>>) x254; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A>' doesn't conform to the bound 'A' of the type variable 'X' on 'FconCyclicBound'. void Function(FconCyclicBound>>) x255; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A>' doesn't conform to the bound 'A' of the type variable 'X' on 'FconCyclicBound'. void Function(FconCyclicBound>>>) x256; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A>>' doesn't conform to the bound 'A' of the type variable 'X' on 'FconCyclicBound'. void Function(FconCyclicBound>>>) x257; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A>>' doesn't conform to the bound 'A' of the type variable 'X' on 'FconCyclicBound'. void Function(FconCyclicBound>>>) x258; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A>>' doesn't conform to the bound 'A' of the type variable 'X' on 'FconCyclicBound'. void Function(FconCyclicCoBound) x259; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'dynamic' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FconCyclicCoBound'. void Function(FconCyclicCoBound) x260; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'void' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FconCyclicCoBound'. void Function(FconCyclicCoBound) x261; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'Object?' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FconCyclicCoBound'. void Function(FconCyclicCoBound>) x262; //^ // [analyzer] unspecified -// ^ -// [cfe] Type argument 'FutureOr?' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FconCyclicCoBound'. +// ^ +// [cfe] Type argument 'FutureOr' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FconCyclicCoBound'. void Function(FconCyclicCoBound>) x263; //^ // [analyzer] unspecified -// ^ -// [cfe] Type argument 'FutureOr?' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FconCyclicCoBound'. +// ^ +// [cfe] Type argument 'FutureOr' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FconCyclicCoBound'. void Function(FconCyclicCoBound>) x264; //^ // [analyzer] unspecified -// ^ -// [cfe] Type argument 'FutureOr?' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FconCyclicCoBound'. +// ^ +// [cfe] Type argument 'FutureOr' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FconCyclicCoBound'. void Function(FconCyclicCoBound) x265; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'dynamic Function(dynamic Function(dynamic))' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FconCyclicCoBound'. void Function(FconCyclicCoBound) x266; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'dynamic Function(dynamic Function(void))' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FconCyclicCoBound'. void Function(FconCyclicCoBound) x267; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'dynamic Function(dynamic Function(Object?))' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FconCyclicCoBound'. void Function(FconCyclicCoBound))>) x268; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'dynamic Function(dynamic Function(FutureOr))' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FconCyclicCoBound'. void Function(FconCyclicCoBound))>) x269; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'dynamic Function(dynamic Function(FutureOr))' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FconCyclicCoBound'. void Function(FconCyclicCoBound))>) x270; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'dynamic Function(dynamic Function(FutureOr))' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FconCyclicCoBound'. void Function(FconBound) Function() x271; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'dynamic' doesn't conform to the bound 'num' of the type variable 'X' on 'FconBound'. void Function(FconBound) Function() x272; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'void' doesn't conform to the bound 'num' of the type variable 'X' on 'FconBound'. void Function(FconBound) Function() x273; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'Object?' doesn't conform to the bound 'num' of the type variable 'X' on 'FconBound'. void Function(FconBound>) Function() x274; //^ // [analyzer] unspecified -// ^ -// [cfe] Type argument 'FutureOr?' doesn't conform to the bound 'num' of the type variable 'X' on 'FconBound'. +// ^ +// [cfe] Type argument 'FutureOr' doesn't conform to the bound 'num' of the type variable 'X' on 'FconBound'. void Function(FconBound>) Function() x275; //^ // [analyzer] unspecified -// ^ -// [cfe] Type argument 'FutureOr?' doesn't conform to the bound 'num' of the type variable 'X' on 'FconBound'. +// ^ +// [cfe] Type argument 'FutureOr' doesn't conform to the bound 'num' of the type variable 'X' on 'FconBound'. void Function(FconBound>) Function() x276; //^ // [analyzer] unspecified -// ^ -// [cfe] Type argument 'FutureOr?' doesn't conform to the bound 'num' of the type variable 'X' on 'FconBound'. +// ^ +// [cfe] Type argument 'FutureOr' doesn't conform to the bound 'num' of the type variable 'X' on 'FconBound'. void Function(FconCyclicBound) Function() x277; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'dynamic' doesn't conform to the bound 'A' of the type variable 'X' on 'FconCyclicBound'. void Function(FconCyclicBound) Function() x278; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'void' doesn't conform to the bound 'A' of the type variable 'X' on 'FconCyclicBound'. void Function(FconCyclicBound) Function() x279; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'Object?' doesn't conform to the bound 'A' of the type variable 'X' on 'FconCyclicBound'. void Function(FconCyclicBound>) Function() x280; //^ // [analyzer] unspecified -// ^ -// [cfe] Type argument 'FutureOr?' doesn't conform to the bound 'A' of the type variable 'X' on 'FconCyclicBound'. +// ^ +// [cfe] Type argument 'FutureOr' doesn't conform to the bound 'A' of the type variable 'X' on 'FconCyclicBound'. void Function(FconCyclicBound>) Function() x281; //^ // [analyzer] unspecified -// ^ -// [cfe] Type argument 'FutureOr?' doesn't conform to the bound 'A' of the type variable 'X' on 'FconCyclicBound'. +// ^ +// [cfe] Type argument 'FutureOr' doesn't conform to the bound 'A' of the type variable 'X' on 'FconCyclicBound'. void Function(FconCyclicBound>) Function() x282; //^ // [analyzer] unspecified -// ^ -// [cfe] Type argument 'FutureOr?' doesn't conform to the bound 'A' of the type variable 'X' on 'FconCyclicBound'. +// ^ +// [cfe] Type argument 'FutureOr' doesn't conform to the bound 'A' of the type variable 'X' on 'FconCyclicBound'. void Function(FconCyclicBound>) Function() x283; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'FconCyclicBound'. void Function(FconCyclicBound>) Function() x284; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'FconCyclicBound'. void Function(FconCyclicBound>) Function() x285; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'FconCyclicBound'. void Function(FconCyclicBound>>) Function() x286; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A>' doesn't conform to the bound 'A' of the type variable 'X' on 'FconCyclicBound'. void Function(FconCyclicBound>>) Function() x287; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A>' doesn't conform to the bound 'A' of the type variable 'X' on 'FconCyclicBound'. void Function(FconCyclicBound>>) Function() x288; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A>' doesn't conform to the bound 'A' of the type variable 'X' on 'FconCyclicBound'. void Function(FconCyclicBound>>) Function() x289; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A>' doesn't conform to the bound 'A' of the type variable 'X' on 'FconCyclicBound'. void Function(FconCyclicBound>>) Function() x290; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A>' doesn't conform to the bound 'A' of the type variable 'X' on 'FconCyclicBound'. void Function(FconCyclicBound>>) Function() x291; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A>' doesn't conform to the bound 'A' of the type variable 'X' on 'FconCyclicBound'. void Function(FconCyclicBound>>>) Function() x292; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A>>' doesn't conform to the bound 'A' of the type variable 'X' on 'FconCyclicBound'. void Function(FconCyclicBound>>>) Function() x293; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A>>' doesn't conform to the bound 'A' of the type variable 'X' on 'FconCyclicBound'. void Function(FconCyclicBound>>>) Function() x294; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A>>' doesn't conform to the bound 'A' of the type variable 'X' on 'FconCyclicBound'. void Function(FconCyclicCoBound) Function() x295; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'dynamic' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FconCyclicCoBound'. void Function(FconCyclicCoBound) Function() x296; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'void' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FconCyclicCoBound'. void Function(FconCyclicCoBound) Function() x297; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'Object?' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FconCyclicCoBound'. void Function(FconCyclicCoBound>) Function() x298; //^ // [analyzer] unspecified -// ^ -// [cfe] Type argument 'FutureOr?' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FconCyclicCoBound'. +// ^ +// [cfe] Type argument 'FutureOr' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FconCyclicCoBound'. void Function(FconCyclicCoBound>) Function() x299; //^ // [analyzer] unspecified -// ^ -// [cfe] Type argument 'FutureOr?' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FconCyclicCoBound'. +// ^ +// [cfe] Type argument 'FutureOr' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FconCyclicCoBound'. void Function(FconCyclicCoBound>) Function() x300; //^ // [analyzer] unspecified -// ^ -// [cfe] Type argument 'FutureOr?' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FconCyclicCoBound'. +// ^ +// [cfe] Type argument 'FutureOr' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FconCyclicCoBound'. void Function(FconCyclicCoBound) Function() x301; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'dynamic Function(dynamic Function(dynamic))' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FconCyclicCoBound'. void Function(FconCyclicCoBound) Function() x302; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'dynamic Function(dynamic Function(void))' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FconCyclicCoBound'. void Function(FconCyclicCoBound) Function() x303; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'dynamic Function(dynamic Function(Object?))' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FconCyclicCoBound'. void Function(FconCyclicCoBound))>) //^ // [analyzer] unspecified - Function() x304; -// ^ +// ^ // [cfe] Type argument 'dynamic Function(dynamic Function(FutureOr))' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FconCyclicCoBound'. + Function() x304; void Function(FconCyclicCoBound))>) //^ // [analyzer] unspecified - Function() x305; -// ^ +// ^ // [cfe] Type argument 'dynamic Function(dynamic Function(FutureOr))' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FconCyclicCoBound'. + Function() x305; void Function(FconCyclicCoBound))>) //^ // [analyzer] unspecified - Function() x306; -// ^ +// ^ // [cfe] Type argument 'dynamic Function(dynamic Function(FutureOr))' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FconCyclicCoBound'. + Function() x306; void Function>() x307; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'dynamic' doesn't conform to the bound 'num' of the type variable 'X' on 'FconBound'. void Function>() x308; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'void' doesn't conform to the bound 'num' of the type variable 'X' on 'FconBound'. void Function>() x309; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'Object?' doesn't conform to the bound 'num' of the type variable 'X' on 'FconBound'. void Function>>() x310; //^ // [analyzer] unspecified -// ^ -// [cfe] Type argument 'FutureOr?' doesn't conform to the bound 'num' of the type variable 'X' on 'FconBound'. +// ^ +// [cfe] Type argument 'FutureOr' doesn't conform to the bound 'num' of the type variable 'X' on 'FconBound'. void Function>>() x311; //^ // [analyzer] unspecified -// ^ -// [cfe] Type argument 'FutureOr?' doesn't conform to the bound 'num' of the type variable 'X' on 'FconBound'. +// ^ +// [cfe] Type argument 'FutureOr' doesn't conform to the bound 'num' of the type variable 'X' on 'FconBound'. void Function>>() x312; //^ // [analyzer] unspecified -// ^ -// [cfe] Type argument 'FutureOr?' doesn't conform to the bound 'num' of the type variable 'X' on 'FconBound'. +// ^ +// [cfe] Type argument 'FutureOr' doesn't conform to the bound 'num' of the type variable 'X' on 'FconBound'. void Function>() x313; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'dynamic' doesn't conform to the bound 'A' of the type variable 'X' on 'FconCyclicBound'. void Function>() x314; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'void' doesn't conform to the bound 'A' of the type variable 'X' on 'FconCyclicBound'. void Function>() x315; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'Object?' doesn't conform to the bound 'A' of the type variable 'X' on 'FconCyclicBound'. void Function>>() x316; //^ // [analyzer] unspecified -// ^ -// [cfe] Type argument 'FutureOr?' doesn't conform to the bound 'A' of the type variable 'X' on 'FconCyclicBound'. +// ^ +// [cfe] Type argument 'FutureOr' doesn't conform to the bound 'A' of the type variable 'X' on 'FconCyclicBound'. void Function>>() x317; //^ // [analyzer] unspecified -// ^ -// [cfe] Type argument 'FutureOr?' doesn't conform to the bound 'A' of the type variable 'X' on 'FconCyclicBound'. +// ^ +// [cfe] Type argument 'FutureOr' doesn't conform to the bound 'A' of the type variable 'X' on 'FconCyclicBound'. void Function>>() x318; //^ // [analyzer] unspecified -// ^ -// [cfe] Type argument 'FutureOr?' doesn't conform to the bound 'A' of the type variable 'X' on 'FconCyclicBound'. +// ^ +// [cfe] Type argument 'FutureOr' doesn't conform to the bound 'A' of the type variable 'X' on 'FconCyclicBound'. void Function>>() x319; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'FconCyclicBound'. void Function>>() x320; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'FconCyclicBound'. void Function>>() x321; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'FconCyclicBound'. void Function>>>() x322; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A>' doesn't conform to the bound 'A' of the type variable 'X' on 'FconCyclicBound'. void Function>>>() x323; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A>' doesn't conform to the bound 'A' of the type variable 'X' on 'FconCyclicBound'. void Function>>>() x324; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A>' doesn't conform to the bound 'A' of the type variable 'X' on 'FconCyclicBound'. void Function>>>() x325; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A>' doesn't conform to the bound 'A' of the type variable 'X' on 'FconCyclicBound'. void Function>>>() x326; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A>' doesn't conform to the bound 'A' of the type variable 'X' on 'FconCyclicBound'. void Function>>>() x327; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A>' doesn't conform to the bound 'A' of the type variable 'X' on 'FconCyclicBound'. void Function>>>>() x328; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A>>' doesn't conform to the bound 'A' of the type variable 'X' on 'FconCyclicBound'. void Function>>>>() x329; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A>>' doesn't conform to the bound 'A' of the type variable 'X' on 'FconCyclicBound'. void Function>>>>() x330; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A>>' doesn't conform to the bound 'A' of the type variable 'X' on 'FconCyclicBound'. void Function>() x331; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'dynamic' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FconCyclicCoBound'. void Function>() x332; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'void' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FconCyclicCoBound'. void Function>() x333; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'Object?' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FconCyclicCoBound'. void Function>>() x334; //^ // [analyzer] unspecified -// ^ -// [cfe] Type argument 'FutureOr?' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FconCyclicCoBound'. +// ^ +// [cfe] Type argument 'FutureOr' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FconCyclicCoBound'. void Function>>() x335; //^ // [analyzer] unspecified -// ^ -// [cfe] Type argument 'FutureOr?' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FconCyclicCoBound'. +// ^ +// [cfe] Type argument 'FutureOr' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FconCyclicCoBound'. void Function>>() x336; //^ // [analyzer] unspecified -// ^ -// [cfe] Type argument 'FutureOr?' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FconCyclicCoBound'. +// ^ +// [cfe] Type argument 'FutureOr' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FconCyclicCoBound'. void Function>() //^ // [analyzer] unspecified - x337; -// ^ +// ^ // [cfe] Type argument 'dynamic Function(dynamic Function(dynamic))' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FconCyclicCoBound'. + x337; void Function>() x338; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'dynamic Function(dynamic Function(void))' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FconCyclicCoBound'. void Function>() //^ // [analyzer] unspecified - x339; -// ^ +// ^ // [cfe] Type argument 'dynamic Function(dynamic Function(Object?))' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FconCyclicCoBound'. + x339; void Function< Y extends FconCyclicCoBound))>>() //^ // [analyzer] unspecified - x340; -// ^ +// ^ // [cfe] Type argument 'dynamic Function(dynamic Function(FutureOr))' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FconCyclicCoBound'. + x340; void Function< Y extends FconCyclicCoBound))>>() x341; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'dynamic Function(dynamic Function(FutureOr))' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FconCyclicCoBound'. void Function< Y extends FconCyclicCoBound))>>() //^ // [analyzer] unspecified - x342; -// ^ +// ^ // [cfe] Type argument 'dynamic Function(dynamic Function(FutureOr))' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FconCyclicCoBound'. + x342; void Function>>() x343; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'dynamic' doesn't conform to the bound 'num' of the type variable 'X' on 'FconBound'. void Function>>() x344; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'void' doesn't conform to the bound 'num' of the type variable 'X' on 'FconBound'. void Function>>() x345; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'Object?' doesn't conform to the bound 'num' of the type variable 'X' on 'FconBound'. void Function>>>() x346; //^ // [analyzer] unspecified -// ^ -// [cfe] Type argument 'FutureOr?' doesn't conform to the bound 'num' of the type variable 'X' on 'FconBound'. +// ^ +// [cfe] Type argument 'FutureOr' doesn't conform to the bound 'num' of the type variable 'X' on 'FconBound'. void Function>>>() x347; //^ // [analyzer] unspecified -// ^ -// [cfe] Type argument 'FutureOr?' doesn't conform to the bound 'num' of the type variable 'X' on 'FconBound'. +// ^ +// [cfe] Type argument 'FutureOr' doesn't conform to the bound 'num' of the type variable 'X' on 'FconBound'. void Function>>>() x348; //^ // [analyzer] unspecified -// ^ -// [cfe] Type argument 'FutureOr?' doesn't conform to the bound 'num' of the type variable 'X' on 'FconBound'. +// ^ +// [cfe] Type argument 'FutureOr' doesn't conform to the bound 'num' of the type variable 'X' on 'FconBound'. void Function>>() x349; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'dynamic' doesn't conform to the bound 'A' of the type variable 'X' on 'FconCyclicBound'. void Function>>() x350; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'void' doesn't conform to the bound 'A' of the type variable 'X' on 'FconCyclicBound'. void Function>>() x351; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'Object?' doesn't conform to the bound 'A' of the type variable 'X' on 'FconCyclicBound'. void Function>>>() x352; //^ // [analyzer] unspecified -// ^ -// [cfe] Type argument 'FutureOr?' doesn't conform to the bound 'A' of the type variable 'X' on 'FconCyclicBound'. +// ^ +// [cfe] Type argument 'FutureOr' doesn't conform to the bound 'A' of the type variable 'X' on 'FconCyclicBound'. void Function>>>() x353; //^ // [analyzer] unspecified -// ^ -// [cfe] Type argument 'FutureOr?' doesn't conform to the bound 'A' of the type variable 'X' on 'FconCyclicBound'. +// ^ +// [cfe] Type argument 'FutureOr' doesn't conform to the bound 'A' of the type variable 'X' on 'FconCyclicBound'. void Function>>>() x354; //^ // [analyzer] unspecified -// ^ -// [cfe] Type argument 'FutureOr?' doesn't conform to the bound 'A' of the type variable 'X' on 'FconCyclicBound'. +// ^ +// [cfe] Type argument 'FutureOr' doesn't conform to the bound 'A' of the type variable 'X' on 'FconCyclicBound'. void Function>>>() x355; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'FconCyclicBound'. void Function>>>() x356; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'FconCyclicBound'. void Function>>>() x357; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'FconCyclicBound'. void Function>>>>() x358; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A>' doesn't conform to the bound 'A' of the type variable 'X' on 'FconCyclicBound'. void Function>>>>() x359; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A>' doesn't conform to the bound 'A' of the type variable 'X' on 'FconCyclicBound'. void Function>>>>() x360; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A>' doesn't conform to the bound 'A' of the type variable 'X' on 'FconCyclicBound'. void Function>>>>() x361; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A>' doesn't conform to the bound 'A' of the type variable 'X' on 'FconCyclicBound'. void Function>>>>() x362; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A>' doesn't conform to the bound 'A' of the type variable 'X' on 'FconCyclicBound'. void Function>>>>() x363; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A>' doesn't conform to the bound 'A' of the type variable 'X' on 'FconCyclicBound'. void Function>>>>>() x364; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A>>' doesn't conform to the bound 'A' of the type variable 'X' on 'FconCyclicBound'. void Function>>>>>() x365; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A>>' doesn't conform to the bound 'A' of the type variable 'X' on 'FconCyclicBound'. void Function>>>>>() x366; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A>>' doesn't conform to the bound 'A' of the type variable 'X' on 'FconCyclicBound'. void Function>>() x367; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'dynamic' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FconCyclicCoBound'. void Function>>() x368; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'void' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FconCyclicCoBound'. void Function>>() x369; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'Object?' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FconCyclicCoBound'. void Function>>>() x370; //^ // [analyzer] unspecified -// ^ -// [cfe] Type argument 'FutureOr?' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FconCyclicCoBound'. +// ^ +// [cfe] Type argument 'FutureOr' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FconCyclicCoBound'. void Function>>>() x371; //^ // [analyzer] unspecified -// ^ -// [cfe] Type argument 'FutureOr?' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FconCyclicCoBound'. +// ^ +// [cfe] Type argument 'FutureOr' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FconCyclicCoBound'. void Function>>>() x372; //^ // [analyzer] unspecified -// ^ -// [cfe] Type argument 'FutureOr?' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FconCyclicCoBound'. +// ^ +// [cfe] Type argument 'FutureOr' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FconCyclicCoBound'. void Function>>() //^ // [analyzer] unspecified - x373; -// ^ +// ^ // [cfe] Type argument 'dynamic Function(dynamic Function(dynamic))' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FconCyclicCoBound'. + x373; void Function>>() //^ // [analyzer] unspecified - x374; -// ^ +// ^ // [cfe] Type argument 'dynamic Function(dynamic Function(void))' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FconCyclicCoBound'. + x374; void Function>>() //^ // [analyzer] unspecified - x375; -// ^ +// ^ // [cfe] Type argument 'dynamic Function(dynamic Function(Object?))' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FconCyclicCoBound'. + x375; void Function< Y extends A< FconCyclicCoBound))>>>() x376; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'dynamic Function(dynamic Function(FutureOr))' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FconCyclicCoBound'. void Function< Y extends A))>>>() //^ // [analyzer] unspecified - x377; -// ^ +// ^ // [cfe] Type argument 'dynamic Function(dynamic Function(FutureOr))' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FconCyclicCoBound'. + x377; void Function< Y extends A< FconCyclicCoBound))>>>() x378; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'dynamic Function(dynamic Function(FutureOr))' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FconCyclicCoBound'. Finv> x379; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'dynamic' doesn't conform to the bound 'num' of the type variable 'X' on 'FconBound'. Finv> x380; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'void' doesn't conform to the bound 'num' of the type variable 'X' on 'FconBound'. Finv> x381; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'Object?' doesn't conform to the bound 'num' of the type variable 'X' on 'FconBound'. Finv>> x382; //^ // [analyzer] unspecified -// ^ -// [cfe] Type argument 'FutureOr?' doesn't conform to the bound 'num' of the type variable 'X' on 'FconBound'. +// ^ +// [cfe] Type argument 'FutureOr' doesn't conform to the bound 'num' of the type variable 'X' on 'FconBound'. Finv>> x383; //^ // [analyzer] unspecified -// ^ -// [cfe] Type argument 'FutureOr?' doesn't conform to the bound 'num' of the type variable 'X' on 'FconBound'. +// ^ +// [cfe] Type argument 'FutureOr' doesn't conform to the bound 'num' of the type variable 'X' on 'FconBound'. Finv>> x384; //^ // [analyzer] unspecified -// ^ -// [cfe] Type argument 'FutureOr?' doesn't conform to the bound 'num' of the type variable 'X' on 'FconBound'. +// ^ +// [cfe] Type argument 'FutureOr' doesn't conform to the bound 'num' of the type variable 'X' on 'FconBound'. Finv> x385; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'dynamic' doesn't conform to the bound 'A' of the type variable 'X' on 'FconCyclicBound'. Finv> x386; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'void' doesn't conform to the bound 'A' of the type variable 'X' on 'FconCyclicBound'. Finv> x387; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'Object?' doesn't conform to the bound 'A' of the type variable 'X' on 'FconCyclicBound'. Finv>> x388; //^ // [analyzer] unspecified -// ^ -// [cfe] Type argument 'FutureOr?' doesn't conform to the bound 'A' of the type variable 'X' on 'FconCyclicBound'. +// ^ +// [cfe] Type argument 'FutureOr' doesn't conform to the bound 'A' of the type variable 'X' on 'FconCyclicBound'. Finv>> x389; //^ // [analyzer] unspecified -// ^ -// [cfe] Type argument 'FutureOr?' doesn't conform to the bound 'A' of the type variable 'X' on 'FconCyclicBound'. +// ^ +// [cfe] Type argument 'FutureOr' doesn't conform to the bound 'A' of the type variable 'X' on 'FconCyclicBound'. Finv>> x390; //^ // [analyzer] unspecified -// ^ -// [cfe] Type argument 'FutureOr?' doesn't conform to the bound 'A' of the type variable 'X' on 'FconCyclicBound'. +// ^ +// [cfe] Type argument 'FutureOr' doesn't conform to the bound 'A' of the type variable 'X' on 'FconCyclicBound'. Finv>> x391; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'FconCyclicBound'. Finv>> x392; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'FconCyclicBound'. Finv>> x393; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'FconCyclicBound'. Finv>>> x394; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A>' doesn't conform to the bound 'A' of the type variable 'X' on 'FconCyclicBound'. Finv>>> x395; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A>' doesn't conform to the bound 'A' of the type variable 'X' on 'FconCyclicBound'. Finv>>> x396; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A>' doesn't conform to the bound 'A' of the type variable 'X' on 'FconCyclicBound'. Finv>>> x397; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A>' doesn't conform to the bound 'A' of the type variable 'X' on 'FconCyclicBound'. Finv>>> x398; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A>' doesn't conform to the bound 'A' of the type variable 'X' on 'FconCyclicBound'. Finv>>> x399; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A>' doesn't conform to the bound 'A' of the type variable 'X' on 'FconCyclicBound'. Finv>>>> x400; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A>>' doesn't conform to the bound 'A' of the type variable 'X' on 'FconCyclicBound'. Finv>>>> x401; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A>>' doesn't conform to the bound 'A' of the type variable 'X' on 'FconCyclicBound'. Finv>>>> x402; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A>>' doesn't conform to the bound 'A' of the type variable 'X' on 'FconCyclicBound'. Finv> x403; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'dynamic' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FconCyclicCoBound'. Finv> x404; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'void' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FconCyclicCoBound'. Finv> x405; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'Object?' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FconCyclicCoBound'. Finv>> x406; //^ // [analyzer] unspecified -// ^ -// [cfe] Type argument 'FutureOr?' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FconCyclicCoBound'. +// ^ +// [cfe] Type argument 'FutureOr' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FconCyclicCoBound'. Finv>> x407; //^ // [analyzer] unspecified -// ^ -// [cfe] Type argument 'FutureOr?' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FconCyclicCoBound'. +// ^ +// [cfe] Type argument 'FutureOr' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FconCyclicCoBound'. Finv>> x408; //^ // [analyzer] unspecified -// ^ -// [cfe] Type argument 'FutureOr?' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FconCyclicCoBound'. +// ^ +// [cfe] Type argument 'FutureOr' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FconCyclicCoBound'. Finv> x409; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'dynamic Function(dynamic Function(dynamic))' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FconCyclicCoBound'. Finv> x410; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'dynamic Function(dynamic Function(void))' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FconCyclicCoBound'. Finv> x411; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'dynamic Function(dynamic Function(Object?))' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FconCyclicCoBound'. Finv))>> x412; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'dynamic Function(dynamic Function(FutureOr))' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FconCyclicCoBound'. Finv))>> x413; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'dynamic Function(dynamic Function(FutureOr))' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FconCyclicCoBound'. Finv))>> x414; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'dynamic Function(dynamic Function(FutureOr))' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FconCyclicCoBound'. Funu> x415; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'dynamic' doesn't conform to the bound 'num' of the type variable 'X' on 'FconBound'. Funu> x416; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'void' doesn't conform to the bound 'num' of the type variable 'X' on 'FconBound'. Funu> x417; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'Object?' doesn't conform to the bound 'num' of the type variable 'X' on 'FconBound'. Funu>> x418; //^ // [analyzer] unspecified -// ^ -// [cfe] Type argument 'FutureOr?' doesn't conform to the bound 'num' of the type variable 'X' on 'FconBound'. +// ^ +// [cfe] Type argument 'FutureOr' doesn't conform to the bound 'num' of the type variable 'X' on 'FconBound'. Funu>> x419; //^ // [analyzer] unspecified -// ^ -// [cfe] Type argument 'FutureOr?' doesn't conform to the bound 'num' of the type variable 'X' on 'FconBound'. +// ^ +// [cfe] Type argument 'FutureOr' doesn't conform to the bound 'num' of the type variable 'X' on 'FconBound'. Funu>> x420; //^ // [analyzer] unspecified -// ^ -// [cfe] Type argument 'FutureOr?' doesn't conform to the bound 'num' of the type variable 'X' on 'FconBound'. +// ^ +// [cfe] Type argument 'FutureOr' doesn't conform to the bound 'num' of the type variable 'X' on 'FconBound'. Funu> x421; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'dynamic' doesn't conform to the bound 'A' of the type variable 'X' on 'FconCyclicBound'. Funu> x422; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'void' doesn't conform to the bound 'A' of the type variable 'X' on 'FconCyclicBound'. Funu> x423; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'Object?' doesn't conform to the bound 'A' of the type variable 'X' on 'FconCyclicBound'. Funu>> x424; //^ // [analyzer] unspecified -// ^ -// [cfe] Type argument 'FutureOr?' doesn't conform to the bound 'A' of the type variable 'X' on 'FconCyclicBound'. +// ^ +// [cfe] Type argument 'FutureOr' doesn't conform to the bound 'A' of the type variable 'X' on 'FconCyclicBound'. Funu>> x425; //^ // [analyzer] unspecified -// ^ -// [cfe] Type argument 'FutureOr?' doesn't conform to the bound 'A' of the type variable 'X' on 'FconCyclicBound'. +// ^ +// [cfe] Type argument 'FutureOr' doesn't conform to the bound 'A' of the type variable 'X' on 'FconCyclicBound'. Funu>> x426; //^ // [analyzer] unspecified -// ^ -// [cfe] Type argument 'FutureOr?' doesn't conform to the bound 'A' of the type variable 'X' on 'FconCyclicBound'. +// ^ +// [cfe] Type argument 'FutureOr' doesn't conform to the bound 'A' of the type variable 'X' on 'FconCyclicBound'. Funu>> x427; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'FconCyclicBound'. Funu>> x428; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'FconCyclicBound'. Funu>> x429; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'FconCyclicBound'. Funu>>> x430; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A>' doesn't conform to the bound 'A' of the type variable 'X' on 'FconCyclicBound'. Funu>>> x431; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A>' doesn't conform to the bound 'A' of the type variable 'X' on 'FconCyclicBound'. Funu>>> x432; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A>' doesn't conform to the bound 'A' of the type variable 'X' on 'FconCyclicBound'. Funu>>> x433; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A>' doesn't conform to the bound 'A' of the type variable 'X' on 'FconCyclicBound'. Funu>>> x434; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A>' doesn't conform to the bound 'A' of the type variable 'X' on 'FconCyclicBound'. Funu>>> x435; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A>' doesn't conform to the bound 'A' of the type variable 'X' on 'FconCyclicBound'. Funu>>>> x436; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A>>' doesn't conform to the bound 'A' of the type variable 'X' on 'FconCyclicBound'. Funu>>>> x437; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A>>' doesn't conform to the bound 'A' of the type variable 'X' on 'FconCyclicBound'. Funu>>>> x438; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A>>' doesn't conform to the bound 'A' of the type variable 'X' on 'FconCyclicBound'. Funu> x439; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'dynamic' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FconCyclicCoBound'. Funu> x440; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'void' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FconCyclicCoBound'. Funu> x441; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'Object?' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FconCyclicCoBound'. Funu>> x442; //^ // [analyzer] unspecified -// ^ -// [cfe] Type argument 'FutureOr?' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FconCyclicCoBound'. +// ^ +// [cfe] Type argument 'FutureOr' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FconCyclicCoBound'. Funu>> x443; //^ // [analyzer] unspecified -// ^ -// [cfe] Type argument 'FutureOr?' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FconCyclicCoBound'. +// ^ +// [cfe] Type argument 'FutureOr' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FconCyclicCoBound'. Funu>> x444; //^ // [analyzer] unspecified -// ^ -// [cfe] Type argument 'FutureOr?' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FconCyclicCoBound'. +// ^ +// [cfe] Type argument 'FutureOr' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FconCyclicCoBound'. Funu> x445; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'dynamic Function(dynamic Function(dynamic))' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FconCyclicCoBound'. Funu> x446; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'dynamic Function(dynamic Function(void))' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FconCyclicCoBound'. Funu> x447; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'dynamic Function(dynamic Function(Object?))' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FconCyclicCoBound'. Funu))>> x448; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'dynamic Function(dynamic Function(FutureOr))' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FconCyclicCoBound'. Funu))>> x449; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'dynamic Function(dynamic Function(FutureOr))' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FconCyclicCoBound'. Funu))>> x450; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'dynamic Function(dynamic Function(FutureOr))' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FconCyclicCoBound'. } diff --git a/tests/language/generic/super_bounded_types_error_test.dart b/tests/language/generic/super_bounded_types_error_test.dart index 5f523bc77a3..7917fa779c7 100644 --- a/tests/language/generic/super_bounded_types_error_test.dart +++ b/tests/language/generic/super_bounded_types_error_test.dart @@ -62,1820 +62,1748 @@ void testCovariantSuperboundError() { FcovBound x1; //^ // [analyzer] unspecified -// ^ // [cfe] Type argument 'Object' doesn't conform to the bound 'num' of the type variable 'X' on 'FcovBound'. FcovBound> x2; //^ // [analyzer] unspecified -// ^ // [cfe] Type argument 'FutureOr' doesn't conform to the bound 'num' of the type variable 'X' on 'FcovBound'. FcovCyclicBound x3; //^ // [analyzer] unspecified -// ^ // [cfe] Type argument 'Object' doesn't conform to the bound 'A' of the type variable 'X' on 'FcovCyclicBound'. FcovCyclicBound> x4; //^ // [analyzer] unspecified -// ^ // [cfe] Type argument 'FutureOr' doesn't conform to the bound 'A' of the type variable 'X' on 'FcovCyclicBound'. FcovCyclicBound> x5; //^ // [analyzer] unspecified -// ^ // [cfe] Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'FcovCyclicBound'. FcovCyclicBound>> x6; //^ // [analyzer] unspecified -// ^ // [cfe] Type argument 'A>' doesn't conform to the bound 'A' of the type variable 'X' on 'FcovCyclicBound'. FcovCyclicBound>> x7; //^ // [analyzer] unspecified -// ^ // [cfe] Type argument 'A>' doesn't conform to the bound 'A' of the type variable 'X' on 'FcovCyclicBound'. FcovCyclicBound>>> x8; //^ // [analyzer] unspecified -// ^ // [cfe] Type argument 'A>>' doesn't conform to the bound 'A' of the type variable 'X' on 'FcovCyclicBound'. FcovCyclicCoBound x9; //^ // [analyzer] unspecified -// ^ // [cfe] Type argument 'Object' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FcovCyclicCoBound'. FcovCyclicCoBound> x10; //^ // [analyzer] unspecified -// ^ // [cfe] Type argument 'FutureOr' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FcovCyclicCoBound'. FcovCyclicCoBound x11; //^ // [analyzer] unspecified -// ^ // [cfe] Type argument 'dynamic Function(dynamic Function(Object))' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FcovCyclicCoBound'. FcovCyclicCoBound))> x12; //^ // [analyzer] unspecified -// ^ // [cfe] Type argument 'dynamic Function(dynamic Function(FutureOr))' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FcovCyclicCoBound'. CFcov x13; //^ // [analyzer] unspecified -// ^ // [cfe] Type argument 'Object' doesn't conform to the bound 'X Function()' of the type variable 'X' on 'CFcov'. CFcov> x14; //^ // [analyzer] unspecified -// ^ // [cfe] Type argument 'FutureOr' doesn't conform to the bound 'X Function()' of the type variable 'X' on 'CFcov'. CFcov> x15; //^ // [analyzer] unspecified -// ^ -// [cfe] Type argument 'Object Function()' doesn't conform to the bound 'X Function()' of the type variable 'X' on 'CFcov'. +// [cfe] Type argument 'Fcov' doesn't conform to the bound 'X Function()' of the type variable 'X' on 'CFcov'. CFcov>> x16; //^ // [analyzer] unspecified -// ^ -// [cfe] Type argument 'FutureOr Function()' doesn't conform to the bound 'X Function()' of the type variable 'X' on 'CFcov'. +// [cfe] Type argument 'Fcov>' doesn't conform to the bound 'X Function()' of the type variable 'X' on 'CFcov'. CFcov>> x17; //^ // [analyzer] unspecified -// ^ -// [cfe] Type argument 'Object Function() Function()' doesn't conform to the bound 'X Function()' of the type variable 'X' on 'CFcov'. +// [cfe] Type argument 'Fcov>' doesn't conform to the bound 'X Function()' of the type variable 'X' on 'CFcov'. CFcov>>> x18; //^ // [analyzer] unspecified -// ^ -// [cfe] Type argument 'FutureOr Function() Function()' doesn't conform to the bound 'X Function()' of the type variable 'X' on 'CFcov'. +// [cfe] Type argument 'Fcov>>' doesn't conform to the bound 'X Function()' of the type variable 'X' on 'CFcov'. CFcon x19; //^ // [analyzer] unspecified -// ^ // [cfe] Type argument 'Object' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'CFcon'. CFcon> x20; //^ // [analyzer] unspecified -// ^ // [cfe] Type argument 'FutureOr' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'CFcon'. CFinv x21; //^ // [analyzer] unspecified -// ^ // [cfe] Type argument 'Object' doesn't conform to the bound 'X Function(X)' of the type variable 'X' on 'CFinv'. CFinv> x22; //^ // [analyzer] unspecified -// ^ // [cfe] Type argument 'FutureOr' doesn't conform to the bound 'X Function(X)' of the type variable 'X' on 'CFinv'. CFunu x23; //^ // [analyzer] unspecified -// ^ // [cfe] Type argument 'Object' doesn't conform to the bound 'dynamic Function()' of the type variable 'X' on 'CFunu'. CFunu> x24; //^ // [analyzer] unspecified -// ^ // [cfe] Type argument 'FutureOr' doesn't conform to the bound 'dynamic Function()' of the type variable 'X' on 'CFunu'. CcovBound x25; //^ // [analyzer] unspecified -// ^ // [cfe] Type argument 'Object' doesn't conform to the bound 'num' of the type variable 'X' on 'CcovBound'. CcovBound> x26; //^ // [analyzer] unspecified -// ^ // [cfe] Type argument 'FutureOr' doesn't conform to the bound 'num' of the type variable 'X' on 'CcovBound'. CcovCyclicBound x27; //^ // [analyzer] unspecified -// ^ // [cfe] Type argument 'Object' doesn't conform to the bound 'A' of the type variable 'X' on 'CcovCyclicBound'. CcovCyclicBound> x28; //^ // [analyzer] unspecified -// ^ // [cfe] Type argument 'FutureOr' doesn't conform to the bound 'A' of the type variable 'X' on 'CcovCyclicBound'. CcovCyclicBound> x29; //^ // [analyzer] unspecified -// ^ // [cfe] Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'CcovCyclicBound'. CcovCyclicBound>> x30; //^ // [analyzer] unspecified -// ^ // [cfe] Type argument 'A>' doesn't conform to the bound 'A' of the type variable 'X' on 'CcovCyclicBound'. CcovCyclicBound>> x31; //^ // [analyzer] unspecified -// ^ // [cfe] Type argument 'A>' doesn't conform to the bound 'A' of the type variable 'X' on 'CcovCyclicBound'. CcovCyclicBound>>> x32; //^ // [analyzer] unspecified -// ^ // [cfe] Type argument 'A>>' doesn't conform to the bound 'A' of the type variable 'X' on 'CcovCyclicBound'. CcovCyclicCoBound x33; //^ // [analyzer] unspecified -// ^ // [cfe] Type argument 'Object' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'CcovCyclicCoBound'. CcovCyclicCoBound> x34; //^ // [analyzer] unspecified -// ^ // [cfe] Type argument 'FutureOr' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'CcovCyclicCoBound'. CcovCyclicCoBound x35; //^ // [analyzer] unspecified -// ^ // [cfe] Type argument 'dynamic Function(dynamic Function(Object))' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'CcovCyclicCoBound'. CcovCyclicCoBound))> x36; //^ // [analyzer] unspecified -// ^ // [cfe] Type argument 'dynamic Function(dynamic Function(FutureOr))' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'CcovCyclicCoBound'. // --- Same non-super-bounded types in a context. A> x37; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'Object' doesn't conform to the bound 'num' of the type variable 'X' on 'FcovBound'. A>> x38; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'FutureOr' doesn't conform to the bound 'num' of the type variable 'X' on 'FcovBound'. A> x39; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'Object' doesn't conform to the bound 'A' of the type variable 'X' on 'FcovCyclicBound'. A>> x40; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'FutureOr' doesn't conform to the bound 'A' of the type variable 'X' on 'FcovCyclicBound'. A>> x41; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'FcovCyclicBound'. A>>> x42; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A>' doesn't conform to the bound 'A' of the type variable 'X' on 'FcovCyclicBound'. A>>> x43; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A>' doesn't conform to the bound 'A' of the type variable 'X' on 'FcovCyclicBound'. A>>>> x44; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A>>' doesn't conform to the bound 'A' of the type variable 'X' on 'FcovCyclicBound'. A> x45; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'Object' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FcovCyclicCoBound'. A>> x46; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'FutureOr' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FcovCyclicCoBound'. A> x47; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'dynamic Function(dynamic Function(Object))' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FcovCyclicCoBound'. A))>> x48; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'dynamic Function(dynamic Function(FutureOr))' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FcovCyclicCoBound'. A> x49; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'Object' doesn't conform to the bound 'X Function()' of the type variable 'X' on 'CFcov'. A>> x50; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'FutureOr' doesn't conform to the bound 'X Function()' of the type variable 'X' on 'CFcov'. A>> x51; //^ // [analyzer] unspecified -// ^ -// [cfe] Type argument 'Object Function()' doesn't conform to the bound 'X Function()' of the type variable 'X' on 'CFcov'. +// ^ +// [cfe] Type argument 'Fcov' doesn't conform to the bound 'X Function()' of the type variable 'X' on 'CFcov'. A>>> x52; //^ // [analyzer] unspecified -// ^ -// [cfe] Type argument 'FutureOr Function()' doesn't conform to the bound 'X Function()' of the type variable 'X' on 'CFcov'. +// ^ +// [cfe] Type argument 'Fcov>' doesn't conform to the bound 'X Function()' of the type variable 'X' on 'CFcov'. A>>> x53; //^ // [analyzer] unspecified -// ^ -// [cfe] Type argument 'Object Function() Function()' doesn't conform to the bound 'X Function()' of the type variable 'X' on 'CFcov'. +// ^ +// [cfe] Type argument 'Fcov>' doesn't conform to the bound 'X Function()' of the type variable 'X' on 'CFcov'. A>>>> x54; //^ // [analyzer] unspecified -// ^ -// [cfe] Type argument 'FutureOr Function() Function()' doesn't conform to the bound 'X Function()' of the type variable 'X' on 'CFcov'. +// ^ +// [cfe] Type argument 'Fcov>>' doesn't conform to the bound 'X Function()' of the type variable 'X' on 'CFcov'. A> x55; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'Object' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'CFcon'. A>> x56; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'FutureOr' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'CFcon'. A> x57; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'Object' doesn't conform to the bound 'X Function(X)' of the type variable 'X' on 'CFinv'. A>> x58; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'FutureOr' doesn't conform to the bound 'X Function(X)' of the type variable 'X' on 'CFinv'. A> x59; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'Object' doesn't conform to the bound 'dynamic Function()' of the type variable 'X' on 'CFunu'. A>> x60; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'FutureOr' doesn't conform to the bound 'dynamic Function()' of the type variable 'X' on 'CFunu'. A> x61; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'Object' doesn't conform to the bound 'num' of the type variable 'X' on 'CcovBound'. A>> x62; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'FutureOr' doesn't conform to the bound 'num' of the type variable 'X' on 'CcovBound'. A> x63; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'Object' doesn't conform to the bound 'A' of the type variable 'X' on 'CcovCyclicBound'. A>> x64; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'FutureOr' doesn't conform to the bound 'A' of the type variable 'X' on 'CcovCyclicBound'. A>> x65; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'CcovCyclicBound'. A>>> x66; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A>' doesn't conform to the bound 'A' of the type variable 'X' on 'CcovCyclicBound'. A>>> x67; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A>' doesn't conform to the bound 'A' of the type variable 'X' on 'CcovCyclicBound'. A>>>> x68; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A>>' doesn't conform to the bound 'A' of the type variable 'X' on 'CcovCyclicBound'. A> x69; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'Object' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'CcovCyclicCoBound'. A>> x70; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'FutureOr' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'CcovCyclicCoBound'. A> x71; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'dynamic Function(dynamic Function(Object))' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'CcovCyclicCoBound'. A))>> x72; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'dynamic Function(dynamic Function(FutureOr))' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'CcovCyclicCoBound'. FcovBound Function() x73; //^ // [analyzer] unspecified -// ^ // [cfe] Type argument 'Object' doesn't conform to the bound 'num' of the type variable 'X' on 'FcovBound'. FcovBound> Function() x74; //^ // [analyzer] unspecified -// ^ // [cfe] Type argument 'FutureOr' doesn't conform to the bound 'num' of the type variable 'X' on 'FcovBound'. FcovCyclicBound Function() x75; //^ // [analyzer] unspecified -// ^ // [cfe] Type argument 'Object' doesn't conform to the bound 'A' of the type variable 'X' on 'FcovCyclicBound'. FcovCyclicBound> Function() x76; //^ // [analyzer] unspecified -// ^ // [cfe] Type argument 'FutureOr' doesn't conform to the bound 'A' of the type variable 'X' on 'FcovCyclicBound'. FcovCyclicBound> Function() x77; //^ // [analyzer] unspecified -// ^ // [cfe] Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'FcovCyclicBound'. FcovCyclicBound>> Function() x78; //^ // [analyzer] unspecified -// ^ // [cfe] Type argument 'A>' doesn't conform to the bound 'A' of the type variable 'X' on 'FcovCyclicBound'. FcovCyclicBound>> Function() x79; //^ // [analyzer] unspecified -// ^ // [cfe] Type argument 'A>' doesn't conform to the bound 'A' of the type variable 'X' on 'FcovCyclicBound'. FcovCyclicBound>>> Function() x80; //^ // [analyzer] unspecified -// ^ // [cfe] Type argument 'A>>' doesn't conform to the bound 'A' of the type variable 'X' on 'FcovCyclicBound'. FcovCyclicCoBound Function() x81; //^ // [analyzer] unspecified -// ^ // [cfe] Type argument 'Object' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FcovCyclicCoBound'. FcovCyclicCoBound> Function() x82; //^ // [analyzer] unspecified -// ^ // [cfe] Type argument 'FutureOr' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FcovCyclicCoBound'. FcovCyclicCoBound Function() x83; //^ // [analyzer] unspecified -// ^ // [cfe] Type argument 'dynamic Function(dynamic Function(Object))' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FcovCyclicCoBound'. FcovCyclicCoBound))> Function() x84; //^ // [analyzer] unspecified -// ^ // [cfe] Type argument 'dynamic Function(dynamic Function(FutureOr))' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FcovCyclicCoBound'. CFcov Function() x85; //^ // [analyzer] unspecified -// ^ // [cfe] Type argument 'Object' doesn't conform to the bound 'X Function()' of the type variable 'X' on 'CFcov'. CFcov> Function() x86; //^ // [analyzer] unspecified -// ^ // [cfe] Type argument 'FutureOr' doesn't conform to the bound 'X Function()' of the type variable 'X' on 'CFcov'. CFcov> Function() x87; //^ // [analyzer] unspecified -// ^ -// [cfe] Type argument 'Object Function()' doesn't conform to the bound 'X Function()' of the type variable 'X' on 'CFcov'. +// [cfe] Type argument 'Fcov' doesn't conform to the bound 'X Function()' of the type variable 'X' on 'CFcov'. CFcov>> Function() x88; //^ // [analyzer] unspecified -// ^ -// [cfe] Type argument 'FutureOr Function()' doesn't conform to the bound 'X Function()' of the type variable 'X' on 'CFcov'. +// [cfe] Type argument 'Fcov>' doesn't conform to the bound 'X Function()' of the type variable 'X' on 'CFcov'. CFcov>> Function() x89; //^ // [analyzer] unspecified -// ^ -// [cfe] Type argument 'Object Function() Function()' doesn't conform to the bound 'X Function()' of the type variable 'X' on 'CFcov'. +// [cfe] Type argument 'Fcov>' doesn't conform to the bound 'X Function()' of the type variable 'X' on 'CFcov'. CFcov>>> Function() x90; //^ // [analyzer] unspecified -// ^ -// [cfe] Type argument 'FutureOr Function() Function()' doesn't conform to the bound 'X Function()' of the type variable 'X' on 'CFcov'. +// [cfe] Type argument 'Fcov>>' doesn't conform to the bound 'X Function()' of the type variable 'X' on 'CFcov'. CFcon Function() x91; //^ // [analyzer] unspecified -// ^ // [cfe] Type argument 'Object' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'CFcon'. CFcon> Function() x92; //^ // [analyzer] unspecified -// ^ // [cfe] Type argument 'FutureOr' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'CFcon'. CFinv Function() x93; //^ // [analyzer] unspecified -// ^ // [cfe] Type argument 'Object' doesn't conform to the bound 'X Function(X)' of the type variable 'X' on 'CFinv'. CFinv> Function() x94; //^ // [analyzer] unspecified -// ^ // [cfe] Type argument 'FutureOr' doesn't conform to the bound 'X Function(X)' of the type variable 'X' on 'CFinv'. CFunu Function() x95; //^ // [analyzer] unspecified -// ^ // [cfe] Type argument 'Object' doesn't conform to the bound 'dynamic Function()' of the type variable 'X' on 'CFunu'. CFunu> Function() x96; //^ // [analyzer] unspecified -// ^ // [cfe] Type argument 'FutureOr' doesn't conform to the bound 'dynamic Function()' of the type variable 'X' on 'CFunu'. CcovBound Function() x97; //^ // [analyzer] unspecified -// ^ // [cfe] Type argument 'Object' doesn't conform to the bound 'num' of the type variable 'X' on 'CcovBound'. CcovBound> Function() x98; //^ // [analyzer] unspecified -// ^ // [cfe] Type argument 'FutureOr' doesn't conform to the bound 'num' of the type variable 'X' on 'CcovBound'. CcovCyclicBound Function() x99; //^ // [analyzer] unspecified -// ^ // [cfe] Type argument 'Object' doesn't conform to the bound 'A' of the type variable 'X' on 'CcovCyclicBound'. CcovCyclicBound> Function() x100; //^ // [analyzer] unspecified -// ^ // [cfe] Type argument 'FutureOr' doesn't conform to the bound 'A' of the type variable 'X' on 'CcovCyclicBound'. CcovCyclicBound> Function() x101; //^ // [analyzer] unspecified -// ^ // [cfe] Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'CcovCyclicBound'. CcovCyclicBound>> Function() x102; //^ // [analyzer] unspecified -// ^ // [cfe] Type argument 'A>' doesn't conform to the bound 'A' of the type variable 'X' on 'CcovCyclicBound'. CcovCyclicBound>> Function() x103; //^ // [analyzer] unspecified -// ^ // [cfe] Type argument 'A>' doesn't conform to the bound 'A' of the type variable 'X' on 'CcovCyclicBound'. CcovCyclicBound>>> Function() x104; //^ // [analyzer] unspecified -// ^ // [cfe] Type argument 'A>>' doesn't conform to the bound 'A' of the type variable 'X' on 'CcovCyclicBound'. CcovCyclicCoBound Function() x105; //^ // [analyzer] unspecified -// ^ // [cfe] Type argument 'Object' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'CcovCyclicCoBound'. CcovCyclicCoBound> Function() x106; //^ // [analyzer] unspecified -// ^ // [cfe] Type argument 'FutureOr' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'CcovCyclicCoBound'. CcovCyclicCoBound Function() x107; //^ // [analyzer] unspecified -// ^ // [cfe] Type argument 'dynamic Function(dynamic Function(Object))' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'CcovCyclicCoBound'. CcovCyclicCoBound))> Function() x108; //^ // [analyzer] unspecified -// ^ // [cfe] Type argument 'dynamic Function(dynamic Function(FutureOr))' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'CcovCyclicCoBound'. void Function(void Function(FcovBound)) x109; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'Object' doesn't conform to the bound 'num' of the type variable 'X' on 'FcovBound'. void Function(void Function(FcovBound>)) x110; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'FutureOr' doesn't conform to the bound 'num' of the type variable 'X' on 'FcovBound'. void Function(void Function(FcovCyclicBound)) x111; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'Object' doesn't conform to the bound 'A' of the type variable 'X' on 'FcovCyclicBound'. void Function(void Function(FcovCyclicBound>)) x112; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'FutureOr' doesn't conform to the bound 'A' of the type variable 'X' on 'FcovCyclicBound'. void Function(void Function(FcovCyclicBound>)) x113; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'FcovCyclicBound'. void Function(void Function(FcovCyclicBound>>)) x114; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A>' doesn't conform to the bound 'A' of the type variable 'X' on 'FcovCyclicBound'. void Function(void Function(FcovCyclicBound>>)) x115; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A>' doesn't conform to the bound 'A' of the type variable 'X' on 'FcovCyclicBound'. void Function(void Function(FcovCyclicBound>>>)) x116; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A>>' doesn't conform to the bound 'A' of the type variable 'X' on 'FcovCyclicBound'. void Function(void Function(FcovCyclicCoBound)) x117; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'Object' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FcovCyclicCoBound'. void Function(void Function(FcovCyclicCoBound>)) x118; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'FutureOr' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FcovCyclicCoBound'. void Function(void Function(FcovCyclicCoBound)) //^ // [analyzer] unspecified - x119; -// ^ +// ^ // [cfe] Type argument 'dynamic Function(dynamic Function(Object))' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FcovCyclicCoBound'. + x119; void Function( void Function( FcovCyclicCoBound))>)) x120; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'dynamic Function(dynamic Function(FutureOr))' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FcovCyclicCoBound'. void Function(void Function(CFcov)) x121; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'Object' doesn't conform to the bound 'X Function()' of the type variable 'X' on 'CFcov'. void Function(void Function(CFcov>)) x122; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'FutureOr' doesn't conform to the bound 'X Function()' of the type variable 'X' on 'CFcov'. void Function(void Function(CFcov>)) x123; //^ // [analyzer] unspecified -// ^ -// [cfe] Type argument 'Object Function()' doesn't conform to the bound 'X Function()' of the type variable 'X' on 'CFcov'. +// ^ +// [cfe] Type argument 'Fcov' doesn't conform to the bound 'X Function()' of the type variable 'X' on 'CFcov'. void Function(void Function(CFcov>>)) x124; //^ // [analyzer] unspecified -// ^ -// [cfe] Type argument 'FutureOr Function()' doesn't conform to the bound 'X Function()' of the type variable 'X' on 'CFcov'. +// ^ +// [cfe] Type argument 'Fcov>' doesn't conform to the bound 'X Function()' of the type variable 'X' on 'CFcov'. void Function(void Function(CFcov>>)) x125; //^ // [analyzer] unspecified -// ^ -// [cfe] Type argument 'Object Function() Function()' doesn't conform to the bound 'X Function()' of the type variable 'X' on 'CFcov'. +// ^ +// [cfe] Type argument 'Fcov>' doesn't conform to the bound 'X Function()' of the type variable 'X' on 'CFcov'. void Function(void Function(CFcov>>>)) x126; //^ // [analyzer] unspecified -// ^ -// [cfe] Type argument 'FutureOr Function() Function()' doesn't conform to the bound 'X Function()' of the type variable 'X' on 'CFcov'. +// ^ +// [cfe] Type argument 'Fcov>>' doesn't conform to the bound 'X Function()' of the type variable 'X' on 'CFcov'. void Function(void Function(CFcon)) x127; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'Object' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'CFcon'. void Function(void Function(CFcon>)) x128; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'FutureOr' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'CFcon'. void Function(void Function(CFinv)) x129; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'Object' doesn't conform to the bound 'X Function(X)' of the type variable 'X' on 'CFinv'. void Function(void Function(CFinv>)) x130; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'FutureOr' doesn't conform to the bound 'X Function(X)' of the type variable 'X' on 'CFinv'. void Function(void Function(CFunu)) x131; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'Object' doesn't conform to the bound 'dynamic Function()' of the type variable 'X' on 'CFunu'. void Function(void Function(CFunu>)) x132; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'FutureOr' doesn't conform to the bound 'dynamic Function()' of the type variable 'X' on 'CFunu'. void Function(void Function(CcovBound)) x133; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'Object' doesn't conform to the bound 'num' of the type variable 'X' on 'CcovBound'. void Function(void Function(CcovBound>)) x134; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'FutureOr' doesn't conform to the bound 'num' of the type variable 'X' on 'CcovBound'. void Function(void Function(CcovCyclicBound)) x135; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'Object' doesn't conform to the bound 'A' of the type variable 'X' on 'CcovCyclicBound'. void Function(void Function(CcovCyclicBound>)) x136; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'FutureOr' doesn't conform to the bound 'A' of the type variable 'X' on 'CcovCyclicBound'. void Function(void Function(CcovCyclicBound>)) x137; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'CcovCyclicBound'. void Function(void Function(CcovCyclicBound>>)) x138; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A>' doesn't conform to the bound 'A' of the type variable 'X' on 'CcovCyclicBound'. void Function(void Function(CcovCyclicBound>>)) x139; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A>' doesn't conform to the bound 'A' of the type variable 'X' on 'CcovCyclicBound'. void Function(void Function(CcovCyclicBound>>>)) x140; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A>>' doesn't conform to the bound 'A' of the type variable 'X' on 'CcovCyclicBound'. void Function(void Function(CcovCyclicCoBound)) x141; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'Object' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'CcovCyclicCoBound'. void Function(void Function(CcovCyclicCoBound>)) x142; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'FutureOr' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'CcovCyclicCoBound'. void Function(void Function(CcovCyclicCoBound)) //^ // [analyzer] unspecified - x143; -// ^ +// ^ // [cfe] Type argument 'dynamic Function(dynamic Function(Object))' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'CcovCyclicCoBound'. + x143; void Function( void Function( CcovCyclicCoBound))>)) x144; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'dynamic Function(dynamic Function(FutureOr))' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'CcovCyclicCoBound'. void Function(FcovBound) x145; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'Object' doesn't conform to the bound 'num' of the type variable 'X' on 'FcovBound'. void Function(FcovBound>) x146; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'FutureOr' doesn't conform to the bound 'num' of the type variable 'X' on 'FcovBound'. void Function(FcovCyclicBound) x147; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'Object' doesn't conform to the bound 'A' of the type variable 'X' on 'FcovCyclicBound'. void Function(FcovCyclicBound>) x148; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'FutureOr' doesn't conform to the bound 'A' of the type variable 'X' on 'FcovCyclicBound'. void Function(FcovCyclicBound>) x149; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'FcovCyclicBound'. void Function(FcovCyclicBound>>) x150; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A>' doesn't conform to the bound 'A' of the type variable 'X' on 'FcovCyclicBound'. void Function(FcovCyclicBound>>) x151; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A>' doesn't conform to the bound 'A' of the type variable 'X' on 'FcovCyclicBound'. void Function(FcovCyclicBound>>>) x152; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A>>' doesn't conform to the bound 'A' of the type variable 'X' on 'FcovCyclicBound'. void Function(FcovCyclicCoBound) x153; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'Object' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FcovCyclicCoBound'. void Function(FcovCyclicCoBound>) x154; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'FutureOr' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FcovCyclicCoBound'. void Function(FcovCyclicCoBound) x155; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'dynamic Function(dynamic Function(Object))' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FcovCyclicCoBound'. void Function(FcovCyclicCoBound))>) x156; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'dynamic Function(dynamic Function(FutureOr))' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FcovCyclicCoBound'. void Function(CFcov) x157; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'Object' doesn't conform to the bound 'X Function()' of the type variable 'X' on 'CFcov'. void Function(CFcov>) x158; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'FutureOr' doesn't conform to the bound 'X Function()' of the type variable 'X' on 'CFcov'. void Function(CFcov>) x159; //^ // [analyzer] unspecified -// ^ -// [cfe] Type argument 'Object Function()' doesn't conform to the bound 'X Function()' of the type variable 'X' on 'CFcov'. +// ^ +// [cfe] Type argument 'Fcov' doesn't conform to the bound 'X Function()' of the type variable 'X' on 'CFcov'. void Function(CFcov>>) x160; //^ // [analyzer] unspecified -// ^ -// [cfe] Type argument 'FutureOr Function()' doesn't conform to the bound 'X Function()' of the type variable 'X' on 'CFcov'. +// ^ +// [cfe] Type argument 'Fcov>' doesn't conform to the bound 'X Function()' of the type variable 'X' on 'CFcov'. void Function(CFcov>>) x161; //^ // [analyzer] unspecified -// ^ -// [cfe] Type argument 'Object Function() Function()' doesn't conform to the bound 'X Function()' of the type variable 'X' on 'CFcov'. +// ^ +// [cfe] Type argument 'Fcov>' doesn't conform to the bound 'X Function()' of the type variable 'X' on 'CFcov'. void Function(CFcov>>>) x162; //^ // [analyzer] unspecified -// ^ -// [cfe] Type argument 'FutureOr Function() Function()' doesn't conform to the bound 'X Function()' of the type variable 'X' on 'CFcov'. +// ^ +// [cfe] Type argument 'Fcov>>' doesn't conform to the bound 'X Function()' of the type variable 'X' on 'CFcov'. void Function(CFcon) x163; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'Object' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'CFcon'. void Function(CFcon>) x164; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'FutureOr' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'CFcon'. void Function(CFinv) x165; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'Object' doesn't conform to the bound 'X Function(X)' of the type variable 'X' on 'CFinv'. void Function(CFinv>) x166; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'FutureOr' doesn't conform to the bound 'X Function(X)' of the type variable 'X' on 'CFinv'. void Function(CFunu) x167; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'Object' doesn't conform to the bound 'dynamic Function()' of the type variable 'X' on 'CFunu'. void Function(CFunu>) x168; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'FutureOr' doesn't conform to the bound 'dynamic Function()' of the type variable 'X' on 'CFunu'. void Function(CcovBound) x169; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'Object' doesn't conform to the bound 'num' of the type variable 'X' on 'CcovBound'. void Function(CcovBound>) x170; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'FutureOr' doesn't conform to the bound 'num' of the type variable 'X' on 'CcovBound'. void Function(CcovCyclicBound) x171; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'Object' doesn't conform to the bound 'A' of the type variable 'X' on 'CcovCyclicBound'. void Function(CcovCyclicBound>) x172; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'FutureOr' doesn't conform to the bound 'A' of the type variable 'X' on 'CcovCyclicBound'. void Function(CcovCyclicBound>) x173; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'CcovCyclicBound'. void Function(CcovCyclicBound>>) x174; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A>' doesn't conform to the bound 'A' of the type variable 'X' on 'CcovCyclicBound'. void Function(CcovCyclicBound>>) x175; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A>' doesn't conform to the bound 'A' of the type variable 'X' on 'CcovCyclicBound'. void Function(CcovCyclicBound>>>) x176; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A>>' doesn't conform to the bound 'A' of the type variable 'X' on 'CcovCyclicBound'. void Function(CcovCyclicCoBound) x177; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'Object' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'CcovCyclicCoBound'. void Function(CcovCyclicCoBound>) x178; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'FutureOr' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'CcovCyclicCoBound'. void Function(CcovCyclicCoBound) x179; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'dynamic Function(dynamic Function(Object))' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'CcovCyclicCoBound'. void Function(CcovCyclicCoBound))>) x180; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'dynamic Function(dynamic Function(FutureOr))' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'CcovCyclicCoBound'. void Function(FcovBound) Function() x181; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'Object' doesn't conform to the bound 'num' of the type variable 'X' on 'FcovBound'. void Function(FcovBound>) Function() x182; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'FutureOr' doesn't conform to the bound 'num' of the type variable 'X' on 'FcovBound'. void Function(FcovCyclicBound) Function() x183; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'Object' doesn't conform to the bound 'A' of the type variable 'X' on 'FcovCyclicBound'. void Function(FcovCyclicBound>) Function() x184; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'FutureOr' doesn't conform to the bound 'A' of the type variable 'X' on 'FcovCyclicBound'. void Function(FcovCyclicBound>) Function() x185; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'FcovCyclicBound'. void Function(FcovCyclicBound>>) Function() x186; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A>' doesn't conform to the bound 'A' of the type variable 'X' on 'FcovCyclicBound'. void Function(FcovCyclicBound>>) Function() x187; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A>' doesn't conform to the bound 'A' of the type variable 'X' on 'FcovCyclicBound'. void Function(FcovCyclicBound>>>) Function() x188; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A>>' doesn't conform to the bound 'A' of the type variable 'X' on 'FcovCyclicBound'. void Function(FcovCyclicCoBound) Function() x189; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'Object' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FcovCyclicCoBound'. void Function(FcovCyclicCoBound>) Function() x190; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'FutureOr' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FcovCyclicCoBound'. void Function(FcovCyclicCoBound) Function() x191; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'dynamic Function(dynamic Function(Object))' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FcovCyclicCoBound'. void Function(FcovCyclicCoBound))>) //^ // [analyzer] unspecified - Function() x192; -// ^ +// ^ // [cfe] Type argument 'dynamic Function(dynamic Function(FutureOr))' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FcovCyclicCoBound'. + Function() x192; void Function(CFcov) Function() x193; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'Object' doesn't conform to the bound 'X Function()' of the type variable 'X' on 'CFcov'. void Function(CFcov>) Function() x194; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'FutureOr' doesn't conform to the bound 'X Function()' of the type variable 'X' on 'CFcov'. void Function(CFcov>) Function() x195; //^ // [analyzer] unspecified -// ^ -// [cfe] Type argument 'Object Function()' doesn't conform to the bound 'X Function()' of the type variable 'X' on 'CFcov'. +// ^ +// [cfe] Type argument 'Fcov' doesn't conform to the bound 'X Function()' of the type variable 'X' on 'CFcov'. void Function(CFcov>>) Function() x196; //^ // [analyzer] unspecified -// ^ -// [cfe] Type argument 'FutureOr Function()' doesn't conform to the bound 'X Function()' of the type variable 'X' on 'CFcov'. +// ^ +// [cfe] Type argument 'Fcov>' doesn't conform to the bound 'X Function()' of the type variable 'X' on 'CFcov'. void Function(CFcov>>) Function() x197; //^ // [analyzer] unspecified -// ^ -// [cfe] Type argument 'Object Function() Function()' doesn't conform to the bound 'X Function()' of the type variable 'X' on 'CFcov'. +// ^ +// [cfe] Type argument 'Fcov>' doesn't conform to the bound 'X Function()' of the type variable 'X' on 'CFcov'. void Function(CFcov>>>) Function() x198; //^ // [analyzer] unspecified -// ^ -// [cfe] Type argument 'FutureOr Function() Function()' doesn't conform to the bound 'X Function()' of the type variable 'X' on 'CFcov'. +// ^ +// [cfe] Type argument 'Fcov>>' doesn't conform to the bound 'X Function()' of the type variable 'X' on 'CFcov'. void Function(CFcon) Function() x199; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'Object' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'CFcon'. void Function(CFcon>) Function() x200; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'FutureOr' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'CFcon'. void Function(CFinv) Function() x201; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'Object' doesn't conform to the bound 'X Function(X)' of the type variable 'X' on 'CFinv'. void Function(CFinv>) Function() x202; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'FutureOr' doesn't conform to the bound 'X Function(X)' of the type variable 'X' on 'CFinv'. void Function(CFunu) Function() x203; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'Object' doesn't conform to the bound 'dynamic Function()' of the type variable 'X' on 'CFunu'. void Function(CFunu>) Function() x204; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'FutureOr' doesn't conform to the bound 'dynamic Function()' of the type variable 'X' on 'CFunu'. void Function(CcovBound) Function() x205; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'Object' doesn't conform to the bound 'num' of the type variable 'X' on 'CcovBound'. void Function(CcovBound>) Function() x206; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'FutureOr' doesn't conform to the bound 'num' of the type variable 'X' on 'CcovBound'. void Function(CcovCyclicBound) Function() x207; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'Object' doesn't conform to the bound 'A' of the type variable 'X' on 'CcovCyclicBound'. void Function(CcovCyclicBound>) Function() x208; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'FutureOr' doesn't conform to the bound 'A' of the type variable 'X' on 'CcovCyclicBound'. void Function(CcovCyclicBound>) Function() x209; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'CcovCyclicBound'. void Function(CcovCyclicBound>>) Function() x210; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A>' doesn't conform to the bound 'A' of the type variable 'X' on 'CcovCyclicBound'. void Function(CcovCyclicBound>>) Function() x211; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A>' doesn't conform to the bound 'A' of the type variable 'X' on 'CcovCyclicBound'. void Function(CcovCyclicBound>>>) Function() x212; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A>>' doesn't conform to the bound 'A' of the type variable 'X' on 'CcovCyclicBound'. void Function(CcovCyclicCoBound) Function() x213; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'Object' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'CcovCyclicCoBound'. void Function(CcovCyclicCoBound>) Function() x214; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'FutureOr' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'CcovCyclicCoBound'. void Function(CcovCyclicCoBound) Function() x215; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'dynamic Function(dynamic Function(Object))' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'CcovCyclicCoBound'. void Function(CcovCyclicCoBound))>) //^ // [analyzer] unspecified - Function() x216; -// ^ +// ^ // [cfe] Type argument 'dynamic Function(dynamic Function(FutureOr))' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'CcovCyclicCoBound'. + Function() x216; void Function>() x217; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'Object' doesn't conform to the bound 'num' of the type variable 'X' on 'FcovBound'. void Function>>() x218; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'FutureOr' doesn't conform to the bound 'num' of the type variable 'X' on 'FcovBound'. void Function>() x219; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'Object' doesn't conform to the bound 'A' of the type variable 'X' on 'FcovCyclicBound'. void Function>>() x220; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'FutureOr' doesn't conform to the bound 'A' of the type variable 'X' on 'FcovCyclicBound'. void Function>>() x221; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'FcovCyclicBound'. void Function>>>() x222; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A>' doesn't conform to the bound 'A' of the type variable 'X' on 'FcovCyclicBound'. void Function>>>() x223; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A>' doesn't conform to the bound 'A' of the type variable 'X' on 'FcovCyclicBound'. void Function>>>>() x224; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A>>' doesn't conform to the bound 'A' of the type variable 'X' on 'FcovCyclicBound'. void Function>() x225; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'Object' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FcovCyclicCoBound'. void Function>>() x226; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'FutureOr' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FcovCyclicCoBound'. void Function>() x227; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'dynamic Function(dynamic Function(Object))' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FcovCyclicCoBound'. void Function< Y extends FcovCyclicCoBound))>>() x228; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'dynamic Function(dynamic Function(FutureOr))' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FcovCyclicCoBound'. void Function>() x229; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'Object' doesn't conform to the bound 'X Function()' of the type variable 'X' on 'CFcov'. void Function>>() x230; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'FutureOr' doesn't conform to the bound 'X Function()' of the type variable 'X' on 'CFcov'. void Function>>() x231; //^ // [analyzer] unspecified -// ^ -// [cfe] Type argument 'Object Function()' doesn't conform to the bound 'X Function()' of the type variable 'X' on 'CFcov'. +// ^ +// [cfe] Type argument 'Fcov' doesn't conform to the bound 'X Function()' of the type variable 'X' on 'CFcov'. void Function>>>() x232; //^ // [analyzer] unspecified -// ^ -// [cfe] Type argument 'FutureOr Function()' doesn't conform to the bound 'X Function()' of the type variable 'X' on 'CFcov'. +// ^ +// [cfe] Type argument 'Fcov>' doesn't conform to the bound 'X Function()' of the type variable 'X' on 'CFcov'. void Function>>>() x233; //^ // [analyzer] unspecified -// ^ -// [cfe] Type argument 'Object Function() Function()' doesn't conform to the bound 'X Function()' of the type variable 'X' on 'CFcov'. +// ^ +// [cfe] Type argument 'Fcov>' doesn't conform to the bound 'X Function()' of the type variable 'X' on 'CFcov'. void Function>>>>() x234; //^ // [analyzer] unspecified -// ^ -// [cfe] Type argument 'FutureOr Function() Function()' doesn't conform to the bound 'X Function()' of the type variable 'X' on 'CFcov'. +// ^ +// [cfe] Type argument 'Fcov>>' doesn't conform to the bound 'X Function()' of the type variable 'X' on 'CFcov'. void Function>() x235; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'Object' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'CFcon'. void Function>>() x236; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'FutureOr' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'CFcon'. void Function>() x237; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'Object' doesn't conform to the bound 'X Function(X)' of the type variable 'X' on 'CFinv'. void Function>>() x238; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'FutureOr' doesn't conform to the bound 'X Function(X)' of the type variable 'X' on 'CFinv'. void Function>() x239; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'Object' doesn't conform to the bound 'dynamic Function()' of the type variable 'X' on 'CFunu'. void Function>>() x240; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'FutureOr' doesn't conform to the bound 'dynamic Function()' of the type variable 'X' on 'CFunu'. void Function>() x241; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'Object' doesn't conform to the bound 'num' of the type variable 'X' on 'CcovBound'. void Function>>() x242; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'FutureOr' doesn't conform to the bound 'num' of the type variable 'X' on 'CcovBound'. void Function>() x243; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'Object' doesn't conform to the bound 'A' of the type variable 'X' on 'CcovCyclicBound'. void Function>>() x244; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'FutureOr' doesn't conform to the bound 'A' of the type variable 'X' on 'CcovCyclicBound'. void Function>>() x245; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'CcovCyclicBound'. void Function>>>() x246; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A>' doesn't conform to the bound 'A' of the type variable 'X' on 'CcovCyclicBound'. void Function>>>() x247; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A>' doesn't conform to the bound 'A' of the type variable 'X' on 'CcovCyclicBound'. void Function>>>>() x248; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A>>' doesn't conform to the bound 'A' of the type variable 'X' on 'CcovCyclicBound'. void Function>() x249; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'Object' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'CcovCyclicCoBound'. void Function>>() x250; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'FutureOr' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'CcovCyclicCoBound'. void Function>() x251; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'dynamic Function(dynamic Function(Object))' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'CcovCyclicCoBound'. void Function< Y extends CcovCyclicCoBound))>>() x252; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'dynamic Function(dynamic Function(FutureOr))' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'CcovCyclicCoBound'. void Function>>() x253; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'Object' doesn't conform to the bound 'num' of the type variable 'X' on 'FcovBound'. void Function>>>() x254; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'FutureOr' doesn't conform to the bound 'num' of the type variable 'X' on 'FcovBound'. void Function>>() x255; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'Object' doesn't conform to the bound 'A' of the type variable 'X' on 'FcovCyclicBound'. void Function>>>() x256; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'FutureOr' doesn't conform to the bound 'A' of the type variable 'X' on 'FcovCyclicBound'. void Function>>>() x257; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'FcovCyclicBound'. void Function>>>>() x258; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A>' doesn't conform to the bound 'A' of the type variable 'X' on 'FcovCyclicBound'. void Function>>>>() x259; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A>' doesn't conform to the bound 'A' of the type variable 'X' on 'FcovCyclicBound'. void Function>>>>>() x260; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A>>' doesn't conform to the bound 'A' of the type variable 'X' on 'FcovCyclicBound'. void Function>>() x261; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'Object' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FcovCyclicCoBound'. void Function>>>() x262; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'FutureOr' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FcovCyclicCoBound'. void Function>>() //^ // [analyzer] unspecified - x263; -// ^ +// ^ // [cfe] Type argument 'dynamic Function(dynamic Function(Object))' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FcovCyclicCoBound'. + x263; void Function< Y extends A< FcovCyclicCoBound))>>>() x264; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'dynamic Function(dynamic Function(FutureOr))' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FcovCyclicCoBound'. void Function>>() x265; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'Object' doesn't conform to the bound 'X Function()' of the type variable 'X' on 'CFcov'. void Function>>>() x266; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'FutureOr' doesn't conform to the bound 'X Function()' of the type variable 'X' on 'CFcov'. void Function>>>() x267; //^ // [analyzer] unspecified -// ^ -// [cfe] Type argument 'Object Function()' doesn't conform to the bound 'X Function()' of the type variable 'X' on 'CFcov'. +// ^ +// [cfe] Type argument 'Fcov' doesn't conform to the bound 'X Function()' of the type variable 'X' on 'CFcov'. void Function>>>>() x268; //^ // [analyzer] unspecified -// ^ -// [cfe] Type argument 'FutureOr Function()' doesn't conform to the bound 'X Function()' of the type variable 'X' on 'CFcov'. +// ^ +// [cfe] Type argument 'Fcov>' doesn't conform to the bound 'X Function()' of the type variable 'X' on 'CFcov'. void Function>>>>() x269; //^ // [analyzer] unspecified -// ^ -// [cfe] Type argument 'Object Function() Function()' doesn't conform to the bound 'X Function()' of the type variable 'X' on 'CFcov'. +// ^ +// [cfe] Type argument 'Fcov>' doesn't conform to the bound 'X Function()' of the type variable 'X' on 'CFcov'. void Function>>>>>() x270; //^ // [analyzer] unspecified -// ^ -// [cfe] Type argument 'FutureOr Function() Function()' doesn't conform to the bound 'X Function()' of the type variable 'X' on 'CFcov'. +// ^ +// [cfe] Type argument 'Fcov>>' doesn't conform to the bound 'X Function()' of the type variable 'X' on 'CFcov'. void Function>>() x271; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'Object' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'CFcon'. void Function>>>() x272; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'FutureOr' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'CFcon'. void Function>>() x273; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'Object' doesn't conform to the bound 'X Function(X)' of the type variable 'X' on 'CFinv'. void Function>>>() x274; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'FutureOr' doesn't conform to the bound 'X Function(X)' of the type variable 'X' on 'CFinv'. void Function>>() x275; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'Object' doesn't conform to the bound 'dynamic Function()' of the type variable 'X' on 'CFunu'. void Function>>>() x276; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'FutureOr' doesn't conform to the bound 'dynamic Function()' of the type variable 'X' on 'CFunu'. void Function>>() x277; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'Object' doesn't conform to the bound 'num' of the type variable 'X' on 'CcovBound'. void Function>>>() x278; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'FutureOr' doesn't conform to the bound 'num' of the type variable 'X' on 'CcovBound'. void Function>>() x279; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'Object' doesn't conform to the bound 'A' of the type variable 'X' on 'CcovCyclicBound'. void Function>>>() x280; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'FutureOr' doesn't conform to the bound 'A' of the type variable 'X' on 'CcovCyclicBound'. void Function>>>() x281; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'CcovCyclicBound'. void Function>>>>() x282; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A>' doesn't conform to the bound 'A' of the type variable 'X' on 'CcovCyclicBound'. void Function>>>>() x283; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A>' doesn't conform to the bound 'A' of the type variable 'X' on 'CcovCyclicBound'. void Function>>>>>() x284; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A>>' doesn't conform to the bound 'A' of the type variable 'X' on 'CcovCyclicBound'. void Function>>() x285; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'Object' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'CcovCyclicCoBound'. void Function>>>() x286; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'FutureOr' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'CcovCyclicCoBound'. void Function>>() //^ // [analyzer] unspecified - x287; -// ^ +// ^ // [cfe] Type argument 'dynamic Function(dynamic Function(Object))' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'CcovCyclicCoBound'. + x287; void Function< Y extends A< CcovCyclicCoBound))>>>() x288; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'dynamic Function(dynamic Function(FutureOr))' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'CcovCyclicCoBound'. Finv> x289; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'Object' doesn't conform to the bound 'num' of the type variable 'X' on 'FcovBound'. Finv>> x290; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'FutureOr' doesn't conform to the bound 'num' of the type variable 'X' on 'FcovBound'. Finv> x291; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'Object' doesn't conform to the bound 'A' of the type variable 'X' on 'FcovCyclicBound'. Finv>> x292; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'FutureOr' doesn't conform to the bound 'A' of the type variable 'X' on 'FcovCyclicBound'. Finv>> x293; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'FcovCyclicBound'. Finv>>> x294; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A>' doesn't conform to the bound 'A' of the type variable 'X' on 'FcovCyclicBound'. Finv>>> x295; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A>' doesn't conform to the bound 'A' of the type variable 'X' on 'FcovCyclicBound'. Finv>>>> x296; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A>>' doesn't conform to the bound 'A' of the type variable 'X' on 'FcovCyclicBound'. Finv> x297; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'Object' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FcovCyclicCoBound'. Finv>> x298; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'FutureOr' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FcovCyclicCoBound'. Finv> x299; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'dynamic Function(dynamic Function(Object))' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FcovCyclicCoBound'. Finv))>> x300; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'dynamic Function(dynamic Function(FutureOr))' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FcovCyclicCoBound'. Finv> x301; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'Object' doesn't conform to the bound 'X Function()' of the type variable 'X' on 'CFcov'. Finv>> x302; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'FutureOr' doesn't conform to the bound 'X Function()' of the type variable 'X' on 'CFcov'. Finv>> x303; //^ // [analyzer] unspecified -// ^ -// [cfe] Type argument 'Object Function()' doesn't conform to the bound 'X Function()' of the type variable 'X' on 'CFcov'. +// ^ +// [cfe] Type argument 'Fcov' doesn't conform to the bound 'X Function()' of the type variable 'X' on 'CFcov'. Finv>>> x304; //^ // [analyzer] unspecified -// ^ -// [cfe] Type argument 'FutureOr Function()' doesn't conform to the bound 'X Function()' of the type variable 'X' on 'CFcov'. +// ^ +// [cfe] Type argument 'Fcov>' doesn't conform to the bound 'X Function()' of the type variable 'X' on 'CFcov'. Finv>>> x305; //^ // [analyzer] unspecified -// ^ -// [cfe] Type argument 'Object Function() Function()' doesn't conform to the bound 'X Function()' of the type variable 'X' on 'CFcov'. +// ^ +// [cfe] Type argument 'Fcov>' doesn't conform to the bound 'X Function()' of the type variable 'X' on 'CFcov'. Finv>>>> x306; //^ // [analyzer] unspecified -// ^ -// [cfe] Type argument 'FutureOr Function() Function()' doesn't conform to the bound 'X Function()' of the type variable 'X' on 'CFcov'. +// ^ +// [cfe] Type argument 'Fcov>>' doesn't conform to the bound 'X Function()' of the type variable 'X' on 'CFcov'. Finv> x307; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'Object' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'CFcon'. Finv>> x308; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'FutureOr' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'CFcon'. Finv> x309; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'Object' doesn't conform to the bound 'X Function(X)' of the type variable 'X' on 'CFinv'. Finv>> x310; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'FutureOr' doesn't conform to the bound 'X Function(X)' of the type variable 'X' on 'CFinv'. Finv> x311; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'Object' doesn't conform to the bound 'dynamic Function()' of the type variable 'X' on 'CFunu'. Finv>> x312; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'FutureOr' doesn't conform to the bound 'dynamic Function()' of the type variable 'X' on 'CFunu'. Finv> x313; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'Object' doesn't conform to the bound 'num' of the type variable 'X' on 'CcovBound'. Finv>> x314; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'FutureOr' doesn't conform to the bound 'num' of the type variable 'X' on 'CcovBound'. Finv> x315; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'Object' doesn't conform to the bound 'A' of the type variable 'X' on 'CcovCyclicBound'. Finv>> x316; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'FutureOr' doesn't conform to the bound 'A' of the type variable 'X' on 'CcovCyclicBound'. Finv>> x317; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'CcovCyclicBound'. Finv>>> x318; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A>' doesn't conform to the bound 'A' of the type variable 'X' on 'CcovCyclicBound'. Finv>>> x319; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A>' doesn't conform to the bound 'A' of the type variable 'X' on 'CcovCyclicBound'. Finv>>>> x320; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A>>' doesn't conform to the bound 'A' of the type variable 'X' on 'CcovCyclicBound'. Finv> x321; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'Object' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'CcovCyclicCoBound'. Finv>> x322; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'FutureOr' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'CcovCyclicCoBound'. Finv> x323; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'dynamic Function(dynamic Function(Object))' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'CcovCyclicCoBound'. Finv))>> x324; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'dynamic Function(dynamic Function(FutureOr))' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'CcovCyclicCoBound'. Funu> x325; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'Object' doesn't conform to the bound 'num' of the type variable 'X' on 'FcovBound'. Funu>> x326; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'FutureOr' doesn't conform to the bound 'num' of the type variable 'X' on 'FcovBound'. Funu> x327; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'Object' doesn't conform to the bound 'A' of the type variable 'X' on 'FcovCyclicBound'. Funu>> x328; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'FutureOr' doesn't conform to the bound 'A' of the type variable 'X' on 'FcovCyclicBound'. Funu>> x329; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'FcovCyclicBound'. Funu>>> x330; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A>' doesn't conform to the bound 'A' of the type variable 'X' on 'FcovCyclicBound'. Funu>>> x331; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A>' doesn't conform to the bound 'A' of the type variable 'X' on 'FcovCyclicBound'. Funu>>>> x332; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A>>' doesn't conform to the bound 'A' of the type variable 'X' on 'FcovCyclicBound'. Funu> x333; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'Object' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FcovCyclicCoBound'. Funu>> x334; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'FutureOr' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FcovCyclicCoBound'. Funu> x335; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'dynamic Function(dynamic Function(Object))' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FcovCyclicCoBound'. Funu))>> x336; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'dynamic Function(dynamic Function(FutureOr))' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FcovCyclicCoBound'. Funu> x337; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'Object' doesn't conform to the bound 'X Function()' of the type variable 'X' on 'CFcov'. Funu>> x338; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'FutureOr' doesn't conform to the bound 'X Function()' of the type variable 'X' on 'CFcov'. Funu>> x339; //^ // [analyzer] unspecified -// ^ -// [cfe] Type argument 'Object Function()' doesn't conform to the bound 'X Function()' of the type variable 'X' on 'CFcov'. +// ^ +// [cfe] Type argument 'Fcov' doesn't conform to the bound 'X Function()' of the type variable 'X' on 'CFcov'. Funu>>> x340; //^ // [analyzer] unspecified -// ^ -// [cfe] Type argument 'FutureOr Function()' doesn't conform to the bound 'X Function()' of the type variable 'X' on 'CFcov'. +// ^ +// [cfe] Type argument 'Fcov>' doesn't conform to the bound 'X Function()' of the type variable 'X' on 'CFcov'. Funu>>> x341; //^ // [analyzer] unspecified -// ^ -// [cfe] Type argument 'Object Function() Function()' doesn't conform to the bound 'X Function()' of the type variable 'X' on 'CFcov'. +// ^ +// [cfe] Type argument 'Fcov>' doesn't conform to the bound 'X Function()' of the type variable 'X' on 'CFcov'. Funu>>>> x342; //^ // [analyzer] unspecified -// ^ -// [cfe] Type argument 'FutureOr Function() Function()' doesn't conform to the bound 'X Function()' of the type variable 'X' on 'CFcov'. +// ^ +// [cfe] Type argument 'Fcov>>' doesn't conform to the bound 'X Function()' of the type variable 'X' on 'CFcov'. Funu> x343; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'Object' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'CFcon'. Funu>> x344; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'FutureOr' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'CFcon'. Funu> x345; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'Object' doesn't conform to the bound 'X Function(X)' of the type variable 'X' on 'CFinv'. Funu>> x346; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'FutureOr' doesn't conform to the bound 'X Function(X)' of the type variable 'X' on 'CFinv'. Funu> x347; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'Object' doesn't conform to the bound 'dynamic Function()' of the type variable 'X' on 'CFunu'. Funu>> x348; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'FutureOr' doesn't conform to the bound 'dynamic Function()' of the type variable 'X' on 'CFunu'. Funu> x349; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'Object' doesn't conform to the bound 'num' of the type variable 'X' on 'CcovBound'. Funu>> x350; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'FutureOr' doesn't conform to the bound 'num' of the type variable 'X' on 'CcovBound'. Funu> x351; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'Object' doesn't conform to the bound 'A' of the type variable 'X' on 'CcovCyclicBound'. Funu>> x352; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'FutureOr' doesn't conform to the bound 'A' of the type variable 'X' on 'CcovCyclicBound'. Funu>> x353; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'CcovCyclicBound'. Funu>>> x354; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A>' doesn't conform to the bound 'A' of the type variable 'X' on 'CcovCyclicBound'. Funu>>> x355; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A>' doesn't conform to the bound 'A' of the type variable 'X' on 'CcovCyclicBound'. Funu>>>> x356; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A>>' doesn't conform to the bound 'A' of the type variable 'X' on 'CcovCyclicBound'. Funu> x357; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'Object' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'CcovCyclicCoBound'. Funu>> x358; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'FutureOr' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'CcovCyclicCoBound'. Funu> x359; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'dynamic Function(dynamic Function(Object))' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'CcovCyclicCoBound'. Funu))>> x360; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'dynamic Function(dynamic Function(FutureOr))' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'CcovCyclicCoBound'. } @@ -1884,612 +1812,588 @@ void testInvariantSuperboundError() { FinvBound x1; //^ // [analyzer] unspecified -// ^ // [cfe] Type argument 'Object' doesn't conform to the bound 'num' of the type variable 'X' on 'FinvBound'. FinvBound> x2; //^ // [analyzer] unspecified -// ^ // [cfe] Type argument 'FutureOr' doesn't conform to the bound 'num' of the type variable 'X' on 'FinvBound'. FinvCyclicBound x3; //^ // [analyzer] unspecified -// ^ // [cfe] Type argument 'Object' doesn't conform to the bound 'A' of the type variable 'X' on 'FinvCyclicBound'. FinvCyclicBound> x4; //^ // [analyzer] unspecified -// ^ // [cfe] Type argument 'FutureOr' doesn't conform to the bound 'A' of the type variable 'X' on 'FinvCyclicBound'. FinvCyclicBound> x5; //^ // [analyzer] unspecified -// ^ // [cfe] Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'FinvCyclicBound'. FinvCyclicBound>> x6; //^ // [analyzer] unspecified -// ^ // [cfe] Type argument 'A>' doesn't conform to the bound 'A' of the type variable 'X' on 'FinvCyclicBound'. FinvCyclicBound>> x7; //^ // [analyzer] unspecified -// ^ // [cfe] Type argument 'A>' doesn't conform to the bound 'A' of the type variable 'X' on 'FinvCyclicBound'. FinvCyclicBound>>> x8; //^ // [analyzer] unspecified -// ^ // [cfe] Type argument 'A>>' doesn't conform to the bound 'A' of the type variable 'X' on 'FinvCyclicBound'. FinvCyclicCoBound x9; //^ // [analyzer] unspecified -// ^ // [cfe] Type argument 'Object' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FinvCyclicCoBound'. FinvCyclicCoBound> x10; //^ // [analyzer] unspecified -// ^ // [cfe] Type argument 'FutureOr' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FinvCyclicCoBound'. FinvCyclicCoBound x11; //^ // [analyzer] unspecified -// ^ // [cfe] Type argument 'dynamic Function(dynamic Function(Object))' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FinvCyclicCoBound'. FinvCyclicCoBound))> x12; //^ // [analyzer] unspecified -// ^ // [cfe] Type argument 'dynamic Function(dynamic Function(FutureOr))' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FinvCyclicCoBound'. // --- Same non-super-bounded types in a context. A> x13; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'Object' doesn't conform to the bound 'num' of the type variable 'X' on 'FinvBound'. A>> x14; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'FutureOr' doesn't conform to the bound 'num' of the type variable 'X' on 'FinvBound'. A> x15; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'Object' doesn't conform to the bound 'A' of the type variable 'X' on 'FinvCyclicBound'. A>> x16; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'FutureOr' doesn't conform to the bound 'A' of the type variable 'X' on 'FinvCyclicBound'. A>> x17; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'FinvCyclicBound'. A>>> x18; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A>' doesn't conform to the bound 'A' of the type variable 'X' on 'FinvCyclicBound'. A>>> x19; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A>' doesn't conform to the bound 'A' of the type variable 'X' on 'FinvCyclicBound'. A>>>> x20; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A>>' doesn't conform to the bound 'A' of the type variable 'X' on 'FinvCyclicBound'. A> x21; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'Object' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FinvCyclicCoBound'. A>> x22; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'FutureOr' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FinvCyclicCoBound'. A> x23; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'dynamic Function(dynamic Function(Object))' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FinvCyclicCoBound'. A))>> x24; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'dynamic Function(dynamic Function(FutureOr))' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FinvCyclicCoBound'. FinvBound Function() x25; //^ // [analyzer] unspecified -// ^ // [cfe] Type argument 'Object' doesn't conform to the bound 'num' of the type variable 'X' on 'FinvBound'. FinvBound> Function() x26; //^ // [analyzer] unspecified -// ^ // [cfe] Type argument 'FutureOr' doesn't conform to the bound 'num' of the type variable 'X' on 'FinvBound'. FinvCyclicBound Function() x27; //^ // [analyzer] unspecified -// ^ // [cfe] Type argument 'Object' doesn't conform to the bound 'A' of the type variable 'X' on 'FinvCyclicBound'. FinvCyclicBound> Function() x28; //^ // [analyzer] unspecified -// ^ // [cfe] Type argument 'FutureOr' doesn't conform to the bound 'A' of the type variable 'X' on 'FinvCyclicBound'. FinvCyclicBound> Function() x29; //^ // [analyzer] unspecified -// ^ // [cfe] Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'FinvCyclicBound'. FinvCyclicBound>> Function() x30; //^ // [analyzer] unspecified -// ^ // [cfe] Type argument 'A>' doesn't conform to the bound 'A' of the type variable 'X' on 'FinvCyclicBound'. FinvCyclicBound>> Function() x31; //^ // [analyzer] unspecified -// ^ // [cfe] Type argument 'A>' doesn't conform to the bound 'A' of the type variable 'X' on 'FinvCyclicBound'. FinvCyclicBound>>> Function() x32; //^ // [analyzer] unspecified -// ^ // [cfe] Type argument 'A>>' doesn't conform to the bound 'A' of the type variable 'X' on 'FinvCyclicBound'. FinvCyclicCoBound Function() x33; //^ // [analyzer] unspecified -// ^ // [cfe] Type argument 'Object' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FinvCyclicCoBound'. FinvCyclicCoBound> Function() x34; //^ // [analyzer] unspecified -// ^ // [cfe] Type argument 'FutureOr' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FinvCyclicCoBound'. FinvCyclicCoBound Function() x35; //^ // [analyzer] unspecified -// ^ // [cfe] Type argument 'dynamic Function(dynamic Function(Object))' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FinvCyclicCoBound'. FinvCyclicCoBound))> Function() x36; //^ // [analyzer] unspecified -// ^ // [cfe] Type argument 'dynamic Function(dynamic Function(FutureOr))' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FinvCyclicCoBound'. void Function(void Function(FinvBound)) x37; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'Object' doesn't conform to the bound 'num' of the type variable 'X' on 'FinvBound'. void Function(void Function(FinvBound>)) x38; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'FutureOr' doesn't conform to the bound 'num' of the type variable 'X' on 'FinvBound'. void Function(void Function(FinvCyclicBound)) x39; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'Object' doesn't conform to the bound 'A' of the type variable 'X' on 'FinvCyclicBound'. void Function(void Function(FinvCyclicBound>)) x40; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'FutureOr' doesn't conform to the bound 'A' of the type variable 'X' on 'FinvCyclicBound'. void Function(void Function(FinvCyclicBound>)) x41; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'FinvCyclicBound'. void Function(void Function(FinvCyclicBound>>)) x42; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A>' doesn't conform to the bound 'A' of the type variable 'X' on 'FinvCyclicBound'. void Function(void Function(FinvCyclicBound>>)) x43; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A>' doesn't conform to the bound 'A' of the type variable 'X' on 'FinvCyclicBound'. void Function(void Function(FinvCyclicBound>>>)) x44; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A>>' doesn't conform to the bound 'A' of the type variable 'X' on 'FinvCyclicBound'. void Function(void Function(FinvCyclicCoBound)) x45; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'Object' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FinvCyclicCoBound'. void Function(void Function(FinvCyclicCoBound>)) x46; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'FutureOr' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FinvCyclicCoBound'. void Function(void Function(FinvCyclicCoBound)) //^ // [analyzer] unspecified - x47; -// ^ +// ^ // [cfe] Type argument 'dynamic Function(dynamic Function(Object))' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FinvCyclicCoBound'. + x47; void Function( void Function( FinvCyclicCoBound))>)) x48; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'dynamic Function(dynamic Function(FutureOr))' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FinvCyclicCoBound'. void Function(FinvBound) x49; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'Object' doesn't conform to the bound 'num' of the type variable 'X' on 'FinvBound'. void Function(FinvBound>) x50; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'FutureOr' doesn't conform to the bound 'num' of the type variable 'X' on 'FinvBound'. void Function(FinvCyclicBound) x51; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'Object' doesn't conform to the bound 'A' of the type variable 'X' on 'FinvCyclicBound'. void Function(FinvCyclicBound>) x52; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'FutureOr' doesn't conform to the bound 'A' of the type variable 'X' on 'FinvCyclicBound'. void Function(FinvCyclicBound>) x53; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'FinvCyclicBound'. void Function(FinvCyclicBound>>) x54; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A>' doesn't conform to the bound 'A' of the type variable 'X' on 'FinvCyclicBound'. void Function(FinvCyclicBound>>) x55; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A>' doesn't conform to the bound 'A' of the type variable 'X' on 'FinvCyclicBound'. void Function(FinvCyclicBound>>>) x56; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A>>' doesn't conform to the bound 'A' of the type variable 'X' on 'FinvCyclicBound'. void Function(FinvCyclicCoBound) x57; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'Object' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FinvCyclicCoBound'. void Function(FinvCyclicCoBound>) x58; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'FutureOr' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FinvCyclicCoBound'. void Function(FinvCyclicCoBound) x59; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'dynamic Function(dynamic Function(Object))' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FinvCyclicCoBound'. void Function(FinvCyclicCoBound))>) x60; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'dynamic Function(dynamic Function(FutureOr))' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FinvCyclicCoBound'. void Function(FinvBound) Function() x61; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'Object' doesn't conform to the bound 'num' of the type variable 'X' on 'FinvBound'. void Function(FinvBound>) Function() x62; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'FutureOr' doesn't conform to the bound 'num' of the type variable 'X' on 'FinvBound'. void Function(FinvCyclicBound) Function() x63; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'Object' doesn't conform to the bound 'A' of the type variable 'X' on 'FinvCyclicBound'. void Function(FinvCyclicBound>) Function() x64; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'FutureOr' doesn't conform to the bound 'A' of the type variable 'X' on 'FinvCyclicBound'. void Function(FinvCyclicBound>) Function() x65; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'FinvCyclicBound'. void Function(FinvCyclicBound>>) Function() x66; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A>' doesn't conform to the bound 'A' of the type variable 'X' on 'FinvCyclicBound'. void Function(FinvCyclicBound>>) Function() x67; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A>' doesn't conform to the bound 'A' of the type variable 'X' on 'FinvCyclicBound'. void Function(FinvCyclicBound>>>) Function() x68; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A>>' doesn't conform to the bound 'A' of the type variable 'X' on 'FinvCyclicBound'. void Function(FinvCyclicCoBound) Function() x69; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'Object' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FinvCyclicCoBound'. void Function(FinvCyclicCoBound>) Function() x70; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'FutureOr' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FinvCyclicCoBound'. void Function(FinvCyclicCoBound) Function() x71; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'dynamic Function(dynamic Function(Object))' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FinvCyclicCoBound'. void Function(FinvCyclicCoBound))>) //^ // [analyzer] unspecified - Function() x72; -// ^ +// ^ // [cfe] Type argument 'dynamic Function(dynamic Function(FutureOr))' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FinvCyclicCoBound'. + Function() x72; void Function>() x73; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'Object' doesn't conform to the bound 'num' of the type variable 'X' on 'FinvBound'. void Function>>() x74; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'FutureOr' doesn't conform to the bound 'num' of the type variable 'X' on 'FinvBound'. void Function>() x75; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'Object' doesn't conform to the bound 'A' of the type variable 'X' on 'FinvCyclicBound'. void Function>>() x76; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'FutureOr' doesn't conform to the bound 'A' of the type variable 'X' on 'FinvCyclicBound'. void Function>>() x77; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'FinvCyclicBound'. void Function>>>() x78; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A>' doesn't conform to the bound 'A' of the type variable 'X' on 'FinvCyclicBound'. void Function>>>() x79; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A>' doesn't conform to the bound 'A' of the type variable 'X' on 'FinvCyclicBound'. void Function>>>>() x80; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A>>' doesn't conform to the bound 'A' of the type variable 'X' on 'FinvCyclicBound'. void Function>() x81; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'Object' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FinvCyclicCoBound'. void Function>>() x82; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'FutureOr' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FinvCyclicCoBound'. void Function>() x83; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'dynamic Function(dynamic Function(Object))' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FinvCyclicCoBound'. void Function< Y extends FinvCyclicCoBound))>>() x84; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'dynamic Function(dynamic Function(FutureOr))' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FinvCyclicCoBound'. void Function>>() x85; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'Object' doesn't conform to the bound 'num' of the type variable 'X' on 'FinvBound'. void Function>>>() x86; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'FutureOr' doesn't conform to the bound 'num' of the type variable 'X' on 'FinvBound'. void Function>>() x87; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'Object' doesn't conform to the bound 'A' of the type variable 'X' on 'FinvCyclicBound'. void Function>>>() x88; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'FutureOr' doesn't conform to the bound 'A' of the type variable 'X' on 'FinvCyclicBound'. void Function>>>() x89; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'FinvCyclicBound'. void Function>>>>() x90; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A>' doesn't conform to the bound 'A' of the type variable 'X' on 'FinvCyclicBound'. void Function>>>>() x91; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A>' doesn't conform to the bound 'A' of the type variable 'X' on 'FinvCyclicBound'. void Function>>>>>() x92; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A>>' doesn't conform to the bound 'A' of the type variable 'X' on 'FinvCyclicBound'. void Function>>() x93; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'Object' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FinvCyclicCoBound'. void Function>>>() x94; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'FutureOr' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FinvCyclicCoBound'. void Function>>() //^ // [analyzer] unspecified - x95; -// ^ +// ^ // [cfe] Type argument 'dynamic Function(dynamic Function(Object))' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FinvCyclicCoBound'. + x95; void Function< Y extends A< FinvCyclicCoBound))>>>() x96; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'dynamic Function(dynamic Function(FutureOr))' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FinvCyclicCoBound'. Finv> x97; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'Object' doesn't conform to the bound 'num' of the type variable 'X' on 'FinvBound'. Finv>> x98; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'FutureOr' doesn't conform to the bound 'num' of the type variable 'X' on 'FinvBound'. Finv> x99; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'Object' doesn't conform to the bound 'A' of the type variable 'X' on 'FinvCyclicBound'. Finv>> x100; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'FutureOr' doesn't conform to the bound 'A' of the type variable 'X' on 'FinvCyclicBound'. Finv>> x101; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'FinvCyclicBound'. Finv>>> x102; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A>' doesn't conform to the bound 'A' of the type variable 'X' on 'FinvCyclicBound'. Finv>>> x103; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A>' doesn't conform to the bound 'A' of the type variable 'X' on 'FinvCyclicBound'. Finv>>>> x104; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A>>' doesn't conform to the bound 'A' of the type variable 'X' on 'FinvCyclicBound'. Finv> x105; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'Object' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FinvCyclicCoBound'. Finv>> x106; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'FutureOr' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FinvCyclicCoBound'. Finv> x107; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'dynamic Function(dynamic Function(Object))' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FinvCyclicCoBound'. Finv))>> x108; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'dynamic Function(dynamic Function(FutureOr))' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FinvCyclicCoBound'. Funu> x109; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'Object' doesn't conform to the bound 'num' of the type variable 'X' on 'FinvBound'. Funu>> x110; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'FutureOr' doesn't conform to the bound 'num' of the type variable 'X' on 'FinvBound'. Funu> x111; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'Object' doesn't conform to the bound 'A' of the type variable 'X' on 'FinvCyclicBound'. Funu>> x112; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'FutureOr' doesn't conform to the bound 'A' of the type variable 'X' on 'FinvCyclicBound'. Funu>> x113; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'FinvCyclicBound'. Funu>>> x114; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A>' doesn't conform to the bound 'A' of the type variable 'X' on 'FinvCyclicBound'. Funu>>> x115; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A>' doesn't conform to the bound 'A' of the type variable 'X' on 'FinvCyclicBound'. Funu>>>> x116; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A>>' doesn't conform to the bound 'A' of the type variable 'X' on 'FinvCyclicBound'. Funu> x117; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'Object' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FinvCyclicCoBound'. Funu>> x118; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'FutureOr' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FinvCyclicCoBound'. Funu> x119; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'dynamic Function(dynamic Function(Object))' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FinvCyclicCoBound'. Funu))>> x120; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'dynamic Function(dynamic Function(FutureOr))' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FinvCyclicCoBound'. } @@ -2498,612 +2402,588 @@ void testVarianceLessSuperboundError() { FunuBound x1; //^ // [analyzer] unspecified -// ^ // [cfe] Type argument 'Object' doesn't conform to the bound 'num' of the type variable 'X' on 'FunuBound'. FunuBound> x2; //^ // [analyzer] unspecified -// ^ // [cfe] Type argument 'FutureOr' doesn't conform to the bound 'num' of the type variable 'X' on 'FunuBound'. FunuCyclicBound x3; //^ // [analyzer] unspecified -// ^ // [cfe] Type argument 'Object' doesn't conform to the bound 'A' of the type variable 'X' on 'FunuCyclicBound'. FunuCyclicBound> x4; //^ // [analyzer] unspecified -// ^ // [cfe] Type argument 'FutureOr' doesn't conform to the bound 'A' of the type variable 'X' on 'FunuCyclicBound'. FunuCyclicBound> x5; //^ // [analyzer] unspecified -// ^ // [cfe] Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'FunuCyclicBound'. FunuCyclicBound>> x6; //^ // [analyzer] unspecified -// ^ // [cfe] Type argument 'A>' doesn't conform to the bound 'A' of the type variable 'X' on 'FunuCyclicBound'. FunuCyclicBound>> x7; //^ // [analyzer] unspecified -// ^ // [cfe] Type argument 'A>' doesn't conform to the bound 'A' of the type variable 'X' on 'FunuCyclicBound'. FunuCyclicBound>>> x8; //^ // [analyzer] unspecified -// ^ // [cfe] Type argument 'A>>' doesn't conform to the bound 'A' of the type variable 'X' on 'FunuCyclicBound'. FunuCyclicCoBound x9; //^ // [analyzer] unspecified -// ^ // [cfe] Type argument 'Object' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FunuCyclicCoBound'. FunuCyclicCoBound> x10; //^ // [analyzer] unspecified -// ^ // [cfe] Type argument 'FutureOr' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FunuCyclicCoBound'. FunuCyclicCoBound x13; //^ // [analyzer] unspecified -// ^ // [cfe] Type argument 'dynamic Function(dynamic Function(Object))' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FunuCyclicCoBound'. FunuCyclicCoBound))> x14; //^ // [analyzer] unspecified -// ^ // [cfe] Type argument 'dynamic Function(dynamic Function(FutureOr))' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FunuCyclicCoBound'. // --- Same non-super-bounded types in a context. A> x19; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'Object' doesn't conform to the bound 'num' of the type variable 'X' on 'FunuBound'. A>> x20; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'FutureOr' doesn't conform to the bound 'num' of the type variable 'X' on 'FunuBound'. A> x21; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'Object' doesn't conform to the bound 'A' of the type variable 'X' on 'FunuCyclicBound'. A>> x22; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'FutureOr' doesn't conform to the bound 'A' of the type variable 'X' on 'FunuCyclicBound'. A>> x23; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'FunuCyclicBound'. A>>> x24; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A>' doesn't conform to the bound 'A' of the type variable 'X' on 'FunuCyclicBound'. A>>> x25; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A>' doesn't conform to the bound 'A' of the type variable 'X' on 'FunuCyclicBound'. A>>>> x26; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A>>' doesn't conform to the bound 'A' of the type variable 'X' on 'FunuCyclicBound'. A> x27; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'Object' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FunuCyclicCoBound'. A>> x28; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'FutureOr' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FunuCyclicCoBound'. A> x31; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'dynamic Function(dynamic Function(Object))' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FunuCyclicCoBound'. A))>> x32; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'dynamic Function(dynamic Function(FutureOr))' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FunuCyclicCoBound'. FunuBound Function() x37; //^ // [analyzer] unspecified -// ^ // [cfe] Type argument 'Object' doesn't conform to the bound 'num' of the type variable 'X' on 'FunuBound'. FunuBound> Function() x38; //^ // [analyzer] unspecified -// ^ // [cfe] Type argument 'FutureOr' doesn't conform to the bound 'num' of the type variable 'X' on 'FunuBound'. FunuCyclicBound Function() x39; //^ // [analyzer] unspecified -// ^ // [cfe] Type argument 'Object' doesn't conform to the bound 'A' of the type variable 'X' on 'FunuCyclicBound'. FunuCyclicBound> Function() x40; //^ // [analyzer] unspecified -// ^ // [cfe] Type argument 'FutureOr' doesn't conform to the bound 'A' of the type variable 'X' on 'FunuCyclicBound'. FunuCyclicBound> Function() x41; //^ // [analyzer] unspecified -// ^ // [cfe] Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'FunuCyclicBound'. FunuCyclicBound>> Function() x42; //^ // [analyzer] unspecified -// ^ // [cfe] Type argument 'A>' doesn't conform to the bound 'A' of the type variable 'X' on 'FunuCyclicBound'. FunuCyclicBound>> Function() x43; //^ // [analyzer] unspecified -// ^ // [cfe] Type argument 'A>' doesn't conform to the bound 'A' of the type variable 'X' on 'FunuCyclicBound'. FunuCyclicBound>>> Function() x44; //^ // [analyzer] unspecified -// ^ // [cfe] Type argument 'A>>' doesn't conform to the bound 'A' of the type variable 'X' on 'FunuCyclicBound'. FunuCyclicCoBound Function() x45; //^ // [analyzer] unspecified -// ^ // [cfe] Type argument 'Object' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FunuCyclicCoBound'. FunuCyclicCoBound> Function() x46; //^ // [analyzer] unspecified -// ^ // [cfe] Type argument 'FutureOr' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FunuCyclicCoBound'. FunuCyclicCoBound Function() x49; //^ // [analyzer] unspecified -// ^ // [cfe] Type argument 'dynamic Function(dynamic Function(Object))' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FunuCyclicCoBound'. FunuCyclicCoBound))> Function() x50; //^ // [analyzer] unspecified -// ^ // [cfe] Type argument 'dynamic Function(dynamic Function(FutureOr))' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FunuCyclicCoBound'. void Function(void Function(FunuBound)) x55; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'Object' doesn't conform to the bound 'num' of the type variable 'X' on 'FunuBound'. void Function(void Function(FunuBound>)) x56; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'FutureOr' doesn't conform to the bound 'num' of the type variable 'X' on 'FunuBound'. void Function(void Function(FunuCyclicBound)) x57; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'Object' doesn't conform to the bound 'A' of the type variable 'X' on 'FunuCyclicBound'. void Function(void Function(FunuCyclicBound>)) x58; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'FutureOr' doesn't conform to the bound 'A' of the type variable 'X' on 'FunuCyclicBound'. void Function(void Function(FunuCyclicBound>)) x59; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'FunuCyclicBound'. void Function(void Function(FunuCyclicBound>>)) x60; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A>' doesn't conform to the bound 'A' of the type variable 'X' on 'FunuCyclicBound'. void Function(void Function(FunuCyclicBound>>)) x61; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A>' doesn't conform to the bound 'A' of the type variable 'X' on 'FunuCyclicBound'. void Function(void Function(FunuCyclicBound>>>)) x62; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A>>' doesn't conform to the bound 'A' of the type variable 'X' on 'FunuCyclicBound'. void Function(void Function(FunuCyclicCoBound)) x63; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'Object' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FunuCyclicCoBound'. void Function(void Function(FunuCyclicCoBound>)) x64; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'FutureOr' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FunuCyclicCoBound'. void Function(void Function(FunuCyclicCoBound)) //^ // [analyzer] unspecified - x67; -// ^ +// ^ // [cfe] Type argument 'dynamic Function(dynamic Function(Object))' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FunuCyclicCoBound'. + x67; void Function( void Function( FunuCyclicCoBound))>)) x68; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'dynamic Function(dynamic Function(FutureOr))' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FunuCyclicCoBound'. void Function(FunuBound) x73; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'Object' doesn't conform to the bound 'num' of the type variable 'X' on 'FunuBound'. void Function(FunuBound>) x74; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'FutureOr' doesn't conform to the bound 'num' of the type variable 'X' on 'FunuBound'. void Function(FunuCyclicBound) x75; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'Object' doesn't conform to the bound 'A' of the type variable 'X' on 'FunuCyclicBound'. void Function(FunuCyclicBound>) x76; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'FutureOr' doesn't conform to the bound 'A' of the type variable 'X' on 'FunuCyclicBound'. void Function(FunuCyclicBound>) x77; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'FunuCyclicBound'. void Function(FunuCyclicBound>>) x78; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A>' doesn't conform to the bound 'A' of the type variable 'X' on 'FunuCyclicBound'. void Function(FunuCyclicBound>>) x79; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A>' doesn't conform to the bound 'A' of the type variable 'X' on 'FunuCyclicBound'. void Function(FunuCyclicBound>>>) x80; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A>>' doesn't conform to the bound 'A' of the type variable 'X' on 'FunuCyclicBound'. void Function(FunuCyclicCoBound) x81; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'Object' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FunuCyclicCoBound'. void Function(FunuCyclicCoBound>) x82; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'FutureOr' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FunuCyclicCoBound'. void Function(FunuCyclicCoBound) x85; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'dynamic Function(dynamic Function(Object))' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FunuCyclicCoBound'. void Function(FunuCyclicCoBound))>) x86; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'dynamic Function(dynamic Function(FutureOr))' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FunuCyclicCoBound'. void Function(FunuBound) Function() x91; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'Object' doesn't conform to the bound 'num' of the type variable 'X' on 'FunuBound'. void Function(FunuBound>) Function() x92; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'FutureOr' doesn't conform to the bound 'num' of the type variable 'X' on 'FunuBound'. void Function(FunuCyclicBound) Function() x93; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'Object' doesn't conform to the bound 'A' of the type variable 'X' on 'FunuCyclicBound'. void Function(FunuCyclicBound>) Function() x94; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'FutureOr' doesn't conform to the bound 'A' of the type variable 'X' on 'FunuCyclicBound'. void Function(FunuCyclicBound>) Function() x95; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'FunuCyclicBound'. void Function(FunuCyclicBound>>) Function() x96; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A>' doesn't conform to the bound 'A' of the type variable 'X' on 'FunuCyclicBound'. void Function(FunuCyclicBound>>) Function() x97; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A>' doesn't conform to the bound 'A' of the type variable 'X' on 'FunuCyclicBound'. void Function(FunuCyclicBound>>>) Function() x98; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A>>' doesn't conform to the bound 'A' of the type variable 'X' on 'FunuCyclicBound'. void Function(FunuCyclicCoBound) Function() x99; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'Object' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FunuCyclicCoBound'. void Function(FunuCyclicCoBound>) Function() x100; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'FutureOr' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FunuCyclicCoBound'. void Function(FunuCyclicCoBound) Function() x103; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'dynamic Function(dynamic Function(Object))' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FunuCyclicCoBound'. void Function(FunuCyclicCoBound))>) //^ // [analyzer] unspecified - Function() x104; -// ^ +// ^ // [cfe] Type argument 'dynamic Function(dynamic Function(FutureOr))' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FunuCyclicCoBound'. + Function() x104; void Function>() x109; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'Object' doesn't conform to the bound 'num' of the type variable 'X' on 'FunuBound'. void Function>>() x110; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'FutureOr' doesn't conform to the bound 'num' of the type variable 'X' on 'FunuBound'. void Function>() x111; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'Object' doesn't conform to the bound 'A' of the type variable 'X' on 'FunuCyclicBound'. void Function>>() x112; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'FutureOr' doesn't conform to the bound 'A' of the type variable 'X' on 'FunuCyclicBound'. void Function>>() x113; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'FunuCyclicBound'. void Function>>>() x114; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A>' doesn't conform to the bound 'A' of the type variable 'X' on 'FunuCyclicBound'. void Function>>>() x115; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A>' doesn't conform to the bound 'A' of the type variable 'X' on 'FunuCyclicBound'. void Function>>>>() x116; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A>>' doesn't conform to the bound 'A' of the type variable 'X' on 'FunuCyclicBound'. void Function>() x117; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'Object' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FunuCyclicCoBound'. void Function>>() x118; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'FutureOr' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FunuCyclicCoBound'. void Function>() x121; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'dynamic Function(dynamic Function(Object))' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FunuCyclicCoBound'. void Function< Y extends FunuCyclicCoBound))>>() x122; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'dynamic Function(dynamic Function(FutureOr))' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FunuCyclicCoBound'. void Function>>() x127; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'Object' doesn't conform to the bound 'num' of the type variable 'X' on 'FunuBound'. void Function>>>() x128; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'FutureOr' doesn't conform to the bound 'num' of the type variable 'X' on 'FunuBound'. void Function>>() x129; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'Object' doesn't conform to the bound 'A' of the type variable 'X' on 'FunuCyclicBound'. void Function>>>() x130; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'FutureOr' doesn't conform to the bound 'A' of the type variable 'X' on 'FunuCyclicBound'. void Function>>>() x131; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'FunuCyclicBound'. void Function>>>>() x132; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A>' doesn't conform to the bound 'A' of the type variable 'X' on 'FunuCyclicBound'. void Function>>>>() x133; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A>' doesn't conform to the bound 'A' of the type variable 'X' on 'FunuCyclicBound'. void Function>>>>>() x134; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A>>' doesn't conform to the bound 'A' of the type variable 'X' on 'FunuCyclicBound'. void Function>>() x135; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'Object' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FunuCyclicCoBound'. void Function>>>() x136; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'FutureOr' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FunuCyclicCoBound'. void Function>>() //^ // [analyzer] unspecified - x139; -// ^ +// ^ // [cfe] Type argument 'dynamic Function(dynamic Function(Object))' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FunuCyclicCoBound'. + x139; void Function< Y extends A< FunuCyclicCoBound))>>>() x140; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'dynamic Function(dynamic Function(FutureOr))' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FunuCyclicCoBound'. Finv> x145; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'Object' doesn't conform to the bound 'num' of the type variable 'X' on 'FunuBound'. Finv>> x146; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'FutureOr' doesn't conform to the bound 'num' of the type variable 'X' on 'FunuBound'. Finv> x147; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'Object' doesn't conform to the bound 'A' of the type variable 'X' on 'FunuCyclicBound'. Finv>> x148; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'FutureOr' doesn't conform to the bound 'A' of the type variable 'X' on 'FunuCyclicBound'. Finv>> x149; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'FunuCyclicBound'. Finv>>> x150; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A>' doesn't conform to the bound 'A' of the type variable 'X' on 'FunuCyclicBound'. Finv>>> x151; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A>' doesn't conform to the bound 'A' of the type variable 'X' on 'FunuCyclicBound'. Finv>>>> x152; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A>>' doesn't conform to the bound 'A' of the type variable 'X' on 'FunuCyclicBound'. Finv> x153; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'Object' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FunuCyclicCoBound'. Finv>> x154; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'FutureOr' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FunuCyclicCoBound'. Finv> x157; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'dynamic Function(dynamic Function(Object))' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FunuCyclicCoBound'. Finv))>> x158; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'dynamic Function(dynamic Function(FutureOr))' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FunuCyclicCoBound'. Funu> x163; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'Object' doesn't conform to the bound 'num' of the type variable 'X' on 'FunuBound'. Funu>> x164; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'FutureOr' doesn't conform to the bound 'num' of the type variable 'X' on 'FunuBound'. Funu> x165; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'Object' doesn't conform to the bound 'A' of the type variable 'X' on 'FunuCyclicBound'. Funu>> x166; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'FutureOr' doesn't conform to the bound 'A' of the type variable 'X' on 'FunuCyclicBound'. Funu>> x167; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A' doesn't conform to the bound 'A' of the type variable 'X' on 'FunuCyclicBound'. Funu>>> x168; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A>' doesn't conform to the bound 'A' of the type variable 'X' on 'FunuCyclicBound'. Funu>>> x169; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A>' doesn't conform to the bound 'A' of the type variable 'X' on 'FunuCyclicBound'. Funu>>>> x170; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'A>>' doesn't conform to the bound 'A' of the type variable 'X' on 'FunuCyclicBound'. Funu> x171; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'Object' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FunuCyclicCoBound'. Funu>> x172; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'FutureOr' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FunuCyclicCoBound'. Funu> x175; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'dynamic Function(dynamic Function(Object))' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FunuCyclicCoBound'. Funu))>> x176; //^ // [analyzer] unspecified -// ^ +// ^ // [cfe] Type argument 'dynamic Function(dynamic Function(FutureOr))' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FunuCyclicCoBound'. } @@ -3111,12 +2991,10 @@ void testVarianceLessSuperbound() { FunuCyclicCoBound x1; //^ // [analyzer] unspecified -// ^ // [cfe] Type argument 'dynamic Function(Never)' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FunuCyclicCoBound'. FunuCyclicCoBound x2; //^ // [analyzer] unspecified -// ^ // [cfe] Type argument 'dynamic Function(N)' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FunuCyclicCoBound'. } @@ -3133,8 +3011,6 @@ void testTypeAliasAsTypeArgument() { void f(AinvCyclicCoBound source) { // ^ // [analyzer] unspecified -// ^ -// [cfe] Type argument 'dynamic Function(Never)' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FinvCyclicCoBound'. // [cfe] Inferred type argument 'dynamic Function(Never)' doesn't conform to the bound 'dynamic Function(Y)' of the type variable 'Y' on 'AinvCyclicCoBound'. // We do not use `source` in further tests, because the type of `source` @@ -3146,9 +3022,8 @@ void testNested() { void f(B source) { // ^ // [analyzer] unspecified -// ^ -// [cfe] Type argument 'AinvCyclicCoBound' doesn't conform to the bound 'B' of the type variable 'X' on 'B'. -// [cfe] Type argument 'dynamic Function(Never)' doesn't conform to the bound 'dynamic Function(X)' of the type variable 'X' on 'FinvCyclicCoBound'. +// [cfe] Type argument 'AinvCyclicCoBound, dynamic Function(Never)>' doesn't conform to the bound 'B' of the type variable 'X' on 'B'. +// ^ // [cfe] Inferred type argument 'dynamic Function(Never)' doesn't conform to the bound 'dynamic Function(Y)' of the type variable 'Y' on 'AinvCyclicCoBound'. // We do not use `source` in further tests, because the type of `source` diff --git a/tests/language/generic_methods/generic_function_result_test.dart b/tests/language/generic_methods/generic_function_result_test.dart index 569c2f97830..910c9b4c0d8 100644 --- a/tests/language/generic_methods/generic_function_result_test.dart +++ b/tests/language/generic_methods/generic_function_result_test.dart @@ -14,17 +14,15 @@ int foo (int i, int j) => i + j; List(S, int)> bar() { +// [error column 1] +// [cfe] A generic function type can't be used as a type argument. // ^^^^^^^^^^^^^^^^^^^^^^^ // [analyzer] COMPILE_TIME_ERROR.GENERIC_FUNCTION_TYPE_CANNOT_BE_TYPE_ARGUMENT -// ^ -// [cfe] A generic function type can't be used as a type argument. return (S, int)>[foo, foo]; } void main() { var list = bar(); - // ^ - // [cfe] Generic function type 'int Function(int, int)' inferred as a type argument. print(list[0].runtimeType); Expect.equals(123, list[1](100, 23)); } diff --git a/tests/language/malbounded/instantiation_test.dart b/tests/language/malbounded/instantiation_test.dart index 2f397b2d761..d181b51bdc0 100644 --- a/tests/language/malbounded/instantiation_test.dart +++ b/tests/language/malbounded/instantiation_test.dart @@ -4,13 +4,13 @@ class Super {} class Malbounded1 implements Super {} -// ^ -// [cfe] Type argument 'String' doesn't conform to the bound 'num' of the type variable 'T' on 'Super' in the supertype 'Super' of class 'Malbounded1'. +// ^ +// [cfe] Type argument 'String' doesn't conform to the bound 'num' of the type variable 'T' on 'Super'. // ^^^^^^ // [analyzer] COMPILE_TIME_ERROR.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS class Malbounded2 extends Super {} -// ^ -// [cfe] Type argument 'String' doesn't conform to the bound 'num' of the type variable 'T' on 'Super' in the supertype 'Super' of class 'Malbounded2'. +// ^ +// [cfe] Type argument 'String' doesn't conform to the bound 'num' of the type variable 'T' on 'Super'. // ^^^^^^ // [analyzer] COMPILE_TIME_ERROR.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS diff --git a/tests/language/malbounded/type_cast_test.dart b/tests/language/malbounded/type_cast_test.dart index 2c56e68d6d7..e72cb3d4571 100644 --- a/tests/language/malbounded/type_cast_test.dart +++ b/tests/language/malbounded/type_cast_test.dart @@ -6,15 +6,15 @@ import 'package:expect/expect.dart'; class Super {} class Malbounded1 implements Super -// ^ -// [cfe] Type argument 'String' doesn't conform to the bound 'num' of the type variable 'T' on 'Super' in the supertype 'Super' of class 'Malbounded1'. +// ^ +// [cfe] Type argument 'String' doesn't conform to the bound 'num' of the type variable 'T' on 'Super'. // ^^^^^^ // [analyzer] COMPILE_TIME_ERROR.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS {} class Malbounded2 extends Super -// ^ -// [cfe] Type argument 'String' doesn't conform to the bound 'num' of the type variable 'T' on 'Super' in the supertype 'Super' of class 'Malbounded2'. +// ^ +// [cfe] Type argument 'String' doesn't conform to the bound 'num' of the type variable 'T' on 'Super'. // ^^^^^^ // [analyzer] COMPILE_TIME_ERROR.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS @@ -27,7 +27,7 @@ main() { Expect.throwsTypeError(() => s as Malbounded1); Expect.throwsTypeError(() => s as Malbounded2); s as Super - //^ + // ^ // [cfe] Type argument 'String' doesn't conform to the bound 'num' of the type variable 'T' on 'Super'. // ^^^^^^ diff --git a/tests/language/malbounded/type_literal_test.dart b/tests/language/malbounded/type_literal_test.dart index 2369b69d451..a356615c559 100644 --- a/tests/language/malbounded/type_literal_test.dart +++ b/tests/language/malbounded/type_literal_test.dart @@ -7,8 +7,8 @@ import 'package:expect/expect.dart'; class Super {} class Malbounded extends Super -// ^ -// [cfe] Type argument 'String' doesn't conform to the bound 'num' of the type variable 'T' on 'Super' in the supertype 'Super' of class 'Malbounded'. +// ^ +// [cfe] Type argument 'String' doesn't conform to the bound 'num' of the type variable 'T' on 'Super'. // ^^^^^^ // [analyzer] COMPILE_TIME_ERROR.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS diff --git a/tests/language/malbounded/type_test2_test.dart b/tests/language/malbounded/type_test2_test.dart index 8eec3aa544f..3ee3e90e15c 100644 --- a/tests/language/malbounded/type_test2_test.dart +++ b/tests/language/malbounded/type_test2_test.dart @@ -9,7 +9,7 @@ class A {} class B { test() { new A() is A - // ^ + // ^ // [cfe] Type argument 'T' doesn't conform to the bound 'num' of the type variable 'T' on 'A'. // ^ diff --git a/tests/language/malbounded/type_test_test.dart b/tests/language/malbounded/type_test_test.dart index 70fc93962f7..c0c61fff139 100644 --- a/tests/language/malbounded/type_test_test.dart +++ b/tests/language/malbounded/type_test_test.dart @@ -7,16 +7,16 @@ import 'package:expect/expect.dart'; class Super {} class Malbounded1 implements Super -// ^ -// [cfe] Type argument 'String' doesn't conform to the bound 'num' of the type variable 'T' on 'Super' in the supertype 'Super' of class 'Malbounded1'. +// ^ +// [cfe] Type argument 'String' doesn't conform to the bound 'num' of the type variable 'T' on 'Super'. // ^^^^^^ // [analyzer] COMPILE_TIME_ERROR.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS {} class Malbounded2 extends Super -// ^ -// [cfe] Type argument 'String' doesn't conform to the bound 'num' of the type variable 'T' on 'Super' in the supertype 'Super' of class 'Malbounded2'. +// ^ +// [cfe] Type argument 'String' doesn't conform to the bound 'num' of the type variable 'T' on 'Super'. // ^^^^^^ // [analyzer] COMPILE_TIME_ERROR.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS @@ -29,7 +29,7 @@ main() { Expect.isFalse(s is Malbounded1); Expect.isFalse(s is Malbounded2); Expect.isTrue(s is Super - // ^ + // ^ // [cfe] Type argument 'String' doesn't conform to the bound 'num' of the type variable 'T' on 'Super'. // ^^^^^^ diff --git a/tests/language/regress/regress18628_2_test.dart b/tests/language/regress/regress18628_2_test.dart index 622b7248ad1..11a1a4474db 100644 --- a/tests/language/regress/regress18628_2_test.dart +++ b/tests/language/regress/regress18628_2_test.dart @@ -13,8 +13,8 @@ class X {} // This line is supposed to cause the warning; the other lines are // marked because they don't make sense when [Y] is not defined. class Y extends X {} -// ^ -// [cfe] Type argument 'U' doesn't conform to the bound 'Type' of the type variable 'T' on 'X' in the supertype 'X' of class 'Y'. +// ^ +// [cfe] Type argument 'U' doesn't conform to the bound 'Type' of the type variable 'T' on 'X'. // ^ // [analyzer] COMPILE_TIME_ERROR.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS diff --git a/tests/language/type_variable/bounds3_test.dart b/tests/language/type_variable/bounds3_test.dart index 471112b2400..c0482d680b7 100644 --- a/tests/language/type_variable/bounds3_test.dart +++ b/tests/language/type_variable/bounds3_test.dart @@ -9,7 +9,7 @@ class A {} class B { foo(x) { return x is A; - // ^ + // ^ // [cfe] Type argument 'X' doesn't conform to the bound 'int' of the type variable 'K' on 'A'. // ^ // [analyzer] COMPILE_TIME_ERROR.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS diff --git a/tests/language/type_variable/bounds4_test.dart b/tests/language/type_variable/bounds4_test.dart index 9908b9c14ae..e4d522317c6 100644 --- a/tests/language/type_variable/bounds4_test.dart +++ b/tests/language/type_variable/bounds4_test.dart @@ -10,8 +10,8 @@ class A< > {} class B implements A {} -// ^ -// [cfe] Type argument 'T' doesn't conform to the bound 'num' of the type variable 'T' on 'A' in the supertype 'A' of class 'B'. +// ^ +// [cfe] Type argument 'T' doesn't conform to the bound 'num' of the type variable 'T' on 'A'. // ^ // [analyzer] COMPILE_TIME_ERROR.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS diff --git a/tests/language/variance/variance_in_subtyping_error_test.dart b/tests/language/variance/variance_in_subtyping_error_test.dart index 4271fd09320..1230d2b5793 100644 --- a/tests/language/variance/variance_in_subtyping_error_test.dart +++ b/tests/language/variance/variance_in_subtyping_error_test.dart @@ -41,10 +41,10 @@ class C> {} class D { C> method1() { +//^ +// [cfe] Type argument 'Contravariant' doesn't conform to the bound 'Contravariant' of the type variable 'T' on 'C'. //^^^^^^^^^^^^^^^^^^^^ // [analyzer] COMPILE_TIME_ERROR.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS - // ^ - // [cfe] Type argument 'Contravariant' doesn't conform to the bound 'Contravariant' of the type variable 'T' on 'C' in the return type. return C>(); // ^ // [cfe] Type argument 'Contravariant' doesn't conform to the bound 'Contravariant' of the type variable 'T' on 'C'. @@ -57,10 +57,10 @@ void testCall(Iterable> x) {} main() { C> c = new C>(); +//^ +// [cfe] Type argument 'Contravariant' doesn't conform to the bound 'Contravariant' of the type variable 'T' on 'C'. //^^^^^^^^^^^^^^^^^^^^ // [analyzer] COMPILE_TIME_ERROR.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS - // ^ - // [cfe] Type argument 'Contravariant' doesn't conform to the bound 'Contravariant' of the type variable 'T' on 'C'. // ^ // [cfe] Type argument 'Contravariant' doesn't conform to the bound 'Contravariant' of the type variable 'T' on 'C'. // ^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/language/variance/variance_inout_subtyping_error_test.dart b/tests/language/variance/variance_inout_subtyping_error_test.dart index d994e6c1da7..51e9052c6e2 100644 --- a/tests/language/variance/variance_inout_subtyping_error_test.dart +++ b/tests/language/variance/variance_inout_subtyping_error_test.dart @@ -58,10 +58,10 @@ class D> {} class E { D> method1() { +//^ +// [cfe] Type argument 'Invariant' doesn't conform to the bound 'Invariant' of the type variable 'T' on 'D'. //^^^^^^^^^^^^^^^^ // [analyzer] COMPILE_TIME_ERROR.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS - // ^ - // [cfe] Type argument 'Invariant' doesn't conform to the bound 'Invariant' of the type variable 'T' on 'D' in the return type. return D>(); // ^ // [cfe] Type argument 'Invariant' doesn't conform to the bound 'Invariant' of the type variable 'T' on 'D'. @@ -70,10 +70,10 @@ class E { } D> method2() { +//^ +// [cfe] Type argument 'Invariant' doesn't conform to the bound 'Invariant' of the type variable 'T' on 'D'. //^^^^^^^^^^^^^^^^ // [analyzer] COMPILE_TIME_ERROR.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS - // ^ - // [cfe] Type argument 'Invariant' doesn't conform to the bound 'Invariant' of the type variable 'T' on 'D' in the return type. return D>(); // ^ // [cfe] Type argument 'Invariant' doesn't conform to the bound 'Invariant' of the type variable 'T' on 'D'. @@ -86,19 +86,19 @@ void testCall(Iterable> x) {} main() { D> dUpper = new D>(); +//^ +// [cfe] Type argument 'Invariant' doesn't conform to the bound 'Invariant' of the type variable 'T' on 'D'. //^^^^^^^^^^^^^^^^ // [analyzer] COMPILE_TIME_ERROR.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS - // ^ - // [cfe] Type argument 'Invariant' doesn't conform to the bound 'Invariant' of the type variable 'T' on 'D'. // ^ // [cfe] Type argument 'Invariant' doesn't conform to the bound 'Invariant' of the type variable 'T' on 'D'. // ^^^^^^^^^^^^^^^^ // [analyzer] COMPILE_TIME_ERROR.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS D> dLower = new D>(); +//^ +// [cfe] Type argument 'Invariant' doesn't conform to the bound 'Invariant' of the type variable 'T' on 'D'. //^^^^^^^^^^^^^^^^ // [analyzer] COMPILE_TIME_ERROR.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS - // ^ - // [cfe] Type argument 'Invariant' doesn't conform to the bound 'Invariant' of the type variable 'T' on 'D'. // ^ // [cfe] Type argument 'Invariant' doesn't conform to the bound 'Invariant' of the type variable 'T' on 'D'. // ^^^^^^^^^^^^^^^^ diff --git a/tests/language/variance/variance_out_subtyping_error_test.dart b/tests/language/variance/variance_out_subtyping_error_test.dart index 2ddcd3e2131..ecce2796701 100644 --- a/tests/language/variance/variance_out_subtyping_error_test.dart +++ b/tests/language/variance/variance_out_subtyping_error_test.dart @@ -41,10 +41,10 @@ class C> {} class D { C> method1() { +//^ +// [cfe] Type argument 'Covariant' doesn't conform to the bound 'Covariant' of the type variable 'T' on 'C'. //^^^^^^^^^^^^^^^^ // [analyzer] COMPILE_TIME_ERROR.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS - // ^ - // [cfe] Type argument 'Covariant' doesn't conform to the bound 'Covariant' of the type variable 'T' on 'C' in the return type. return C>(); // ^ // [cfe] Type argument 'Covariant' doesn't conform to the bound 'Covariant' of the type variable 'T' on 'C'. @@ -57,10 +57,10 @@ void testCall(Iterable> x) {} main() { C> c = new C>(); +//^ +// [cfe] Type argument 'Covariant' doesn't conform to the bound 'Covariant' of the type variable 'T' on 'C'. //^^^^^^^^^^^^^^^^ // [analyzer] COMPILE_TIME_ERROR.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS - // ^ - // [cfe] Type argument 'Covariant' doesn't conform to the bound 'Covariant' of the type variable 'T' on 'C'. // ^ // [cfe] Type argument 'Covariant' doesn't conform to the bound 'Covariant' of the type variable 'T' on 'C'. // ^^^^^^^^^^^^^^^^ diff --git a/tests/language_2/generic/f_bounded_quantification_test.dart b/tests/language_2/generic/f_bounded_quantification_test.dart index 055e05acceb..7ff3b40e9b5 100644 --- a/tests/language_2/generic/f_bounded_quantification_test.dart +++ b/tests/language_2/generic/f_bounded_quantification_test.dart @@ -19,10 +19,10 @@ class SubBaz extends Baz {} main() { FBound fb = new FBound(); FBound fsb = new FBound(); +//^ +// [cfe] Type argument 'SubBar' doesn't conform to the bound 'FBound' of the type variable 'F' on 'FBound'. // ^^^^^^ // [analyzer] COMPILE_TIME_ERROR.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS - // ^ - // [cfe] Type argument 'SubBar' doesn't conform to the bound 'FBound' of the type variable 'F' on 'FBound'. // ^ // [cfe] Type argument 'SubBar' doesn't conform to the bound 'FBound' of the type variable 'F' on 'FBound'. // ^^^^^^ @@ -30,10 +30,10 @@ main() { FBound> fbb = new FBound>(); FBound> fsbb = new FBound>(); +//^ +// [cfe] Type argument 'SubBaz' doesn't conform to the bound 'FBound' of the type variable 'F' on 'FBound'. // ^^^^^^^^^^^ // [analyzer] COMPILE_TIME_ERROR.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS - // ^ - // [cfe] Type argument 'SubBaz' doesn't conform to the bound 'FBound' of the type variable 'F' on 'FBound'. // ^ // [cfe] Type argument 'SubBaz' doesn't conform to the bound 'FBound' of the type variable 'F' on 'FBound'. // ^^^^^^^^^^^ diff --git a/tests/language_2/generic/function_type_as_type_argument_test.dart b/tests/language_2/generic/function_type_as_type_argument_test.dart index 130d1b2fe3b..6dcc8f70393 100644 --- a/tests/language_2/generic/function_type_as_type_argument_test.dart +++ b/tests/language_2/generic/function_type_as_type_argument_test.dart @@ -18,17 +18,16 @@ void main() { // Generic function types are not allowed as type arguments. List(T)> typedList = (T)>[foo]; - // ^^^^^^^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.GENERIC_FUNCTION_TYPE_CANNOT_BE_TYPE_ARGUMENT - // ^ - // [cfe] A generic function type can't be used as a type argument. +//^ +// [cfe] A generic function type can't be used as a type argument. +// ^^^^^^^^^^^^^^^^ +// [analyzer] COMPILE_TIME_ERROR.GENERIC_FUNCTION_TYPE_CANNOT_BE_TYPE_ARGUMENT // Type inference must also give an error. var inferredList = [foo]; - // ^ - // [cfe] Generic function type 'T Function(T)' inferred as a type argument. // ^^^^^ // [analyzer] COMPILE_TIME_ERROR.COULD_NOT_INFER + // [cfe] Generic function type 'T Function(T)' inferred as a type argument. // No error if illegal type cannot be inferred. var dynamicList = [foo]; diff --git a/tests/language_2/generic_methods/generic_function_result_test.dart b/tests/language_2/generic_methods/generic_function_result_test.dart index d291d2d4e33..d50dcb53827 100644 --- a/tests/language_2/generic_methods/generic_function_result_test.dart +++ b/tests/language_2/generic_methods/generic_function_result_test.dart @@ -16,17 +16,15 @@ int foo (int i, int j) => i + j; List(S, int)> bar() { +// [error column 1] +// [cfe] A generic function type can't be used as a type argument. // ^^^^^^^^^^^^^^^^^^^^^^^ // [analyzer] COMPILE_TIME_ERROR.GENERIC_FUNCTION_TYPE_CANNOT_BE_TYPE_ARGUMENT -// ^ -// [cfe] A generic function type can't be used as a type argument. return (S, int)>[foo, foo]; } void main() { var list = bar(); - // ^ - // [cfe] Generic function type 'int Function(int, int)' inferred as a type argument. print(list[0].runtimeType); Expect.equals(123, list[1](100, 23)); } diff --git a/tests/language_2/malbounded/instantiation_test.dart b/tests/language_2/malbounded/instantiation_test.dart index 9f524276ec1..b3f0bfa79dc 100644 --- a/tests/language_2/malbounded/instantiation_test.dart +++ b/tests/language_2/malbounded/instantiation_test.dart @@ -6,13 +6,13 @@ class Super {} class Malbounded1 implements Super {} -// ^ -// [cfe] Type argument 'String' doesn't conform to the bound 'num' of the type variable 'T' on 'Super' in the supertype 'Super' of class 'Malbounded1'. +// ^ +// [cfe] Type argument 'String' doesn't conform to the bound 'num' of the type variable 'T' on 'Super'. // ^^^^^^ // [analyzer] COMPILE_TIME_ERROR.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS class Malbounded2 extends Super {} -// ^ -// [cfe] Type argument 'String' doesn't conform to the bound 'num' of the type variable 'T' on 'Super' in the supertype 'Super' of class 'Malbounded2'. +// ^ +// [cfe] Type argument 'String' doesn't conform to the bound 'num' of the type variable 'T' on 'Super'. // ^^^^^^ // [analyzer] COMPILE_TIME_ERROR.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS diff --git a/tests/language_2/malbounded/type_cast_test.dart b/tests/language_2/malbounded/type_cast_test.dart index 476c63e312f..7e98c551b50 100644 --- a/tests/language_2/malbounded/type_cast_test.dart +++ b/tests/language_2/malbounded/type_cast_test.dart @@ -8,15 +8,15 @@ import 'package:expect/expect.dart'; class Super {} class Malbounded1 implements Super -// ^ -// [cfe] Type argument 'String' doesn't conform to the bound 'num' of the type variable 'T' on 'Super' in the supertype 'Super' of class 'Malbounded1'. +// ^ +// [cfe] Type argument 'String' doesn't conform to the bound 'num' of the type variable 'T' on 'Super'. // ^^^^^^ // [analyzer] COMPILE_TIME_ERROR.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS {} class Malbounded2 extends Super -// ^ -// [cfe] Type argument 'String' doesn't conform to the bound 'num' of the type variable 'T' on 'Super' in the supertype 'Super' of class 'Malbounded2'. +// ^ +// [cfe] Type argument 'String' doesn't conform to the bound 'num' of the type variable 'T' on 'Super'. // ^^^^^^ // [analyzer] COMPILE_TIME_ERROR.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS @@ -29,7 +29,7 @@ main() { Expect.throwsTypeError(() => s as Malbounded1); Expect.throwsTypeError(() => s as Malbounded2); s as Super - //^ + // ^ // [cfe] Type argument 'String' doesn't conform to the bound 'num' of the type variable 'T' on 'Super'. // ^^^^^^ diff --git a/tests/language_2/malbounded/type_literal_test.dart b/tests/language_2/malbounded/type_literal_test.dart index ebfef5b7057..eb4a34c0ebe 100644 --- a/tests/language_2/malbounded/type_literal_test.dart +++ b/tests/language_2/malbounded/type_literal_test.dart @@ -9,8 +9,8 @@ import 'package:expect/expect.dart'; class Super {} class Malbounded extends Super -// ^ -// [cfe] Type argument 'String' doesn't conform to the bound 'num' of the type variable 'T' on 'Super' in the supertype 'Super' of class 'Malbounded'. +// ^ +// [cfe] Type argument 'String' doesn't conform to the bound 'num' of the type variable 'T' on 'Super'. // ^^^^^^ // [analyzer] COMPILE_TIME_ERROR.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS diff --git a/tests/language_2/malbounded/type_test2_test.dart b/tests/language_2/malbounded/type_test2_test.dart index 542b7f6dccd..0e4cb696e40 100644 --- a/tests/language_2/malbounded/type_test2_test.dart +++ b/tests/language_2/malbounded/type_test2_test.dart @@ -11,7 +11,7 @@ class A {} class B { test() { new A() is A - // ^ + // ^ // [cfe] Type argument 'T' doesn't conform to the bound 'num' of the type variable 'T' on 'A'. // ^ diff --git a/tests/language_2/malbounded/type_test_test.dart b/tests/language_2/malbounded/type_test_test.dart index b5434fd4536..c3128573e8e 100644 --- a/tests/language_2/malbounded/type_test_test.dart +++ b/tests/language_2/malbounded/type_test_test.dart @@ -9,16 +9,16 @@ import 'package:expect/expect.dart'; class Super {} class Malbounded1 implements Super -// ^ -// [cfe] Type argument 'String' doesn't conform to the bound 'num' of the type variable 'T' on 'Super' in the supertype 'Super' of class 'Malbounded1'. +// ^ +// [cfe] Type argument 'String' doesn't conform to the bound 'num' of the type variable 'T' on 'Super'. // ^^^^^^ // [analyzer] COMPILE_TIME_ERROR.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS {} class Malbounded2 extends Super -// ^ -// [cfe] Type argument 'String' doesn't conform to the bound 'num' of the type variable 'T' on 'Super' in the supertype 'Super' of class 'Malbounded2'. +// ^ +// [cfe] Type argument 'String' doesn't conform to the bound 'num' of the type variable 'T' on 'Super'. // ^^^^^^ // [analyzer] COMPILE_TIME_ERROR.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS @@ -31,7 +31,7 @@ main() { Expect.isFalse(s is Malbounded1); Expect.isFalse(s is Malbounded2); Expect.isTrue(s is Super - // ^ + // ^ // [cfe] Type argument 'String' doesn't conform to the bound 'num' of the type variable 'T' on 'Super'. // ^^^^^^ diff --git a/tests/language_2/regress/regress18628_2_test.dart b/tests/language_2/regress/regress18628_2_test.dart index 85d59cae7c4..e035c813a63 100644 --- a/tests/language_2/regress/regress18628_2_test.dart +++ b/tests/language_2/regress/regress18628_2_test.dart @@ -15,8 +15,8 @@ class X {} // This line is supposed to cause the warning; the other lines are // marked because they don't make sense when [Y] is not defined. class Y extends X {} -// ^ -// [cfe] Type argument 'U' doesn't conform to the bound 'Type' of the type variable 'T' on 'X' in the supertype 'X' of class 'Y'. +// ^ +// [cfe] Type argument 'U' doesn't conform to the bound 'Type' of the type variable 'T' on 'X'. // ^ // [analyzer] COMPILE_TIME_ERROR.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS diff --git a/tests/language_2/type_variable/bounds3_test.dart b/tests/language_2/type_variable/bounds3_test.dart index a56675e21e0..7246ac71ed8 100644 --- a/tests/language_2/type_variable/bounds3_test.dart +++ b/tests/language_2/type_variable/bounds3_test.dart @@ -11,7 +11,7 @@ class A {} class B { foo(x) { return x is A; - // ^ + // ^ // [cfe] Type argument 'X' doesn't conform to the bound 'int' of the type variable 'K' on 'A'. // ^ // [analyzer] COMPILE_TIME_ERROR.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS diff --git a/tests/language_2/type_variable/bounds4_test.dart b/tests/language_2/type_variable/bounds4_test.dart index 265c94f0ea1..9fa6558abd4 100644 --- a/tests/language_2/type_variable/bounds4_test.dart +++ b/tests/language_2/type_variable/bounds4_test.dart @@ -12,8 +12,8 @@ class A< > {} class B implements A {} -// ^ -// [cfe] Type argument 'T' doesn't conform to the bound 'num' of the type variable 'T' on 'A' in the supertype 'A' of class 'B'. +// ^ +// [cfe] Type argument 'T' doesn't conform to the bound 'num' of the type variable 'T' on 'A'. // ^ // [analyzer] COMPILE_TIME_ERROR.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS