diff --git a/pkg/front_end/lib/src/codes/cfe_codes_generated.dart b/pkg/front_end/lib/src/codes/cfe_codes_generated.dart index daca4593f2d..ef100fb70bd 100644 --- a/pkg/front_end/lib/src/codes/cfe_codes_generated.dart +++ b/pkg/front_end/lib/src/codes/cfe_codes_generated.dart @@ -210,166 +210,6 @@ Message _withArgumentsArgumentTypeNotAssignable( ); } -// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template - templateArgumentTypeNotAssignableNullability = - const Template( - "ArgumentTypeNotAssignableNullability", - problemMessageTemplate: - r"""The argument type '#type' can't be assigned to the parameter type '#type2' because '#type' is nullable and '#type2' isn't.""", - withArguments: _withArgumentsArgumentTypeNotAssignableNullability, -); - -// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Code - codeArgumentTypeNotAssignableNullability = - const Code( - "ArgumentTypeNotAssignableNullability", - analyzerCodes: ["ARGUMENT_TYPE_NOT_ASSIGNABLE"], -); - -// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -Message _withArgumentsArgumentTypeNotAssignableNullability( - DartType _type, DartType _type2) { - TypeLabeler labeler = new TypeLabeler(); - List typeParts = labeler.labelType(_type); - List type2Parts = labeler.labelType(_type2); - String type = typeParts.join(); - String type2 = type2Parts.join(); - return new Message( - codeArgumentTypeNotAssignableNullability, - problemMessage: - """The argument type '${type}' can't be assigned to the parameter type '${type2}' because '${type}' is nullable and '${type2}' isn't.""" + - labeler.originMessages, - arguments: { - 'type': _type, - 'type2': _type2, - }, - ); -} - -// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template - templateArgumentTypeNotAssignableNullabilityNull = - const Template( - "ArgumentTypeNotAssignableNullabilityNull", - problemMessageTemplate: - r"""The value 'null' can't be assigned to the parameter type '#type' because '#type' is not nullable.""", - withArguments: _withArgumentsArgumentTypeNotAssignableNullabilityNull, -); - -// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Code - codeArgumentTypeNotAssignableNullabilityNull = - const Code( - "ArgumentTypeNotAssignableNullabilityNull", - analyzerCodes: ["ARGUMENT_TYPE_NOT_ASSIGNABLE"], -); - -// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -Message _withArgumentsArgumentTypeNotAssignableNullabilityNull(DartType _type) { - TypeLabeler labeler = new TypeLabeler(); - List typeParts = labeler.labelType(_type); - String type = typeParts.join(); - return new Message( - codeArgumentTypeNotAssignableNullabilityNull, - problemMessage: - """The value 'null' can't be assigned to the parameter type '${type}' because '${type}' is not nullable.""" + - labeler.originMessages, - arguments: { - 'type': _type, - }, - ); -} - -// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template - templateArgumentTypeNotAssignableNullabilityNullType = - const Template( - "ArgumentTypeNotAssignableNullabilityNullType", - problemMessageTemplate: - r"""The argument type '#type' can't be assigned to the parameter type '#type2' because '#type2' is not nullable.""", - withArguments: _withArgumentsArgumentTypeNotAssignableNullabilityNullType, -); - -// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Code - codeArgumentTypeNotAssignableNullabilityNullType = - const Code( - "ArgumentTypeNotAssignableNullabilityNullType", - analyzerCodes: ["ARGUMENT_TYPE_NOT_ASSIGNABLE"], -); - -// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -Message _withArgumentsArgumentTypeNotAssignableNullabilityNullType( - DartType _type, DartType _type2) { - TypeLabeler labeler = new TypeLabeler(); - List typeParts = labeler.labelType(_type); - List type2Parts = labeler.labelType(_type2); - String type = typeParts.join(); - String type2 = type2Parts.join(); - return new Message( - codeArgumentTypeNotAssignableNullabilityNullType, - problemMessage: - """The argument type '${type}' can't be assigned to the parameter type '${type2}' because '${type2}' is not nullable.""" + - labeler.originMessages, - arguments: { - 'type': _type, - 'type2': _type2, - }, - ); -} - -// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template< - Message Function( - DartType _type, DartType _type2, DartType _type3, DartType _type4)> - templateArgumentTypeNotAssignablePartNullability = const Template< - Message Function( - DartType _type, DartType _type2, DartType _type3, DartType _type4)>( - "ArgumentTypeNotAssignablePartNullability", - problemMessageTemplate: - r"""The argument type '#type' can't be assigned to the parameter type '#type2' because '#type3' is nullable and '#type4' isn't.""", - withArguments: _withArgumentsArgumentTypeNotAssignablePartNullability, -); - -// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Code< - Message Function( - DartType _type, DartType _type2, DartType _type3, DartType _type4)> - codeArgumentTypeNotAssignablePartNullability = const Code< - Message Function( - DartType _type, DartType _type2, DartType _type3, DartType _type4)>( - "ArgumentTypeNotAssignablePartNullability", - analyzerCodes: ["ARGUMENT_TYPE_NOT_ASSIGNABLE"], -); - -// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -Message _withArgumentsArgumentTypeNotAssignablePartNullability( - DartType _type, DartType _type2, DartType _type3, DartType _type4) { - TypeLabeler labeler = new TypeLabeler(); - List typeParts = labeler.labelType(_type); - List type2Parts = labeler.labelType(_type2); - List type3Parts = labeler.labelType(_type3); - List type4Parts = labeler.labelType(_type4); - String type = typeParts.join(); - String type2 = type2Parts.join(); - String type3 = type3Parts.join(); - String type4 = type4Parts.join(); - return new Message( - codeArgumentTypeNotAssignablePartNullability, - problemMessage: - """The argument type '${type}' can't be assigned to the parameter type '${type2}' because '${type3}' is nullable and '${type4}' isn't.""" + - labeler.originMessages, - arguments: { - 'type': _type, - 'type2': _type2, - 'type3': _type3, - 'type4': _type4, - }, - ); -} - // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Template templateConstEvalCaseImplementsEqual = @@ -1489,98 +1329,6 @@ Message _withArgumentsForInLoopElementTypeNotAssignable( ); } -// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template - templateForInLoopElementTypeNotAssignableNullability = - const Template( - "ForInLoopElementTypeNotAssignableNullability", - problemMessageTemplate: - r"""A value of type '#type' can't be assigned to a variable of type '#type2' because '#type' is nullable and '#type2' isn't.""", - correctionMessageTemplate: r"""Try changing the type of the variable.""", - withArguments: _withArgumentsForInLoopElementTypeNotAssignableNullability, -); - -// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Code - codeForInLoopElementTypeNotAssignableNullability = - const Code( - "ForInLoopElementTypeNotAssignableNullability", - analyzerCodes: ["FOR_IN_OF_INVALID_ELEMENT_TYPE"], -); - -// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -Message _withArgumentsForInLoopElementTypeNotAssignableNullability( - DartType _type, DartType _type2) { - TypeLabeler labeler = new TypeLabeler(); - List typeParts = labeler.labelType(_type); - List type2Parts = labeler.labelType(_type2); - String type = typeParts.join(); - String type2 = type2Parts.join(); - return new Message( - codeForInLoopElementTypeNotAssignableNullability, - problemMessage: - """A value of type '${type}' can't be assigned to a variable of type '${type2}' because '${type}' is nullable and '${type2}' isn't.""" + - labeler.originMessages, - correctionMessage: """Try changing the type of the variable.""", - arguments: { - 'type': _type, - 'type2': _type2, - }, - ); -} - -// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template< - Message Function( - DartType _type, DartType _type2, DartType _type3, DartType _type4)> - templateForInLoopElementTypeNotAssignablePartNullability = const Template< - Message Function( - DartType _type, DartType _type2, DartType _type3, DartType _type4)>( - "ForInLoopElementTypeNotAssignablePartNullability", - problemMessageTemplate: - r"""A value of type '#type' can't be assigned to a variable of type '#type2' because '#type3' is nullable and '#type4' isn't.""", - correctionMessageTemplate: r"""Try changing the type of the variable.""", - withArguments: _withArgumentsForInLoopElementTypeNotAssignablePartNullability, -); - -// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Code< - Message Function( - DartType _type, DartType _type2, DartType _type3, DartType _type4)> - codeForInLoopElementTypeNotAssignablePartNullability = const Code< - Message Function( - DartType _type, DartType _type2, DartType _type3, DartType _type4)>( - "ForInLoopElementTypeNotAssignablePartNullability", - analyzerCodes: ["FOR_IN_OF_INVALID_ELEMENT_TYPE"], -); - -// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -Message _withArgumentsForInLoopElementTypeNotAssignablePartNullability( - DartType _type, DartType _type2, DartType _type3, DartType _type4) { - TypeLabeler labeler = new TypeLabeler(); - List typeParts = labeler.labelType(_type); - List type2Parts = labeler.labelType(_type2); - List type3Parts = labeler.labelType(_type3); - List type4Parts = labeler.labelType(_type4); - String type = typeParts.join(); - String type2 = type2Parts.join(); - String type3 = type3Parts.join(); - String type4 = type4Parts.join(); - return new Message( - codeForInLoopElementTypeNotAssignablePartNullability, - problemMessage: - """A value of type '${type}' can't be assigned to a variable of type '${type2}' because '${type3}' is nullable and '${type4}' isn't.""" + - labeler.originMessages, - correctionMessage: """Try changing the type of the variable.""", - arguments: { - 'type': _type, - 'type2': _type2, - 'type3': _type3, - 'type4': _type4, - }, - ); -} - // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Template templateForInLoopTypeNotIterable = @@ -1619,94 +1367,6 @@ Message _withArgumentsForInLoopTypeNotIterable( ); } -// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template - templateForInLoopTypeNotIterableNullability = - const Template( - "ForInLoopTypeNotIterableNullability", - problemMessageTemplate: - r"""The type '#type' used in the 'for' loop must implement '#type2' because '#type' is nullable and '#type2' isn't.""", - withArguments: _withArgumentsForInLoopTypeNotIterableNullability, -); - -// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Code - codeForInLoopTypeNotIterableNullability = - const Code( - "ForInLoopTypeNotIterableNullability", - analyzerCodes: ["FOR_IN_OF_INVALID_TYPE"], -); - -// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -Message _withArgumentsForInLoopTypeNotIterableNullability( - DartType _type, DartType _type2) { - TypeLabeler labeler = new TypeLabeler(); - List typeParts = labeler.labelType(_type); - List type2Parts = labeler.labelType(_type2); - String type = typeParts.join(); - String type2 = type2Parts.join(); - return new Message( - codeForInLoopTypeNotIterableNullability, - problemMessage: - """The type '${type}' used in the 'for' loop must implement '${type2}' because '${type}' is nullable and '${type2}' isn't.""" + - labeler.originMessages, - arguments: { - 'type': _type, - 'type2': _type2, - }, - ); -} - -// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template< - Message Function( - DartType _type, DartType _type2, DartType _type3, DartType _type4)> - templateForInLoopTypeNotIterablePartNullability = const Template< - Message Function( - DartType _type, DartType _type2, DartType _type3, DartType _type4)>( - "ForInLoopTypeNotIterablePartNullability", - problemMessageTemplate: - r"""The type '#type' used in the 'for' loop must implement '#type2' because '#type3' is nullable and '#type4' isn't.""", - withArguments: _withArgumentsForInLoopTypeNotIterablePartNullability, -); - -// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Code< - Message Function( - DartType _type, DartType _type2, DartType _type3, DartType _type4)> - codeForInLoopTypeNotIterablePartNullability = const Code< - Message Function( - DartType _type, DartType _type2, DartType _type3, DartType _type4)>( - "ForInLoopTypeNotIterablePartNullability", - analyzerCodes: ["FOR_IN_OF_INVALID_TYPE"], -); - -// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -Message _withArgumentsForInLoopTypeNotIterablePartNullability( - DartType _type, DartType _type2, DartType _type3, DartType _type4) { - TypeLabeler labeler = new TypeLabeler(); - List typeParts = labeler.labelType(_type); - List type2Parts = labeler.labelType(_type2); - List type3Parts = labeler.labelType(_type3); - List type4Parts = labeler.labelType(_type4); - String type = typeParts.join(); - String type2 = type2Parts.join(); - String type3 = type3Parts.join(); - String type4 = type4Parts.join(); - return new Message( - codeForInLoopTypeNotIterablePartNullability, - problemMessage: - """The type '${type}' used in the 'for' loop must implement '${type2}' because '${type3}' is nullable and '${type4}' isn't.""" + - labeler.originMessages, - arguments: { - 'type': _type, - 'type2': _type2, - 'type3': _type3, - 'type4': _type4, - }, - ); -} - // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Template templateGenericFunctionTypeAsTypeArgumentThroughTypedef = @@ -2463,166 +2123,6 @@ Message _withArgumentsInvalidAssignmentError(DartType _type, DartType _type2) { ); } -// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template - templateInvalidAssignmentErrorNullability = - const Template( - "InvalidAssignmentErrorNullability", - problemMessageTemplate: - r"""A value of type '#type' can't be assigned to a variable of type '#type2' because '#type' is nullable and '#type2' isn't.""", - withArguments: _withArgumentsInvalidAssignmentErrorNullability, -); - -// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Code - codeInvalidAssignmentErrorNullability = - const Code( - "InvalidAssignmentErrorNullability", - analyzerCodes: ["INVALID_ASSIGNMENT"], -); - -// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -Message _withArgumentsInvalidAssignmentErrorNullability( - DartType _type, DartType _type2) { - TypeLabeler labeler = new TypeLabeler(); - List typeParts = labeler.labelType(_type); - List type2Parts = labeler.labelType(_type2); - String type = typeParts.join(); - String type2 = type2Parts.join(); - return new Message( - codeInvalidAssignmentErrorNullability, - problemMessage: - """A value of type '${type}' can't be assigned to a variable of type '${type2}' because '${type}' is nullable and '${type2}' isn't.""" + - labeler.originMessages, - arguments: { - 'type': _type, - 'type2': _type2, - }, - ); -} - -// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template - templateInvalidAssignmentErrorNullabilityNull = - const Template( - "InvalidAssignmentErrorNullabilityNull", - problemMessageTemplate: - r"""The value 'null' can't be assigned to a variable of type '#type' because '#type' is not nullable.""", - withArguments: _withArgumentsInvalidAssignmentErrorNullabilityNull, -); - -// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Code - codeInvalidAssignmentErrorNullabilityNull = - const Code( - "InvalidAssignmentErrorNullabilityNull", - analyzerCodes: ["INVALID_ASSIGNMENT"], -); - -// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -Message _withArgumentsInvalidAssignmentErrorNullabilityNull(DartType _type) { - TypeLabeler labeler = new TypeLabeler(); - List typeParts = labeler.labelType(_type); - String type = typeParts.join(); - return new Message( - codeInvalidAssignmentErrorNullabilityNull, - problemMessage: - """The value 'null' can't be assigned to a variable of type '${type}' because '${type}' is not nullable.""" + - labeler.originMessages, - arguments: { - 'type': _type, - }, - ); -} - -// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template - templateInvalidAssignmentErrorNullabilityNullType = - const Template( - "InvalidAssignmentErrorNullabilityNullType", - problemMessageTemplate: - r"""A value of type '#type' can't be assigned to a variable of type '#type2' because '#type2' is not nullable.""", - withArguments: _withArgumentsInvalidAssignmentErrorNullabilityNullType, -); - -// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Code - codeInvalidAssignmentErrorNullabilityNullType = - const Code( - "InvalidAssignmentErrorNullabilityNullType", - analyzerCodes: ["INVALID_ASSIGNMENT"], -); - -// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -Message _withArgumentsInvalidAssignmentErrorNullabilityNullType( - DartType _type, DartType _type2) { - TypeLabeler labeler = new TypeLabeler(); - List typeParts = labeler.labelType(_type); - List type2Parts = labeler.labelType(_type2); - String type = typeParts.join(); - String type2 = type2Parts.join(); - return new Message( - codeInvalidAssignmentErrorNullabilityNullType, - problemMessage: - """A value of type '${type}' can't be assigned to a variable of type '${type2}' because '${type2}' is not nullable.""" + - labeler.originMessages, - arguments: { - 'type': _type, - 'type2': _type2, - }, - ); -} - -// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template< - Message Function( - DartType _type, DartType _type2, DartType _type3, DartType _type4)> - templateInvalidAssignmentErrorPartNullability = const Template< - Message Function( - DartType _type, DartType _type2, DartType _type3, DartType _type4)>( - "InvalidAssignmentErrorPartNullability", - problemMessageTemplate: - r"""A value of type '#type' can't be assigned to a variable of type '#type2' because '#type3' is nullable and '#type4' isn't.""", - withArguments: _withArgumentsInvalidAssignmentErrorPartNullability, -); - -// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Code< - Message Function( - DartType _type, DartType _type2, DartType _type3, DartType _type4)> - codeInvalidAssignmentErrorPartNullability = const Code< - Message Function( - DartType _type, DartType _type2, DartType _type3, DartType _type4)>( - "InvalidAssignmentErrorPartNullability", - analyzerCodes: ["INVALID_ASSIGNMENT"], -); - -// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -Message _withArgumentsInvalidAssignmentErrorPartNullability( - DartType _type, DartType _type2, DartType _type3, DartType _type4) { - TypeLabeler labeler = new TypeLabeler(); - List typeParts = labeler.labelType(_type); - List type2Parts = labeler.labelType(_type2); - List type3Parts = labeler.labelType(_type3); - List type4Parts = labeler.labelType(_type4); - String type = typeParts.join(); - String type2 = type2Parts.join(); - String type3 = type3Parts.join(); - String type4 = type4Parts.join(); - return new Message( - codeInvalidAssignmentErrorPartNullability, - problemMessage: - """A value of type '${type}' can't be assigned to a variable of type '${type2}' because '${type3}' is nullable and '${type4}' isn't.""" + - labeler.originMessages, - arguments: { - 'type': _type, - 'type2': _type2, - 'type3': _type3, - 'type4': _type4, - }, - ); -} - // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Template templateInvalidCastFunctionExpr = @@ -3465,317 +2965,6 @@ Message _withArgumentsInvalidReturnAsync(DartType _type, DartType _type2) { ); } -// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template - templateInvalidReturnAsyncNullability = - const Template( - "InvalidReturnAsyncNullability", - problemMessageTemplate: - r"""A value of type '#type' can't be returned from an async function with return type '#type2' because '#type' is nullable and '#type2' isn't.""", - withArguments: _withArgumentsInvalidReturnAsyncNullability, -); - -// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Code - codeInvalidReturnAsyncNullability = - const Code( - "InvalidReturnAsyncNullability", -); - -// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -Message _withArgumentsInvalidReturnAsyncNullability( - DartType _type, DartType _type2) { - TypeLabeler labeler = new TypeLabeler(); - List typeParts = labeler.labelType(_type); - List type2Parts = labeler.labelType(_type2); - String type = typeParts.join(); - String type2 = type2Parts.join(); - return new Message( - codeInvalidReturnAsyncNullability, - problemMessage: - """A value of type '${type}' can't be returned from an async function with return type '${type2}' because '${type}' is nullable and '${type2}' isn't.""" + - labeler.originMessages, - arguments: { - 'type': _type, - 'type2': _type2, - }, - ); -} - -// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template - templateInvalidReturnAsyncNullabilityNull = - const Template( - "InvalidReturnAsyncNullabilityNull", - problemMessageTemplate: - r"""The value 'null' can't be returned from an async function with return type '#type' because '#type' is not nullable.""", - withArguments: _withArgumentsInvalidReturnAsyncNullabilityNull, -); - -// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Code - codeInvalidReturnAsyncNullabilityNull = - const Code( - "InvalidReturnAsyncNullabilityNull", -); - -// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -Message _withArgumentsInvalidReturnAsyncNullabilityNull(DartType _type) { - TypeLabeler labeler = new TypeLabeler(); - List typeParts = labeler.labelType(_type); - String type = typeParts.join(); - return new Message( - codeInvalidReturnAsyncNullabilityNull, - problemMessage: - """The value 'null' can't be returned from an async function with return type '${type}' because '${type}' is not nullable.""" + - labeler.originMessages, - arguments: { - 'type': _type, - }, - ); -} - -// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template - templateInvalidReturnAsyncNullabilityNullType = - const Template( - "InvalidReturnAsyncNullabilityNullType", - problemMessageTemplate: - r"""A value of type '#type' can't be returned from an async function with return type '#type2' because '#type2' is not nullable.""", - withArguments: _withArgumentsInvalidReturnAsyncNullabilityNullType, -); - -// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Code - codeInvalidReturnAsyncNullabilityNullType = - const Code( - "InvalidReturnAsyncNullabilityNullType", -); - -// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -Message _withArgumentsInvalidReturnAsyncNullabilityNullType( - DartType _type, DartType _type2) { - TypeLabeler labeler = new TypeLabeler(); - List typeParts = labeler.labelType(_type); - List type2Parts = labeler.labelType(_type2); - String type = typeParts.join(); - String type2 = type2Parts.join(); - return new Message( - codeInvalidReturnAsyncNullabilityNullType, - problemMessage: - """A value of type '${type}' can't be returned from an async function with return type '${type2}' because '${type2}' is not nullable.""" + - labeler.originMessages, - arguments: { - 'type': _type, - 'type2': _type2, - }, - ); -} - -// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template< - Message Function( - DartType _type, DartType _type2, DartType _type3, DartType _type4)> - templateInvalidReturnAsyncPartNullability = const Template< - Message Function( - DartType _type, DartType _type2, DartType _type3, DartType _type4)>( - "InvalidReturnAsyncPartNullability", - problemMessageTemplate: - r"""A value of type '#type' can't be returned from an async function with return type '#type2' because '#type3' is nullable and '#type4' isn't.""", - withArguments: _withArgumentsInvalidReturnAsyncPartNullability, -); - -// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Code< - Message Function( - DartType _type, DartType _type2, DartType _type3, DartType _type4)> - codeInvalidReturnAsyncPartNullability = const Code< - Message Function( - DartType _type, DartType _type2, DartType _type3, DartType _type4)>( - "InvalidReturnAsyncPartNullability", -); - -// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -Message _withArgumentsInvalidReturnAsyncPartNullability( - DartType _type, DartType _type2, DartType _type3, DartType _type4) { - TypeLabeler labeler = new TypeLabeler(); - List typeParts = labeler.labelType(_type); - List type2Parts = labeler.labelType(_type2); - List type3Parts = labeler.labelType(_type3); - List type4Parts = labeler.labelType(_type4); - String type = typeParts.join(); - String type2 = type2Parts.join(); - String type3 = type3Parts.join(); - String type4 = type4Parts.join(); - return new Message( - codeInvalidReturnAsyncPartNullability, - problemMessage: - """A value of type '${type}' can't be returned from an async function with return type '${type2}' because '${type3}' is nullable and '${type4}' isn't.""" + - labeler.originMessages, - arguments: { - 'type': _type, - 'type2': _type2, - 'type3': _type3, - 'type4': _type4, - }, - ); -} - -// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template - templateInvalidReturnNullability = - const Template( - "InvalidReturnNullability", - problemMessageTemplate: - r"""A value of type '#type' can't be returned from a function with return type '#type2' because '#type' is nullable and '#type2' isn't.""", - withArguments: _withArgumentsInvalidReturnNullability, -); - -// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Code - codeInvalidReturnNullability = - const Code( - "InvalidReturnNullability", -); - -// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -Message _withArgumentsInvalidReturnNullability( - DartType _type, DartType _type2) { - TypeLabeler labeler = new TypeLabeler(); - List typeParts = labeler.labelType(_type); - List type2Parts = labeler.labelType(_type2); - String type = typeParts.join(); - String type2 = type2Parts.join(); - return new Message( - codeInvalidReturnNullability, - problemMessage: - """A value of type '${type}' can't be returned from a function with return type '${type2}' because '${type}' is nullable and '${type2}' isn't.""" + - labeler.originMessages, - arguments: { - 'type': _type, - 'type2': _type2, - }, - ); -} - -// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template - templateInvalidReturnNullabilityNull = - const Template( - "InvalidReturnNullabilityNull", - problemMessageTemplate: - r"""The value 'null' can't be returned from a function with return type '#type' because '#type' is not nullable.""", - withArguments: _withArgumentsInvalidReturnNullabilityNull, -); - -// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Code codeInvalidReturnNullabilityNull = - const Code( - "InvalidReturnNullabilityNull", -); - -// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -Message _withArgumentsInvalidReturnNullabilityNull(DartType _type) { - TypeLabeler labeler = new TypeLabeler(); - List typeParts = labeler.labelType(_type); - String type = typeParts.join(); - return new Message( - codeInvalidReturnNullabilityNull, - problemMessage: - """The value 'null' can't be returned from a function with return type '${type}' because '${type}' is not nullable.""" + - labeler.originMessages, - arguments: { - 'type': _type, - }, - ); -} - -// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template - templateInvalidReturnNullabilityNullType = - const Template( - "InvalidReturnNullabilityNullType", - problemMessageTemplate: - r"""A value of type '#type' can't be returned from a function with return type '#type2' because '#type2' is not nullable.""", - withArguments: _withArgumentsInvalidReturnNullabilityNullType, -); - -// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Code - codeInvalidReturnNullabilityNullType = - const Code( - "InvalidReturnNullabilityNullType", -); - -// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -Message _withArgumentsInvalidReturnNullabilityNullType( - DartType _type, DartType _type2) { - TypeLabeler labeler = new TypeLabeler(); - List typeParts = labeler.labelType(_type); - List type2Parts = labeler.labelType(_type2); - String type = typeParts.join(); - String type2 = type2Parts.join(); - return new Message( - codeInvalidReturnNullabilityNullType, - problemMessage: - """A value of type '${type}' can't be returned from a function with return type '${type2}' because '${type2}' is not nullable.""" + - labeler.originMessages, - arguments: { - 'type': _type, - 'type2': _type2, - }, - ); -} - -// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template< - Message Function( - DartType _type, DartType _type2, DartType _type3, DartType _type4)> - templateInvalidReturnPartNullability = const Template< - Message Function( - DartType _type, DartType _type2, DartType _type3, DartType _type4)>( - "InvalidReturnPartNullability", - problemMessageTemplate: - r"""A value of type '#type' can't be returned from a function with return type '#type2' because '#type3' is nullable and '#type4' isn't.""", - withArguments: _withArgumentsInvalidReturnPartNullability, -); - -// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Code< - Message Function( - DartType _type, DartType _type2, DartType _type3, DartType _type4)> - codeInvalidReturnPartNullability = const Code< - Message Function( - DartType _type, DartType _type2, DartType _type3, DartType _type4)>( - "InvalidReturnPartNullability", -); - -// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -Message _withArgumentsInvalidReturnPartNullability( - DartType _type, DartType _type2, DartType _type3, DartType _type4) { - TypeLabeler labeler = new TypeLabeler(); - List typeParts = labeler.labelType(_type); - List type2Parts = labeler.labelType(_type2); - List type3Parts = labeler.labelType(_type3); - List type4Parts = labeler.labelType(_type4); - String type = typeParts.join(); - String type2 = type2Parts.join(); - String type3 = type3Parts.join(); - String type4 = type4Parts.join(); - return new Message( - codeInvalidReturnPartNullability, - problemMessage: - """A value of type '${type}' can't be returned from a function with return type '${type2}' because '${type3}' is nullable and '${type4}' isn't.""" + - labeler.originMessages, - arguments: { - 'type': _type, - 'type2': _type2, - 'type3': _type3, - 'type4': _type4, - }, - ); -} - // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Template templateJsInteropExportInvalidInteropTypeArgument = diff --git a/pkg/front_end/lib/src/type_inference/closure_context.dart b/pkg/front_end/lib/src/type_inference/closure_context.dart index a4d1bfa6d0e..4c931ae54fc 100644 --- a/pkg/front_end/lib/src/type_inference/closure_context.dart +++ b/pkg/front_end/lib/src/type_inference/closure_context.dart @@ -219,12 +219,7 @@ class _SyncClosureContext implements ClosureContext { _returnContext, expressionType, statement.expression!, fileOffset: statement.expression!.fileOffset, isVoidAllowed: true, - errorTemplate: templateInvalidReturn, - nullabilityErrorTemplate: templateInvalidReturnNullability, - nullabilityPartErrorTemplate: templateInvalidReturnPartNullability, - nullabilityNullErrorTemplate: templateInvalidReturnNullabilityNull, - nullabilityNullTypeErrorTemplate: - templateInvalidReturnNullabilityNullType); + errorTemplate: templateInvalidReturn); statement.expression = expression..parent = statement; } } @@ -491,14 +486,7 @@ class _AsyncClosureContext implements ClosureContext { inferrer.computeGreatestClosure2(_returnContext), declaredContextType: returnType, isVoidAllowed: false, - errorTemplate: templateInvalidReturnAsync, - nullabilityErrorTemplate: templateInvalidReturnAsyncNullability, - nullabilityPartErrorTemplate: - templateInvalidReturnAsyncPartNullability, - nullabilityNullErrorTemplate: - templateInvalidReturnAsyncNullabilityNull, - nullabilityNullTypeErrorTemplate: - templateInvalidReturnAsyncNullabilityNullType) + errorTemplate: templateInvalidReturnAsync) ..parent = statement; } } diff --git a/pkg/front_end/lib/src/type_inference/for_in.dart b/pkg/front_end/lib/src/type_inference/for_in.dart index e8f35b84787..0d8a836f20c 100644 --- a/pkg/front_end/lib/src/type_inference/for_in.dart +++ b/pkg/front_end/lib/src/type_inference/for_in.dart @@ -60,10 +60,6 @@ class LocalForInVariable implements ForInVariable { Expression rhs = visitor.ensureAssignable( variableType, rhsType, variableSet.value, errorTemplate: templateForInLoopElementTypeNotAssignable, - nullabilityErrorTemplate: - templateForInLoopElementTypeNotAssignableNullability, - nullabilityPartErrorTemplate: - templateForInLoopElementTypeNotAssignablePartNullability, isVoidAllowed: true); variableSet.value = rhs..parent = variableSet; @@ -141,10 +137,6 @@ class PropertyForInVariable implements ForInVariable { Expression rhs = visitor.ensureAssignable( visitor.computeGreatestClosure(_writeType!), rhsType, _rhs!, errorTemplate: templateForInLoopElementTypeNotAssignable, - nullabilityErrorTemplate: - templateForInLoopElementTypeNotAssignableNullability, - nullabilityPartErrorTemplate: - templateForInLoopElementTypeNotAssignablePartNullability, isVoidAllowed: true); propertySet.value = rhs..parent = propertySet; @@ -179,10 +171,6 @@ class AbstractSuperPropertyForInVariable implements ForInVariable { rhsType, superPropertySet.value, errorTemplate: templateForInLoopElementTypeNotAssignable, - nullabilityErrorTemplate: - templateForInLoopElementTypeNotAssignableNullability, - nullabilityPartErrorTemplate: - templateForInLoopElementTypeNotAssignablePartNullability, isVoidAllowed: true); superPropertySet.value = rhs..parent = superPropertySet; ExpressionInferenceResult result = visitor.inferExpression( @@ -218,10 +206,6 @@ class SuperPropertyForInVariable implements ForInVariable { rhsType, superPropertySet.value, errorTemplate: templateForInLoopElementTypeNotAssignable, - nullabilityErrorTemplate: - templateForInLoopElementTypeNotAssignableNullability, - nullabilityPartErrorTemplate: - templateForInLoopElementTypeNotAssignablePartNullability, isVoidAllowed: true); superPropertySet.value = rhs..parent = superPropertySet; ExpressionInferenceResult result = visitor.inferExpression( @@ -247,10 +231,6 @@ class StaticForInVariable implements ForInVariable { Expression rhs = visitor.ensureAssignable( setterType, rhsType, staticSet.value, errorTemplate: templateForInLoopElementTypeNotAssignable, - nullabilityErrorTemplate: - templateForInLoopElementTypeNotAssignableNullability, - nullabilityPartErrorTemplate: - templateForInLoopElementTypeNotAssignablePartNullability, isVoidAllowed: true); staticSet.value = rhs..parent = staticSet; @@ -297,10 +277,6 @@ class ExtensionSetForInVariable implements ForInVariable { Expression rhs = visitor.ensureAssignable( setterType!, rhsType, extensionSet.value, errorTemplate: templateForInLoopElementTypeNotAssignable, - nullabilityErrorTemplate: - templateForInLoopElementTypeNotAssignableNullability, - nullabilityPartErrorTemplate: - templateForInLoopElementTypeNotAssignablePartNullability, isVoidAllowed: true); extensionSet.value = rhs..parent = extensionSet; diff --git a/pkg/front_end/lib/src/type_inference/inference_visitor.dart b/pkg/front_end/lib/src/type_inference/inference_visitor.dart index 0055ee1a826..9f88e28ae23 100644 --- a/pkg/front_end/lib/src/type_inference/inference_visitor.dart +++ b/pkg/front_end/lib/src/type_inference/inference_visitor.dart @@ -1624,11 +1624,7 @@ class InferenceVisitorImpl extends InferenceVisitorBase variable.type, inferredType, variableGet, isVoidAllowed: true, fileOffset: parent.fileOffset, - errorTemplate: templateForInLoopElementTypeNotAssignable, - nullabilityErrorTemplate: - templateForInLoopElementTypeNotAssignableNullability, - nullabilityPartErrorTemplate: - templateForInLoopElementTypeNotAssignablePartNullability); + errorTemplate: templateForInLoopElementTypeNotAssignable); Statement? expressionEffect; if (!identical(implicitDowncast, variableGet)) { variable.initializer = implicitDowncast..parent = variable; @@ -1668,10 +1664,7 @@ class InferenceVisitorImpl extends InferenceVisitorBase wrapType(const DynamicType(), iterableClass, Nullability.nonNullable), inferredExpressionType, iterable, - errorTemplate: templateForInLoopTypeNotIterable, - nullabilityErrorTemplate: templateForInLoopTypeNotIterableNullability, - nullabilityPartErrorTemplate: - templateForInLoopTypeNotIterablePartNullability); + errorTemplate: templateForInLoopTypeNotIterable); DartType inferredType = const DynamicType(); if (inferredExpressionType is TypeDeclarationType) { // TODO(johnniwinther): Should we use the type of @@ -1803,10 +1796,7 @@ class InferenceVisitorImpl extends InferenceVisitorBase Nullability.nonNullable), result.expressionType.unwrapTypeView(), iterable, - errorTemplate: templateForInLoopTypeNotIterable, - nullabilityErrorTemplate: templateForInLoopTypeNotIterableNullability, - nullabilityPartErrorTemplate: - templateForInLoopTypeNotIterablePartNullability); + errorTemplate: templateForInLoopTypeNotIterable); // This is matched by the call to [forEach_end] in // [inferElement], [inferMapEntry] or [inferForInStatement]. flowAnalysis.forEach_bodyBegin(node); @@ -6774,14 +6764,7 @@ class InferenceVisitorImpl extends InferenceVisitorBase DartType contextType = rightType.withDeclaredNullability(Nullability.nullable); rightResult = ensureAssignableResult(contextType, rightResult, - errorTemplate: templateArgumentTypeNotAssignable, - nullabilityErrorTemplate: templateArgumentTypeNotAssignableNullability, - nullabilityPartErrorTemplate: - templateArgumentTypeNotAssignablePartNullability, - nullabilityNullErrorTemplate: - templateArgumentTypeNotAssignableNullabilityNull, - nullabilityNullTypeErrorTemplate: - templateArgumentTypeNotAssignableNullabilityNullType); + errorTemplate: templateArgumentTypeNotAssignable); right = rightResult.expression; FunctionType functionType = diff --git a/pkg/front_end/lib/src/type_inference/inference_visitor_base.dart b/pkg/front_end/lib/src/type_inference/inference_visitor_base.dart index 3edd2f235ec..3b1eaab7b8b 100644 --- a/pkg/front_end/lib/src/type_inference/inference_visitor_base.dart +++ b/pkg/front_end/lib/src/type_inference/inference_visitor_base.dart @@ -349,12 +349,6 @@ abstract class InferenceVisitorBase implements InferenceVisitor { bool isVoidAllowed = false, bool coerceExpression = true, Template? errorTemplate, - Template? nullabilityErrorTemplate, - Template? nullabilityNullErrorTemplate, - Template? - nullabilityNullTypeErrorTemplate, - Template? - nullabilityPartErrorTemplate, Map Function()? whyNotPromoted}) { return ensureAssignableResult(expectedType, new ExpressionInferenceResult(expressionType, expression), @@ -364,10 +358,6 @@ abstract class InferenceVisitorBase implements InferenceVisitor { isVoidAllowed: isVoidAllowed, coerceExpression: coerceExpression, errorTemplate: errorTemplate, - nullabilityErrorTemplate: nullabilityErrorTemplate, - nullabilityNullErrorTemplate: nullabilityNullErrorTemplate, - nullabilityNullTypeErrorTemplate: nullabilityNullTypeErrorTemplate, - nullabilityPartErrorTemplate: nullabilityPartErrorTemplate, whyNotPromoted: whyNotPromoted) .expression; } @@ -463,34 +453,8 @@ abstract class InferenceVisitorBase implements InferenceVisitor { bool isVoidAllowed = false, bool isCoercionAllowed = true, Template? errorTemplate, - Template? nullabilityErrorTemplate, - Template? nullabilityNullErrorTemplate, - Template? - nullabilityNullTypeErrorTemplate, - Template? - nullabilityPartErrorTemplate, Map Function()? whyNotPromoted}) { - // [errorTemplate], [nullabilityErrorTemplate], and - // [nullabilityPartErrorTemplate] should be provided together. - assert((errorTemplate == null) == (nullabilityErrorTemplate == null) && - (nullabilityErrorTemplate == null) == - (nullabilityPartErrorTemplate == null)); - // [nullabilityNullErrorTemplate] and [nullabilityNullTypeErrorTemplate] - // should be provided together. - assert((nullabilityNullErrorTemplate == null) == - (nullabilityNullTypeErrorTemplate == null)); errorTemplate ??= templateInvalidAssignmentError; - if (nullabilityErrorTemplate == null) { - // Use [templateInvalidAssignmentErrorNullabilityNull] only if no - // specific [nullabilityErrorTemplate] template was passed. - nullabilityNullErrorTemplate ??= - templateInvalidAssignmentErrorNullabilityNull; - } - nullabilityNullTypeErrorTemplate ??= nullabilityErrorTemplate ?? - templateInvalidAssignmentErrorNullabilityNullType; - nullabilityErrorTemplate ??= templateInvalidAssignmentErrorNullability; - nullabilityPartErrorTemplate ??= - templateInvalidAssignmentErrorPartNullability; fileOffset ??= inferenceResult.expression.fileOffset; contextType = computeGreatestClosure(contextType); @@ -558,47 +522,29 @@ abstract class InferenceVisitorBase implements InferenceVisitor { break; case AssignabilityKind.unassignableNullability: if (expressionType == assignabilityResult.subtype && - contextType == assignabilityResult.supertype) { - if (expression is NullLiteral && - nullabilityNullErrorTemplate != null) { - result = _wrapUnassignableExpression( - expression, - expressionType, - contextType, - nullabilityNullErrorTemplate - .withArguments(declaredContextType ?? contextType)); - } else if (expressionType is NullType) { - result = _wrapUnassignableExpression( - expression, - expressionType, - contextType, - nullabilityNullTypeErrorTemplate.withArguments( - expressionType, declaredContextType ?? contextType)); - } else { - whyNotPromoted ??= flowAnalysis.whyNotPromoted(expression); - result = _wrapUnassignableExpression( - expression, - expressionType, - contextType, - nullabilityErrorTemplate.withArguments( - expressionType, declaredContextType ?? contextType), - context: getWhyNotPromotedContext( - whyNotPromoted.call(), - expression, - // Coverage-ignore(suite): Not run. - (type) => typeSchemaEnvironment.isSubtypeOf(type, - contextType, SubtypeCheckMode.withNullabilities))); - } + contextType == assignabilityResult.supertype && + expression is! NullLiteral && + expressionType is! NullType) { + whyNotPromoted ??= flowAnalysis.whyNotPromoted(expression); + result = _wrapUnassignableExpression( + expression, + expressionType, + contextType, + errorTemplate.withArguments( + expressionType, declaredContextType ?? contextType), + context: getWhyNotPromotedContext( + whyNotPromoted.call(), + expression, + // Coverage-ignore(suite): Not run. + (type) => typeSchemaEnvironment.isSubtypeOf( + type, contextType, SubtypeCheckMode.withNullabilities))); } else { result = _wrapUnassignableExpression( expression, expressionType, contextType, - nullabilityPartErrorTemplate.withArguments( - expressionType, - declaredContextType ?? contextType, - assignabilityResult.subtype!, - assignabilityResult.supertype!)); + errorTemplate.withArguments( + expressionType, declaredContextType ?? contextType)); } break; } @@ -623,12 +569,6 @@ abstract class InferenceVisitorBase implements InferenceVisitor { bool isVoidAllowed = false, bool coerceExpression = true, Template? errorTemplate, - Template? nullabilityErrorTemplate, - Template? nullabilityNullErrorTemplate, - Template? - nullabilityNullTypeErrorTemplate, - Template? - nullabilityPartErrorTemplate, Map Function()? whyNotPromoted}) { if (coerceExpression) { ExpressionInferenceResult? coercionResult = coerceExpressionForAssignment( @@ -651,10 +591,6 @@ abstract class InferenceVisitorBase implements InferenceVisitor { isVoidAllowed: isVoidAllowed, isCoercionAllowed: coerceExpression, errorTemplate: errorTemplate, - nullabilityErrorTemplate: nullabilityErrorTemplate, - nullabilityNullErrorTemplate: nullabilityNullErrorTemplate, - nullabilityNullTypeErrorTemplate: nullabilityNullTypeErrorTemplate, - nullabilityPartErrorTemplate: nullabilityPartErrorTemplate, whyNotPromoted: whyNotPromoted); return inferenceResult; @@ -2066,15 +2002,7 @@ abstract class InferenceVisitorBase implements InferenceVisitor { expectedType, argumentResultToCheck, isVoidAllowed: expectedType is VoidType, isCoercionAllowed: coerceExpression, - errorTemplate: templateArgumentTypeNotAssignable, - nullabilityErrorTemplate: - templateArgumentTypeNotAssignableNullability, - nullabilityPartErrorTemplate: - templateArgumentTypeNotAssignablePartNullability, - nullabilityNullErrorTemplate: - templateArgumentTypeNotAssignableNullabilityNull, - nullabilityNullTypeErrorTemplate: - templateArgumentTypeNotAssignableNullabilityNullType); + errorTemplate: templateArgumentTypeNotAssignable); argumentExpression = argumentResultToCheck.expression; if (namedArgumentExpression == null) { diff --git a/pkg/front_end/messages.yaml b/pkg/front_end/messages.yaml index be51dfbb65e..b93a9b9a8c1 100644 --- a/pkg/front_end/messages.yaml +++ b/pkg/front_end/messages.yaml @@ -4074,45 +4074,6 @@ ArgumentTypeNotAssignable: method(1.5); } -ArgumentTypeNotAssignableNullability: - problemMessage: "The argument type '#type' can't be assigned to the parameter type '#type2' because '#type' is nullable and '#type2' isn't." - analyzerCode: ARGUMENT_TYPE_NOT_ASSIGNABLE - script: > - method(int i) {} - main() { - int? j = null; - method(j); - } - -ArgumentTypeNotAssignablePartNullability: - problemMessage: "The argument type '#type' can't be assigned to the parameter type '#type2' because '#type3' is nullable and '#type4' isn't." - analyzerCode: ARGUMENT_TYPE_NOT_ASSIGNABLE - script: > - method(List i) {} - main() { - List j = [null]; - method(j); - } - -ArgumentTypeNotAssignableNullabilityNull: - problemMessage: "The value 'null' can't be assigned to the parameter type '#type' because '#type' is not nullable." - analyzerCode: ARGUMENT_TYPE_NOT_ASSIGNABLE - script: > - method(int i) {} - main() { - method(null); - } - -ArgumentTypeNotAssignableNullabilityNullType: - problemMessage: "The argument type '#type' can't be assigned to the parameter type '#type2' because '#type2' is not nullable." - analyzerCode: ARGUMENT_TYPE_NOT_ASSIGNABLE - script: > - method(int i) {} - main() { - Null n; - method(n); - } - InvalidAssignmentError: problemMessage: "A value of type '#type' can't be assigned to a variable of type '#type2'." analyzerCode: INVALID_ASSIGNMENT @@ -4122,45 +4083,6 @@ InvalidAssignmentError: i = 1.5; } -InvalidAssignmentErrorNullability: - problemMessage: "A value of type '#type' can't be assigned to a variable of type '#type2' because '#type' is nullable and '#type2' isn't." - analyzerCode: INVALID_ASSIGNMENT - script: > - main() { - int i = 0; - int? j; - i = j; - } - -InvalidAssignmentErrorPartNullability: - problemMessage: "A value of type '#type' can't be assigned to a variable of type '#type2' because '#type3' is nullable and '#type4' isn't." - analyzerCode: INVALID_ASSIGNMENT - script: > - main() { - List i = []; - List j = [null]; - i = j; - } - -InvalidAssignmentErrorNullabilityNull: - problemMessage: "The value 'null' can't be assigned to a variable of type '#type' because '#type' is not nullable." - analyzerCode: INVALID_ASSIGNMENT - script: > - main() { - int i = 0; - i = null; - } - -InvalidAssignmentErrorNullabilityNullType: - problemMessage: "A value of type '#type' can't be assigned to a variable of type '#type2' because '#type2' is not nullable." - analyzerCode: INVALID_ASSIGNMENT - script: > - main() { - Null n; - int i = 0; - i = n; - } - PatchClassTypeParametersMismatch: problemMessage: "A patch class must have the same number of type variables as its origin class." @@ -4453,26 +4375,6 @@ ForInLoopElementTypeNotAssignable: for (int i in list) {} } -ForInLoopElementTypeNotAssignableNullability: - problemMessage: "A value of type '#type' can't be assigned to a variable of type '#type2' because '#type' is nullable and '#type2' isn't." - correctionMessage: "Try changing the type of the variable." - analyzerCode: FOR_IN_OF_INVALID_ELEMENT_TYPE - script: | - method() { - List list = []; - for (int i in list) {} - } - -ForInLoopElementTypeNotAssignablePartNullability: - problemMessage: "A value of type '#type' can't be assigned to a variable of type '#type2' because '#type3' is nullable and '#type4' isn't." - correctionMessage: "Try changing the type of the variable." - analyzerCode: FOR_IN_OF_INVALID_ELEMENT_TYPE - script: | - method() { - List> list = [[]]; - for (List i in list) {} - } - ForInLoopTypeNotIterable: problemMessage: "The type '#type' used in the 'for' loop must implement '#type2'." analyzerCode: FOR_IN_OF_INVALID_TYPE @@ -4482,22 +4384,6 @@ ForInLoopTypeNotIterable: for (int i in list) {} } -ForInLoopTypeNotIterableNullability: - problemMessage: "The type '#type' used in the 'for' loop must implement '#type2' because '#type' is nullable and '#type2' isn't." - analyzerCode: FOR_IN_OF_INVALID_TYPE - script: | - method() { - List? list = null; - for (int i in list) {} - } - -# This cannot never occur since the iterable is checked to be assignable to `Iterable` so nullability can -# only be a problem at the immediate level as in [ForInLoopTypeNotIterableNullability]. The message is needed for -# symmetry in the call site. -ForInLoopTypeNotIterablePartNullability: - problemMessage: "The type '#type' used in the 'for' loop must implement '#type2' because '#type3' is nullable and '#type4' isn't." - analyzerCode: FOR_IN_OF_INVALID_TYPE - InitializingFormalTypeMismatch: problemMessage: "The type of parameter '#name', '#type' is not a subtype of the corresponding field's type, '#type2'." correctionMessage: "Try changing the type of parameter '#name' to a subtype of '#type2'." @@ -4696,42 +4582,10 @@ InvalidReturn: problemMessage: "A value of type '#type' can't be returned from a function with return type '#type2'." declaration: "int foo() { return true; }" -InvalidReturnNullability: - problemMessage: "A value of type '#type' can't be returned from a function with return type '#type2' because '#type' is nullable and '#type2' isn't." - declaration: "int foo(int? i) { return i; }" - -InvalidReturnPartNullability: - problemMessage: "A value of type '#type' can't be returned from a function with return type '#type2' because '#type3' is nullable and '#type4' isn't." - declaration: "List foo(List list) { return list; }" - -InvalidReturnNullabilityNull: - problemMessage: "The value 'null' can't be returned from a function with return type '#type' because '#type' is not nullable." - declaration: "int foo() { return null; }" - -InvalidReturnNullabilityNullType: - problemMessage: "A value of type '#type' can't be returned from a function with return type '#type2' because '#type2' is not nullable." - declaration: "int foo(Null i) { return i; }" - InvalidReturnAsync: problemMessage: "A value of type '#type' can't be returned from an async function with return type '#type2'." declaration: "Future foo() async { return true; }" -InvalidReturnAsyncNullability: - problemMessage: "A value of type '#type' can't be returned from an async function with return type '#type2' because '#type' is nullable and '#type2' isn't." - declaration: "Future foo(int? i) async { return i; }" - -InvalidReturnAsyncPartNullability: - problemMessage: "A value of type '#type' can't be returned from an async function with return type '#type2' because '#type3' is nullable and '#type4' isn't." - declaration: "Future> foo(List list) async { return list; }" - -InvalidReturnAsyncNullabilityNull: - problemMessage: "The value 'null' can't be returned from an async function with return type '#type' because '#type' is not nullable." - declaration: "Future foo() async { return null; }" - -InvalidReturnAsyncNullabilityNullType: - problemMessage: "A value of type '#type' can't be returned from an async function with return type '#type2' because '#type2' is not nullable." - declaration: "Future foo(Null n) async { return n; }" - ImplicitReturnNull: problemMessage: "A non-null value must be returned since the return type '#type' doesn't allow null." script: | diff --git a/pkg/front_end/test/coverage_suite_expected.dart b/pkg/front_end/test/coverage_suite_expected.dart index 634260896ef..00de45f6e60 100644 --- a/pkg/front_end/test/coverage_suite_expected.dart +++ b/pkg/front_end/test/coverage_suite_expected.dart @@ -195,7 +195,7 @@ const Map _expect = { ), // 100.0%. "package:front_end/src/base/name_space.dart": ( - hitCount: 129, + hitCount: 133, missCount: 0, ), // 100.0%. @@ -1061,12 +1061,12 @@ const Map _expect = { ), // 100.0%. "package:front_end/src/type_inference/inference_visitor.dart": ( - hitCount: 8392, + hitCount: 8371, missCount: 0, ), // 100.0%. "package:front_end/src/type_inference/inference_visitor_base.dart": ( - hitCount: 2460, + hitCount: 2447, missCount: 0, ), // 100.0%. diff --git a/pkg/front_end/testcases/constructor_tearoffs/implicit_instantiation_errors.dart.strong.expect b/pkg/front_end/testcases/constructor_tearoffs/implicit_instantiation_errors.dart.strong.expect index de682d638e7..b07976f27c7 100644 --- a/pkg/front_end/testcases/constructor_tearoffs/implicit_instantiation_errors.dart.strong.expect +++ b/pkg/front_end/testcases/constructor_tearoffs/implicit_instantiation_errors.dart.strong.expect @@ -2,23 +2,23 @@ library; // // Problems in library: // -// pkg/front_end/testcases/constructor_tearoffs/implicit_instantiation_errors.dart:16:30: Error: A value of type 'int Function(int, int)?' can't be assigned to a variable of type 'int Function(int, int)' because 'int Function(int, int)?' is nullable and 'int Function(int, int)' isn't. +// pkg/front_end/testcases/constructor_tearoffs/implicit_instantiation_errors.dart:16:30: Error: A value of type 'int Function(int, int)?' can't be assigned to a variable of type 'int Function(int, int)'. // int Function(int, int) f = alias; // ^ // -// pkg/front_end/testcases/constructor_tearoffs/implicit_instantiation_errors.dart:18:7: Error: A value of type 'int Function(int, int)?' can't be assigned to a variable of type 'int Function(int, int?)?' because 'int?' is nullable and 'int' isn't. +// pkg/front_end/testcases/constructor_tearoffs/implicit_instantiation_errors.dart:18:7: Error: A value of type 'int Function(int, int)?' can't be assigned to a variable of type 'int Function(int, int?)?'. // g = alias; // ^ // -// pkg/front_end/testcases/constructor_tearoffs/implicit_instantiation_errors.dart:19:27: Error: A value of type 'int Function(int, int)' can't be assigned to a variable of type 'int Function(int, int?)' because 'int?' is nullable and 'int' isn't. +// pkg/front_end/testcases/constructor_tearoffs/implicit_instantiation_errors.dart:19:27: Error: A value of type 'int Function(int, int)' can't be assigned to a variable of type 'int Function(int, int?)'. // int Function(int, int?) h = c; // ^ // -// pkg/front_end/testcases/constructor_tearoffs/implicit_instantiation_errors.dart:20:3: Error: A value of type 'int Function(int, int)' can't be assigned to a variable of type 'int Function(int, int?)?' because 'int?' is nullable and 'int' isn't. +// pkg/front_end/testcases/constructor_tearoffs/implicit_instantiation_errors.dart:20:3: Error: A value of type 'int Function(int, int)' can't be assigned to a variable of type 'int Function(int, int?)?'. // g = c; // ^ // -// pkg/front_end/testcases/constructor_tearoffs/implicit_instantiation_errors.dart:21:10: Error: The argument type 'int Function(int, int)?' can't be assigned to the parameter type 'int Function(int, int?)' because 'int?' is nullable and 'int' isn't. +// pkg/front_end/testcases/constructor_tearoffs/implicit_instantiation_errors.dart:21:10: Error: The argument type 'int Function(int, int)?' can't be assigned to the parameter type 'int Function(int, int?)'. // method(alias); // ^ // @@ -38,20 +38,20 @@ static method id(self::id::T% t, core::int i) static method method((core::int, core::int?) → core::int f) → dynamic {} static method test() → dynamic { self::Class c = new self::Class::•(); - (core::int, core::int) → core::int f = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/implicit_instantiation_errors.dart:16:30: Error: A value of type 'int Function(int, int)?' can't be assigned to a variable of type 'int Function(int, int)' because 'int Function(int, int)?' is nullable and 'int Function(int, int)' isn't. + (core::int, core::int) → core::int f = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/implicit_instantiation_errors.dart:16:30: Error: A value of type 'int Function(int, int)?' can't be assigned to a variable of type 'int Function(int, int)'. int Function(int, int) f = alias; ^" in (let final (T%, core::int) →? T% #t1 = self::alias in #t1 == null ?{(core::int, core::int) →? core::int} null : #t1{(T%, core::int) → T%}) as{TypeError} (core::int, core::int) → core::int; (core::int, core::int?) →? core::int g; - g = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/implicit_instantiation_errors.dart:18:7: Error: A value of type 'int Function(int, int)?' can't be assigned to a variable of type 'int Function(int, int?)?' because 'int?' is nullable and 'int' isn't. + g = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/implicit_instantiation_errors.dart:18:7: Error: A value of type 'int Function(int, int)?' can't be assigned to a variable of type 'int Function(int, int?)?'. g = alias; ^" in (let final (T%, core::int) →? T% #t2 = self::alias in #t2 == null ?{(core::int, core::int) →? core::int} null : #t2{(T%, core::int) → T%}) as{TypeError} (core::int, core::int?) →? core::int; - (core::int, core::int?) → core::int h = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/implicit_instantiation_errors.dart:19:27: Error: A value of type 'int Function(int, int)' can't be assigned to a variable of type 'int Function(int, int?)' because 'int?' is nullable and 'int' isn't. + (core::int, core::int?) → core::int h = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/implicit_instantiation_errors.dart:19:27: Error: A value of type 'int Function(int, int)' can't be assigned to a variable of type 'int Function(int, int?)'. int Function(int, int?) h = c; ^" in ((let final self::Class #t3 = c in #t3 == null ?{(T%, core::int) → T%} null : #t3.{self::Class::call}{(T%, core::int) → T%})) as{TypeError} (core::int, core::int?) → core::int; - g = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/implicit_instantiation_errors.dart:20:3: Error: A value of type 'int Function(int, int)' can't be assigned to a variable of type 'int Function(int, int?)?' because 'int?' is nullable and 'int' isn't. + g = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/implicit_instantiation_errors.dart:20:3: Error: A value of type 'int Function(int, int)' can't be assigned to a variable of type 'int Function(int, int?)?'. g = c; ^" in ((let final self::Class #t4 = c in #t4 == null ?{(T%, core::int) → T%} null : #t4.{self::Class::call}{(T%, core::int) → T%})) as{TypeError} (core::int, core::int?) →? core::int; - self::method(invalid-expression "pkg/front_end/testcases/constructor_tearoffs/implicit_instantiation_errors.dart:21:10: Error: The argument type 'int Function(int, int)?' can't be assigned to the parameter type 'int Function(int, int?)' because 'int?' is nullable and 'int' isn't. + self::method(invalid-expression "pkg/front_end/testcases/constructor_tearoffs/implicit_instantiation_errors.dart:21:10: Error: The argument type 'int Function(int, int)?' can't be assigned to the parameter type 'int Function(int, int?)'. method(alias); ^" in (let final (T%, core::int) →? T% #t5 = self::alias in #t5 == null ?{(core::int, core::int) →? core::int} null : #t5{(T%, core::int) → T%}) as{TypeError} (core::int, core::int?) → core::int); } diff --git a/pkg/front_end/testcases/constructor_tearoffs/implicit_instantiation_errors.dart.strong.modular.expect b/pkg/front_end/testcases/constructor_tearoffs/implicit_instantiation_errors.dart.strong.modular.expect index de682d638e7..b07976f27c7 100644 --- a/pkg/front_end/testcases/constructor_tearoffs/implicit_instantiation_errors.dart.strong.modular.expect +++ b/pkg/front_end/testcases/constructor_tearoffs/implicit_instantiation_errors.dart.strong.modular.expect @@ -2,23 +2,23 @@ library; // // Problems in library: // -// pkg/front_end/testcases/constructor_tearoffs/implicit_instantiation_errors.dart:16:30: Error: A value of type 'int Function(int, int)?' can't be assigned to a variable of type 'int Function(int, int)' because 'int Function(int, int)?' is nullable and 'int Function(int, int)' isn't. +// pkg/front_end/testcases/constructor_tearoffs/implicit_instantiation_errors.dart:16:30: Error: A value of type 'int Function(int, int)?' can't be assigned to a variable of type 'int Function(int, int)'. // int Function(int, int) f = alias; // ^ // -// pkg/front_end/testcases/constructor_tearoffs/implicit_instantiation_errors.dart:18:7: Error: A value of type 'int Function(int, int)?' can't be assigned to a variable of type 'int Function(int, int?)?' because 'int?' is nullable and 'int' isn't. +// pkg/front_end/testcases/constructor_tearoffs/implicit_instantiation_errors.dart:18:7: Error: A value of type 'int Function(int, int)?' can't be assigned to a variable of type 'int Function(int, int?)?'. // g = alias; // ^ // -// pkg/front_end/testcases/constructor_tearoffs/implicit_instantiation_errors.dart:19:27: Error: A value of type 'int Function(int, int)' can't be assigned to a variable of type 'int Function(int, int?)' because 'int?' is nullable and 'int' isn't. +// pkg/front_end/testcases/constructor_tearoffs/implicit_instantiation_errors.dart:19:27: Error: A value of type 'int Function(int, int)' can't be assigned to a variable of type 'int Function(int, int?)'. // int Function(int, int?) h = c; // ^ // -// pkg/front_end/testcases/constructor_tearoffs/implicit_instantiation_errors.dart:20:3: Error: A value of type 'int Function(int, int)' can't be assigned to a variable of type 'int Function(int, int?)?' because 'int?' is nullable and 'int' isn't. +// pkg/front_end/testcases/constructor_tearoffs/implicit_instantiation_errors.dart:20:3: Error: A value of type 'int Function(int, int)' can't be assigned to a variable of type 'int Function(int, int?)?'. // g = c; // ^ // -// pkg/front_end/testcases/constructor_tearoffs/implicit_instantiation_errors.dart:21:10: Error: The argument type 'int Function(int, int)?' can't be assigned to the parameter type 'int Function(int, int?)' because 'int?' is nullable and 'int' isn't. +// pkg/front_end/testcases/constructor_tearoffs/implicit_instantiation_errors.dart:21:10: Error: The argument type 'int Function(int, int)?' can't be assigned to the parameter type 'int Function(int, int?)'. // method(alias); // ^ // @@ -38,20 +38,20 @@ static method id(self::id::T% t, core::int i) static method method((core::int, core::int?) → core::int f) → dynamic {} static method test() → dynamic { self::Class c = new self::Class::•(); - (core::int, core::int) → core::int f = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/implicit_instantiation_errors.dart:16:30: Error: A value of type 'int Function(int, int)?' can't be assigned to a variable of type 'int Function(int, int)' because 'int Function(int, int)?' is nullable and 'int Function(int, int)' isn't. + (core::int, core::int) → core::int f = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/implicit_instantiation_errors.dart:16:30: Error: A value of type 'int Function(int, int)?' can't be assigned to a variable of type 'int Function(int, int)'. int Function(int, int) f = alias; ^" in (let final (T%, core::int) →? T% #t1 = self::alias in #t1 == null ?{(core::int, core::int) →? core::int} null : #t1{(T%, core::int) → T%}) as{TypeError} (core::int, core::int) → core::int; (core::int, core::int?) →? core::int g; - g = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/implicit_instantiation_errors.dart:18:7: Error: A value of type 'int Function(int, int)?' can't be assigned to a variable of type 'int Function(int, int?)?' because 'int?' is nullable and 'int' isn't. + g = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/implicit_instantiation_errors.dart:18:7: Error: A value of type 'int Function(int, int)?' can't be assigned to a variable of type 'int Function(int, int?)?'. g = alias; ^" in (let final (T%, core::int) →? T% #t2 = self::alias in #t2 == null ?{(core::int, core::int) →? core::int} null : #t2{(T%, core::int) → T%}) as{TypeError} (core::int, core::int?) →? core::int; - (core::int, core::int?) → core::int h = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/implicit_instantiation_errors.dart:19:27: Error: A value of type 'int Function(int, int)' can't be assigned to a variable of type 'int Function(int, int?)' because 'int?' is nullable and 'int' isn't. + (core::int, core::int?) → core::int h = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/implicit_instantiation_errors.dart:19:27: Error: A value of type 'int Function(int, int)' can't be assigned to a variable of type 'int Function(int, int?)'. int Function(int, int?) h = c; ^" in ((let final self::Class #t3 = c in #t3 == null ?{(T%, core::int) → T%} null : #t3.{self::Class::call}{(T%, core::int) → T%})) as{TypeError} (core::int, core::int?) → core::int; - g = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/implicit_instantiation_errors.dart:20:3: Error: A value of type 'int Function(int, int)' can't be assigned to a variable of type 'int Function(int, int?)?' because 'int?' is nullable and 'int' isn't. + g = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/implicit_instantiation_errors.dart:20:3: Error: A value of type 'int Function(int, int)' can't be assigned to a variable of type 'int Function(int, int?)?'. g = c; ^" in ((let final self::Class #t4 = c in #t4 == null ?{(T%, core::int) → T%} null : #t4.{self::Class::call}{(T%, core::int) → T%})) as{TypeError} (core::int, core::int?) →? core::int; - self::method(invalid-expression "pkg/front_end/testcases/constructor_tearoffs/implicit_instantiation_errors.dart:21:10: Error: The argument type 'int Function(int, int)?' can't be assigned to the parameter type 'int Function(int, int?)' because 'int?' is nullable and 'int' isn't. + self::method(invalid-expression "pkg/front_end/testcases/constructor_tearoffs/implicit_instantiation_errors.dart:21:10: Error: The argument type 'int Function(int, int)?' can't be assigned to the parameter type 'int Function(int, int?)'. method(alias); ^" in (let final (T%, core::int) →? T% #t5 = self::alias in #t5 == null ?{(core::int, core::int) →? core::int} null : #t5{(T%, core::int) → T%}) as{TypeError} (core::int, core::int?) → core::int); } diff --git a/pkg/front_end/testcases/constructor_tearoffs/implicit_instantiation_errors.dart.strong.transformed.expect b/pkg/front_end/testcases/constructor_tearoffs/implicit_instantiation_errors.dart.strong.transformed.expect index 12eb3c53c4c..3058b7c51f0 100644 --- a/pkg/front_end/testcases/constructor_tearoffs/implicit_instantiation_errors.dart.strong.transformed.expect +++ b/pkg/front_end/testcases/constructor_tearoffs/implicit_instantiation_errors.dart.strong.transformed.expect @@ -2,23 +2,23 @@ library; // // Problems in library: // -// pkg/front_end/testcases/constructor_tearoffs/implicit_instantiation_errors.dart:16:30: Error: A value of type 'int Function(int, int)?' can't be assigned to a variable of type 'int Function(int, int)' because 'int Function(int, int)?' is nullable and 'int Function(int, int)' isn't. +// pkg/front_end/testcases/constructor_tearoffs/implicit_instantiation_errors.dart:16:30: Error: A value of type 'int Function(int, int)?' can't be assigned to a variable of type 'int Function(int, int)'. // int Function(int, int) f = alias; // ^ // -// pkg/front_end/testcases/constructor_tearoffs/implicit_instantiation_errors.dart:18:7: Error: A value of type 'int Function(int, int)?' can't be assigned to a variable of type 'int Function(int, int?)?' because 'int?' is nullable and 'int' isn't. +// pkg/front_end/testcases/constructor_tearoffs/implicit_instantiation_errors.dart:18:7: Error: A value of type 'int Function(int, int)?' can't be assigned to a variable of type 'int Function(int, int?)?'. // g = alias; // ^ // -// pkg/front_end/testcases/constructor_tearoffs/implicit_instantiation_errors.dart:19:27: Error: A value of type 'int Function(int, int)' can't be assigned to a variable of type 'int Function(int, int?)' because 'int?' is nullable and 'int' isn't. +// pkg/front_end/testcases/constructor_tearoffs/implicit_instantiation_errors.dart:19:27: Error: A value of type 'int Function(int, int)' can't be assigned to a variable of type 'int Function(int, int?)'. // int Function(int, int?) h = c; // ^ // -// pkg/front_end/testcases/constructor_tearoffs/implicit_instantiation_errors.dart:20:3: Error: A value of type 'int Function(int, int)' can't be assigned to a variable of type 'int Function(int, int?)?' because 'int?' is nullable and 'int' isn't. +// pkg/front_end/testcases/constructor_tearoffs/implicit_instantiation_errors.dart:20:3: Error: A value of type 'int Function(int, int)' can't be assigned to a variable of type 'int Function(int, int?)?'. // g = c; // ^ // -// pkg/front_end/testcases/constructor_tearoffs/implicit_instantiation_errors.dart:21:10: Error: The argument type 'int Function(int, int)?' can't be assigned to the parameter type 'int Function(int, int?)' because 'int?' is nullable and 'int' isn't. +// pkg/front_end/testcases/constructor_tearoffs/implicit_instantiation_errors.dart:21:10: Error: The argument type 'int Function(int, int)?' can't be assigned to the parameter type 'int Function(int, int?)'. // method(alias); // ^ // @@ -38,20 +38,20 @@ static method id(self::id::T% t, core::int i) static method method((core::int, core::int?) → core::int f) → dynamic {} static method test() → dynamic { self::Class c = new self::Class::•(); - (core::int, core::int) → core::int f = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/implicit_instantiation_errors.dart:16:30: Error: A value of type 'int Function(int, int)?' can't be assigned to a variable of type 'int Function(int, int)' because 'int Function(int, int)?' is nullable and 'int Function(int, int)' isn't. + (core::int, core::int) → core::int f = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/implicit_instantiation_errors.dart:16:30: Error: A value of type 'int Function(int, int)?' can't be assigned to a variable of type 'int Function(int, int)'. int Function(int, int) f = alias; ^" in let (core::int, core::int) →? core::int #t1 = let final (T%, core::int) →? T% #t2 = self::alias in #t2 == null ?{(core::int, core::int) →? core::int} null : #t2{(T%, core::int) → T%} in #t1 == null ?{(core::int, core::int) → core::int} #t1 as{TypeError} (core::int, core::int) → core::int : #t1{(core::int, core::int) → core::int}; (core::int, core::int?) →? core::int g; - g = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/implicit_instantiation_errors.dart:18:7: Error: A value of type 'int Function(int, int)?' can't be assigned to a variable of type 'int Function(int, int?)?' because 'int?' is nullable and 'int' isn't. + g = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/implicit_instantiation_errors.dart:18:7: Error: A value of type 'int Function(int, int)?' can't be assigned to a variable of type 'int Function(int, int?)?'. g = alias; ^" in (let final (T%, core::int) →? T% #t3 = self::alias in #t3 == null ?{(core::int, core::int) →? core::int} null : #t3{(T%, core::int) → T%}) as{TypeError} (core::int, core::int?) →? core::int; - (core::int, core::int?) → core::int h = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/implicit_instantiation_errors.dart:19:27: Error: A value of type 'int Function(int, int)' can't be assigned to a variable of type 'int Function(int, int?)' because 'int?' is nullable and 'int' isn't. + (core::int, core::int?) → core::int h = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/implicit_instantiation_errors.dart:19:27: Error: A value of type 'int Function(int, int)' can't be assigned to a variable of type 'int Function(int, int?)'. int Function(int, int?) h = c; ^" in ((let final self::Class #t4 = c in #t4 == null ?{(T%, core::int) → T%} null : #t4.{self::Class::call}{(T%, core::int) → T%})) as{TypeError} (core::int, core::int?) → core::int; - g = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/implicit_instantiation_errors.dart:20:3: Error: A value of type 'int Function(int, int)' can't be assigned to a variable of type 'int Function(int, int?)?' because 'int?' is nullable and 'int' isn't. + g = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/implicit_instantiation_errors.dart:20:3: Error: A value of type 'int Function(int, int)' can't be assigned to a variable of type 'int Function(int, int?)?'. g = c; ^" in ((let final self::Class #t5 = c in #t5 == null ?{(T%, core::int) → T%} null : #t5.{self::Class::call}{(T%, core::int) → T%})) as{TypeError} (core::int, core::int?) →? core::int; - self::method(invalid-expression "pkg/front_end/testcases/constructor_tearoffs/implicit_instantiation_errors.dart:21:10: Error: The argument type 'int Function(int, int)?' can't be assigned to the parameter type 'int Function(int, int?)' because 'int?' is nullable and 'int' isn't. + self::method(invalid-expression "pkg/front_end/testcases/constructor_tearoffs/implicit_instantiation_errors.dart:21:10: Error: The argument type 'int Function(int, int)?' can't be assigned to the parameter type 'int Function(int, int?)'. method(alias); ^" in (let final (T%, core::int) →? T% #t6 = self::alias in #t6 == null ?{(core::int, core::int) →? core::int} null : #t6{(T%, core::int) → T%}) as{TypeError} (core::int, core::int?) → core::int); } diff --git a/pkg/front_end/testcases/constructor_tearoffs/lowering/invalid_redirect.dart.strong.expect b/pkg/front_end/testcases/constructor_tearoffs/lowering/invalid_redirect.dart.strong.expect index e757cd6317d..eee8fe353ce 100644 --- a/pkg/front_end/testcases/constructor_tearoffs/lowering/invalid_redirect.dart.strong.expect +++ b/pkg/front_end/testcases/constructor_tearoffs/lowering/invalid_redirect.dart.strong.expect @@ -29,7 +29,7 @@ library; // factory Link.create4({int i}) = LinkFactory.create; // ^ // -// pkg/front_end/testcases/constructor_tearoffs/lowering/invalid_redirect.dart:14:12: Error: The value 'null' can't be returned from a function with return type 'LinkFactory' because 'LinkFactory' is not nullable. +// pkg/front_end/testcases/constructor_tearoffs/lowering/invalid_redirect.dart:14:12: Error: A value of type 'Null' can't be returned from a function with return type 'LinkFactory'. // - 'LinkFactory' is from 'pkg/front_end/testcases/constructor_tearoffs/lowering/invalid_redirect.dart'. // return null; // ^ @@ -81,7 +81,7 @@ abstract class Link extends core::Object { } class LinkFactory extends core::Object { static factory create() → self::LinkFactory { - return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/lowering/invalid_redirect.dart:14:12: Error: The value 'null' can't be returned from a function with return type 'LinkFactory' because 'LinkFactory' is not nullable. + return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/lowering/invalid_redirect.dart:14:12: Error: A value of type 'Null' can't be returned from a function with return type 'LinkFactory'. - 'LinkFactory' is from 'pkg/front_end/testcases/constructor_tearoffs/lowering/invalid_redirect.dart'. return null; ^" in null as{TypeError} self::LinkFactory; diff --git a/pkg/front_end/testcases/constructor_tearoffs/lowering/invalid_redirect.dart.strong.modular.expect b/pkg/front_end/testcases/constructor_tearoffs/lowering/invalid_redirect.dart.strong.modular.expect index e757cd6317d..eee8fe353ce 100644 --- a/pkg/front_end/testcases/constructor_tearoffs/lowering/invalid_redirect.dart.strong.modular.expect +++ b/pkg/front_end/testcases/constructor_tearoffs/lowering/invalid_redirect.dart.strong.modular.expect @@ -29,7 +29,7 @@ library; // factory Link.create4({int i}) = LinkFactory.create; // ^ // -// pkg/front_end/testcases/constructor_tearoffs/lowering/invalid_redirect.dart:14:12: Error: The value 'null' can't be returned from a function with return type 'LinkFactory' because 'LinkFactory' is not nullable. +// pkg/front_end/testcases/constructor_tearoffs/lowering/invalid_redirect.dart:14:12: Error: A value of type 'Null' can't be returned from a function with return type 'LinkFactory'. // - 'LinkFactory' is from 'pkg/front_end/testcases/constructor_tearoffs/lowering/invalid_redirect.dart'. // return null; // ^ @@ -81,7 +81,7 @@ abstract class Link extends core::Object { } class LinkFactory extends core::Object { static factory create() → self::LinkFactory { - return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/lowering/invalid_redirect.dart:14:12: Error: The value 'null' can't be returned from a function with return type 'LinkFactory' because 'LinkFactory' is not nullable. + return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/lowering/invalid_redirect.dart:14:12: Error: A value of type 'Null' can't be returned from a function with return type 'LinkFactory'. - 'LinkFactory' is from 'pkg/front_end/testcases/constructor_tearoffs/lowering/invalid_redirect.dart'. return null; ^" in null as{TypeError} self::LinkFactory; diff --git a/pkg/front_end/testcases/constructor_tearoffs/lowering/invalid_redirect.dart.strong.transformed.expect b/pkg/front_end/testcases/constructor_tearoffs/lowering/invalid_redirect.dart.strong.transformed.expect index 543cb8695ca..e2fb060b18f 100644 --- a/pkg/front_end/testcases/constructor_tearoffs/lowering/invalid_redirect.dart.strong.transformed.expect +++ b/pkg/front_end/testcases/constructor_tearoffs/lowering/invalid_redirect.dart.strong.transformed.expect @@ -29,7 +29,7 @@ library; // factory Link.create4({int i}) = LinkFactory.create; // ^ // -// pkg/front_end/testcases/constructor_tearoffs/lowering/invalid_redirect.dart:14:12: Error: The value 'null' can't be returned from a function with return type 'LinkFactory' because 'LinkFactory' is not nullable. +// pkg/front_end/testcases/constructor_tearoffs/lowering/invalid_redirect.dart:14:12: Error: A value of type 'Null' can't be returned from a function with return type 'LinkFactory'. // - 'LinkFactory' is from 'pkg/front_end/testcases/constructor_tearoffs/lowering/invalid_redirect.dart'. // return null; // ^ @@ -81,7 +81,7 @@ abstract class Link extends core::Object { } class LinkFactory extends core::Object { static factory create() → self::LinkFactory { - return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/lowering/invalid_redirect.dart:14:12: Error: The value 'null' can't be returned from a function with return type 'LinkFactory' because 'LinkFactory' is not nullable. + return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/lowering/invalid_redirect.dart:14:12: Error: A value of type 'Null' can't be returned from a function with return type 'LinkFactory'. - 'LinkFactory' is from 'pkg/front_end/testcases/constructor_tearoffs/lowering/invalid_redirect.dart'. return null; ^" in let Null #t1 = null in #t1 == null ?{self::LinkFactory} #t1 as{TypeError} self::LinkFactory : #t1{self::LinkFactory}; diff --git a/pkg/front_end/testcases/extension_types/assign_interface_type.dart.strong.expect b/pkg/front_end/testcases/extension_types/assign_interface_type.dart.strong.expect index 77c8f0e897c..817eabed56b 100644 --- a/pkg/front_end/testcases/extension_types/assign_interface_type.dart.strong.expect +++ b/pkg/front_end/testcases/extension_types/assign_interface_type.dart.strong.expect @@ -2,22 +2,22 @@ library; // // Problems in library: // -// pkg/front_end/testcases/extension_types/assign_interface_type.dart:39:7: Error: A value of type 'C' can't be assigned to a variable of type 'Object' because 'C' is nullable and 'Object' isn't. +// pkg/front_end/testcases/extension_types/assign_interface_type.dart:39:7: Error: A value of type 'C' can't be assigned to a variable of type 'Object'. // - 'Object' is from 'dart:core'. // o = c; // Error // ^ // -// pkg/front_end/testcases/extension_types/assign_interface_type.dart:41:7: Error: A value of type 'D2' can't be assigned to a variable of type 'Object' because 'D2' is nullable and 'Object' isn't. +// pkg/front_end/testcases/extension_types/assign_interface_type.dart:41:7: Error: A value of type 'D2' can't be assigned to a variable of type 'Object'. // - 'Object' is from 'dart:core'. // o = d2; // Error // ^ // -// pkg/front_end/testcases/extension_types/assign_interface_type.dart:44:7: Error: A value of type 'G' can't be assigned to a variable of type 'Object' because 'G' is nullable and 'Object' isn't. +// pkg/front_end/testcases/extension_types/assign_interface_type.dart:44:7: Error: A value of type 'G' can't be assigned to a variable of type 'Object'. // - 'Object' is from 'dart:core'. // o = g1; // Error // ^ // -// pkg/front_end/testcases/extension_types/assign_interface_type.dart:45:7: Error: A value of type 'G' can't be assigned to a variable of type 'Object' because 'G' is nullable and 'Object' isn't. +// pkg/front_end/testcases/extension_types/assign_interface_type.dart:45:7: Error: A value of type 'G' can't be assigned to a variable of type 'Object'. // - 'Object' is from 'dart:core'. // o = g2; // Error // ^ @@ -385,22 +385,22 @@ static method test' can't be assigned to a variable of type 'Object' because 'G' is nullable and 'Object' isn't. + o = invalid-expression "pkg/front_end/testcases/extension_types/assign_interface_type.dart:44:7: Error: A value of type 'G' can't be assigned to a variable of type 'Object'. - 'Object' is from 'dart:core'. o = g1; // Error ^" in g1 as{TypeError} core::Object; - o = invalid-expression "pkg/front_end/testcases/extension_types/assign_interface_type.dart:45:7: Error: A value of type 'G' can't be assigned to a variable of type 'Object' because 'G' is nullable and 'Object' isn't. + o = invalid-expression "pkg/front_end/testcases/extension_types/assign_interface_type.dart:45:7: Error: A value of type 'G' can't be assigned to a variable of type 'Object'. - 'Object' is from 'dart:core'. o = g2; // Error ^" in g2 as{TypeError} core::Object; diff --git a/pkg/front_end/testcases/extension_types/assign_interface_type.dart.strong.modular.expect b/pkg/front_end/testcases/extension_types/assign_interface_type.dart.strong.modular.expect index 77c8f0e897c..817eabed56b 100644 --- a/pkg/front_end/testcases/extension_types/assign_interface_type.dart.strong.modular.expect +++ b/pkg/front_end/testcases/extension_types/assign_interface_type.dart.strong.modular.expect @@ -2,22 +2,22 @@ library; // // Problems in library: // -// pkg/front_end/testcases/extension_types/assign_interface_type.dart:39:7: Error: A value of type 'C' can't be assigned to a variable of type 'Object' because 'C' is nullable and 'Object' isn't. +// pkg/front_end/testcases/extension_types/assign_interface_type.dart:39:7: Error: A value of type 'C' can't be assigned to a variable of type 'Object'. // - 'Object' is from 'dart:core'. // o = c; // Error // ^ // -// pkg/front_end/testcases/extension_types/assign_interface_type.dart:41:7: Error: A value of type 'D2' can't be assigned to a variable of type 'Object' because 'D2' is nullable and 'Object' isn't. +// pkg/front_end/testcases/extension_types/assign_interface_type.dart:41:7: Error: A value of type 'D2' can't be assigned to a variable of type 'Object'. // - 'Object' is from 'dart:core'. // o = d2; // Error // ^ // -// pkg/front_end/testcases/extension_types/assign_interface_type.dart:44:7: Error: A value of type 'G' can't be assigned to a variable of type 'Object' because 'G' is nullable and 'Object' isn't. +// pkg/front_end/testcases/extension_types/assign_interface_type.dart:44:7: Error: A value of type 'G' can't be assigned to a variable of type 'Object'. // - 'Object' is from 'dart:core'. // o = g1; // Error // ^ // -// pkg/front_end/testcases/extension_types/assign_interface_type.dart:45:7: Error: A value of type 'G' can't be assigned to a variable of type 'Object' because 'G' is nullable and 'Object' isn't. +// pkg/front_end/testcases/extension_types/assign_interface_type.dart:45:7: Error: A value of type 'G' can't be assigned to a variable of type 'Object'. // - 'Object' is from 'dart:core'. // o = g2; // Error // ^ @@ -385,22 +385,22 @@ static method test' can't be assigned to a variable of type 'Object' because 'G' is nullable and 'Object' isn't. + o = invalid-expression "pkg/front_end/testcases/extension_types/assign_interface_type.dart:44:7: Error: A value of type 'G' can't be assigned to a variable of type 'Object'. - 'Object' is from 'dart:core'. o = g1; // Error ^" in g1 as{TypeError} core::Object; - o = invalid-expression "pkg/front_end/testcases/extension_types/assign_interface_type.dart:45:7: Error: A value of type 'G' can't be assigned to a variable of type 'Object' because 'G' is nullable and 'Object' isn't. + o = invalid-expression "pkg/front_end/testcases/extension_types/assign_interface_type.dart:45:7: Error: A value of type 'G' can't be assigned to a variable of type 'Object'. - 'Object' is from 'dart:core'. o = g2; // Error ^" in g2 as{TypeError} core::Object; diff --git a/pkg/front_end/testcases/extension_types/assign_interface_type.dart.strong.transformed.expect b/pkg/front_end/testcases/extension_types/assign_interface_type.dart.strong.transformed.expect index 685c139bb50..15f3bb45cbc 100644 --- a/pkg/front_end/testcases/extension_types/assign_interface_type.dart.strong.transformed.expect +++ b/pkg/front_end/testcases/extension_types/assign_interface_type.dart.strong.transformed.expect @@ -2,22 +2,22 @@ library; // // Problems in library: // -// pkg/front_end/testcases/extension_types/assign_interface_type.dart:39:7: Error: A value of type 'C' can't be assigned to a variable of type 'Object' because 'C' is nullable and 'Object' isn't. +// pkg/front_end/testcases/extension_types/assign_interface_type.dart:39:7: Error: A value of type 'C' can't be assigned to a variable of type 'Object'. // - 'Object' is from 'dart:core'. // o = c; // Error // ^ // -// pkg/front_end/testcases/extension_types/assign_interface_type.dart:41:7: Error: A value of type 'D2' can't be assigned to a variable of type 'Object' because 'D2' is nullable and 'Object' isn't. +// pkg/front_end/testcases/extension_types/assign_interface_type.dart:41:7: Error: A value of type 'D2' can't be assigned to a variable of type 'Object'. // - 'Object' is from 'dart:core'. // o = d2; // Error // ^ // -// pkg/front_end/testcases/extension_types/assign_interface_type.dart:44:7: Error: A value of type 'G' can't be assigned to a variable of type 'Object' because 'G' is nullable and 'Object' isn't. +// pkg/front_end/testcases/extension_types/assign_interface_type.dart:44:7: Error: A value of type 'G' can't be assigned to a variable of type 'Object'. // - 'Object' is from 'dart:core'. // o = g1; // Error // ^ // -// pkg/front_end/testcases/extension_types/assign_interface_type.dart:45:7: Error: A value of type 'G' can't be assigned to a variable of type 'Object' because 'G' is nullable and 'Object' isn't. +// pkg/front_end/testcases/extension_types/assign_interface_type.dart:45:7: Error: A value of type 'G' can't be assigned to a variable of type 'Object'. // - 'Object' is from 'dart:core'. // o = g2; // Error // ^ @@ -385,22 +385,22 @@ static method test' can't be assigned to a variable of type 'Object' because 'G' is nullable and 'Object' isn't. + o = invalid-expression "pkg/front_end/testcases/extension_types/assign_interface_type.dart:44:7: Error: A value of type 'G' can't be assigned to a variable of type 'Object'. - 'Object' is from 'dart:core'. o = g1; // Error ^" in let self::G% /* erasure=self::test::T1%, declared=! */ #t3 = g1 in #t3 == null ?{core::Object} #t3 as{TypeError} core::Object : #t3{core::Object}; - o = invalid-expression "pkg/front_end/testcases/extension_types/assign_interface_type.dart:45:7: Error: A value of type 'G' can't be assigned to a variable of type 'Object' because 'G' is nullable and 'Object' isn't. + o = invalid-expression "pkg/front_end/testcases/extension_types/assign_interface_type.dart:45:7: Error: A value of type 'G' can't be assigned to a variable of type 'Object'. - 'Object' is from 'dart:core'. o = g2; // Error ^" in let self::G% /* erasure=self::test::T2, declared=! */ #t4 = g2 in #t4 == null ?{core::Object} #t4 as{TypeError} core::Object : #t4{core::Object}; diff --git a/pkg/front_end/testcases/extension_types/issue54625_2.dart.strong.expect b/pkg/front_end/testcases/extension_types/issue54625_2.dart.strong.expect index 66ba48d2466..df8ef951f1e 100644 --- a/pkg/front_end/testcases/extension_types/issue54625_2.dart.strong.expect +++ b/pkg/front_end/testcases/extension_types/issue54625_2.dart.strong.expect @@ -10,7 +10,7 @@ library; // class A {} // ^ // -// pkg/front_end/testcases/extension_types/issue54625_2.dart:21:7: Error: A value of type 'Null Function()' can't be assigned to a variable of type 'X Function()' because 'Null' is nullable and 'X' isn't. +// pkg/front_end/testcases/extension_types/issue54625_2.dart:21:7: Error: A value of type 'Null Function()' can't be assigned to a variable of type 'X Function()'. // f = returnsNull; // Error. // ^ // @@ -43,7 +43,7 @@ static method returnsNull() → Null return null; static method test3() → dynamic { () → X f = self::foo(); - f = invalid-expression "pkg/front_end/testcases/extension_types/issue54625_2.dart:21:7: Error: A value of type 'Null Function()' can't be assigned to a variable of type 'X Function()' because 'Null' is nullable and 'X' isn't. + f = invalid-expression "pkg/front_end/testcases/extension_types/issue54625_2.dart:21:7: Error: A value of type 'Null Function()' can't be assigned to a variable of type 'X Function()'. f = returnsNull; // Error. ^" in #C1 as{TypeError} Never; } diff --git a/pkg/front_end/testcases/extension_types/issue54625_2.dart.strong.modular.expect b/pkg/front_end/testcases/extension_types/issue54625_2.dart.strong.modular.expect index 66ba48d2466..df8ef951f1e 100644 --- a/pkg/front_end/testcases/extension_types/issue54625_2.dart.strong.modular.expect +++ b/pkg/front_end/testcases/extension_types/issue54625_2.dart.strong.modular.expect @@ -10,7 +10,7 @@ library; // class A {} // ^ // -// pkg/front_end/testcases/extension_types/issue54625_2.dart:21:7: Error: A value of type 'Null Function()' can't be assigned to a variable of type 'X Function()' because 'Null' is nullable and 'X' isn't. +// pkg/front_end/testcases/extension_types/issue54625_2.dart:21:7: Error: A value of type 'Null Function()' can't be assigned to a variable of type 'X Function()'. // f = returnsNull; // Error. // ^ // @@ -43,7 +43,7 @@ static method returnsNull() → Null return null; static method test3() → dynamic { () → X f = self::foo(); - f = invalid-expression "pkg/front_end/testcases/extension_types/issue54625_2.dart:21:7: Error: A value of type 'Null Function()' can't be assigned to a variable of type 'X Function()' because 'Null' is nullable and 'X' isn't. + f = invalid-expression "pkg/front_end/testcases/extension_types/issue54625_2.dart:21:7: Error: A value of type 'Null Function()' can't be assigned to a variable of type 'X Function()'. f = returnsNull; // Error. ^" in #C1 as{TypeError} Never; } diff --git a/pkg/front_end/testcases/extension_types/issue54625_2.dart.strong.transformed.expect b/pkg/front_end/testcases/extension_types/issue54625_2.dart.strong.transformed.expect index 66ba48d2466..df8ef951f1e 100644 --- a/pkg/front_end/testcases/extension_types/issue54625_2.dart.strong.transformed.expect +++ b/pkg/front_end/testcases/extension_types/issue54625_2.dart.strong.transformed.expect @@ -10,7 +10,7 @@ library; // class A {} // ^ // -// pkg/front_end/testcases/extension_types/issue54625_2.dart:21:7: Error: A value of type 'Null Function()' can't be assigned to a variable of type 'X Function()' because 'Null' is nullable and 'X' isn't. +// pkg/front_end/testcases/extension_types/issue54625_2.dart:21:7: Error: A value of type 'Null Function()' can't be assigned to a variable of type 'X Function()'. // f = returnsNull; // Error. // ^ // @@ -43,7 +43,7 @@ static method returnsNull() → Null return null; static method test3() → dynamic { () → X f = self::foo(); - f = invalid-expression "pkg/front_end/testcases/extension_types/issue54625_2.dart:21:7: Error: A value of type 'Null Function()' can't be assigned to a variable of type 'X Function()' because 'Null' is nullable and 'X' isn't. + f = invalid-expression "pkg/front_end/testcases/extension_types/issue54625_2.dart:21:7: Error: A value of type 'Null Function()' can't be assigned to a variable of type 'X Function()'. f = returnsNull; // Error. ^" in #C1 as{TypeError} Never; } diff --git a/pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart.strong.expect b/pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart.strong.expect index fa45fd8e636..36dd374a988 100644 --- a/pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart.strong.expect +++ b/pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart.strong.expect @@ -2,124 +2,124 @@ library; // // Problems in library: // -// pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:14:15: Error: A value of type 'E1' can't be assigned to a variable of type 'Object' because 'E1' is nullable and 'Object' isn't. +// pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:14:15: Error: A value of type 'E1' can't be assigned to a variable of type 'Object'. // - 'Object' is from 'dart:core'. // Object v1 = e1; // Error. // ^ // -// pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:15:8: Error: The value 'null' can't be assigned to a variable of type 'E1' because 'E1' is not nullable. +// pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:15:8: Error: A value of type 'Null' can't be assigned to a variable of type 'E1'. // e1 = null; // Error. // ^ // -// pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:18:8: Error: The value 'null' can't be assigned to a variable of type 'E2' because 'E2' is not nullable. +// pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:18:8: Error: A value of type 'Null' can't be assigned to a variable of type 'E2'. // e2 = null; // Error. // ^ // -// pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:20:15: Error: A value of type 'E3' can't be assigned to a variable of type 'Object' because 'E3' is nullable and 'Object' isn't. +// pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:20:15: Error: A value of type 'E3' can't be assigned to a variable of type 'Object'. // - 'Object' is from 'dart:core'. // Object v3 = e3; // Error. // ^ // -// pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:21:8: Error: The value 'null' can't be assigned to a variable of type 'E3' because 'E3' is not nullable. +// pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:21:8: Error: A value of type 'Null' can't be assigned to a variable of type 'E3'. // e3 = null; // Error. // ^ // -// pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:24:8: Error: The value 'null' can't be assigned to a variable of type 'E4' because 'E4' is not nullable. +// pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:24:8: Error: A value of type 'Null' can't be assigned to a variable of type 'E4'. // e4 = null; // Error. // ^ // -// pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:26:15: Error: A value of type 'E5' can't be assigned to a variable of type 'Object' because 'E5' is nullable and 'Object' isn't. +// pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:26:15: Error: A value of type 'E5' can't be assigned to a variable of type 'Object'. // - 'Object' is from 'dart:core'. // Object v5 = e5; // Error. // ^ // -// pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:27:8: Error: The value 'null' can't be assigned to a variable of type 'E5' because 'E5' is not nullable. +// pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:27:8: Error: A value of type 'Null' can't be assigned to a variable of type 'E5'. // e5 = null; // Error. // ^ // -// pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:30:8: Error: The value 'null' can't be assigned to a variable of type 'E6' because 'E6' is not nullable. +// pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:30:8: Error: A value of type 'Null' can't be assigned to a variable of type 'E6'. // - 'Object' is from 'dart:core'. // e6 = null; // Error. // ^ // -// pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:33:8: Error: The value 'null' can't be assigned to a variable of type 'E7' because 'E7' is not nullable. +// pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:33:8: Error: A value of type 'Null' can't be assigned to a variable of type 'E7'. // e7 = null; // Error. // ^ // -// pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:38:15: Error: A value of type 'X1' can't be assigned to a variable of type 'Object' because 'X1' is nullable and 'Object' isn't. +// pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:38:15: Error: A value of type 'X1' can't be assigned to a variable of type 'Object'. // - 'Object' is from 'dart:core'. // Object v1 = x1; // Error. // ^ // -// pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:39:8: Error: The value 'null' can't be assigned to a variable of type 'X1' because 'X1' is not nullable. +// pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:39:8: Error: A value of type 'Null' can't be assigned to a variable of type 'X1'. // x1 = null; // Error. // ^ // -// pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:42:8: Error: The value 'null' can't be assigned to a variable of type 'X2' because 'X2' is not nullable. +// pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:42:8: Error: A value of type 'Null' can't be assigned to a variable of type 'X2'. // x2 = null; // Error. // ^ // -// pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:44:15: Error: A value of type 'X3' can't be assigned to a variable of type 'Object' because 'X3' is nullable and 'Object' isn't. +// pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:44:15: Error: A value of type 'X3' can't be assigned to a variable of type 'Object'. // - 'Object' is from 'dart:core'. // Object v3 = x3; // Error. // ^ // -// pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:45:8: Error: The value 'null' can't be assigned to a variable of type 'X3' because 'X3' is not nullable. +// pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:45:8: Error: A value of type 'Null' can't be assigned to a variable of type 'X3'. // x3 = null; // Error. // ^ // -// pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:48:8: Error: The value 'null' can't be assigned to a variable of type 'X4' because 'X4' is not nullable. +// pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:48:8: Error: A value of type 'Null' can't be assigned to a variable of type 'X4'. // x4 = null; // Error. // ^ // -// pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:50:15: Error: A value of type 'X5' can't be assigned to a variable of type 'Object' because 'X5' is nullable and 'Object' isn't. +// pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:50:15: Error: A value of type 'X5' can't be assigned to a variable of type 'Object'. // - 'Object' is from 'dart:core'. // Object v5 = x5; // Error. // ^ // -// pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:51:8: Error: The value 'null' can't be assigned to a variable of type 'X5' because 'X5' is not nullable. +// pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:51:8: Error: A value of type 'Null' can't be assigned to a variable of type 'X5'. // x5 = null; // Error. // ^ // -// pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:54:8: Error: The value 'null' can't be assigned to a variable of type 'X6' because 'X6' is not nullable. +// pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:54:8: Error: A value of type 'Null' can't be assigned to a variable of type 'X6'. // x6 = null; // Error. // ^ // -// pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:57:8: Error: The value 'null' can't be assigned to a variable of type 'X7' because 'X7' is not nullable. +// pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:57:8: Error: A value of type 'Null' can't be assigned to a variable of type 'X7'. // x7 = null; // Error. // ^ // -// pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:62:16: Error: A value of type 'Object?' can't be assigned to a variable of type 'Object' because 'Object?' is nullable and 'Object' isn't. +// pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:62:16: Error: A value of type 'Object?' can't be assigned to a variable of type 'Object'. // - 'Object' is from 'dart:core'. // Object v12 = v11; // Error. // ^ // -// pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:67:9: Error: The value 'null' can't be assigned to a variable of type 'Object' because 'Object' is not nullable. +// pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:67:9: Error: A value of type 'Null' can't be assigned to a variable of type 'Object'. // - 'Object' is from 'dart:core'. // v21 = null; // Error. // ^ // -// pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:70:16: Error: A value of type 'Object?' can't be assigned to a variable of type 'Object' because 'Object?' is nullable and 'Object' isn't. +// pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:70:16: Error: A value of type 'Object?' can't be assigned to a variable of type 'Object'. // - 'Object' is from 'dart:core'. // Object v32 = v31; // Error. // ^ // -// pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:75:9: Error: The value 'null' can't be assigned to a variable of type 'Object' because 'Object' is not nullable. +// pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:75:9: Error: A value of type 'Null' can't be assigned to a variable of type 'Object'. // - 'Object' is from 'dart:core'. // v41 = null; // Error. // ^ // -// pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:78:16: Error: A value of type 'Object?' can't be assigned to a variable of type 'Object' because 'Object?' is nullable and 'Object' isn't. +// pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:78:16: Error: A value of type 'Object?' can't be assigned to a variable of type 'Object'. // - 'Object' is from 'dart:core'. // Object v52 = v51; // Error. // ^ // -// pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:83:9: Error: The value 'null' can't be assigned to a variable of type 'Object' because 'Object' is not nullable. +// pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:83:9: Error: A value of type 'Null' can't be assigned to a variable of type 'Object'. // - 'Object' is from 'dart:core'. // v61 = null; // Error. // ^ // -// pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:87:9: Error: The value 'null' can't be assigned to a variable of type 'Object' because 'Object' is not nullable. +// pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:87:9: Error: A value of type 'Null' can't be assigned to a variable of type 'Object'. // - 'Object' is from 'dart:core'. // v71 = null; // Error. // ^ @@ -205,124 +205,124 @@ static extension-type-member method E7|constructor#(core::num it) → self::E7 / static extension-type-member synthetic method E7|constructor#_#new#tearOff(core::num it) → self::E7 /* erasure=core::num */ return self::E7|constructor#(it); static method test1(self::E1% /* erasure=core::Object, declared=! */ e1, self::E2 /* erasure=core::Object */ e2, self::E3% /* erasure=core::Object, declared=! */ e3, self::E4 /* erasure=core::Object */ e4, self::E5% /* erasure=dynamic, declared=! */ e5, self::E6 /* erasure=core::Object */ e6, self::E7 /* erasure=core::num */ e7) → dynamic { - core::Object v1 = invalid-expression "pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:14:15: Error: A value of type 'E1' can't be assigned to a variable of type 'Object' because 'E1' is nullable and 'Object' isn't. + core::Object v1 = invalid-expression "pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:14:15: Error: A value of type 'E1' can't be assigned to a variable of type 'Object'. - 'Object' is from 'dart:core'. Object v1 = e1; // Error. ^" in e1 as{TypeError} core::Object; - e1 = invalid-expression "pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:15:8: Error: The value 'null' can't be assigned to a variable of type 'E1' because 'E1' is not nullable. + e1 = invalid-expression "pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:15:8: Error: A value of type 'Null' can't be assigned to a variable of type 'E1'. e1 = null; // Error. ^" in null as{TypeError} self::E1% /* erasure=core::Object, declared=! */; core::Object v2 = e2; - e2 = invalid-expression "pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:18:8: Error: The value 'null' can't be assigned to a variable of type 'E2' because 'E2' is not nullable. + e2 = invalid-expression "pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:18:8: Error: A value of type 'Null' can't be assigned to a variable of type 'E2'. e2 = null; // Error. ^" in null as{TypeError} self::E2 /* erasure=core::Object */; - core::Object v3 = invalid-expression "pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:20:15: Error: A value of type 'E3' can't be assigned to a variable of type 'Object' because 'E3' is nullable and 'Object' isn't. + core::Object v3 = invalid-expression "pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:20:15: Error: A value of type 'E3' can't be assigned to a variable of type 'Object'. - 'Object' is from 'dart:core'. Object v3 = e3; // Error. ^" in e3 as{TypeError} core::Object; - e3 = invalid-expression "pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:21:8: Error: The value 'null' can't be assigned to a variable of type 'E3' because 'E3' is not nullable. + e3 = invalid-expression "pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:21:8: Error: A value of type 'Null' can't be assigned to a variable of type 'E3'. e3 = null; // Error. ^" in null as{TypeError} self::E3% /* erasure=core::Object, declared=! */; core::Object v4 = e4; - e4 = invalid-expression "pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:24:8: Error: The value 'null' can't be assigned to a variable of type 'E4' because 'E4' is not nullable. + e4 = invalid-expression "pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:24:8: Error: A value of type 'Null' can't be assigned to a variable of type 'E4'. e4 = null; // Error. ^" in null as{TypeError} self::E4 /* erasure=core::Object */; - core::Object v5 = invalid-expression "pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:26:15: Error: A value of type 'E5' can't be assigned to a variable of type 'Object' because 'E5' is nullable and 'Object' isn't. + core::Object v5 = invalid-expression "pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:26:15: Error: A value of type 'E5' can't be assigned to a variable of type 'Object'. - 'Object' is from 'dart:core'. Object v5 = e5; // Error. ^" in e5 as{TypeError} core::Object; - e5 = invalid-expression "pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:27:8: Error: The value 'null' can't be assigned to a variable of type 'E5' because 'E5' is not nullable. + e5 = invalid-expression "pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:27:8: Error: A value of type 'Null' can't be assigned to a variable of type 'E5'. e5 = null; // Error. ^" in null as{TypeError} self::E5% /* erasure=dynamic, declared=! */; core::Object v6 = e6; - e6 = invalid-expression "pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:30:8: Error: The value 'null' can't be assigned to a variable of type 'E6' because 'E6' is not nullable. + e6 = invalid-expression "pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:30:8: Error: A value of type 'Null' can't be assigned to a variable of type 'E6'. - 'Object' is from 'dart:core'. e6 = null; // Error. ^" in null as{TypeError} self::E6 /* erasure=core::Object */; core::Object v7 = e7; - e7 = invalid-expression "pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:33:8: Error: The value 'null' can't be assigned to a variable of type 'E7' because 'E7' is not nullable. + e7 = invalid-expression "pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:33:8: Error: A value of type 'Null' can't be assigned to a variable of type 'E7'. e7 = null; // Error. ^" in null as{TypeError} self::E7 /* erasure=core::num */; } static method test2% /* erasure=dynamic, declared=! */, X6 extends self::E6 /* erasure=core::Object */, X7 extends self::E7 /* erasure=core::num */>(self::test2::X1% x1, self::test2::X2 x2, self::test2::X3% x3, self::test2::X4 x4, self::test2::X5% x5, self::test2::X6 x6, self::test2::X7 x7) → dynamic { - core::Object v1 = invalid-expression "pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:38:15: Error: A value of type 'X1' can't be assigned to a variable of type 'Object' because 'X1' is nullable and 'Object' isn't. + core::Object v1 = invalid-expression "pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:38:15: Error: A value of type 'X1' can't be assigned to a variable of type 'Object'. - 'Object' is from 'dart:core'. Object v1 = x1; // Error. ^" in x1 as{TypeError} core::Object; - x1 = invalid-expression "pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:39:8: Error: The value 'null' can't be assigned to a variable of type 'X1' because 'X1' is not nullable. + x1 = invalid-expression "pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:39:8: Error: A value of type 'Null' can't be assigned to a variable of type 'X1'. x1 = null; // Error. ^" in null as{TypeError} Never; core::Object v2 = x2; - x2 = invalid-expression "pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:42:8: Error: The value 'null' can't be assigned to a variable of type 'X2' because 'X2' is not nullable. + x2 = invalid-expression "pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:42:8: Error: A value of type 'Null' can't be assigned to a variable of type 'X2'. x2 = null; // Error. ^" in null as{TypeError} Never; - core::Object v3 = invalid-expression "pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:44:15: Error: A value of type 'X3' can't be assigned to a variable of type 'Object' because 'X3' is nullable and 'Object' isn't. + core::Object v3 = invalid-expression "pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:44:15: Error: A value of type 'X3' can't be assigned to a variable of type 'Object'. - 'Object' is from 'dart:core'. Object v3 = x3; // Error. ^" in x3 as{TypeError} core::Object; - x3 = invalid-expression "pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:45:8: Error: The value 'null' can't be assigned to a variable of type 'X3' because 'X3' is not nullable. + x3 = invalid-expression "pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:45:8: Error: A value of type 'Null' can't be assigned to a variable of type 'X3'. x3 = null; // Error. ^" in null as{TypeError} Never; core::Object v4 = x4; - x4 = invalid-expression "pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:48:8: Error: The value 'null' can't be assigned to a variable of type 'X4' because 'X4' is not nullable. + x4 = invalid-expression "pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:48:8: Error: A value of type 'Null' can't be assigned to a variable of type 'X4'. x4 = null; // Error. ^" in null as{TypeError} Never; - core::Object v5 = invalid-expression "pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:50:15: Error: A value of type 'X5' can't be assigned to a variable of type 'Object' because 'X5' is nullable and 'Object' isn't. + core::Object v5 = invalid-expression "pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:50:15: Error: A value of type 'X5' can't be assigned to a variable of type 'Object'. - 'Object' is from 'dart:core'. Object v5 = x5; // Error. ^" in x5 as{TypeError} core::Object; - x5 = invalid-expression "pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:51:8: Error: The value 'null' can't be assigned to a variable of type 'X5' because 'X5' is not nullable. + x5 = invalid-expression "pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:51:8: Error: A value of type 'Null' can't be assigned to a variable of type 'X5'. x5 = null; // Error. ^" in null as{TypeError} Never; core::Object v6 = x6; - x6 = invalid-expression "pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:54:8: Error: The value 'null' can't be assigned to a variable of type 'X6' because 'X6' is not nullable. + x6 = invalid-expression "pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:54:8: Error: A value of type 'Null' can't be assigned to a variable of type 'X6'. x6 = null; // Error. ^" in null as{TypeError} Never; core::Object v7 = x7; - x7 = invalid-expression "pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:57:8: Error: The value 'null' can't be assigned to a variable of type 'X7' because 'X7' is not nullable. + x7 = invalid-expression "pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:57:8: Error: A value of type 'Null' can't be assigned to a variable of type 'X7'. x7 = null; // Error. ^" in null as{TypeError} Never; } static method test3(self::E1% /* erasure=core::Object, declared=! */ e1, self::E2 /* erasure=core::Object */ e2, self::E3% /* erasure=core::Object, declared=! */ e3, self::E4 /* erasure=core::Object */ e4, self::E5% /* erasure=dynamic, declared=! */ e5, self::E6 /* erasure=core::Object */ e6, self::E7 /* erasure=core::num */ e7, core::String s, core::bool b) → dynamic { core::Object? v11 = b ?{core::Object?} e1 : s; - core::Object v12 = invalid-expression "pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:62:16: Error: A value of type 'Object?' can't be assigned to a variable of type 'Object' because 'Object?' is nullable and 'Object' isn't. + core::Object v12 = invalid-expression "pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:62:16: Error: A value of type 'Object?' can't be assigned to a variable of type 'Object'. - 'Object' is from 'dart:core'. Object v12 = v11; // Error. ^" in v11 as{TypeError} core::Object; v11 = null; core::Object v21 = b ?{core::Object} e2 : s; core::Object v22 = v21; - v21 = invalid-expression "pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:67:9: Error: The value 'null' can't be assigned to a variable of type 'Object' because 'Object' is not nullable. + v21 = invalid-expression "pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:67:9: Error: A value of type 'Null' can't be assigned to a variable of type 'Object'. - 'Object' is from 'dart:core'. v21 = null; // Error. ^" in null as{TypeError} core::Object; core::Object? v31 = b ?{core::Object?} e3 : s; - core::Object v32 = invalid-expression "pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:70:16: Error: A value of type 'Object?' can't be assigned to a variable of type 'Object' because 'Object?' is nullable and 'Object' isn't. + core::Object v32 = invalid-expression "pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:70:16: Error: A value of type 'Object?' can't be assigned to a variable of type 'Object'. - 'Object' is from 'dart:core'. Object v32 = v31; // Error. ^" in v31 as{TypeError} core::Object; v31 = null; core::Object v41 = b ?{core::Object} e4 : s; core::Object v42 = v41; - v41 = invalid-expression "pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:75:9: Error: The value 'null' can't be assigned to a variable of type 'Object' because 'Object' is not nullable. + v41 = invalid-expression "pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:75:9: Error: A value of type 'Null' can't be assigned to a variable of type 'Object'. - 'Object' is from 'dart:core'. v41 = null; // Error. ^" in null as{TypeError} core::Object; core::Object? v51 = b ?{core::Object?} e5 : s; - core::Object v52 = invalid-expression "pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:78:16: Error: A value of type 'Object?' can't be assigned to a variable of type 'Object' because 'Object?' is nullable and 'Object' isn't. + core::Object v52 = invalid-expression "pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:78:16: Error: A value of type 'Object?' can't be assigned to a variable of type 'Object'. - 'Object' is from 'dart:core'. Object v52 = v51; // Error. ^" in v51 as{TypeError} core::Object; v51 = null; core::Object v61 = b ?{core::Object} e6 : s; core::Object v62 = v61; - v61 = invalid-expression "pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:83:9: Error: The value 'null' can't be assigned to a variable of type 'Object' because 'Object' is not nullable. + v61 = invalid-expression "pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:83:9: Error: A value of type 'Null' can't be assigned to a variable of type 'Object'. - 'Object' is from 'dart:core'. v61 = null; // Error. ^" in null as{TypeError} core::Object; core::Object v71 = b ?{core::Object} e7 : s; core::Object v72 = v71; - v71 = invalid-expression "pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:87:9: Error: The value 'null' can't be assigned to a variable of type 'Object' because 'Object' is not nullable. + v71 = invalid-expression "pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:87:9: Error: A value of type 'Null' can't be assigned to a variable of type 'Object'. - 'Object' is from 'dart:core'. v71 = null; // Error. ^" in null as{TypeError} core::Object; diff --git a/pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart.strong.modular.expect b/pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart.strong.modular.expect index fa45fd8e636..36dd374a988 100644 --- a/pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart.strong.modular.expect +++ b/pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart.strong.modular.expect @@ -2,124 +2,124 @@ library; // // Problems in library: // -// pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:14:15: Error: A value of type 'E1' can't be assigned to a variable of type 'Object' because 'E1' is nullable and 'Object' isn't. +// pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:14:15: Error: A value of type 'E1' can't be assigned to a variable of type 'Object'. // - 'Object' is from 'dart:core'. // Object v1 = e1; // Error. // ^ // -// pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:15:8: Error: The value 'null' can't be assigned to a variable of type 'E1' because 'E1' is not nullable. +// pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:15:8: Error: A value of type 'Null' can't be assigned to a variable of type 'E1'. // e1 = null; // Error. // ^ // -// pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:18:8: Error: The value 'null' can't be assigned to a variable of type 'E2' because 'E2' is not nullable. +// pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:18:8: Error: A value of type 'Null' can't be assigned to a variable of type 'E2'. // e2 = null; // Error. // ^ // -// pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:20:15: Error: A value of type 'E3' can't be assigned to a variable of type 'Object' because 'E3' is nullable and 'Object' isn't. +// pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:20:15: Error: A value of type 'E3' can't be assigned to a variable of type 'Object'. // - 'Object' is from 'dart:core'. // Object v3 = e3; // Error. // ^ // -// pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:21:8: Error: The value 'null' can't be assigned to a variable of type 'E3' because 'E3' is not nullable. +// pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:21:8: Error: A value of type 'Null' can't be assigned to a variable of type 'E3'. // e3 = null; // Error. // ^ // -// pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:24:8: Error: The value 'null' can't be assigned to a variable of type 'E4' because 'E4' is not nullable. +// pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:24:8: Error: A value of type 'Null' can't be assigned to a variable of type 'E4'. // e4 = null; // Error. // ^ // -// pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:26:15: Error: A value of type 'E5' can't be assigned to a variable of type 'Object' because 'E5' is nullable and 'Object' isn't. +// pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:26:15: Error: A value of type 'E5' can't be assigned to a variable of type 'Object'. // - 'Object' is from 'dart:core'. // Object v5 = e5; // Error. // ^ // -// pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:27:8: Error: The value 'null' can't be assigned to a variable of type 'E5' because 'E5' is not nullable. +// pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:27:8: Error: A value of type 'Null' can't be assigned to a variable of type 'E5'. // e5 = null; // Error. // ^ // -// pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:30:8: Error: The value 'null' can't be assigned to a variable of type 'E6' because 'E6' is not nullable. +// pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:30:8: Error: A value of type 'Null' can't be assigned to a variable of type 'E6'. // - 'Object' is from 'dart:core'. // e6 = null; // Error. // ^ // -// pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:33:8: Error: The value 'null' can't be assigned to a variable of type 'E7' because 'E7' is not nullable. +// pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:33:8: Error: A value of type 'Null' can't be assigned to a variable of type 'E7'. // e7 = null; // Error. // ^ // -// pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:38:15: Error: A value of type 'X1' can't be assigned to a variable of type 'Object' because 'X1' is nullable and 'Object' isn't. +// pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:38:15: Error: A value of type 'X1' can't be assigned to a variable of type 'Object'. // - 'Object' is from 'dart:core'. // Object v1 = x1; // Error. // ^ // -// pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:39:8: Error: The value 'null' can't be assigned to a variable of type 'X1' because 'X1' is not nullable. +// pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:39:8: Error: A value of type 'Null' can't be assigned to a variable of type 'X1'. // x1 = null; // Error. // ^ // -// pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:42:8: Error: The value 'null' can't be assigned to a variable of type 'X2' because 'X2' is not nullable. +// pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:42:8: Error: A value of type 'Null' can't be assigned to a variable of type 'X2'. // x2 = null; // Error. // ^ // -// pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:44:15: Error: A value of type 'X3' can't be assigned to a variable of type 'Object' because 'X3' is nullable and 'Object' isn't. +// pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:44:15: Error: A value of type 'X3' can't be assigned to a variable of type 'Object'. // - 'Object' is from 'dart:core'. // Object v3 = x3; // Error. // ^ // -// pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:45:8: Error: The value 'null' can't be assigned to a variable of type 'X3' because 'X3' is not nullable. +// pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:45:8: Error: A value of type 'Null' can't be assigned to a variable of type 'X3'. // x3 = null; // Error. // ^ // -// pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:48:8: Error: The value 'null' can't be assigned to a variable of type 'X4' because 'X4' is not nullable. +// pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:48:8: Error: A value of type 'Null' can't be assigned to a variable of type 'X4'. // x4 = null; // Error. // ^ // -// pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:50:15: Error: A value of type 'X5' can't be assigned to a variable of type 'Object' because 'X5' is nullable and 'Object' isn't. +// pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:50:15: Error: A value of type 'X5' can't be assigned to a variable of type 'Object'. // - 'Object' is from 'dart:core'. // Object v5 = x5; // Error. // ^ // -// pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:51:8: Error: The value 'null' can't be assigned to a variable of type 'X5' because 'X5' is not nullable. +// pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:51:8: Error: A value of type 'Null' can't be assigned to a variable of type 'X5'. // x5 = null; // Error. // ^ // -// pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:54:8: Error: The value 'null' can't be assigned to a variable of type 'X6' because 'X6' is not nullable. +// pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:54:8: Error: A value of type 'Null' can't be assigned to a variable of type 'X6'. // x6 = null; // Error. // ^ // -// pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:57:8: Error: The value 'null' can't be assigned to a variable of type 'X7' because 'X7' is not nullable. +// pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:57:8: Error: A value of type 'Null' can't be assigned to a variable of type 'X7'. // x7 = null; // Error. // ^ // -// pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:62:16: Error: A value of type 'Object?' can't be assigned to a variable of type 'Object' because 'Object?' is nullable and 'Object' isn't. +// pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:62:16: Error: A value of type 'Object?' can't be assigned to a variable of type 'Object'. // - 'Object' is from 'dart:core'. // Object v12 = v11; // Error. // ^ // -// pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:67:9: Error: The value 'null' can't be assigned to a variable of type 'Object' because 'Object' is not nullable. +// pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:67:9: Error: A value of type 'Null' can't be assigned to a variable of type 'Object'. // - 'Object' is from 'dart:core'. // v21 = null; // Error. // ^ // -// pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:70:16: Error: A value of type 'Object?' can't be assigned to a variable of type 'Object' because 'Object?' is nullable and 'Object' isn't. +// pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:70:16: Error: A value of type 'Object?' can't be assigned to a variable of type 'Object'. // - 'Object' is from 'dart:core'. // Object v32 = v31; // Error. // ^ // -// pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:75:9: Error: The value 'null' can't be assigned to a variable of type 'Object' because 'Object' is not nullable. +// pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:75:9: Error: A value of type 'Null' can't be assigned to a variable of type 'Object'. // - 'Object' is from 'dart:core'. // v41 = null; // Error. // ^ // -// pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:78:16: Error: A value of type 'Object?' can't be assigned to a variable of type 'Object' because 'Object?' is nullable and 'Object' isn't. +// pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:78:16: Error: A value of type 'Object?' can't be assigned to a variable of type 'Object'. // - 'Object' is from 'dart:core'. // Object v52 = v51; // Error. // ^ // -// pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:83:9: Error: The value 'null' can't be assigned to a variable of type 'Object' because 'Object' is not nullable. +// pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:83:9: Error: A value of type 'Null' can't be assigned to a variable of type 'Object'. // - 'Object' is from 'dart:core'. // v61 = null; // Error. // ^ // -// pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:87:9: Error: The value 'null' can't be assigned to a variable of type 'Object' because 'Object' is not nullable. +// pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:87:9: Error: A value of type 'Null' can't be assigned to a variable of type 'Object'. // - 'Object' is from 'dart:core'. // v71 = null; // Error. // ^ @@ -205,124 +205,124 @@ static extension-type-member method E7|constructor#(core::num it) → self::E7 / static extension-type-member synthetic method E7|constructor#_#new#tearOff(core::num it) → self::E7 /* erasure=core::num */ return self::E7|constructor#(it); static method test1(self::E1% /* erasure=core::Object, declared=! */ e1, self::E2 /* erasure=core::Object */ e2, self::E3% /* erasure=core::Object, declared=! */ e3, self::E4 /* erasure=core::Object */ e4, self::E5% /* erasure=dynamic, declared=! */ e5, self::E6 /* erasure=core::Object */ e6, self::E7 /* erasure=core::num */ e7) → dynamic { - core::Object v1 = invalid-expression "pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:14:15: Error: A value of type 'E1' can't be assigned to a variable of type 'Object' because 'E1' is nullable and 'Object' isn't. + core::Object v1 = invalid-expression "pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:14:15: Error: A value of type 'E1' can't be assigned to a variable of type 'Object'. - 'Object' is from 'dart:core'. Object v1 = e1; // Error. ^" in e1 as{TypeError} core::Object; - e1 = invalid-expression "pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:15:8: Error: The value 'null' can't be assigned to a variable of type 'E1' because 'E1' is not nullable. + e1 = invalid-expression "pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:15:8: Error: A value of type 'Null' can't be assigned to a variable of type 'E1'. e1 = null; // Error. ^" in null as{TypeError} self::E1% /* erasure=core::Object, declared=! */; core::Object v2 = e2; - e2 = invalid-expression "pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:18:8: Error: The value 'null' can't be assigned to a variable of type 'E2' because 'E2' is not nullable. + e2 = invalid-expression "pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:18:8: Error: A value of type 'Null' can't be assigned to a variable of type 'E2'. e2 = null; // Error. ^" in null as{TypeError} self::E2 /* erasure=core::Object */; - core::Object v3 = invalid-expression "pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:20:15: Error: A value of type 'E3' can't be assigned to a variable of type 'Object' because 'E3' is nullable and 'Object' isn't. + core::Object v3 = invalid-expression "pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:20:15: Error: A value of type 'E3' can't be assigned to a variable of type 'Object'. - 'Object' is from 'dart:core'. Object v3 = e3; // Error. ^" in e3 as{TypeError} core::Object; - e3 = invalid-expression "pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:21:8: Error: The value 'null' can't be assigned to a variable of type 'E3' because 'E3' is not nullable. + e3 = invalid-expression "pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:21:8: Error: A value of type 'Null' can't be assigned to a variable of type 'E3'. e3 = null; // Error. ^" in null as{TypeError} self::E3% /* erasure=core::Object, declared=! */; core::Object v4 = e4; - e4 = invalid-expression "pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:24:8: Error: The value 'null' can't be assigned to a variable of type 'E4' because 'E4' is not nullable. + e4 = invalid-expression "pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:24:8: Error: A value of type 'Null' can't be assigned to a variable of type 'E4'. e4 = null; // Error. ^" in null as{TypeError} self::E4 /* erasure=core::Object */; - core::Object v5 = invalid-expression "pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:26:15: Error: A value of type 'E5' can't be assigned to a variable of type 'Object' because 'E5' is nullable and 'Object' isn't. + core::Object v5 = invalid-expression "pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:26:15: Error: A value of type 'E5' can't be assigned to a variable of type 'Object'. - 'Object' is from 'dart:core'. Object v5 = e5; // Error. ^" in e5 as{TypeError} core::Object; - e5 = invalid-expression "pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:27:8: Error: The value 'null' can't be assigned to a variable of type 'E5' because 'E5' is not nullable. + e5 = invalid-expression "pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:27:8: Error: A value of type 'Null' can't be assigned to a variable of type 'E5'. e5 = null; // Error. ^" in null as{TypeError} self::E5% /* erasure=dynamic, declared=! */; core::Object v6 = e6; - e6 = invalid-expression "pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:30:8: Error: The value 'null' can't be assigned to a variable of type 'E6' because 'E6' is not nullable. + e6 = invalid-expression "pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:30:8: Error: A value of type 'Null' can't be assigned to a variable of type 'E6'. - 'Object' is from 'dart:core'. e6 = null; // Error. ^" in null as{TypeError} self::E6 /* erasure=core::Object */; core::Object v7 = e7; - e7 = invalid-expression "pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:33:8: Error: The value 'null' can't be assigned to a variable of type 'E7' because 'E7' is not nullable. + e7 = invalid-expression "pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:33:8: Error: A value of type 'Null' can't be assigned to a variable of type 'E7'. e7 = null; // Error. ^" in null as{TypeError} self::E7 /* erasure=core::num */; } static method test2% /* erasure=dynamic, declared=! */, X6 extends self::E6 /* erasure=core::Object */, X7 extends self::E7 /* erasure=core::num */>(self::test2::X1% x1, self::test2::X2 x2, self::test2::X3% x3, self::test2::X4 x4, self::test2::X5% x5, self::test2::X6 x6, self::test2::X7 x7) → dynamic { - core::Object v1 = invalid-expression "pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:38:15: Error: A value of type 'X1' can't be assigned to a variable of type 'Object' because 'X1' is nullable and 'Object' isn't. + core::Object v1 = invalid-expression "pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:38:15: Error: A value of type 'X1' can't be assigned to a variable of type 'Object'. - 'Object' is from 'dart:core'. Object v1 = x1; // Error. ^" in x1 as{TypeError} core::Object; - x1 = invalid-expression "pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:39:8: Error: The value 'null' can't be assigned to a variable of type 'X1' because 'X1' is not nullable. + x1 = invalid-expression "pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:39:8: Error: A value of type 'Null' can't be assigned to a variable of type 'X1'. x1 = null; // Error. ^" in null as{TypeError} Never; core::Object v2 = x2; - x2 = invalid-expression "pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:42:8: Error: The value 'null' can't be assigned to a variable of type 'X2' because 'X2' is not nullable. + x2 = invalid-expression "pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:42:8: Error: A value of type 'Null' can't be assigned to a variable of type 'X2'. x2 = null; // Error. ^" in null as{TypeError} Never; - core::Object v3 = invalid-expression "pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:44:15: Error: A value of type 'X3' can't be assigned to a variable of type 'Object' because 'X3' is nullable and 'Object' isn't. + core::Object v3 = invalid-expression "pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:44:15: Error: A value of type 'X3' can't be assigned to a variable of type 'Object'. - 'Object' is from 'dart:core'. Object v3 = x3; // Error. ^" in x3 as{TypeError} core::Object; - x3 = invalid-expression "pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:45:8: Error: The value 'null' can't be assigned to a variable of type 'X3' because 'X3' is not nullable. + x3 = invalid-expression "pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:45:8: Error: A value of type 'Null' can't be assigned to a variable of type 'X3'. x3 = null; // Error. ^" in null as{TypeError} Never; core::Object v4 = x4; - x4 = invalid-expression "pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:48:8: Error: The value 'null' can't be assigned to a variable of type 'X4' because 'X4' is not nullable. + x4 = invalid-expression "pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:48:8: Error: A value of type 'Null' can't be assigned to a variable of type 'X4'. x4 = null; // Error. ^" in null as{TypeError} Never; - core::Object v5 = invalid-expression "pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:50:15: Error: A value of type 'X5' can't be assigned to a variable of type 'Object' because 'X5' is nullable and 'Object' isn't. + core::Object v5 = invalid-expression "pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:50:15: Error: A value of type 'X5' can't be assigned to a variable of type 'Object'. - 'Object' is from 'dart:core'. Object v5 = x5; // Error. ^" in x5 as{TypeError} core::Object; - x5 = invalid-expression "pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:51:8: Error: The value 'null' can't be assigned to a variable of type 'X5' because 'X5' is not nullable. + x5 = invalid-expression "pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:51:8: Error: A value of type 'Null' can't be assigned to a variable of type 'X5'. x5 = null; // Error. ^" in null as{TypeError} Never; core::Object v6 = x6; - x6 = invalid-expression "pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:54:8: Error: The value 'null' can't be assigned to a variable of type 'X6' because 'X6' is not nullable. + x6 = invalid-expression "pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:54:8: Error: A value of type 'Null' can't be assigned to a variable of type 'X6'. x6 = null; // Error. ^" in null as{TypeError} Never; core::Object v7 = x7; - x7 = invalid-expression "pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:57:8: Error: The value 'null' can't be assigned to a variable of type 'X7' because 'X7' is not nullable. + x7 = invalid-expression "pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:57:8: Error: A value of type 'Null' can't be assigned to a variable of type 'X7'. x7 = null; // Error. ^" in null as{TypeError} Never; } static method test3(self::E1% /* erasure=core::Object, declared=! */ e1, self::E2 /* erasure=core::Object */ e2, self::E3% /* erasure=core::Object, declared=! */ e3, self::E4 /* erasure=core::Object */ e4, self::E5% /* erasure=dynamic, declared=! */ e5, self::E6 /* erasure=core::Object */ e6, self::E7 /* erasure=core::num */ e7, core::String s, core::bool b) → dynamic { core::Object? v11 = b ?{core::Object?} e1 : s; - core::Object v12 = invalid-expression "pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:62:16: Error: A value of type 'Object?' can't be assigned to a variable of type 'Object' because 'Object?' is nullable and 'Object' isn't. + core::Object v12 = invalid-expression "pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:62:16: Error: A value of type 'Object?' can't be assigned to a variable of type 'Object'. - 'Object' is from 'dart:core'. Object v12 = v11; // Error. ^" in v11 as{TypeError} core::Object; v11 = null; core::Object v21 = b ?{core::Object} e2 : s; core::Object v22 = v21; - v21 = invalid-expression "pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:67:9: Error: The value 'null' can't be assigned to a variable of type 'Object' because 'Object' is not nullable. + v21 = invalid-expression "pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:67:9: Error: A value of type 'Null' can't be assigned to a variable of type 'Object'. - 'Object' is from 'dart:core'. v21 = null; // Error. ^" in null as{TypeError} core::Object; core::Object? v31 = b ?{core::Object?} e3 : s; - core::Object v32 = invalid-expression "pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:70:16: Error: A value of type 'Object?' can't be assigned to a variable of type 'Object' because 'Object?' is nullable and 'Object' isn't. + core::Object v32 = invalid-expression "pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:70:16: Error: A value of type 'Object?' can't be assigned to a variable of type 'Object'. - 'Object' is from 'dart:core'. Object v32 = v31; // Error. ^" in v31 as{TypeError} core::Object; v31 = null; core::Object v41 = b ?{core::Object} e4 : s; core::Object v42 = v41; - v41 = invalid-expression "pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:75:9: Error: The value 'null' can't be assigned to a variable of type 'Object' because 'Object' is not nullable. + v41 = invalid-expression "pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:75:9: Error: A value of type 'Null' can't be assigned to a variable of type 'Object'. - 'Object' is from 'dart:core'. v41 = null; // Error. ^" in null as{TypeError} core::Object; core::Object? v51 = b ?{core::Object?} e5 : s; - core::Object v52 = invalid-expression "pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:78:16: Error: A value of type 'Object?' can't be assigned to a variable of type 'Object' because 'Object?' is nullable and 'Object' isn't. + core::Object v52 = invalid-expression "pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:78:16: Error: A value of type 'Object?' can't be assigned to a variable of type 'Object'. - 'Object' is from 'dart:core'. Object v52 = v51; // Error. ^" in v51 as{TypeError} core::Object; v51 = null; core::Object v61 = b ?{core::Object} e6 : s; core::Object v62 = v61; - v61 = invalid-expression "pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:83:9: Error: The value 'null' can't be assigned to a variable of type 'Object' because 'Object' is not nullable. + v61 = invalid-expression "pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:83:9: Error: A value of type 'Null' can't be assigned to a variable of type 'Object'. - 'Object' is from 'dart:core'. v61 = null; // Error. ^" in null as{TypeError} core::Object; core::Object v71 = b ?{core::Object} e7 : s; core::Object v72 = v71; - v71 = invalid-expression "pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:87:9: Error: The value 'null' can't be assigned to a variable of type 'Object' because 'Object' is not nullable. + v71 = invalid-expression "pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:87:9: Error: A value of type 'Null' can't be assigned to a variable of type 'Object'. - 'Object' is from 'dart:core'. v71 = null; // Error. ^" in null as{TypeError} core::Object; diff --git a/pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart.strong.transformed.expect b/pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart.strong.transformed.expect index 20a5a8854f6..c221237ca56 100644 --- a/pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart.strong.transformed.expect +++ b/pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart.strong.transformed.expect @@ -2,124 +2,124 @@ library; // // Problems in library: // -// pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:14:15: Error: A value of type 'E1' can't be assigned to a variable of type 'Object' because 'E1' is nullable and 'Object' isn't. +// pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:14:15: Error: A value of type 'E1' can't be assigned to a variable of type 'Object'. // - 'Object' is from 'dart:core'. // Object v1 = e1; // Error. // ^ // -// pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:15:8: Error: The value 'null' can't be assigned to a variable of type 'E1' because 'E1' is not nullable. +// pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:15:8: Error: A value of type 'Null' can't be assigned to a variable of type 'E1'. // e1 = null; // Error. // ^ // -// pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:18:8: Error: The value 'null' can't be assigned to a variable of type 'E2' because 'E2' is not nullable. +// pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:18:8: Error: A value of type 'Null' can't be assigned to a variable of type 'E2'. // e2 = null; // Error. // ^ // -// pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:20:15: Error: A value of type 'E3' can't be assigned to a variable of type 'Object' because 'E3' is nullable and 'Object' isn't. +// pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:20:15: Error: A value of type 'E3' can't be assigned to a variable of type 'Object'. // - 'Object' is from 'dart:core'. // Object v3 = e3; // Error. // ^ // -// pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:21:8: Error: The value 'null' can't be assigned to a variable of type 'E3' because 'E3' is not nullable. +// pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:21:8: Error: A value of type 'Null' can't be assigned to a variable of type 'E3'. // e3 = null; // Error. // ^ // -// pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:24:8: Error: The value 'null' can't be assigned to a variable of type 'E4' because 'E4' is not nullable. +// pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:24:8: Error: A value of type 'Null' can't be assigned to a variable of type 'E4'. // e4 = null; // Error. // ^ // -// pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:26:15: Error: A value of type 'E5' can't be assigned to a variable of type 'Object' because 'E5' is nullable and 'Object' isn't. +// pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:26:15: Error: A value of type 'E5' can't be assigned to a variable of type 'Object'. // - 'Object' is from 'dart:core'. // Object v5 = e5; // Error. // ^ // -// pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:27:8: Error: The value 'null' can't be assigned to a variable of type 'E5' because 'E5' is not nullable. +// pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:27:8: Error: A value of type 'Null' can't be assigned to a variable of type 'E5'. // e5 = null; // Error. // ^ // -// pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:30:8: Error: The value 'null' can't be assigned to a variable of type 'E6' because 'E6' is not nullable. +// pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:30:8: Error: A value of type 'Null' can't be assigned to a variable of type 'E6'. // - 'Object' is from 'dart:core'. // e6 = null; // Error. // ^ // -// pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:33:8: Error: The value 'null' can't be assigned to a variable of type 'E7' because 'E7' is not nullable. +// pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:33:8: Error: A value of type 'Null' can't be assigned to a variable of type 'E7'. // e7 = null; // Error. // ^ // -// pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:38:15: Error: A value of type 'X1' can't be assigned to a variable of type 'Object' because 'X1' is nullable and 'Object' isn't. +// pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:38:15: Error: A value of type 'X1' can't be assigned to a variable of type 'Object'. // - 'Object' is from 'dart:core'. // Object v1 = x1; // Error. // ^ // -// pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:39:8: Error: The value 'null' can't be assigned to a variable of type 'X1' because 'X1' is not nullable. +// pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:39:8: Error: A value of type 'Null' can't be assigned to a variable of type 'X1'. // x1 = null; // Error. // ^ // -// pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:42:8: Error: The value 'null' can't be assigned to a variable of type 'X2' because 'X2' is not nullable. +// pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:42:8: Error: A value of type 'Null' can't be assigned to a variable of type 'X2'. // x2 = null; // Error. // ^ // -// pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:44:15: Error: A value of type 'X3' can't be assigned to a variable of type 'Object' because 'X3' is nullable and 'Object' isn't. +// pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:44:15: Error: A value of type 'X3' can't be assigned to a variable of type 'Object'. // - 'Object' is from 'dart:core'. // Object v3 = x3; // Error. // ^ // -// pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:45:8: Error: The value 'null' can't be assigned to a variable of type 'X3' because 'X3' is not nullable. +// pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:45:8: Error: A value of type 'Null' can't be assigned to a variable of type 'X3'. // x3 = null; // Error. // ^ // -// pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:48:8: Error: The value 'null' can't be assigned to a variable of type 'X4' because 'X4' is not nullable. +// pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:48:8: Error: A value of type 'Null' can't be assigned to a variable of type 'X4'. // x4 = null; // Error. // ^ // -// pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:50:15: Error: A value of type 'X5' can't be assigned to a variable of type 'Object' because 'X5' is nullable and 'Object' isn't. +// pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:50:15: Error: A value of type 'X5' can't be assigned to a variable of type 'Object'. // - 'Object' is from 'dart:core'. // Object v5 = x5; // Error. // ^ // -// pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:51:8: Error: The value 'null' can't be assigned to a variable of type 'X5' because 'X5' is not nullable. +// pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:51:8: Error: A value of type 'Null' can't be assigned to a variable of type 'X5'. // x5 = null; // Error. // ^ // -// pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:54:8: Error: The value 'null' can't be assigned to a variable of type 'X6' because 'X6' is not nullable. +// pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:54:8: Error: A value of type 'Null' can't be assigned to a variable of type 'X6'. // x6 = null; // Error. // ^ // -// pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:57:8: Error: The value 'null' can't be assigned to a variable of type 'X7' because 'X7' is not nullable. +// pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:57:8: Error: A value of type 'Null' can't be assigned to a variable of type 'X7'. // x7 = null; // Error. // ^ // -// pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:62:16: Error: A value of type 'Object?' can't be assigned to a variable of type 'Object' because 'Object?' is nullable and 'Object' isn't. +// pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:62:16: Error: A value of type 'Object?' can't be assigned to a variable of type 'Object'. // - 'Object' is from 'dart:core'. // Object v12 = v11; // Error. // ^ // -// pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:67:9: Error: The value 'null' can't be assigned to a variable of type 'Object' because 'Object' is not nullable. +// pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:67:9: Error: A value of type 'Null' can't be assigned to a variable of type 'Object'. // - 'Object' is from 'dart:core'. // v21 = null; // Error. // ^ // -// pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:70:16: Error: A value of type 'Object?' can't be assigned to a variable of type 'Object' because 'Object?' is nullable and 'Object' isn't. +// pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:70:16: Error: A value of type 'Object?' can't be assigned to a variable of type 'Object'. // - 'Object' is from 'dart:core'. // Object v32 = v31; // Error. // ^ // -// pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:75:9: Error: The value 'null' can't be assigned to a variable of type 'Object' because 'Object' is not nullable. +// pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:75:9: Error: A value of type 'Null' can't be assigned to a variable of type 'Object'. // - 'Object' is from 'dart:core'. // v41 = null; // Error. // ^ // -// pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:78:16: Error: A value of type 'Object?' can't be assigned to a variable of type 'Object' because 'Object?' is nullable and 'Object' isn't. +// pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:78:16: Error: A value of type 'Object?' can't be assigned to a variable of type 'Object'. // - 'Object' is from 'dart:core'. // Object v52 = v51; // Error. // ^ // -// pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:83:9: Error: The value 'null' can't be assigned to a variable of type 'Object' because 'Object' is not nullable. +// pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:83:9: Error: A value of type 'Null' can't be assigned to a variable of type 'Object'. // - 'Object' is from 'dart:core'. // v61 = null; // Error. // ^ // -// pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:87:9: Error: The value 'null' can't be assigned to a variable of type 'Object' because 'Object' is not nullable. +// pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:87:9: Error: A value of type 'Null' can't be assigned to a variable of type 'Object'. // - 'Object' is from 'dart:core'. // v71 = null; // Error. // ^ @@ -205,124 +205,124 @@ static extension-type-member method E7|constructor#(core::num it) → self::E7 / static extension-type-member synthetic method E7|constructor#_#new#tearOff(core::num it) → self::E7 /* erasure=core::num */ return self::E7|constructor#(it); static method test1(self::E1% /* erasure=core::Object, declared=! */ e1, self::E2 /* erasure=core::Object */ e2, self::E3% /* erasure=core::Object, declared=! */ e3, self::E4 /* erasure=core::Object */ e4, self::E5% /* erasure=dynamic, declared=! */ e5, self::E6 /* erasure=core::Object */ e6, self::E7 /* erasure=core::num */ e7) → dynamic { - core::Object v1 = invalid-expression "pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:14:15: Error: A value of type 'E1' can't be assigned to a variable of type 'Object' because 'E1' is nullable and 'Object' isn't. + core::Object v1 = invalid-expression "pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:14:15: Error: A value of type 'E1' can't be assigned to a variable of type 'Object'. - 'Object' is from 'dart:core'. Object v1 = e1; // Error. ^" in let self::E1% /* erasure=core::Object, declared=! */ #t1 = e1 in #t1 == null ?{core::Object} #t1 as{TypeError} core::Object : #t1{core::Object}; - e1 = invalid-expression "pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:15:8: Error: The value 'null' can't be assigned to a variable of type 'E1' because 'E1' is not nullable. + e1 = invalid-expression "pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:15:8: Error: A value of type 'Null' can't be assigned to a variable of type 'E1'. e1 = null; // Error. ^" in let Null #t2 = null in #t2 == null ?{self::E1% /* erasure=core::Object, declared=! */} #t2 as{TypeError} self::E1% /* erasure=core::Object, declared=! */ : #t2{self::E1% /* erasure=core::Object, declared=! */}; core::Object v2 = e2; - e2 = invalid-expression "pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:18:8: Error: The value 'null' can't be assigned to a variable of type 'E2' because 'E2' is not nullable. + e2 = invalid-expression "pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:18:8: Error: A value of type 'Null' can't be assigned to a variable of type 'E2'. e2 = null; // Error. ^" in let Null #t3 = null in #t3 == null ?{self::E2 /* erasure=core::Object */} #t3 as{TypeError} self::E2 /* erasure=core::Object */ : #t3{self::E2 /* erasure=core::Object */}; - core::Object v3 = invalid-expression "pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:20:15: Error: A value of type 'E3' can't be assigned to a variable of type 'Object' because 'E3' is nullable and 'Object' isn't. + core::Object v3 = invalid-expression "pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:20:15: Error: A value of type 'E3' can't be assigned to a variable of type 'Object'. - 'Object' is from 'dart:core'. Object v3 = e3; // Error. ^" in let self::E3% /* erasure=core::Object, declared=! */ #t4 = e3 in #t4 == null ?{core::Object} #t4 as{TypeError} core::Object : #t4{core::Object}; - e3 = invalid-expression "pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:21:8: Error: The value 'null' can't be assigned to a variable of type 'E3' because 'E3' is not nullable. + e3 = invalid-expression "pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:21:8: Error: A value of type 'Null' can't be assigned to a variable of type 'E3'. e3 = null; // Error. ^" in let Null #t5 = null in #t5 == null ?{self::E3% /* erasure=core::Object, declared=! */} #t5 as{TypeError} self::E3% /* erasure=core::Object, declared=! */ : #t5{self::E3% /* erasure=core::Object, declared=! */}; core::Object v4 = e4; - e4 = invalid-expression "pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:24:8: Error: The value 'null' can't be assigned to a variable of type 'E4' because 'E4' is not nullable. + e4 = invalid-expression "pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:24:8: Error: A value of type 'Null' can't be assigned to a variable of type 'E4'. e4 = null; // Error. ^" in let Null #t6 = null in #t6 == null ?{self::E4 /* erasure=core::Object */} #t6 as{TypeError} self::E4 /* erasure=core::Object */ : #t6{self::E4 /* erasure=core::Object */}; - core::Object v5 = invalid-expression "pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:26:15: Error: A value of type 'E5' can't be assigned to a variable of type 'Object' because 'E5' is nullable and 'Object' isn't. + core::Object v5 = invalid-expression "pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:26:15: Error: A value of type 'E5' can't be assigned to a variable of type 'Object'. - 'Object' is from 'dart:core'. Object v5 = e5; // Error. ^" in let self::E5% /* erasure=dynamic, declared=! */ #t7 = e5 in #t7 == null ?{core::Object} #t7 as{TypeError} core::Object : #t7{core::Object}; - e5 = invalid-expression "pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:27:8: Error: The value 'null' can't be assigned to a variable of type 'E5' because 'E5' is not nullable. + e5 = invalid-expression "pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:27:8: Error: A value of type 'Null' can't be assigned to a variable of type 'E5'. e5 = null; // Error. ^" in let Null #t8 = null in #t8 == null ?{self::E5% /* erasure=dynamic, declared=! */} #t8 as{TypeError} self::E5% /* erasure=dynamic, declared=! */ : #t8{self::E5% /* erasure=dynamic, declared=! */}; core::Object v6 = e6; - e6 = invalid-expression "pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:30:8: Error: The value 'null' can't be assigned to a variable of type 'E6' because 'E6' is not nullable. + e6 = invalid-expression "pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:30:8: Error: A value of type 'Null' can't be assigned to a variable of type 'E6'. - 'Object' is from 'dart:core'. e6 = null; // Error. ^" in let Null #t9 = null in #t9 == null ?{self::E6 /* erasure=core::Object */} #t9 as{TypeError} self::E6 /* erasure=core::Object */ : #t9{self::E6 /* erasure=core::Object */}; core::Object v7 = e7; - e7 = invalid-expression "pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:33:8: Error: The value 'null' can't be assigned to a variable of type 'E7' because 'E7' is not nullable. + e7 = invalid-expression "pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:33:8: Error: A value of type 'Null' can't be assigned to a variable of type 'E7'. e7 = null; // Error. ^" in let Null #t10 = null in #t10 == null ?{self::E7 /* erasure=core::num */} #t10 as{TypeError} self::E7 /* erasure=core::num */ : #t10{self::E7 /* erasure=core::num */}; } static method test2% /* erasure=dynamic, declared=! */, X6 extends self::E6 /* erasure=core::Object */, X7 extends self::E7 /* erasure=core::num */>(self::test2::X1% x1, self::test2::X2 x2, self::test2::X3% x3, self::test2::X4 x4, self::test2::X5% x5, self::test2::X6 x6, self::test2::X7 x7) → dynamic { - core::Object v1 = invalid-expression "pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:38:15: Error: A value of type 'X1' can't be assigned to a variable of type 'Object' because 'X1' is nullable and 'Object' isn't. + core::Object v1 = invalid-expression "pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:38:15: Error: A value of type 'X1' can't be assigned to a variable of type 'Object'. - 'Object' is from 'dart:core'. Object v1 = x1; // Error. ^" in let self::test2::X1% #t11 = x1 in #t11 == null ?{core::Object} #t11 as{TypeError} core::Object : #t11{core::Object}; - x1 = invalid-expression "pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:39:8: Error: The value 'null' can't be assigned to a variable of type 'X1' because 'X1' is not nullable. + x1 = invalid-expression "pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:39:8: Error: A value of type 'Null' can't be assigned to a variable of type 'X1'. x1 = null; // Error. ^" in let Null #t12 = null in #t12 == null ?{Never} #t12 as{TypeError} Never : #t12{Never}; core::Object v2 = x2; - x2 = invalid-expression "pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:42:8: Error: The value 'null' can't be assigned to a variable of type 'X2' because 'X2' is not nullable. + x2 = invalid-expression "pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:42:8: Error: A value of type 'Null' can't be assigned to a variable of type 'X2'. x2 = null; // Error. ^" in let Null #t13 = null in #t13 == null ?{Never} #t13 as{TypeError} Never : #t13{Never}; - core::Object v3 = invalid-expression "pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:44:15: Error: A value of type 'X3' can't be assigned to a variable of type 'Object' because 'X3' is nullable and 'Object' isn't. + core::Object v3 = invalid-expression "pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:44:15: Error: A value of type 'X3' can't be assigned to a variable of type 'Object'. - 'Object' is from 'dart:core'. Object v3 = x3; // Error. ^" in let self::test2::X3% #t14 = x3 in #t14 == null ?{core::Object} #t14 as{TypeError} core::Object : #t14{core::Object}; - x3 = invalid-expression "pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:45:8: Error: The value 'null' can't be assigned to a variable of type 'X3' because 'X3' is not nullable. + x3 = invalid-expression "pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:45:8: Error: A value of type 'Null' can't be assigned to a variable of type 'X3'. x3 = null; // Error. ^" in let Null #t15 = null in #t15 == null ?{Never} #t15 as{TypeError} Never : #t15{Never}; core::Object v4 = x4; - x4 = invalid-expression "pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:48:8: Error: The value 'null' can't be assigned to a variable of type 'X4' because 'X4' is not nullable. + x4 = invalid-expression "pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:48:8: Error: A value of type 'Null' can't be assigned to a variable of type 'X4'. x4 = null; // Error. ^" in let Null #t16 = null in #t16 == null ?{Never} #t16 as{TypeError} Never : #t16{Never}; - core::Object v5 = invalid-expression "pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:50:15: Error: A value of type 'X5' can't be assigned to a variable of type 'Object' because 'X5' is nullable and 'Object' isn't. + core::Object v5 = invalid-expression "pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:50:15: Error: A value of type 'X5' can't be assigned to a variable of type 'Object'. - 'Object' is from 'dart:core'. Object v5 = x5; // Error. ^" in let self::test2::X5% #t17 = x5 in #t17 == null ?{core::Object} #t17 as{TypeError} core::Object : #t17{core::Object}; - x5 = invalid-expression "pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:51:8: Error: The value 'null' can't be assigned to a variable of type 'X5' because 'X5' is not nullable. + x5 = invalid-expression "pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:51:8: Error: A value of type 'Null' can't be assigned to a variable of type 'X5'. x5 = null; // Error. ^" in let Null #t18 = null in #t18 == null ?{Never} #t18 as{TypeError} Never : #t18{Never}; core::Object v6 = x6; - x6 = invalid-expression "pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:54:8: Error: The value 'null' can't be assigned to a variable of type 'X6' because 'X6' is not nullable. + x6 = invalid-expression "pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:54:8: Error: A value of type 'Null' can't be assigned to a variable of type 'X6'. x6 = null; // Error. ^" in let Null #t19 = null in #t19 == null ?{Never} #t19 as{TypeError} Never : #t19{Never}; core::Object v7 = x7; - x7 = invalid-expression "pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:57:8: Error: The value 'null' can't be assigned to a variable of type 'X7' because 'X7' is not nullable. + x7 = invalid-expression "pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:57:8: Error: A value of type 'Null' can't be assigned to a variable of type 'X7'. x7 = null; // Error. ^" in let Null #t20 = null in #t20 == null ?{Never} #t20 as{TypeError} Never : #t20{Never}; } static method test3(self::E1% /* erasure=core::Object, declared=! */ e1, self::E2 /* erasure=core::Object */ e2, self::E3% /* erasure=core::Object, declared=! */ e3, self::E4 /* erasure=core::Object */ e4, self::E5% /* erasure=dynamic, declared=! */ e5, self::E6 /* erasure=core::Object */ e6, self::E7 /* erasure=core::num */ e7, core::String s, core::bool b) → dynamic { core::Object? v11 = b ?{core::Object?} e1 : s; - core::Object v12 = invalid-expression "pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:62:16: Error: A value of type 'Object?' can't be assigned to a variable of type 'Object' because 'Object?' is nullable and 'Object' isn't. + core::Object v12 = invalid-expression "pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:62:16: Error: A value of type 'Object?' can't be assigned to a variable of type 'Object'. - 'Object' is from 'dart:core'. Object v12 = v11; // Error. ^" in let core::Object? #t21 = v11 in #t21 == null ?{core::Object} #t21 as{TypeError} core::Object : #t21{core::Object}; v11 = null; core::Object v21 = b ?{core::Object} e2 : s; core::Object v22 = v21; - v21 = invalid-expression "pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:67:9: Error: The value 'null' can't be assigned to a variable of type 'Object' because 'Object' is not nullable. + v21 = invalid-expression "pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:67:9: Error: A value of type 'Null' can't be assigned to a variable of type 'Object'. - 'Object' is from 'dart:core'. v21 = null; // Error. ^" in let Null #t22 = null in #t22 == null ?{core::Object} #t22 as{TypeError} core::Object : #t22{core::Object}; core::Object? v31 = b ?{core::Object?} e3 : s; - core::Object v32 = invalid-expression "pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:70:16: Error: A value of type 'Object?' can't be assigned to a variable of type 'Object' because 'Object?' is nullable and 'Object' isn't. + core::Object v32 = invalid-expression "pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:70:16: Error: A value of type 'Object?' can't be assigned to a variable of type 'Object'. - 'Object' is from 'dart:core'. Object v32 = v31; // Error. ^" in let core::Object? #t23 = v31 in #t23 == null ?{core::Object} #t23 as{TypeError} core::Object : #t23{core::Object}; v31 = null; core::Object v41 = b ?{core::Object} e4 : s; core::Object v42 = v41; - v41 = invalid-expression "pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:75:9: Error: The value 'null' can't be assigned to a variable of type 'Object' because 'Object' is not nullable. + v41 = invalid-expression "pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:75:9: Error: A value of type 'Null' can't be assigned to a variable of type 'Object'. - 'Object' is from 'dart:core'. v41 = null; // Error. ^" in let Null #t24 = null in #t24 == null ?{core::Object} #t24 as{TypeError} core::Object : #t24{core::Object}; core::Object? v51 = b ?{core::Object?} e5 : s; - core::Object v52 = invalid-expression "pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:78:16: Error: A value of type 'Object?' can't be assigned to a variable of type 'Object' because 'Object?' is nullable and 'Object' isn't. + core::Object v52 = invalid-expression "pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:78:16: Error: A value of type 'Object?' can't be assigned to a variable of type 'Object'. - 'Object' is from 'dart:core'. Object v52 = v51; // Error. ^" in let core::Object? #t25 = v51 in #t25 == null ?{core::Object} #t25 as{TypeError} core::Object : #t25{core::Object}; v51 = null; core::Object v61 = b ?{core::Object} e6 : s; core::Object v62 = v61; - v61 = invalid-expression "pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:83:9: Error: The value 'null' can't be assigned to a variable of type 'Object' because 'Object' is not nullable. + v61 = invalid-expression "pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:83:9: Error: A value of type 'Null' can't be assigned to a variable of type 'Object'. - 'Object' is from 'dart:core'. v61 = null; // Error. ^" in let Null #t26 = null in #t26 == null ?{core::Object} #t26 as{TypeError} core::Object : #t26{core::Object}; core::Object v71 = b ?{core::Object} e7 : s; core::Object v72 = v71; - v71 = invalid-expression "pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:87:9: Error: The value 'null' can't be assigned to a variable of type 'Object' because 'Object' is not nullable. + v71 = invalid-expression "pkg/front_end/testcases/extension_types/non_nullable_if_implements_object.dart:87:9: Error: A value of type 'Null' can't be assigned to a variable of type 'Object'. - 'Object' is from 'dart:core'. v71 = null; // Error. ^" in let Null #t27 = null in #t27 == null ?{core::Object} #t27 as{TypeError} core::Object : #t27{core::Object}; diff --git a/pkg/front_end/testcases/extension_types/nullability.dart.strong.expect b/pkg/front_end/testcases/extension_types/nullability.dart.strong.expect index f2014e661a8..5c0b5a12d56 100644 --- a/pkg/front_end/testcases/extension_types/nullability.dart.strong.expect +++ b/pkg/front_end/testcases/extension_types/nullability.dart.strong.expect @@ -62,57 +62,57 @@ library; // E5 e5NNR, // Error. // ^^^^^ // -// pkg/front_end/testcases/extension_types/nullability.dart:13:26: Error: A value of type 'E1' can't be assigned to a variable of type 'Object' because 'E1' is nullable and 'Object' isn't. +// pkg/front_end/testcases/extension_types/nullability.dart:13:26: Error: A value of type 'E1' can't be assigned to a variable of type 'Object'. // - 'Object' is from 'dart:core'. // Object x1numNullable = e1numNullableNNN; // Error. // ^ // -// pkg/front_end/testcases/extension_types/nullability.dart:14:21: Error: A value of type 'E1' can't be assigned to a variable of type 'Object' because 'E1' is nullable and 'Object' isn't. +// pkg/front_end/testcases/extension_types/nullability.dart:14:21: Error: A value of type 'E1' can't be assigned to a variable of type 'Object'. // - 'Object' is from 'dart:core'. // Object x1double = e1doubleNNN; // Error. // ^ // -// pkg/front_end/testcases/extension_types/nullability.dart:15:15: Error: A value of type 'E2' can't be assigned to a variable of type 'Object' because 'E2' is nullable and 'Object' isn't. +// pkg/front_end/testcases/extension_types/nullability.dart:15:15: Error: A value of type 'E2' can't be assigned to a variable of type 'Object'. // - 'Object' is from 'dart:core'. // Object x2 = e2NNN; // Error. // ^ // -// pkg/front_end/testcases/extension_types/nullability.dart:16:15: Error: A value of type 'E3' can't be assigned to a variable of type 'Object' because 'E3' is nullable and 'Object' isn't. +// pkg/front_end/testcases/extension_types/nullability.dart:16:15: Error: A value of type 'E3' can't be assigned to a variable of type 'Object'. // - 'Object' is from 'dart:core'. // Object x3 = e3NNN; // Error. // ^ // -// pkg/front_end/testcases/extension_types/nullability.dart:17:15: Error: A value of type 'E4' can't be assigned to a variable of type 'Object' because 'E4' is nullable and 'Object' isn't. +// pkg/front_end/testcases/extension_types/nullability.dart:17:15: Error: A value of type 'E4' can't be assigned to a variable of type 'Object'. // - 'Object' is from 'dart:core'. // Object x4 = e4NNN; // Error. // ^ // -// pkg/front_end/testcases/extension_types/nullability.dart:18:15: Error: A value of type 'E5' can't be assigned to a variable of type 'Object' because 'E5' is nullable and 'Object' isn't. +// pkg/front_end/testcases/extension_types/nullability.dart:18:15: Error: A value of type 'E5' can't be assigned to a variable of type 'Object'. // - 'Object' is from 'dart:core'. // Object x5 = e5NNN; // Error. // ^ // -// pkg/front_end/testcases/extension_types/nullability.dart:26:21: Error: The value 'null' can't be assigned to a variable of type 'E1' because 'E1' is not nullable. +// pkg/front_end/testcases/extension_types/nullability.dart:26:21: Error: A value of type 'Null' can't be assigned to a variable of type 'E1'. // e1numNullableNN = null; // Error. // ^ // -// pkg/front_end/testcases/extension_types/nullability.dart:27:16: Error: The value 'null' can't be assigned to a variable of type 'E1' because 'E1' is not nullable. +// pkg/front_end/testcases/extension_types/nullability.dart:27:16: Error: A value of type 'Null' can't be assigned to a variable of type 'E1'. // e1doubleNN = null; // Error. // ^ // -// pkg/front_end/testcases/extension_types/nullability.dart:28:10: Error: The value 'null' can't be assigned to a variable of type 'E2' because 'E2' is not nullable. +// pkg/front_end/testcases/extension_types/nullability.dart:28:10: Error: A value of type 'Null' can't be assigned to a variable of type 'E2'. // e2NN = null; // Error. // ^ // -// pkg/front_end/testcases/extension_types/nullability.dart:29:10: Error: The value 'null' can't be assigned to a variable of type 'E3' because 'E3' is not nullable. +// pkg/front_end/testcases/extension_types/nullability.dart:29:10: Error: A value of type 'Null' can't be assigned to a variable of type 'E3'. // e3NN = null; // Error. // ^ // -// pkg/front_end/testcases/extension_types/nullability.dart:30:10: Error: The value 'null' can't be assigned to a variable of type 'E4' because 'E4' is not nullable. +// pkg/front_end/testcases/extension_types/nullability.dart:30:10: Error: A value of type 'Null' can't be assigned to a variable of type 'E4'. // e4NN = null; // Error. // ^ // -// pkg/front_end/testcases/extension_types/nullability.dart:31:10: Error: The value 'null' can't be assigned to a variable of type 'E5' because 'E5' is not nullable. +// pkg/front_end/testcases/extension_types/nullability.dart:31:10: Error: A value of type 'Null' can't be assigned to a variable of type 'E5'. // e5NN = null; // Error. // ^ // @@ -216,48 +216,48 @@ static extension-type-member method E5|constructor#(self::E2% /* erasure=core::O static extension-type-member synthetic method E5|constructor#_#new#tearOff(self::E2% /* erasure=core::Object?, declared=! */ foo) → self::E5% /* erasure=core::Object?, declared=! */ return self::E5|constructor#(foo); static method testNotNonNullable(self::E1% /* erasure=core::num?, declared=! */ e1numNullableNNN, self::E1% /* erasure=core::double, declared=! */ e1doubleNNN, self::E2% /* erasure=core::Object?, declared=! */ e2NNN, self::E3% /* erasure=core::String?, declared=! */ e3NNN, self::E4% /* erasure=core::int, declared=! */ e4NNN, self::E5% /* erasure=core::Object?, declared=! */ e5NNN) → dynamic { - core::Object x1numNullable = invalid-expression "pkg/front_end/testcases/extension_types/nullability.dart:13:26: Error: A value of type 'E1' can't be assigned to a variable of type 'Object' because 'E1' is nullable and 'Object' isn't. + core::Object x1numNullable = invalid-expression "pkg/front_end/testcases/extension_types/nullability.dart:13:26: Error: A value of type 'E1' can't be assigned to a variable of type 'Object'. - 'Object' is from 'dart:core'. Object x1numNullable = e1numNullableNNN; // Error. ^" in e1numNullableNNN as{TypeError} core::Object; - core::Object x1double = invalid-expression "pkg/front_end/testcases/extension_types/nullability.dart:14:21: Error: A value of type 'E1' can't be assigned to a variable of type 'Object' because 'E1' is nullable and 'Object' isn't. + core::Object x1double = invalid-expression "pkg/front_end/testcases/extension_types/nullability.dart:14:21: Error: A value of type 'E1' can't be assigned to a variable of type 'Object'. - 'Object' is from 'dart:core'. Object x1double = e1doubleNNN; // Error. ^" in e1doubleNNN as{TypeError} core::Object; - core::Object x2 = invalid-expression "pkg/front_end/testcases/extension_types/nullability.dart:15:15: Error: A value of type 'E2' can't be assigned to a variable of type 'Object' because 'E2' is nullable and 'Object' isn't. + core::Object x2 = invalid-expression "pkg/front_end/testcases/extension_types/nullability.dart:15:15: Error: A value of type 'E2' can't be assigned to a variable of type 'Object'. - 'Object' is from 'dart:core'. Object x2 = e2NNN; // Error. ^" in e2NNN as{TypeError} core::Object; - core::Object x3 = invalid-expression "pkg/front_end/testcases/extension_types/nullability.dart:16:15: Error: A value of type 'E3' can't be assigned to a variable of type 'Object' because 'E3' is nullable and 'Object' isn't. + core::Object x3 = invalid-expression "pkg/front_end/testcases/extension_types/nullability.dart:16:15: Error: A value of type 'E3' can't be assigned to a variable of type 'Object'. - 'Object' is from 'dart:core'. Object x3 = e3NNN; // Error. ^" in e3NNN as{TypeError} core::Object; - core::Object x4 = invalid-expression "pkg/front_end/testcases/extension_types/nullability.dart:17:15: Error: A value of type 'E4' can't be assigned to a variable of type 'Object' because 'E4' is nullable and 'Object' isn't. + core::Object x4 = invalid-expression "pkg/front_end/testcases/extension_types/nullability.dart:17:15: Error: A value of type 'E4' can't be assigned to a variable of type 'Object'. - 'Object' is from 'dart:core'. Object x4 = e4NNN; // Error. ^" in e4NNN as{TypeError} core::Object; - core::Object x5 = invalid-expression "pkg/front_end/testcases/extension_types/nullability.dart:18:15: Error: A value of type 'E5' can't be assigned to a variable of type 'Object' because 'E5' is nullable and 'Object' isn't. + core::Object x5 = invalid-expression "pkg/front_end/testcases/extension_types/nullability.dart:18:15: Error: A value of type 'E5' can't be assigned to a variable of type 'Object'. - 'Object' is from 'dart:core'. Object x5 = e5NNN; // Error. ^" in e5NNN as{TypeError} core::Object; } static method testNotNullable(self::E1% /* erasure=core::num?, declared=! */ e1numNullableNN, self::E1% /* erasure=core::double, declared=! */ e1doubleNN, self::E2% /* erasure=core::Object?, declared=! */ e2NN, self::E3% /* erasure=core::String?, declared=! */ e3NN, self::E4% /* erasure=core::int, declared=! */ e4NN, self::E5% /* erasure=core::Object?, declared=! */ e5NN, self::E1? /* erasure=core::num? */ e1numNullableNNNullable, self::E1? /* erasure=core::double? */ e1doubleNNNullable, self::E2? /* erasure=core::Object? */ e2NNNullable, self::E3? /* erasure=core::String? */ e3NNNullable, self::E4? /* erasure=core::int? */ e4NNNullable, self::E5? /* erasure=core::Object? */ e5NNNullable) → dynamic { - e1numNullableNN = invalid-expression "pkg/front_end/testcases/extension_types/nullability.dart:26:21: Error: The value 'null' can't be assigned to a variable of type 'E1' because 'E1' is not nullable. + e1numNullableNN = invalid-expression "pkg/front_end/testcases/extension_types/nullability.dart:26:21: Error: A value of type 'Null' can't be assigned to a variable of type 'E1'. e1numNullableNN = null; // Error. ^" in null as{TypeError} self::E1% /* erasure=core::num?, declared=! */; - e1doubleNN = invalid-expression "pkg/front_end/testcases/extension_types/nullability.dart:27:16: Error: The value 'null' can't be assigned to a variable of type 'E1' because 'E1' is not nullable. + e1doubleNN = invalid-expression "pkg/front_end/testcases/extension_types/nullability.dart:27:16: Error: A value of type 'Null' can't be assigned to a variable of type 'E1'. e1doubleNN = null; // Error. ^" in null as{TypeError} self::E1% /* erasure=core::double, declared=! */; - e2NN = invalid-expression "pkg/front_end/testcases/extension_types/nullability.dart:28:10: Error: The value 'null' can't be assigned to a variable of type 'E2' because 'E2' is not nullable. + e2NN = invalid-expression "pkg/front_end/testcases/extension_types/nullability.dart:28:10: Error: A value of type 'Null' can't be assigned to a variable of type 'E2'. e2NN = null; // Error. ^" in null as{TypeError} self::E2% /* erasure=core::Object?, declared=! */; - e3NN = invalid-expression "pkg/front_end/testcases/extension_types/nullability.dart:29:10: Error: The value 'null' can't be assigned to a variable of type 'E3' because 'E3' is not nullable. + e3NN = invalid-expression "pkg/front_end/testcases/extension_types/nullability.dart:29:10: Error: A value of type 'Null' can't be assigned to a variable of type 'E3'. e3NN = null; // Error. ^" in null as{TypeError} self::E3% /* erasure=core::String?, declared=! */; - e4NN = invalid-expression "pkg/front_end/testcases/extension_types/nullability.dart:30:10: Error: The value 'null' can't be assigned to a variable of type 'E4' because 'E4' is not nullable. + e4NN = invalid-expression "pkg/front_end/testcases/extension_types/nullability.dart:30:10: Error: A value of type 'Null' can't be assigned to a variable of type 'E4'. e4NN = null; // Error. ^" in null as{TypeError} self::E4% /* erasure=core::int, declared=! */; - e5NN = invalid-expression "pkg/front_end/testcases/extension_types/nullability.dart:31:10: Error: The value 'null' can't be assigned to a variable of type 'E5' because 'E5' is not nullable. + e5NN = invalid-expression "pkg/front_end/testcases/extension_types/nullability.dart:31:10: Error: A value of type 'Null' can't be assigned to a variable of type 'E5'. e5NN = null; // Error. ^" in null as{TypeError} self::E5% /* erasure=core::Object?, declared=! */; e1numNullableNNNullable = null; diff --git a/pkg/front_end/testcases/extension_types/nullability.dart.strong.modular.expect b/pkg/front_end/testcases/extension_types/nullability.dart.strong.modular.expect index f2014e661a8..5c0b5a12d56 100644 --- a/pkg/front_end/testcases/extension_types/nullability.dart.strong.modular.expect +++ b/pkg/front_end/testcases/extension_types/nullability.dart.strong.modular.expect @@ -62,57 +62,57 @@ library; // E5 e5NNR, // Error. // ^^^^^ // -// pkg/front_end/testcases/extension_types/nullability.dart:13:26: Error: A value of type 'E1' can't be assigned to a variable of type 'Object' because 'E1' is nullable and 'Object' isn't. +// pkg/front_end/testcases/extension_types/nullability.dart:13:26: Error: A value of type 'E1' can't be assigned to a variable of type 'Object'. // - 'Object' is from 'dart:core'. // Object x1numNullable = e1numNullableNNN; // Error. // ^ // -// pkg/front_end/testcases/extension_types/nullability.dart:14:21: Error: A value of type 'E1' can't be assigned to a variable of type 'Object' because 'E1' is nullable and 'Object' isn't. +// pkg/front_end/testcases/extension_types/nullability.dart:14:21: Error: A value of type 'E1' can't be assigned to a variable of type 'Object'. // - 'Object' is from 'dart:core'. // Object x1double = e1doubleNNN; // Error. // ^ // -// pkg/front_end/testcases/extension_types/nullability.dart:15:15: Error: A value of type 'E2' can't be assigned to a variable of type 'Object' because 'E2' is nullable and 'Object' isn't. +// pkg/front_end/testcases/extension_types/nullability.dart:15:15: Error: A value of type 'E2' can't be assigned to a variable of type 'Object'. // - 'Object' is from 'dart:core'. // Object x2 = e2NNN; // Error. // ^ // -// pkg/front_end/testcases/extension_types/nullability.dart:16:15: Error: A value of type 'E3' can't be assigned to a variable of type 'Object' because 'E3' is nullable and 'Object' isn't. +// pkg/front_end/testcases/extension_types/nullability.dart:16:15: Error: A value of type 'E3' can't be assigned to a variable of type 'Object'. // - 'Object' is from 'dart:core'. // Object x3 = e3NNN; // Error. // ^ // -// pkg/front_end/testcases/extension_types/nullability.dart:17:15: Error: A value of type 'E4' can't be assigned to a variable of type 'Object' because 'E4' is nullable and 'Object' isn't. +// pkg/front_end/testcases/extension_types/nullability.dart:17:15: Error: A value of type 'E4' can't be assigned to a variable of type 'Object'. // - 'Object' is from 'dart:core'. // Object x4 = e4NNN; // Error. // ^ // -// pkg/front_end/testcases/extension_types/nullability.dart:18:15: Error: A value of type 'E5' can't be assigned to a variable of type 'Object' because 'E5' is nullable and 'Object' isn't. +// pkg/front_end/testcases/extension_types/nullability.dart:18:15: Error: A value of type 'E5' can't be assigned to a variable of type 'Object'. // - 'Object' is from 'dart:core'. // Object x5 = e5NNN; // Error. // ^ // -// pkg/front_end/testcases/extension_types/nullability.dart:26:21: Error: The value 'null' can't be assigned to a variable of type 'E1' because 'E1' is not nullable. +// pkg/front_end/testcases/extension_types/nullability.dart:26:21: Error: A value of type 'Null' can't be assigned to a variable of type 'E1'. // e1numNullableNN = null; // Error. // ^ // -// pkg/front_end/testcases/extension_types/nullability.dart:27:16: Error: The value 'null' can't be assigned to a variable of type 'E1' because 'E1' is not nullable. +// pkg/front_end/testcases/extension_types/nullability.dart:27:16: Error: A value of type 'Null' can't be assigned to a variable of type 'E1'. // e1doubleNN = null; // Error. // ^ // -// pkg/front_end/testcases/extension_types/nullability.dart:28:10: Error: The value 'null' can't be assigned to a variable of type 'E2' because 'E2' is not nullable. +// pkg/front_end/testcases/extension_types/nullability.dart:28:10: Error: A value of type 'Null' can't be assigned to a variable of type 'E2'. // e2NN = null; // Error. // ^ // -// pkg/front_end/testcases/extension_types/nullability.dart:29:10: Error: The value 'null' can't be assigned to a variable of type 'E3' because 'E3' is not nullable. +// pkg/front_end/testcases/extension_types/nullability.dart:29:10: Error: A value of type 'Null' can't be assigned to a variable of type 'E3'. // e3NN = null; // Error. // ^ // -// pkg/front_end/testcases/extension_types/nullability.dart:30:10: Error: The value 'null' can't be assigned to a variable of type 'E4' because 'E4' is not nullable. +// pkg/front_end/testcases/extension_types/nullability.dart:30:10: Error: A value of type 'Null' can't be assigned to a variable of type 'E4'. // e4NN = null; // Error. // ^ // -// pkg/front_end/testcases/extension_types/nullability.dart:31:10: Error: The value 'null' can't be assigned to a variable of type 'E5' because 'E5' is not nullable. +// pkg/front_end/testcases/extension_types/nullability.dart:31:10: Error: A value of type 'Null' can't be assigned to a variable of type 'E5'. // e5NN = null; // Error. // ^ // @@ -216,48 +216,48 @@ static extension-type-member method E5|constructor#(self::E2% /* erasure=core::O static extension-type-member synthetic method E5|constructor#_#new#tearOff(self::E2% /* erasure=core::Object?, declared=! */ foo) → self::E5% /* erasure=core::Object?, declared=! */ return self::E5|constructor#(foo); static method testNotNonNullable(self::E1% /* erasure=core::num?, declared=! */ e1numNullableNNN, self::E1% /* erasure=core::double, declared=! */ e1doubleNNN, self::E2% /* erasure=core::Object?, declared=! */ e2NNN, self::E3% /* erasure=core::String?, declared=! */ e3NNN, self::E4% /* erasure=core::int, declared=! */ e4NNN, self::E5% /* erasure=core::Object?, declared=! */ e5NNN) → dynamic { - core::Object x1numNullable = invalid-expression "pkg/front_end/testcases/extension_types/nullability.dart:13:26: Error: A value of type 'E1' can't be assigned to a variable of type 'Object' because 'E1' is nullable and 'Object' isn't. + core::Object x1numNullable = invalid-expression "pkg/front_end/testcases/extension_types/nullability.dart:13:26: Error: A value of type 'E1' can't be assigned to a variable of type 'Object'. - 'Object' is from 'dart:core'. Object x1numNullable = e1numNullableNNN; // Error. ^" in e1numNullableNNN as{TypeError} core::Object; - core::Object x1double = invalid-expression "pkg/front_end/testcases/extension_types/nullability.dart:14:21: Error: A value of type 'E1' can't be assigned to a variable of type 'Object' because 'E1' is nullable and 'Object' isn't. + core::Object x1double = invalid-expression "pkg/front_end/testcases/extension_types/nullability.dart:14:21: Error: A value of type 'E1' can't be assigned to a variable of type 'Object'. - 'Object' is from 'dart:core'. Object x1double = e1doubleNNN; // Error. ^" in e1doubleNNN as{TypeError} core::Object; - core::Object x2 = invalid-expression "pkg/front_end/testcases/extension_types/nullability.dart:15:15: Error: A value of type 'E2' can't be assigned to a variable of type 'Object' because 'E2' is nullable and 'Object' isn't. + core::Object x2 = invalid-expression "pkg/front_end/testcases/extension_types/nullability.dart:15:15: Error: A value of type 'E2' can't be assigned to a variable of type 'Object'. - 'Object' is from 'dart:core'. Object x2 = e2NNN; // Error. ^" in e2NNN as{TypeError} core::Object; - core::Object x3 = invalid-expression "pkg/front_end/testcases/extension_types/nullability.dart:16:15: Error: A value of type 'E3' can't be assigned to a variable of type 'Object' because 'E3' is nullable and 'Object' isn't. + core::Object x3 = invalid-expression "pkg/front_end/testcases/extension_types/nullability.dart:16:15: Error: A value of type 'E3' can't be assigned to a variable of type 'Object'. - 'Object' is from 'dart:core'. Object x3 = e3NNN; // Error. ^" in e3NNN as{TypeError} core::Object; - core::Object x4 = invalid-expression "pkg/front_end/testcases/extension_types/nullability.dart:17:15: Error: A value of type 'E4' can't be assigned to a variable of type 'Object' because 'E4' is nullable and 'Object' isn't. + core::Object x4 = invalid-expression "pkg/front_end/testcases/extension_types/nullability.dart:17:15: Error: A value of type 'E4' can't be assigned to a variable of type 'Object'. - 'Object' is from 'dart:core'. Object x4 = e4NNN; // Error. ^" in e4NNN as{TypeError} core::Object; - core::Object x5 = invalid-expression "pkg/front_end/testcases/extension_types/nullability.dart:18:15: Error: A value of type 'E5' can't be assigned to a variable of type 'Object' because 'E5' is nullable and 'Object' isn't. + core::Object x5 = invalid-expression "pkg/front_end/testcases/extension_types/nullability.dart:18:15: Error: A value of type 'E5' can't be assigned to a variable of type 'Object'. - 'Object' is from 'dart:core'. Object x5 = e5NNN; // Error. ^" in e5NNN as{TypeError} core::Object; } static method testNotNullable(self::E1% /* erasure=core::num?, declared=! */ e1numNullableNN, self::E1% /* erasure=core::double, declared=! */ e1doubleNN, self::E2% /* erasure=core::Object?, declared=! */ e2NN, self::E3% /* erasure=core::String?, declared=! */ e3NN, self::E4% /* erasure=core::int, declared=! */ e4NN, self::E5% /* erasure=core::Object?, declared=! */ e5NN, self::E1? /* erasure=core::num? */ e1numNullableNNNullable, self::E1? /* erasure=core::double? */ e1doubleNNNullable, self::E2? /* erasure=core::Object? */ e2NNNullable, self::E3? /* erasure=core::String? */ e3NNNullable, self::E4? /* erasure=core::int? */ e4NNNullable, self::E5? /* erasure=core::Object? */ e5NNNullable) → dynamic { - e1numNullableNN = invalid-expression "pkg/front_end/testcases/extension_types/nullability.dart:26:21: Error: The value 'null' can't be assigned to a variable of type 'E1' because 'E1' is not nullable. + e1numNullableNN = invalid-expression "pkg/front_end/testcases/extension_types/nullability.dart:26:21: Error: A value of type 'Null' can't be assigned to a variable of type 'E1'. e1numNullableNN = null; // Error. ^" in null as{TypeError} self::E1% /* erasure=core::num?, declared=! */; - e1doubleNN = invalid-expression "pkg/front_end/testcases/extension_types/nullability.dart:27:16: Error: The value 'null' can't be assigned to a variable of type 'E1' because 'E1' is not nullable. + e1doubleNN = invalid-expression "pkg/front_end/testcases/extension_types/nullability.dart:27:16: Error: A value of type 'Null' can't be assigned to a variable of type 'E1'. e1doubleNN = null; // Error. ^" in null as{TypeError} self::E1% /* erasure=core::double, declared=! */; - e2NN = invalid-expression "pkg/front_end/testcases/extension_types/nullability.dart:28:10: Error: The value 'null' can't be assigned to a variable of type 'E2' because 'E2' is not nullable. + e2NN = invalid-expression "pkg/front_end/testcases/extension_types/nullability.dart:28:10: Error: A value of type 'Null' can't be assigned to a variable of type 'E2'. e2NN = null; // Error. ^" in null as{TypeError} self::E2% /* erasure=core::Object?, declared=! */; - e3NN = invalid-expression "pkg/front_end/testcases/extension_types/nullability.dart:29:10: Error: The value 'null' can't be assigned to a variable of type 'E3' because 'E3' is not nullable. + e3NN = invalid-expression "pkg/front_end/testcases/extension_types/nullability.dart:29:10: Error: A value of type 'Null' can't be assigned to a variable of type 'E3'. e3NN = null; // Error. ^" in null as{TypeError} self::E3% /* erasure=core::String?, declared=! */; - e4NN = invalid-expression "pkg/front_end/testcases/extension_types/nullability.dart:30:10: Error: The value 'null' can't be assigned to a variable of type 'E4' because 'E4' is not nullable. + e4NN = invalid-expression "pkg/front_end/testcases/extension_types/nullability.dart:30:10: Error: A value of type 'Null' can't be assigned to a variable of type 'E4'. e4NN = null; // Error. ^" in null as{TypeError} self::E4% /* erasure=core::int, declared=! */; - e5NN = invalid-expression "pkg/front_end/testcases/extension_types/nullability.dart:31:10: Error: The value 'null' can't be assigned to a variable of type 'E5' because 'E5' is not nullable. + e5NN = invalid-expression "pkg/front_end/testcases/extension_types/nullability.dart:31:10: Error: A value of type 'Null' can't be assigned to a variable of type 'E5'. e5NN = null; // Error. ^" in null as{TypeError} self::E5% /* erasure=core::Object?, declared=! */; e1numNullableNNNullable = null; diff --git a/pkg/front_end/testcases/extension_types/nullability.dart.strong.transformed.expect b/pkg/front_end/testcases/extension_types/nullability.dart.strong.transformed.expect index 9cecd3815be..8a170125145 100644 --- a/pkg/front_end/testcases/extension_types/nullability.dart.strong.transformed.expect +++ b/pkg/front_end/testcases/extension_types/nullability.dart.strong.transformed.expect @@ -62,57 +62,57 @@ library; // E5 e5NNR, // Error. // ^^^^^ // -// pkg/front_end/testcases/extension_types/nullability.dart:13:26: Error: A value of type 'E1' can't be assigned to a variable of type 'Object' because 'E1' is nullable and 'Object' isn't. +// pkg/front_end/testcases/extension_types/nullability.dart:13:26: Error: A value of type 'E1' can't be assigned to a variable of type 'Object'. // - 'Object' is from 'dart:core'. // Object x1numNullable = e1numNullableNNN; // Error. // ^ // -// pkg/front_end/testcases/extension_types/nullability.dart:14:21: Error: A value of type 'E1' can't be assigned to a variable of type 'Object' because 'E1' is nullable and 'Object' isn't. +// pkg/front_end/testcases/extension_types/nullability.dart:14:21: Error: A value of type 'E1' can't be assigned to a variable of type 'Object'. // - 'Object' is from 'dart:core'. // Object x1double = e1doubleNNN; // Error. // ^ // -// pkg/front_end/testcases/extension_types/nullability.dart:15:15: Error: A value of type 'E2' can't be assigned to a variable of type 'Object' because 'E2' is nullable and 'Object' isn't. +// pkg/front_end/testcases/extension_types/nullability.dart:15:15: Error: A value of type 'E2' can't be assigned to a variable of type 'Object'. // - 'Object' is from 'dart:core'. // Object x2 = e2NNN; // Error. // ^ // -// pkg/front_end/testcases/extension_types/nullability.dart:16:15: Error: A value of type 'E3' can't be assigned to a variable of type 'Object' because 'E3' is nullable and 'Object' isn't. +// pkg/front_end/testcases/extension_types/nullability.dart:16:15: Error: A value of type 'E3' can't be assigned to a variable of type 'Object'. // - 'Object' is from 'dart:core'. // Object x3 = e3NNN; // Error. // ^ // -// pkg/front_end/testcases/extension_types/nullability.dart:17:15: Error: A value of type 'E4' can't be assigned to a variable of type 'Object' because 'E4' is nullable and 'Object' isn't. +// pkg/front_end/testcases/extension_types/nullability.dart:17:15: Error: A value of type 'E4' can't be assigned to a variable of type 'Object'. // - 'Object' is from 'dart:core'. // Object x4 = e4NNN; // Error. // ^ // -// pkg/front_end/testcases/extension_types/nullability.dart:18:15: Error: A value of type 'E5' can't be assigned to a variable of type 'Object' because 'E5' is nullable and 'Object' isn't. +// pkg/front_end/testcases/extension_types/nullability.dart:18:15: Error: A value of type 'E5' can't be assigned to a variable of type 'Object'. // - 'Object' is from 'dart:core'. // Object x5 = e5NNN; // Error. // ^ // -// pkg/front_end/testcases/extension_types/nullability.dart:26:21: Error: The value 'null' can't be assigned to a variable of type 'E1' because 'E1' is not nullable. +// pkg/front_end/testcases/extension_types/nullability.dart:26:21: Error: A value of type 'Null' can't be assigned to a variable of type 'E1'. // e1numNullableNN = null; // Error. // ^ // -// pkg/front_end/testcases/extension_types/nullability.dart:27:16: Error: The value 'null' can't be assigned to a variable of type 'E1' because 'E1' is not nullable. +// pkg/front_end/testcases/extension_types/nullability.dart:27:16: Error: A value of type 'Null' can't be assigned to a variable of type 'E1'. // e1doubleNN = null; // Error. // ^ // -// pkg/front_end/testcases/extension_types/nullability.dart:28:10: Error: The value 'null' can't be assigned to a variable of type 'E2' because 'E2' is not nullable. +// pkg/front_end/testcases/extension_types/nullability.dart:28:10: Error: A value of type 'Null' can't be assigned to a variable of type 'E2'. // e2NN = null; // Error. // ^ // -// pkg/front_end/testcases/extension_types/nullability.dart:29:10: Error: The value 'null' can't be assigned to a variable of type 'E3' because 'E3' is not nullable. +// pkg/front_end/testcases/extension_types/nullability.dart:29:10: Error: A value of type 'Null' can't be assigned to a variable of type 'E3'. // e3NN = null; // Error. // ^ // -// pkg/front_end/testcases/extension_types/nullability.dart:30:10: Error: The value 'null' can't be assigned to a variable of type 'E4' because 'E4' is not nullable. +// pkg/front_end/testcases/extension_types/nullability.dart:30:10: Error: A value of type 'Null' can't be assigned to a variable of type 'E4'. // e4NN = null; // Error. // ^ // -// pkg/front_end/testcases/extension_types/nullability.dart:31:10: Error: The value 'null' can't be assigned to a variable of type 'E5' because 'E5' is not nullable. +// pkg/front_end/testcases/extension_types/nullability.dart:31:10: Error: A value of type 'Null' can't be assigned to a variable of type 'E5'. // e5NN = null; // Error. // ^ // @@ -216,48 +216,48 @@ static extension-type-member method E5|constructor#(self::E2% /* erasure=core::O static extension-type-member synthetic method E5|constructor#_#new#tearOff(self::E2% /* erasure=core::Object?, declared=! */ foo) → self::E5% /* erasure=core::Object?, declared=! */ return self::E5|constructor#(foo); static method testNotNonNullable(self::E1% /* erasure=core::num?, declared=! */ e1numNullableNNN, self::E1% /* erasure=core::double, declared=! */ e1doubleNNN, self::E2% /* erasure=core::Object?, declared=! */ e2NNN, self::E3% /* erasure=core::String?, declared=! */ e3NNN, self::E4% /* erasure=core::int, declared=! */ e4NNN, self::E5% /* erasure=core::Object?, declared=! */ e5NNN) → dynamic { - core::Object x1numNullable = invalid-expression "pkg/front_end/testcases/extension_types/nullability.dart:13:26: Error: A value of type 'E1' can't be assigned to a variable of type 'Object' because 'E1' is nullable and 'Object' isn't. + core::Object x1numNullable = invalid-expression "pkg/front_end/testcases/extension_types/nullability.dart:13:26: Error: A value of type 'E1' can't be assigned to a variable of type 'Object'. - 'Object' is from 'dart:core'. Object x1numNullable = e1numNullableNNN; // Error. ^" in let self::E1% /* erasure=core::num?, declared=! */ #t1 = e1numNullableNNN in #t1 == null ?{core::Object} #t1 as{TypeError} core::Object : #t1{core::Object}; - core::Object x1double = invalid-expression "pkg/front_end/testcases/extension_types/nullability.dart:14:21: Error: A value of type 'E1' can't be assigned to a variable of type 'Object' because 'E1' is nullable and 'Object' isn't. + core::Object x1double = invalid-expression "pkg/front_end/testcases/extension_types/nullability.dart:14:21: Error: A value of type 'E1' can't be assigned to a variable of type 'Object'. - 'Object' is from 'dart:core'. Object x1double = e1doubleNNN; // Error. ^" in let self::E1% /* erasure=core::double, declared=! */ #t2 = e1doubleNNN in #t2 == null ?{core::Object} #t2 as{TypeError} core::Object : #t2{core::Object}; - core::Object x2 = invalid-expression "pkg/front_end/testcases/extension_types/nullability.dart:15:15: Error: A value of type 'E2' can't be assigned to a variable of type 'Object' because 'E2' is nullable and 'Object' isn't. + core::Object x2 = invalid-expression "pkg/front_end/testcases/extension_types/nullability.dart:15:15: Error: A value of type 'E2' can't be assigned to a variable of type 'Object'. - 'Object' is from 'dart:core'. Object x2 = e2NNN; // Error. ^" in let self::E2% /* erasure=core::Object?, declared=! */ #t3 = e2NNN in #t3 == null ?{core::Object} #t3 as{TypeError} core::Object : #t3{core::Object}; - core::Object x3 = invalid-expression "pkg/front_end/testcases/extension_types/nullability.dart:16:15: Error: A value of type 'E3' can't be assigned to a variable of type 'Object' because 'E3' is nullable and 'Object' isn't. + core::Object x3 = invalid-expression "pkg/front_end/testcases/extension_types/nullability.dart:16:15: Error: A value of type 'E3' can't be assigned to a variable of type 'Object'. - 'Object' is from 'dart:core'. Object x3 = e3NNN; // Error. ^" in let self::E3% /* erasure=core::String?, declared=! */ #t4 = e3NNN in #t4 == null ?{core::Object} #t4 as{TypeError} core::Object : #t4{core::Object}; - core::Object x4 = invalid-expression "pkg/front_end/testcases/extension_types/nullability.dart:17:15: Error: A value of type 'E4' can't be assigned to a variable of type 'Object' because 'E4' is nullable and 'Object' isn't. + core::Object x4 = invalid-expression "pkg/front_end/testcases/extension_types/nullability.dart:17:15: Error: A value of type 'E4' can't be assigned to a variable of type 'Object'. - 'Object' is from 'dart:core'. Object x4 = e4NNN; // Error. ^" in let self::E4% /* erasure=core::int, declared=! */ #t5 = e4NNN in #t5 == null ?{core::Object} #t5 as{TypeError} core::Object : #t5{core::Object}; - core::Object x5 = invalid-expression "pkg/front_end/testcases/extension_types/nullability.dart:18:15: Error: A value of type 'E5' can't be assigned to a variable of type 'Object' because 'E5' is nullable and 'Object' isn't. + core::Object x5 = invalid-expression "pkg/front_end/testcases/extension_types/nullability.dart:18:15: Error: A value of type 'E5' can't be assigned to a variable of type 'Object'. - 'Object' is from 'dart:core'. Object x5 = e5NNN; // Error. ^" in let self::E5% /* erasure=core::Object?, declared=! */ #t6 = e5NNN in #t6 == null ?{core::Object} #t6 as{TypeError} core::Object : #t6{core::Object}; } static method testNotNullable(self::E1% /* erasure=core::num?, declared=! */ e1numNullableNN, self::E1% /* erasure=core::double, declared=! */ e1doubleNN, self::E2% /* erasure=core::Object?, declared=! */ e2NN, self::E3% /* erasure=core::String?, declared=! */ e3NN, self::E4% /* erasure=core::int, declared=! */ e4NN, self::E5% /* erasure=core::Object?, declared=! */ e5NN, self::E1? /* erasure=core::num? */ e1numNullableNNNullable, self::E1? /* erasure=core::double? */ e1doubleNNNullable, self::E2? /* erasure=core::Object? */ e2NNNullable, self::E3? /* erasure=core::String? */ e3NNNullable, self::E4? /* erasure=core::int? */ e4NNNullable, self::E5? /* erasure=core::Object? */ e5NNNullable) → dynamic { - e1numNullableNN = invalid-expression "pkg/front_end/testcases/extension_types/nullability.dart:26:21: Error: The value 'null' can't be assigned to a variable of type 'E1' because 'E1' is not nullable. + e1numNullableNN = invalid-expression "pkg/front_end/testcases/extension_types/nullability.dart:26:21: Error: A value of type 'Null' can't be assigned to a variable of type 'E1'. e1numNullableNN = null; // Error. ^" in let Null #t7 = null in #t7 == null ?{self::E1% /* erasure=core::num?, declared=! */} #t7 as{TypeError} self::E1% /* erasure=core::num?, declared=! */ : #t7{self::E1% /* erasure=core::num?, declared=! */}; - e1doubleNN = invalid-expression "pkg/front_end/testcases/extension_types/nullability.dart:27:16: Error: The value 'null' can't be assigned to a variable of type 'E1' because 'E1' is not nullable. + e1doubleNN = invalid-expression "pkg/front_end/testcases/extension_types/nullability.dart:27:16: Error: A value of type 'Null' can't be assigned to a variable of type 'E1'. e1doubleNN = null; // Error. ^" in let Null #t8 = null in #t8 == null ?{self::E1% /* erasure=core::double, declared=! */} #t8 as{TypeError} self::E1% /* erasure=core::double, declared=! */ : #t8{self::E1% /* erasure=core::double, declared=! */}; - e2NN = invalid-expression "pkg/front_end/testcases/extension_types/nullability.dart:28:10: Error: The value 'null' can't be assigned to a variable of type 'E2' because 'E2' is not nullable. + e2NN = invalid-expression "pkg/front_end/testcases/extension_types/nullability.dart:28:10: Error: A value of type 'Null' can't be assigned to a variable of type 'E2'. e2NN = null; // Error. ^" in let Null #t9 = null in #t9 == null ?{self::E2% /* erasure=core::Object?, declared=! */} #t9 as{TypeError} self::E2% /* erasure=core::Object?, declared=! */ : #t9{self::E2% /* erasure=core::Object?, declared=! */}; - e3NN = invalid-expression "pkg/front_end/testcases/extension_types/nullability.dart:29:10: Error: The value 'null' can't be assigned to a variable of type 'E3' because 'E3' is not nullable. + e3NN = invalid-expression "pkg/front_end/testcases/extension_types/nullability.dart:29:10: Error: A value of type 'Null' can't be assigned to a variable of type 'E3'. e3NN = null; // Error. ^" in let Null #t10 = null in #t10 == null ?{self::E3% /* erasure=core::String?, declared=! */} #t10 as{TypeError} self::E3% /* erasure=core::String?, declared=! */ : #t10{self::E3% /* erasure=core::String?, declared=! */}; - e4NN = invalid-expression "pkg/front_end/testcases/extension_types/nullability.dart:30:10: Error: The value 'null' can't be assigned to a variable of type 'E4' because 'E4' is not nullable. + e4NN = invalid-expression "pkg/front_end/testcases/extension_types/nullability.dart:30:10: Error: A value of type 'Null' can't be assigned to a variable of type 'E4'. e4NN = null; // Error. ^" in let Null #t11 = null in #t11 == null ?{self::E4% /* erasure=core::int, declared=! */} #t11 as{TypeError} self::E4% /* erasure=core::int, declared=! */ : #t11{self::E4% /* erasure=core::int, declared=! */}; - e5NN = invalid-expression "pkg/front_end/testcases/extension_types/nullability.dart:31:10: Error: The value 'null' can't be assigned to a variable of type 'E5' because 'E5' is not nullable. + e5NN = invalid-expression "pkg/front_end/testcases/extension_types/nullability.dart:31:10: Error: A value of type 'Null' can't be assigned to a variable of type 'E5'. e5NN = null; // Error. ^" in let Null #t12 = null in #t12 == null ?{self::E5% /* erasure=core::Object?, declared=! */} #t12 as{TypeError} self::E5% /* erasure=core::Object?, declared=! */ : #t12{self::E5% /* erasure=core::Object?, declared=! */}; e1numNullableNNNullable = null; diff --git a/pkg/front_end/testcases/extensions/on_type_variable_inference.dart.strong.expect b/pkg/front_end/testcases/extensions/on_type_variable_inference.dart.strong.expect index e49a8ca7a55..fadfdeae826 100644 --- a/pkg/front_end/testcases/extensions/on_type_variable_inference.dart.strong.expect +++ b/pkg/front_end/testcases/extensions/on_type_variable_inference.dart.strong.expect @@ -14,17 +14,17 @@ library; // structB.property = struct.property; // error // ^ // -// pkg/front_end/testcases/extensions/on_type_variable_inference.dart:52:27: Error: The value 'null' can't be assigned to a variable of type 'Struct' because 'Struct' is not nullable. +// pkg/front_end/testcases/extensions/on_type_variable_inference.dart:52:27: Error: A value of type 'Null' can't be assigned to a variable of type 'Struct'. // - 'Struct' is from 'pkg/front_end/testcases/extensions/on_type_variable_inference.dart'. // new Struct().property = null; // error // ^ // -// pkg/front_end/testcases/extensions/on_type_variable_inference.dart:53:28: Error: The value 'null' can't be assigned to a variable of type 'StructA' because 'StructA' is not nullable. +// pkg/front_end/testcases/extensions/on_type_variable_inference.dart:53:28: Error: A value of type 'Null' can't be assigned to a variable of type 'StructA'. // - 'StructA' is from 'pkg/front_end/testcases/extensions/on_type_variable_inference.dart'. // new StructA().property = null; // error // ^ // -// pkg/front_end/testcases/extensions/on_type_variable_inference.dart:54:28: Error: The value 'null' can't be assigned to a variable of type 'StructB' because 'StructB' is not nullable. +// pkg/front_end/testcases/extensions/on_type_variable_inference.dart:54:28: Error: A value of type 'Null' can't be assigned to a variable of type 'StructB'. // - 'StructB' is from 'pkg/front_end/testcases/extensions/on_type_variable_inference.dart'. // new StructB().property = null; // error // ^ @@ -149,15 +149,15 @@ static method errors() → dynamic { - 'StructB' is from 'pkg/front_end/testcases/extensions/on_type_variable_inference.dart'. structB.property = struct.property; // error ^" in self::Extension|get#property(struct) as{TypeError} self::StructB?); - self::Extension|set#property(new self::Struct::•(), invalid-expression "pkg/front_end/testcases/extensions/on_type_variable_inference.dart:52:27: Error: The value 'null' can't be assigned to a variable of type 'Struct' because 'Struct' is not nullable. + self::Extension|set#property(new self::Struct::•(), invalid-expression "pkg/front_end/testcases/extensions/on_type_variable_inference.dart:52:27: Error: A value of type 'Null' can't be assigned to a variable of type 'Struct'. - 'Struct' is from 'pkg/front_end/testcases/extensions/on_type_variable_inference.dart'. new Struct().property = null; // error ^" in null as{TypeError} self::Struct); - self::Extension|set#property(new self::StructA::•(), invalid-expression "pkg/front_end/testcases/extensions/on_type_variable_inference.dart:53:28: Error: The value 'null' can't be assigned to a variable of type 'StructA' because 'StructA' is not nullable. + self::Extension|set#property(new self::StructA::•(), invalid-expression "pkg/front_end/testcases/extensions/on_type_variable_inference.dart:53:28: Error: A value of type 'Null' can't be assigned to a variable of type 'StructA'. - 'StructA' is from 'pkg/front_end/testcases/extensions/on_type_variable_inference.dart'. new StructA().property = null; // error ^" in null as{TypeError} self::StructA); - self::Extension|set#property(new self::StructB::•(), invalid-expression "pkg/front_end/testcases/extensions/on_type_variable_inference.dart:54:28: Error: The value 'null' can't be assigned to a variable of type 'StructB' because 'StructB' is not nullable. + self::Extension|set#property(new self::StructB::•(), invalid-expression "pkg/front_end/testcases/extensions/on_type_variable_inference.dart:54:28: Error: A value of type 'Null' can't be assigned to a variable of type 'StructB'. - 'StructB' is from 'pkg/front_end/testcases/extensions/on_type_variable_inference.dart'. new StructB().property = null; // error ^" in null as{TypeError} self::StructB); diff --git a/pkg/front_end/testcases/extensions/on_type_variable_inference.dart.strong.modular.expect b/pkg/front_end/testcases/extensions/on_type_variable_inference.dart.strong.modular.expect index e49a8ca7a55..fadfdeae826 100644 --- a/pkg/front_end/testcases/extensions/on_type_variable_inference.dart.strong.modular.expect +++ b/pkg/front_end/testcases/extensions/on_type_variable_inference.dart.strong.modular.expect @@ -14,17 +14,17 @@ library; // structB.property = struct.property; // error // ^ // -// pkg/front_end/testcases/extensions/on_type_variable_inference.dart:52:27: Error: The value 'null' can't be assigned to a variable of type 'Struct' because 'Struct' is not nullable. +// pkg/front_end/testcases/extensions/on_type_variable_inference.dart:52:27: Error: A value of type 'Null' can't be assigned to a variable of type 'Struct'. // - 'Struct' is from 'pkg/front_end/testcases/extensions/on_type_variable_inference.dart'. // new Struct().property = null; // error // ^ // -// pkg/front_end/testcases/extensions/on_type_variable_inference.dart:53:28: Error: The value 'null' can't be assigned to a variable of type 'StructA' because 'StructA' is not nullable. +// pkg/front_end/testcases/extensions/on_type_variable_inference.dart:53:28: Error: A value of type 'Null' can't be assigned to a variable of type 'StructA'. // - 'StructA' is from 'pkg/front_end/testcases/extensions/on_type_variable_inference.dart'. // new StructA().property = null; // error // ^ // -// pkg/front_end/testcases/extensions/on_type_variable_inference.dart:54:28: Error: The value 'null' can't be assigned to a variable of type 'StructB' because 'StructB' is not nullable. +// pkg/front_end/testcases/extensions/on_type_variable_inference.dart:54:28: Error: A value of type 'Null' can't be assigned to a variable of type 'StructB'. // - 'StructB' is from 'pkg/front_end/testcases/extensions/on_type_variable_inference.dart'. // new StructB().property = null; // error // ^ @@ -149,15 +149,15 @@ static method errors() → dynamic { - 'StructB' is from 'pkg/front_end/testcases/extensions/on_type_variable_inference.dart'. structB.property = struct.property; // error ^" in self::Extension|get#property(struct) as{TypeError} self::StructB?); - self::Extension|set#property(new self::Struct::•(), invalid-expression "pkg/front_end/testcases/extensions/on_type_variable_inference.dart:52:27: Error: The value 'null' can't be assigned to a variable of type 'Struct' because 'Struct' is not nullable. + self::Extension|set#property(new self::Struct::•(), invalid-expression "pkg/front_end/testcases/extensions/on_type_variable_inference.dart:52:27: Error: A value of type 'Null' can't be assigned to a variable of type 'Struct'. - 'Struct' is from 'pkg/front_end/testcases/extensions/on_type_variable_inference.dart'. new Struct().property = null; // error ^" in null as{TypeError} self::Struct); - self::Extension|set#property(new self::StructA::•(), invalid-expression "pkg/front_end/testcases/extensions/on_type_variable_inference.dart:53:28: Error: The value 'null' can't be assigned to a variable of type 'StructA' because 'StructA' is not nullable. + self::Extension|set#property(new self::StructA::•(), invalid-expression "pkg/front_end/testcases/extensions/on_type_variable_inference.dart:53:28: Error: A value of type 'Null' can't be assigned to a variable of type 'StructA'. - 'StructA' is from 'pkg/front_end/testcases/extensions/on_type_variable_inference.dart'. new StructA().property = null; // error ^" in null as{TypeError} self::StructA); - self::Extension|set#property(new self::StructB::•(), invalid-expression "pkg/front_end/testcases/extensions/on_type_variable_inference.dart:54:28: Error: The value 'null' can't be assigned to a variable of type 'StructB' because 'StructB' is not nullable. + self::Extension|set#property(new self::StructB::•(), invalid-expression "pkg/front_end/testcases/extensions/on_type_variable_inference.dart:54:28: Error: A value of type 'Null' can't be assigned to a variable of type 'StructB'. - 'StructB' is from 'pkg/front_end/testcases/extensions/on_type_variable_inference.dart'. new StructB().property = null; // error ^" in null as{TypeError} self::StructB); diff --git a/pkg/front_end/testcases/extensions/on_type_variable_inference.dart.strong.transformed.expect b/pkg/front_end/testcases/extensions/on_type_variable_inference.dart.strong.transformed.expect index 6126d6f6ef4..2aca235ad37 100644 --- a/pkg/front_end/testcases/extensions/on_type_variable_inference.dart.strong.transformed.expect +++ b/pkg/front_end/testcases/extensions/on_type_variable_inference.dart.strong.transformed.expect @@ -14,17 +14,17 @@ library; // structB.property = struct.property; // error // ^ // -// pkg/front_end/testcases/extensions/on_type_variable_inference.dart:52:27: Error: The value 'null' can't be assigned to a variable of type 'Struct' because 'Struct' is not nullable. +// pkg/front_end/testcases/extensions/on_type_variable_inference.dart:52:27: Error: A value of type 'Null' can't be assigned to a variable of type 'Struct'. // - 'Struct' is from 'pkg/front_end/testcases/extensions/on_type_variable_inference.dart'. // new Struct().property = null; // error // ^ // -// pkg/front_end/testcases/extensions/on_type_variable_inference.dart:53:28: Error: The value 'null' can't be assigned to a variable of type 'StructA' because 'StructA' is not nullable. +// pkg/front_end/testcases/extensions/on_type_variable_inference.dart:53:28: Error: A value of type 'Null' can't be assigned to a variable of type 'StructA'. // - 'StructA' is from 'pkg/front_end/testcases/extensions/on_type_variable_inference.dart'. // new StructA().property = null; // error // ^ // -// pkg/front_end/testcases/extensions/on_type_variable_inference.dart:54:28: Error: The value 'null' can't be assigned to a variable of type 'StructB' because 'StructB' is not nullable. +// pkg/front_end/testcases/extensions/on_type_variable_inference.dart:54:28: Error: A value of type 'Null' can't be assigned to a variable of type 'StructB'. // - 'StructB' is from 'pkg/front_end/testcases/extensions/on_type_variable_inference.dart'. // new StructB().property = null; // error // ^ @@ -149,15 +149,15 @@ static method errors() → dynamic { - 'StructB' is from 'pkg/front_end/testcases/extensions/on_type_variable_inference.dart'. structB.property = struct.property; // error ^" in self::Extension|get#property(struct) as{TypeError} self::StructB?); - self::Extension|set#property(new self::Struct::•(), invalid-expression "pkg/front_end/testcases/extensions/on_type_variable_inference.dart:52:27: Error: The value 'null' can't be assigned to a variable of type 'Struct' because 'Struct' is not nullable. + self::Extension|set#property(new self::Struct::•(), invalid-expression "pkg/front_end/testcases/extensions/on_type_variable_inference.dart:52:27: Error: A value of type 'Null' can't be assigned to a variable of type 'Struct'. - 'Struct' is from 'pkg/front_end/testcases/extensions/on_type_variable_inference.dart'. new Struct().property = null; // error ^" in let Null #t1 = null in #t1 == null ?{self::Struct} #t1 as{TypeError} self::Struct : #t1{self::Struct}); - self::Extension|set#property(new self::StructA::•(), invalid-expression "pkg/front_end/testcases/extensions/on_type_variable_inference.dart:53:28: Error: The value 'null' can't be assigned to a variable of type 'StructA' because 'StructA' is not nullable. + self::Extension|set#property(new self::StructA::•(), invalid-expression "pkg/front_end/testcases/extensions/on_type_variable_inference.dart:53:28: Error: A value of type 'Null' can't be assigned to a variable of type 'StructA'. - 'StructA' is from 'pkg/front_end/testcases/extensions/on_type_variable_inference.dart'. new StructA().property = null; // error ^" in let Null #t2 = null in #t2 == null ?{self::StructA} #t2 as{TypeError} self::StructA : #t2{self::StructA}); - self::Extension|set#property(new self::StructB::•(), invalid-expression "pkg/front_end/testcases/extensions/on_type_variable_inference.dart:54:28: Error: The value 'null' can't be assigned to a variable of type 'StructB' because 'StructB' is not nullable. + self::Extension|set#property(new self::StructB::•(), invalid-expression "pkg/front_end/testcases/extensions/on_type_variable_inference.dart:54:28: Error: A value of type 'Null' can't be assigned to a variable of type 'StructB'. - 'StructB' is from 'pkg/front_end/testcases/extensions/on_type_variable_inference.dart'. new StructB().property = null; // error ^" in let Null #t3 = null in #t3 == null ?{self::StructB} #t3 as{TypeError} self::StructB : #t3{self::StructB}); diff --git a/pkg/front_end/testcases/general/abstract_members.dart.strong.expect b/pkg/front_end/testcases/general/abstract_members.dart.strong.expect index ca898c074e0..270be17e04c 100644 --- a/pkg/front_end/testcases/general/abstract_members.dart.strong.expect +++ b/pkg/front_end/testcases/general/abstract_members.dart.strong.expect @@ -182,12 +182,12 @@ library; // Object foo() {} // ^^^ // -// pkg/front_end/testcases/general/abstract_members.dart:79:21: Error: The value 'null' can't be returned from a function with return type 'Object' because 'Object' is not nullable. +// pkg/front_end/testcases/general/abstract_members.dart:79:21: Error: A value of type 'Null' can't be returned from a function with return type 'Object'. // - 'Object' is from 'dart:core'. // Object get foo => null; // ^ // -// pkg/front_end/testcases/general/abstract_members.dart:87:21: Error: The value 'null' can't be returned from a function with return type 'Object' because 'Object' is not nullable. +// pkg/front_end/testcases/general/abstract_members.dart:87:21: Error: A value of type 'Null' can't be returned from a function with return type 'Object'. // - 'Object' is from 'dart:core'. // Object get foo => null; // ^ @@ -315,7 +315,7 @@ class G extends core::Object { : super core::Object::•() ; get foo() → core::Object - return invalid-expression "pkg/front_end/testcases/general/abstract_members.dart:79:21: Error: The value 'null' can't be returned from a function with return type 'Object' because 'Object' is not nullable. + return invalid-expression "pkg/front_end/testcases/general/abstract_members.dart:79:21: Error: A value of type 'Null' can't be returned from a function with return type 'Object'. - 'Object' is from 'dart:core'. Object get foo => null; ^" in null as{TypeError} core::Object; @@ -330,7 +330,7 @@ class Bar extends core::Object { : super core::Object::•() ; get foo() → core::Object - return invalid-expression "pkg/front_end/testcases/general/abstract_members.dart:87:21: Error: The value 'null' can't be returned from a function with return type 'Object' because 'Object' is not nullable. + return invalid-expression "pkg/front_end/testcases/general/abstract_members.dart:87:21: Error: A value of type 'Null' can't be returned from a function with return type 'Object'. - 'Object' is from 'dart:core'. Object get foo => null; ^" in null as{TypeError} core::Object; diff --git a/pkg/front_end/testcases/general/abstract_members.dart.strong.modular.expect b/pkg/front_end/testcases/general/abstract_members.dart.strong.modular.expect index ca898c074e0..270be17e04c 100644 --- a/pkg/front_end/testcases/general/abstract_members.dart.strong.modular.expect +++ b/pkg/front_end/testcases/general/abstract_members.dart.strong.modular.expect @@ -182,12 +182,12 @@ library; // Object foo() {} // ^^^ // -// pkg/front_end/testcases/general/abstract_members.dart:79:21: Error: The value 'null' can't be returned from a function with return type 'Object' because 'Object' is not nullable. +// pkg/front_end/testcases/general/abstract_members.dart:79:21: Error: A value of type 'Null' can't be returned from a function with return type 'Object'. // - 'Object' is from 'dart:core'. // Object get foo => null; // ^ // -// pkg/front_end/testcases/general/abstract_members.dart:87:21: Error: The value 'null' can't be returned from a function with return type 'Object' because 'Object' is not nullable. +// pkg/front_end/testcases/general/abstract_members.dart:87:21: Error: A value of type 'Null' can't be returned from a function with return type 'Object'. // - 'Object' is from 'dart:core'. // Object get foo => null; // ^ @@ -315,7 +315,7 @@ class G extends core::Object { : super core::Object::•() ; get foo() → core::Object - return invalid-expression "pkg/front_end/testcases/general/abstract_members.dart:79:21: Error: The value 'null' can't be returned from a function with return type 'Object' because 'Object' is not nullable. + return invalid-expression "pkg/front_end/testcases/general/abstract_members.dart:79:21: Error: A value of type 'Null' can't be returned from a function with return type 'Object'. - 'Object' is from 'dart:core'. Object get foo => null; ^" in null as{TypeError} core::Object; @@ -330,7 +330,7 @@ class Bar extends core::Object { : super core::Object::•() ; get foo() → core::Object - return invalid-expression "pkg/front_end/testcases/general/abstract_members.dart:87:21: Error: The value 'null' can't be returned from a function with return type 'Object' because 'Object' is not nullable. + return invalid-expression "pkg/front_end/testcases/general/abstract_members.dart:87:21: Error: A value of type 'Null' can't be returned from a function with return type 'Object'. - 'Object' is from 'dart:core'. Object get foo => null; ^" in null as{TypeError} core::Object; diff --git a/pkg/front_end/testcases/general/circularity-via-initializing-formal.dart.strong.expect b/pkg/front_end/testcases/general/circularity-via-initializing-formal.dart.strong.expect index dcc50db1cb0..2e885a68486 100644 --- a/pkg/front_end/testcases/general/circularity-via-initializing-formal.dart.strong.expect +++ b/pkg/front_end/testcases/general/circularity-via-initializing-formal.dart.strong.expect @@ -7,12 +7,12 @@ library; // C._circular(this.f); // ^^^^^^^^^^^ // -// pkg/front_end/testcases/general/circularity-via-initializing-formal.dart:11:25: Error: The value 'null' can't be assigned to the parameter type 'C' because 'C' is not nullable. +// pkg/front_end/testcases/general/circularity-via-initializing-formal.dart:11:25: Error: The argument type 'Null' can't be assigned to the parameter type 'C'. // - 'C' is from 'pkg/front_end/testcases/general/circularity-via-initializing-formal.dart'. // var x = new C._circular(null); // ^ // -// pkg/front_end/testcases/general/circularity-via-initializing-formal.dart:14:27: Error: The value 'null' can't be assigned to the parameter type 'C' because 'C' is not nullable. +// pkg/front_end/testcases/general/circularity-via-initializing-formal.dart:14:27: Error: The argument type 'Null' can't be assigned to the parameter type 'C'. // - 'C' is from 'pkg/front_end/testcases/general/circularity-via-initializing-formal.dart'. // var f = new C._circular(null); // ^ @@ -21,7 +21,7 @@ import self as self; import "dart:core" as core; class C extends core::Object { - field self::C f = new self::C::_circular(invalid-expression "pkg/front_end/testcases/general/circularity-via-initializing-formal.dart:14:27: Error: The value 'null' can't be assigned to the parameter type 'C' because 'C' is not nullable. + field self::C f = new self::C::_circular(invalid-expression "pkg/front_end/testcases/general/circularity-via-initializing-formal.dart:14:27: Error: The argument type 'Null' can't be assigned to the parameter type 'C'. - 'C' is from 'pkg/front_end/testcases/general/circularity-via-initializing-formal.dart'. var f = new C._circular(null); ^" in null as{TypeError} self::C); @@ -29,7 +29,7 @@ class C extends core::Object { : self::C::f = f, super core::Object::•() ; } -static field self::C x = new self::C::_circular(invalid-expression "pkg/front_end/testcases/general/circularity-via-initializing-formal.dart:11:25: Error: The value 'null' can't be assigned to the parameter type 'C' because 'C' is not nullable. +static field self::C x = new self::C::_circular(invalid-expression "pkg/front_end/testcases/general/circularity-via-initializing-formal.dart:11:25: Error: The argument type 'Null' can't be assigned to the parameter type 'C'. - 'C' is from 'pkg/front_end/testcases/general/circularity-via-initializing-formal.dart'. var x = new C._circular(null); ^" in null as{TypeError} self::C); diff --git a/pkg/front_end/testcases/general/circularity-via-initializing-formal.dart.strong.modular.expect b/pkg/front_end/testcases/general/circularity-via-initializing-formal.dart.strong.modular.expect index dcc50db1cb0..2e885a68486 100644 --- a/pkg/front_end/testcases/general/circularity-via-initializing-formal.dart.strong.modular.expect +++ b/pkg/front_end/testcases/general/circularity-via-initializing-formal.dart.strong.modular.expect @@ -7,12 +7,12 @@ library; // C._circular(this.f); // ^^^^^^^^^^^ // -// pkg/front_end/testcases/general/circularity-via-initializing-formal.dart:11:25: Error: The value 'null' can't be assigned to the parameter type 'C' because 'C' is not nullable. +// pkg/front_end/testcases/general/circularity-via-initializing-formal.dart:11:25: Error: The argument type 'Null' can't be assigned to the parameter type 'C'. // - 'C' is from 'pkg/front_end/testcases/general/circularity-via-initializing-formal.dart'. // var x = new C._circular(null); // ^ // -// pkg/front_end/testcases/general/circularity-via-initializing-formal.dart:14:27: Error: The value 'null' can't be assigned to the parameter type 'C' because 'C' is not nullable. +// pkg/front_end/testcases/general/circularity-via-initializing-formal.dart:14:27: Error: The argument type 'Null' can't be assigned to the parameter type 'C'. // - 'C' is from 'pkg/front_end/testcases/general/circularity-via-initializing-formal.dart'. // var f = new C._circular(null); // ^ @@ -21,7 +21,7 @@ import self as self; import "dart:core" as core; class C extends core::Object { - field self::C f = new self::C::_circular(invalid-expression "pkg/front_end/testcases/general/circularity-via-initializing-formal.dart:14:27: Error: The value 'null' can't be assigned to the parameter type 'C' because 'C' is not nullable. + field self::C f = new self::C::_circular(invalid-expression "pkg/front_end/testcases/general/circularity-via-initializing-formal.dart:14:27: Error: The argument type 'Null' can't be assigned to the parameter type 'C'. - 'C' is from 'pkg/front_end/testcases/general/circularity-via-initializing-formal.dart'. var f = new C._circular(null); ^" in null as{TypeError} self::C); @@ -29,7 +29,7 @@ class C extends core::Object { : self::C::f = f, super core::Object::•() ; } -static field self::C x = new self::C::_circular(invalid-expression "pkg/front_end/testcases/general/circularity-via-initializing-formal.dart:11:25: Error: The value 'null' can't be assigned to the parameter type 'C' because 'C' is not nullable. +static field self::C x = new self::C::_circular(invalid-expression "pkg/front_end/testcases/general/circularity-via-initializing-formal.dart:11:25: Error: The argument type 'Null' can't be assigned to the parameter type 'C'. - 'C' is from 'pkg/front_end/testcases/general/circularity-via-initializing-formal.dart'. var x = new C._circular(null); ^" in null as{TypeError} self::C); diff --git a/pkg/front_end/testcases/general/circularity-via-initializing-formal.dart.strong.outline.expect b/pkg/front_end/testcases/general/circularity-via-initializing-formal.dart.strong.outline.expect index 6e5f112e56f..4bf63645e06 100644 --- a/pkg/front_end/testcases/general/circularity-via-initializing-formal.dart.strong.outline.expect +++ b/pkg/front_end/testcases/general/circularity-via-initializing-formal.dart.strong.outline.expect @@ -7,7 +7,7 @@ library; // C._circular(this.f); // ^^^^^^^^^^^ // -// pkg/front_end/testcases/general/circularity-via-initializing-formal.dart:11:25: Error: The value 'null' can't be assigned to the parameter type 'C' because 'C' is not nullable. +// pkg/front_end/testcases/general/circularity-via-initializing-formal.dart:11:25: Error: The argument type 'Null' can't be assigned to the parameter type 'C'. // - 'C' is from 'pkg/front_end/testcases/general/circularity-via-initializing-formal.dart'. // var x = new C._circular(null); // ^ diff --git a/pkg/front_end/testcases/general/circularity-via-initializing-formal.dart.strong.transformed.expect b/pkg/front_end/testcases/general/circularity-via-initializing-formal.dart.strong.transformed.expect index 30dca0aee62..03815f70f39 100644 --- a/pkg/front_end/testcases/general/circularity-via-initializing-formal.dart.strong.transformed.expect +++ b/pkg/front_end/testcases/general/circularity-via-initializing-formal.dart.strong.transformed.expect @@ -7,12 +7,12 @@ library; // C._circular(this.f); // ^^^^^^^^^^^ // -// pkg/front_end/testcases/general/circularity-via-initializing-formal.dart:11:25: Error: The value 'null' can't be assigned to the parameter type 'C' because 'C' is not nullable. +// pkg/front_end/testcases/general/circularity-via-initializing-formal.dart:11:25: Error: The argument type 'Null' can't be assigned to the parameter type 'C'. // - 'C' is from 'pkg/front_end/testcases/general/circularity-via-initializing-formal.dart'. // var x = new C._circular(null); // ^ // -// pkg/front_end/testcases/general/circularity-via-initializing-formal.dart:14:27: Error: The value 'null' can't be assigned to the parameter type 'C' because 'C' is not nullable. +// pkg/front_end/testcases/general/circularity-via-initializing-formal.dart:14:27: Error: The argument type 'Null' can't be assigned to the parameter type 'C'. // - 'C' is from 'pkg/front_end/testcases/general/circularity-via-initializing-formal.dart'. // var f = new C._circular(null); // ^ @@ -21,7 +21,7 @@ import self as self; import "dart:core" as core; class C extends core::Object { - field self::C f = new self::C::_circular(invalid-expression "pkg/front_end/testcases/general/circularity-via-initializing-formal.dart:14:27: Error: The value 'null' can't be assigned to the parameter type 'C' because 'C' is not nullable. + field self::C f = new self::C::_circular(invalid-expression "pkg/front_end/testcases/general/circularity-via-initializing-formal.dart:14:27: Error: The argument type 'Null' can't be assigned to the parameter type 'C'. - 'C' is from 'pkg/front_end/testcases/general/circularity-via-initializing-formal.dart'. var f = new C._circular(null); ^" in let Null #t1 = null in #t1 == null ?{self::C} #t1 as{TypeError} self::C : #t1{self::C}); @@ -29,7 +29,7 @@ class C extends core::Object { : self::C::f = f, super core::Object::•() ; } -static field self::C x = new self::C::_circular(invalid-expression "pkg/front_end/testcases/general/circularity-via-initializing-formal.dart:11:25: Error: The value 'null' can't be assigned to the parameter type 'C' because 'C' is not nullable. +static field self::C x = new self::C::_circular(invalid-expression "pkg/front_end/testcases/general/circularity-via-initializing-formal.dart:11:25: Error: The argument type 'Null' can't be assigned to the parameter type 'C'. - 'C' is from 'pkg/front_end/testcases/general/circularity-via-initializing-formal.dart'. var x = new C._circular(null); ^" in let Null #t2 = null in #t2 == null ?{self::C} #t2 as{TypeError} self::C : #t2{self::C}); diff --git a/pkg/front_end/testcases/general/constants/various.dart.strong.expect b/pkg/front_end/testcases/general/constants/various.dart.strong.expect index 7d906627051..cf122e1dbb1 100644 --- a/pkg/front_end/testcases/general/constants/various.dart.strong.expect +++ b/pkg/front_end/testcases/general/constants/various.dart.strong.expect @@ -47,19 +47,19 @@ library; // final z1 = y; // ^ // -// pkg/front_end/testcases/general/constants/various.dart:9:49: Error: The value 'null' can't be assigned to the parameter type 'bool' because 'bool' is not nullable. +// pkg/front_end/testcases/general/constants/various.dart:9:49: Error: The argument type 'Null' can't be assigned to the parameter type 'bool'. // const bool.fromEnvironment("bar", defaultValue: null); // ^ // -// pkg/front_end/testcases/general/constants/various.dart:25:51: Error: The value 'null' can't be assigned to the parameter type 'String' because 'String' is not nullable. +// pkg/front_end/testcases/general/constants/various.dart:25:51: Error: The argument type 'Null' can't be assigned to the parameter type 'String'. // const String.fromEnvironment("bar", defaultValue: null); // ^ // -// pkg/front_end/testcases/general/constants/various.dart:33:49: Error: The value 'null' can't be assigned to the parameter type 'bool' because 'bool' is not nullable. +// pkg/front_end/testcases/general/constants/various.dart:33:49: Error: The argument type 'Null' can't be assigned to the parameter type 'bool'. // const bool.fromEnvironment("bar", defaultValue: null); // ^ // -// pkg/front_end/testcases/general/constants/various.dart:40:48: Error: The value 'null' can't be assigned to the parameter type 'int' because 'int' is not nullable. +// pkg/front_end/testcases/general/constants/various.dart:40:48: Error: The argument type 'Null' can't be assigned to the parameter type 'int'. // const int.fromEnvironment("bar", defaultValue: null); // ^ // @@ -288,65 +288,65 @@ class ConstClassWithFinalFields2 extends core::Object /*hasConstConstructor*/ { } static const field core::bool barFromEnv = #C1; static const field core::bool hasBarEnv = #C1; -static const field core::bool barFromEnvOrNull = invalid-expression "pkg/front_end/testcases/general/constants/various.dart:9:49: Error: The value 'null' can't be assigned to the parameter type 'bool' because 'bool' is not nullable. +static const field core::bool barFromEnvOrNull = invalid-expression "pkg/front_end/testcases/general/constants/various.dart:9:49: Error: The argument type 'Null' can't be assigned to the parameter type 'bool'. const bool.fromEnvironment(\"bar\", defaultValue: null); ^"; -static const field core::bool notBarFromEnvOrNull = invalid-expression "pkg/front_end/testcases/general/constants/various.dart:9:49: Error: The value 'null' can't be assigned to the parameter type 'bool' because 'bool' is not nullable. +static const field core::bool notBarFromEnvOrNull = invalid-expression "pkg/front_end/testcases/general/constants/various.dart:9:49: Error: The argument type 'Null' can't be assigned to the parameter type 'bool'. const bool.fromEnvironment(\"bar\", defaultValue: null); ^"; -static const field core::bool conditionalOnNull = invalid-expression "pkg/front_end/testcases/general/constants/various.dart:9:49: Error: The value 'null' can't be assigned to the parameter type 'bool' because 'bool' is not nullable. +static const field core::bool conditionalOnNull = invalid-expression "pkg/front_end/testcases/general/constants/various.dart:9:49: Error: The argument type 'Null' can't be assigned to the parameter type 'bool'. const bool.fromEnvironment(\"bar\", defaultValue: null); ^"; -static const field core::bool nullAwareOnNullTrue = invalid-expression "pkg/front_end/testcases/general/constants/various.dart:9:49: Error: The value 'null' can't be assigned to the parameter type 'bool' because 'bool' is not nullable. +static const field core::bool nullAwareOnNullTrue = invalid-expression "pkg/front_end/testcases/general/constants/various.dart:9:49: Error: The argument type 'Null' can't be assigned to the parameter type 'bool'. const bool.fromEnvironment(\"bar\", defaultValue: null); ^"; -static const field core::bool nullAwareOnNullFalse = invalid-expression "pkg/front_end/testcases/general/constants/various.dart:9:49: Error: The value 'null' can't be assigned to the parameter type 'bool' because 'bool' is not nullable. +static const field core::bool nullAwareOnNullFalse = invalid-expression "pkg/front_end/testcases/general/constants/various.dart:9:49: Error: The argument type 'Null' can't be assigned to the parameter type 'bool'. const bool.fromEnvironment(\"bar\", defaultValue: null); ^"; -static const field core::bool andOnFalse = invalid-expression "pkg/front_end/testcases/general/constants/various.dart:9:49: Error: The value 'null' can't be assigned to the parameter type 'bool' because 'bool' is not nullable. +static const field core::bool andOnFalse = invalid-expression "pkg/front_end/testcases/general/constants/various.dart:9:49: Error: The argument type 'Null' can't be assigned to the parameter type 'bool'. const bool.fromEnvironment(\"bar\", defaultValue: null); ^"; -static const field core::bool andOnFalse2 = invalid-expression "pkg/front_end/testcases/general/constants/various.dart:9:49: Error: The value 'null' can't be assigned to the parameter type 'bool' because 'bool' is not nullable. +static const field core::bool andOnFalse2 = invalid-expression "pkg/front_end/testcases/general/constants/various.dart:9:49: Error: The argument type 'Null' can't be assigned to the parameter type 'bool'. const bool.fromEnvironment(\"bar\", defaultValue: null); ^"; -static const field core::bool andOnNull = invalid-expression "pkg/front_end/testcases/general/constants/various.dart:9:49: Error: The value 'null' can't be assigned to the parameter type 'bool' because 'bool' is not nullable. +static const field core::bool andOnNull = invalid-expression "pkg/front_end/testcases/general/constants/various.dart:9:49: Error: The argument type 'Null' can't be assigned to the parameter type 'bool'. const bool.fromEnvironment(\"bar\", defaultValue: null); ^"; -static const field core::bool andOnNull2 = invalid-expression "pkg/front_end/testcases/general/constants/various.dart:9:49: Error: The value 'null' can't be assigned to the parameter type 'bool' because 'bool' is not nullable. +static const field core::bool andOnNull2 = invalid-expression "pkg/front_end/testcases/general/constants/various.dart:9:49: Error: The argument type 'Null' can't be assigned to the parameter type 'bool'. const bool.fromEnvironment(\"bar\", defaultValue: null); ^"; -static const field core::bool orOnNull = invalid-expression "pkg/front_end/testcases/general/constants/various.dart:9:49: Error: The value 'null' can't be assigned to the parameter type 'bool' because 'bool' is not nullable. +static const field core::bool orOnNull = invalid-expression "pkg/front_end/testcases/general/constants/various.dart:9:49: Error: The argument type 'Null' can't be assigned to the parameter type 'bool'. const bool.fromEnvironment(\"bar\", defaultValue: null); ^"; -static const field core::bool orOnNull2 = invalid-expression "pkg/front_end/testcases/general/constants/various.dart:9:49: Error: The value 'null' can't be assigned to the parameter type 'bool' because 'bool' is not nullable. +static const field core::bool orOnNull2 = invalid-expression "pkg/front_end/testcases/general/constants/various.dart:9:49: Error: The argument type 'Null' can't be assigned to the parameter type 'bool'. const bool.fromEnvironment(\"bar\", defaultValue: null); ^"; static const field core::bool orOnNull3 = #C2; -static const field core::bool orOnNull4 = invalid-expression "pkg/front_end/testcases/general/constants/various.dart:9:49: Error: The value 'null' can't be assigned to the parameter type 'bool' because 'bool' is not nullable. +static const field core::bool orOnNull4 = invalid-expression "pkg/front_end/testcases/general/constants/various.dart:9:49: Error: The argument type 'Null' can't be assigned to the parameter type 'bool'. const bool.fromEnvironment(\"bar\", defaultValue: null); ^"; static const field core::String barFromEnvString = #C3; -static const field core::String barFromEnvOrNullString = invalid-expression "pkg/front_end/testcases/general/constants/various.dart:25:51: Error: The value 'null' can't be assigned to the parameter type 'String' because 'String' is not nullable. +static const field core::String barFromEnvOrNullString = invalid-expression "pkg/front_end/testcases/general/constants/various.dart:25:51: Error: The argument type 'Null' can't be assigned to the parameter type 'String'. const String.fromEnvironment(\"bar\", defaultValue: null); ^"; static const field core::String barFromEnvOrActualString = #C4; -static const field core::String nullFromEnvString = invalid-expression "pkg/front_end/testcases/general/constants/various.dart:25:51: Error: The value 'null' can't be assigned to the parameter type 'String' because 'String' is not nullable. +static const field core::String nullFromEnvString = invalid-expression "pkg/front_end/testcases/general/constants/various.dart:25:51: Error: The argument type 'Null' can't be assigned to the parameter type 'String'. const String.fromEnvironment(\"bar\", defaultValue: null); ^"; static const field core::bool barFromEnvBool = #C1; -static const field core::bool barFromEnvOrNullBool = invalid-expression "pkg/front_end/testcases/general/constants/various.dart:33:49: Error: The value 'null' can't be assigned to the parameter type 'bool' because 'bool' is not nullable. +static const field core::bool barFromEnvOrNullBool = invalid-expression "pkg/front_end/testcases/general/constants/various.dart:33:49: Error: The argument type 'Null' can't be assigned to the parameter type 'bool'. const bool.fromEnvironment(\"bar\", defaultValue: null); ^"; static const field core::bool barFromEnvOrActualBool = #C2; -static const field core::bool nullFromEnvBool = invalid-expression "pkg/front_end/testcases/general/constants/various.dart:25:51: Error: The value 'null' can't be assigned to the parameter type 'String' because 'String' is not nullable. +static const field core::bool nullFromEnvBool = invalid-expression "pkg/front_end/testcases/general/constants/various.dart:25:51: Error: The argument type 'Null' can't be assigned to the parameter type 'String'. const String.fromEnvironment(\"bar\", defaultValue: null); ^"; static const field core::int barFromEnvInt = #C5; -static const field core::int barFromEnvOrNullInt = invalid-expression "pkg/front_end/testcases/general/constants/various.dart:40:48: Error: The value 'null' can't be assigned to the parameter type 'int' because 'int' is not nullable. +static const field core::int barFromEnvOrNullInt = invalid-expression "pkg/front_end/testcases/general/constants/various.dart:40:48: Error: The argument type 'Null' can't be assigned to the parameter type 'int'. const int.fromEnvironment(\"bar\", defaultValue: null); ^"; static const field core::int barFromEnvOrActualInt = #C6; -static const field core::int nullFromEnvInt = invalid-expression "pkg/front_end/testcases/general/constants/various.dart:25:51: Error: The value 'null' can't be assigned to the parameter type 'String' because 'String' is not nullable. +static const field core::int nullFromEnvInt = invalid-expression "pkg/front_end/testcases/general/constants/various.dart:25:51: Error: The argument type 'Null' can't be assigned to the parameter type 'String'. const String.fromEnvironment(\"bar\", defaultValue: null); ^"; static const field core::bool bazFromEnv = #C1; diff --git a/pkg/front_end/testcases/general/constants/various.dart.strong.modular.expect b/pkg/front_end/testcases/general/constants/various.dart.strong.modular.expect index 7d906627051..cf122e1dbb1 100644 --- a/pkg/front_end/testcases/general/constants/various.dart.strong.modular.expect +++ b/pkg/front_end/testcases/general/constants/various.dart.strong.modular.expect @@ -47,19 +47,19 @@ library; // final z1 = y; // ^ // -// pkg/front_end/testcases/general/constants/various.dart:9:49: Error: The value 'null' can't be assigned to the parameter type 'bool' because 'bool' is not nullable. +// pkg/front_end/testcases/general/constants/various.dart:9:49: Error: The argument type 'Null' can't be assigned to the parameter type 'bool'. // const bool.fromEnvironment("bar", defaultValue: null); // ^ // -// pkg/front_end/testcases/general/constants/various.dart:25:51: Error: The value 'null' can't be assigned to the parameter type 'String' because 'String' is not nullable. +// pkg/front_end/testcases/general/constants/various.dart:25:51: Error: The argument type 'Null' can't be assigned to the parameter type 'String'. // const String.fromEnvironment("bar", defaultValue: null); // ^ // -// pkg/front_end/testcases/general/constants/various.dart:33:49: Error: The value 'null' can't be assigned to the parameter type 'bool' because 'bool' is not nullable. +// pkg/front_end/testcases/general/constants/various.dart:33:49: Error: The argument type 'Null' can't be assigned to the parameter type 'bool'. // const bool.fromEnvironment("bar", defaultValue: null); // ^ // -// pkg/front_end/testcases/general/constants/various.dart:40:48: Error: The value 'null' can't be assigned to the parameter type 'int' because 'int' is not nullable. +// pkg/front_end/testcases/general/constants/various.dart:40:48: Error: The argument type 'Null' can't be assigned to the parameter type 'int'. // const int.fromEnvironment("bar", defaultValue: null); // ^ // @@ -288,65 +288,65 @@ class ConstClassWithFinalFields2 extends core::Object /*hasConstConstructor*/ { } static const field core::bool barFromEnv = #C1; static const field core::bool hasBarEnv = #C1; -static const field core::bool barFromEnvOrNull = invalid-expression "pkg/front_end/testcases/general/constants/various.dart:9:49: Error: The value 'null' can't be assigned to the parameter type 'bool' because 'bool' is not nullable. +static const field core::bool barFromEnvOrNull = invalid-expression "pkg/front_end/testcases/general/constants/various.dart:9:49: Error: The argument type 'Null' can't be assigned to the parameter type 'bool'. const bool.fromEnvironment(\"bar\", defaultValue: null); ^"; -static const field core::bool notBarFromEnvOrNull = invalid-expression "pkg/front_end/testcases/general/constants/various.dart:9:49: Error: The value 'null' can't be assigned to the parameter type 'bool' because 'bool' is not nullable. +static const field core::bool notBarFromEnvOrNull = invalid-expression "pkg/front_end/testcases/general/constants/various.dart:9:49: Error: The argument type 'Null' can't be assigned to the parameter type 'bool'. const bool.fromEnvironment(\"bar\", defaultValue: null); ^"; -static const field core::bool conditionalOnNull = invalid-expression "pkg/front_end/testcases/general/constants/various.dart:9:49: Error: The value 'null' can't be assigned to the parameter type 'bool' because 'bool' is not nullable. +static const field core::bool conditionalOnNull = invalid-expression "pkg/front_end/testcases/general/constants/various.dart:9:49: Error: The argument type 'Null' can't be assigned to the parameter type 'bool'. const bool.fromEnvironment(\"bar\", defaultValue: null); ^"; -static const field core::bool nullAwareOnNullTrue = invalid-expression "pkg/front_end/testcases/general/constants/various.dart:9:49: Error: The value 'null' can't be assigned to the parameter type 'bool' because 'bool' is not nullable. +static const field core::bool nullAwareOnNullTrue = invalid-expression "pkg/front_end/testcases/general/constants/various.dart:9:49: Error: The argument type 'Null' can't be assigned to the parameter type 'bool'. const bool.fromEnvironment(\"bar\", defaultValue: null); ^"; -static const field core::bool nullAwareOnNullFalse = invalid-expression "pkg/front_end/testcases/general/constants/various.dart:9:49: Error: The value 'null' can't be assigned to the parameter type 'bool' because 'bool' is not nullable. +static const field core::bool nullAwareOnNullFalse = invalid-expression "pkg/front_end/testcases/general/constants/various.dart:9:49: Error: The argument type 'Null' can't be assigned to the parameter type 'bool'. const bool.fromEnvironment(\"bar\", defaultValue: null); ^"; -static const field core::bool andOnFalse = invalid-expression "pkg/front_end/testcases/general/constants/various.dart:9:49: Error: The value 'null' can't be assigned to the parameter type 'bool' because 'bool' is not nullable. +static const field core::bool andOnFalse = invalid-expression "pkg/front_end/testcases/general/constants/various.dart:9:49: Error: The argument type 'Null' can't be assigned to the parameter type 'bool'. const bool.fromEnvironment(\"bar\", defaultValue: null); ^"; -static const field core::bool andOnFalse2 = invalid-expression "pkg/front_end/testcases/general/constants/various.dart:9:49: Error: The value 'null' can't be assigned to the parameter type 'bool' because 'bool' is not nullable. +static const field core::bool andOnFalse2 = invalid-expression "pkg/front_end/testcases/general/constants/various.dart:9:49: Error: The argument type 'Null' can't be assigned to the parameter type 'bool'. const bool.fromEnvironment(\"bar\", defaultValue: null); ^"; -static const field core::bool andOnNull = invalid-expression "pkg/front_end/testcases/general/constants/various.dart:9:49: Error: The value 'null' can't be assigned to the parameter type 'bool' because 'bool' is not nullable. +static const field core::bool andOnNull = invalid-expression "pkg/front_end/testcases/general/constants/various.dart:9:49: Error: The argument type 'Null' can't be assigned to the parameter type 'bool'. const bool.fromEnvironment(\"bar\", defaultValue: null); ^"; -static const field core::bool andOnNull2 = invalid-expression "pkg/front_end/testcases/general/constants/various.dart:9:49: Error: The value 'null' can't be assigned to the parameter type 'bool' because 'bool' is not nullable. +static const field core::bool andOnNull2 = invalid-expression "pkg/front_end/testcases/general/constants/various.dart:9:49: Error: The argument type 'Null' can't be assigned to the parameter type 'bool'. const bool.fromEnvironment(\"bar\", defaultValue: null); ^"; -static const field core::bool orOnNull = invalid-expression "pkg/front_end/testcases/general/constants/various.dart:9:49: Error: The value 'null' can't be assigned to the parameter type 'bool' because 'bool' is not nullable. +static const field core::bool orOnNull = invalid-expression "pkg/front_end/testcases/general/constants/various.dart:9:49: Error: The argument type 'Null' can't be assigned to the parameter type 'bool'. const bool.fromEnvironment(\"bar\", defaultValue: null); ^"; -static const field core::bool orOnNull2 = invalid-expression "pkg/front_end/testcases/general/constants/various.dart:9:49: Error: The value 'null' can't be assigned to the parameter type 'bool' because 'bool' is not nullable. +static const field core::bool orOnNull2 = invalid-expression "pkg/front_end/testcases/general/constants/various.dart:9:49: Error: The argument type 'Null' can't be assigned to the parameter type 'bool'. const bool.fromEnvironment(\"bar\", defaultValue: null); ^"; static const field core::bool orOnNull3 = #C2; -static const field core::bool orOnNull4 = invalid-expression "pkg/front_end/testcases/general/constants/various.dart:9:49: Error: The value 'null' can't be assigned to the parameter type 'bool' because 'bool' is not nullable. +static const field core::bool orOnNull4 = invalid-expression "pkg/front_end/testcases/general/constants/various.dart:9:49: Error: The argument type 'Null' can't be assigned to the parameter type 'bool'. const bool.fromEnvironment(\"bar\", defaultValue: null); ^"; static const field core::String barFromEnvString = #C3; -static const field core::String barFromEnvOrNullString = invalid-expression "pkg/front_end/testcases/general/constants/various.dart:25:51: Error: The value 'null' can't be assigned to the parameter type 'String' because 'String' is not nullable. +static const field core::String barFromEnvOrNullString = invalid-expression "pkg/front_end/testcases/general/constants/various.dart:25:51: Error: The argument type 'Null' can't be assigned to the parameter type 'String'. const String.fromEnvironment(\"bar\", defaultValue: null); ^"; static const field core::String barFromEnvOrActualString = #C4; -static const field core::String nullFromEnvString = invalid-expression "pkg/front_end/testcases/general/constants/various.dart:25:51: Error: The value 'null' can't be assigned to the parameter type 'String' because 'String' is not nullable. +static const field core::String nullFromEnvString = invalid-expression "pkg/front_end/testcases/general/constants/various.dart:25:51: Error: The argument type 'Null' can't be assigned to the parameter type 'String'. const String.fromEnvironment(\"bar\", defaultValue: null); ^"; static const field core::bool barFromEnvBool = #C1; -static const field core::bool barFromEnvOrNullBool = invalid-expression "pkg/front_end/testcases/general/constants/various.dart:33:49: Error: The value 'null' can't be assigned to the parameter type 'bool' because 'bool' is not nullable. +static const field core::bool barFromEnvOrNullBool = invalid-expression "pkg/front_end/testcases/general/constants/various.dart:33:49: Error: The argument type 'Null' can't be assigned to the parameter type 'bool'. const bool.fromEnvironment(\"bar\", defaultValue: null); ^"; static const field core::bool barFromEnvOrActualBool = #C2; -static const field core::bool nullFromEnvBool = invalid-expression "pkg/front_end/testcases/general/constants/various.dart:25:51: Error: The value 'null' can't be assigned to the parameter type 'String' because 'String' is not nullable. +static const field core::bool nullFromEnvBool = invalid-expression "pkg/front_end/testcases/general/constants/various.dart:25:51: Error: The argument type 'Null' can't be assigned to the parameter type 'String'. const String.fromEnvironment(\"bar\", defaultValue: null); ^"; static const field core::int barFromEnvInt = #C5; -static const field core::int barFromEnvOrNullInt = invalid-expression "pkg/front_end/testcases/general/constants/various.dart:40:48: Error: The value 'null' can't be assigned to the parameter type 'int' because 'int' is not nullable. +static const field core::int barFromEnvOrNullInt = invalid-expression "pkg/front_end/testcases/general/constants/various.dart:40:48: Error: The argument type 'Null' can't be assigned to the parameter type 'int'. const int.fromEnvironment(\"bar\", defaultValue: null); ^"; static const field core::int barFromEnvOrActualInt = #C6; -static const field core::int nullFromEnvInt = invalid-expression "pkg/front_end/testcases/general/constants/various.dart:25:51: Error: The value 'null' can't be assigned to the parameter type 'String' because 'String' is not nullable. +static const field core::int nullFromEnvInt = invalid-expression "pkg/front_end/testcases/general/constants/various.dart:25:51: Error: The argument type 'Null' can't be assigned to the parameter type 'String'. const String.fromEnvironment(\"bar\", defaultValue: null); ^"; static const field core::bool bazFromEnv = #C1; diff --git a/pkg/front_end/testcases/general/constants/various.dart.strong.outline.expect b/pkg/front_end/testcases/general/constants/various.dart.strong.outline.expect index b4cadaf7752..e944183a572 100644 --- a/pkg/front_end/testcases/general/constants/various.dart.strong.outline.expect +++ b/pkg/front_end/testcases/general/constants/various.dart.strong.outline.expect @@ -47,19 +47,19 @@ library; // final z1 = y; // ^ // -// pkg/front_end/testcases/general/constants/various.dart:9:49: Error: The value 'null' can't be assigned to the parameter type 'bool' because 'bool' is not nullable. +// pkg/front_end/testcases/general/constants/various.dart:9:49: Error: The argument type 'Null' can't be assigned to the parameter type 'bool'. // const bool.fromEnvironment("bar", defaultValue: null); // ^ // -// pkg/front_end/testcases/general/constants/various.dart:25:51: Error: The value 'null' can't be assigned to the parameter type 'String' because 'String' is not nullable. +// pkg/front_end/testcases/general/constants/various.dart:25:51: Error: The argument type 'Null' can't be assigned to the parameter type 'String'. // const String.fromEnvironment("bar", defaultValue: null); // ^ // -// pkg/front_end/testcases/general/constants/various.dart:33:49: Error: The value 'null' can't be assigned to the parameter type 'bool' because 'bool' is not nullable. +// pkg/front_end/testcases/general/constants/various.dart:33:49: Error: The argument type 'Null' can't be assigned to the parameter type 'bool'. // const bool.fromEnvironment("bar", defaultValue: null); // ^ // -// pkg/front_end/testcases/general/constants/various.dart:40:48: Error: The value 'null' can't be assigned to the parameter type 'int' because 'int' is not nullable. +// pkg/front_end/testcases/general/constants/various.dart:40:48: Error: The argument type 'Null' can't be assigned to the parameter type 'int'. // const int.fromEnvironment("bar", defaultValue: null); // ^ // @@ -172,7 +172,7 @@ class ConstClassWithFinalFields2 extends core::Object /*hasConstConstructor*/ { } static const field core::bool barFromEnv = const core::bool::fromEnvironment("bar"); static const field core::bool hasBarEnv = const core::bool::hasEnvironment("bar"); -static const field core::bool barFromEnvOrNull = const core::bool::fromEnvironment("bar", defaultValue: invalid-expression "pkg/front_end/testcases/general/constants/various.dart:9:49: Error: The value 'null' can't be assigned to the parameter type 'bool' because 'bool' is not nullable. +static const field core::bool barFromEnvOrNull = const core::bool::fromEnvironment("bar", defaultValue: invalid-expression "pkg/front_end/testcases/general/constants/various.dart:9:49: Error: The argument type 'Null' can't be assigned to the parameter type 'bool'. const bool.fromEnvironment(\"bar\", defaultValue: null); ^" in null as{TypeError} core::bool); static const field core::bool notBarFromEnvOrNull = !self::barFromEnvOrNull; @@ -188,19 +188,19 @@ static const field core::bool orOnNull2 = self::barFromEnvOrNull || false; static const field core::bool orOnNull3 = true || self::barFromEnvOrNull; static const field core::bool orOnNull4 = false || self::barFromEnvOrNull; static const field core::String barFromEnvString = const core::String::fromEnvironment("bar"); -static const field core::String barFromEnvOrNullString = const core::String::fromEnvironment("bar", defaultValue: invalid-expression "pkg/front_end/testcases/general/constants/various.dart:25:51: Error: The value 'null' can't be assigned to the parameter type 'String' because 'String' is not nullable. +static const field core::String barFromEnvOrNullString = const core::String::fromEnvironment("bar", defaultValue: invalid-expression "pkg/front_end/testcases/general/constants/various.dart:25:51: Error: The argument type 'Null' can't be assigned to the parameter type 'String'. const String.fromEnvironment(\"bar\", defaultValue: null); ^" in null as{TypeError} core::String); static const field core::String barFromEnvOrActualString = const core::String::fromEnvironment("bar", defaultValue: "hello"); static const field core::String nullFromEnvString = const core::String::fromEnvironment(self::barFromEnvOrNullString); static const field core::bool barFromEnvBool = const core::bool::fromEnvironment("bar"); -static const field core::bool barFromEnvOrNullBool = const core::bool::fromEnvironment("bar", defaultValue: invalid-expression "pkg/front_end/testcases/general/constants/various.dart:33:49: Error: The value 'null' can't be assigned to the parameter type 'bool' because 'bool' is not nullable. +static const field core::bool barFromEnvOrNullBool = const core::bool::fromEnvironment("bar", defaultValue: invalid-expression "pkg/front_end/testcases/general/constants/various.dart:33:49: Error: The argument type 'Null' can't be assigned to the parameter type 'bool'. const bool.fromEnvironment(\"bar\", defaultValue: null); ^" in null as{TypeError} core::bool); static const field core::bool barFromEnvOrActualBool = const core::bool::fromEnvironment("bar", defaultValue: true); static const field core::bool nullFromEnvBool = const core::bool::fromEnvironment(self::barFromEnvOrNullString); static const field core::int barFromEnvInt = const core::int::fromEnvironment("bar"); -static const field core::int barFromEnvOrNullInt = const core::int::fromEnvironment("bar", defaultValue: invalid-expression "pkg/front_end/testcases/general/constants/various.dart:40:48: Error: The value 'null' can't be assigned to the parameter type 'int' because 'int' is not nullable. +static const field core::int barFromEnvOrNullInt = const core::int::fromEnvironment("bar", defaultValue: invalid-expression "pkg/front_end/testcases/general/constants/various.dart:40:48: Error: The argument type 'Null' can't be assigned to the parameter type 'int'. const int.fromEnvironment(\"bar\", defaultValue: null); ^" in null as{TypeError} core::int); static const field core::int barFromEnvOrActualInt = const core::int::fromEnvironment("bar", defaultValue: 42); diff --git a/pkg/front_end/testcases/general/constants/various.dart.strong.transformed.expect b/pkg/front_end/testcases/general/constants/various.dart.strong.transformed.expect index 60be3ce2402..154eddbe4f8 100644 --- a/pkg/front_end/testcases/general/constants/various.dart.strong.transformed.expect +++ b/pkg/front_end/testcases/general/constants/various.dart.strong.transformed.expect @@ -47,19 +47,19 @@ library; // final z1 = y; // ^ // -// pkg/front_end/testcases/general/constants/various.dart:9:49: Error: The value 'null' can't be assigned to the parameter type 'bool' because 'bool' is not nullable. +// pkg/front_end/testcases/general/constants/various.dart:9:49: Error: The argument type 'Null' can't be assigned to the parameter type 'bool'. // const bool.fromEnvironment("bar", defaultValue: null); // ^ // -// pkg/front_end/testcases/general/constants/various.dart:25:51: Error: The value 'null' can't be assigned to the parameter type 'String' because 'String' is not nullable. +// pkg/front_end/testcases/general/constants/various.dart:25:51: Error: The argument type 'Null' can't be assigned to the parameter type 'String'. // const String.fromEnvironment("bar", defaultValue: null); // ^ // -// pkg/front_end/testcases/general/constants/various.dart:33:49: Error: The value 'null' can't be assigned to the parameter type 'bool' because 'bool' is not nullable. +// pkg/front_end/testcases/general/constants/various.dart:33:49: Error: The argument type 'Null' can't be assigned to the parameter type 'bool'. // const bool.fromEnvironment("bar", defaultValue: null); // ^ // -// pkg/front_end/testcases/general/constants/various.dart:40:48: Error: The value 'null' can't be assigned to the parameter type 'int' because 'int' is not nullable. +// pkg/front_end/testcases/general/constants/various.dart:40:48: Error: The argument type 'Null' can't be assigned to the parameter type 'int'. // const int.fromEnvironment("bar", defaultValue: null); // ^ // @@ -288,65 +288,65 @@ class ConstClassWithFinalFields2 extends core::Object /*hasConstConstructor*/ { } static const field core::bool barFromEnv = #C1; static const field core::bool hasBarEnv = #C1; -static const field core::bool barFromEnvOrNull = invalid-expression "pkg/front_end/testcases/general/constants/various.dart:9:49: Error: The value 'null' can't be assigned to the parameter type 'bool' because 'bool' is not nullable. +static const field core::bool barFromEnvOrNull = invalid-expression "pkg/front_end/testcases/general/constants/various.dart:9:49: Error: The argument type 'Null' can't be assigned to the parameter type 'bool'. const bool.fromEnvironment(\"bar\", defaultValue: null); ^"; -static const field core::bool notBarFromEnvOrNull = invalid-expression "pkg/front_end/testcases/general/constants/various.dart:9:49: Error: The value 'null' can't be assigned to the parameter type 'bool' because 'bool' is not nullable. +static const field core::bool notBarFromEnvOrNull = invalid-expression "pkg/front_end/testcases/general/constants/various.dart:9:49: Error: The argument type 'Null' can't be assigned to the parameter type 'bool'. const bool.fromEnvironment(\"bar\", defaultValue: null); ^"; -static const field core::bool conditionalOnNull = invalid-expression "pkg/front_end/testcases/general/constants/various.dart:9:49: Error: The value 'null' can't be assigned to the parameter type 'bool' because 'bool' is not nullable. +static const field core::bool conditionalOnNull = invalid-expression "pkg/front_end/testcases/general/constants/various.dart:9:49: Error: The argument type 'Null' can't be assigned to the parameter type 'bool'. const bool.fromEnvironment(\"bar\", defaultValue: null); ^"; -static const field core::bool nullAwareOnNullTrue = invalid-expression "pkg/front_end/testcases/general/constants/various.dart:9:49: Error: The value 'null' can't be assigned to the parameter type 'bool' because 'bool' is not nullable. +static const field core::bool nullAwareOnNullTrue = invalid-expression "pkg/front_end/testcases/general/constants/various.dart:9:49: Error: The argument type 'Null' can't be assigned to the parameter type 'bool'. const bool.fromEnvironment(\"bar\", defaultValue: null); ^"; -static const field core::bool nullAwareOnNullFalse = invalid-expression "pkg/front_end/testcases/general/constants/various.dart:9:49: Error: The value 'null' can't be assigned to the parameter type 'bool' because 'bool' is not nullable. +static const field core::bool nullAwareOnNullFalse = invalid-expression "pkg/front_end/testcases/general/constants/various.dart:9:49: Error: The argument type 'Null' can't be assigned to the parameter type 'bool'. const bool.fromEnvironment(\"bar\", defaultValue: null); ^"; -static const field core::bool andOnFalse = invalid-expression "pkg/front_end/testcases/general/constants/various.dart:9:49: Error: The value 'null' can't be assigned to the parameter type 'bool' because 'bool' is not nullable. +static const field core::bool andOnFalse = invalid-expression "pkg/front_end/testcases/general/constants/various.dart:9:49: Error: The argument type 'Null' can't be assigned to the parameter type 'bool'. const bool.fromEnvironment(\"bar\", defaultValue: null); ^"; -static const field core::bool andOnFalse2 = invalid-expression "pkg/front_end/testcases/general/constants/various.dart:9:49: Error: The value 'null' can't be assigned to the parameter type 'bool' because 'bool' is not nullable. +static const field core::bool andOnFalse2 = invalid-expression "pkg/front_end/testcases/general/constants/various.dart:9:49: Error: The argument type 'Null' can't be assigned to the parameter type 'bool'. const bool.fromEnvironment(\"bar\", defaultValue: null); ^"; -static const field core::bool andOnNull = invalid-expression "pkg/front_end/testcases/general/constants/various.dart:9:49: Error: The value 'null' can't be assigned to the parameter type 'bool' because 'bool' is not nullable. +static const field core::bool andOnNull = invalid-expression "pkg/front_end/testcases/general/constants/various.dart:9:49: Error: The argument type 'Null' can't be assigned to the parameter type 'bool'. const bool.fromEnvironment(\"bar\", defaultValue: null); ^"; -static const field core::bool andOnNull2 = invalid-expression "pkg/front_end/testcases/general/constants/various.dart:9:49: Error: The value 'null' can't be assigned to the parameter type 'bool' because 'bool' is not nullable. +static const field core::bool andOnNull2 = invalid-expression "pkg/front_end/testcases/general/constants/various.dart:9:49: Error: The argument type 'Null' can't be assigned to the parameter type 'bool'. const bool.fromEnvironment(\"bar\", defaultValue: null); ^"; -static const field core::bool orOnNull = invalid-expression "pkg/front_end/testcases/general/constants/various.dart:9:49: Error: The value 'null' can't be assigned to the parameter type 'bool' because 'bool' is not nullable. +static const field core::bool orOnNull = invalid-expression "pkg/front_end/testcases/general/constants/various.dart:9:49: Error: The argument type 'Null' can't be assigned to the parameter type 'bool'. const bool.fromEnvironment(\"bar\", defaultValue: null); ^"; -static const field core::bool orOnNull2 = invalid-expression "pkg/front_end/testcases/general/constants/various.dart:9:49: Error: The value 'null' can't be assigned to the parameter type 'bool' because 'bool' is not nullable. +static const field core::bool orOnNull2 = invalid-expression "pkg/front_end/testcases/general/constants/various.dart:9:49: Error: The argument type 'Null' can't be assigned to the parameter type 'bool'. const bool.fromEnvironment(\"bar\", defaultValue: null); ^"; static const field core::bool orOnNull3 = #C2; -static const field core::bool orOnNull4 = invalid-expression "pkg/front_end/testcases/general/constants/various.dart:9:49: Error: The value 'null' can't be assigned to the parameter type 'bool' because 'bool' is not nullable. +static const field core::bool orOnNull4 = invalid-expression "pkg/front_end/testcases/general/constants/various.dart:9:49: Error: The argument type 'Null' can't be assigned to the parameter type 'bool'. const bool.fromEnvironment(\"bar\", defaultValue: null); ^"; static const field core::String barFromEnvString = #C3; -static const field core::String barFromEnvOrNullString = invalid-expression "pkg/front_end/testcases/general/constants/various.dart:25:51: Error: The value 'null' can't be assigned to the parameter type 'String' because 'String' is not nullable. +static const field core::String barFromEnvOrNullString = invalid-expression "pkg/front_end/testcases/general/constants/various.dart:25:51: Error: The argument type 'Null' can't be assigned to the parameter type 'String'. const String.fromEnvironment(\"bar\", defaultValue: null); ^"; static const field core::String barFromEnvOrActualString = #C4; -static const field core::String nullFromEnvString = invalid-expression "pkg/front_end/testcases/general/constants/various.dart:25:51: Error: The value 'null' can't be assigned to the parameter type 'String' because 'String' is not nullable. +static const field core::String nullFromEnvString = invalid-expression "pkg/front_end/testcases/general/constants/various.dart:25:51: Error: The argument type 'Null' can't be assigned to the parameter type 'String'. const String.fromEnvironment(\"bar\", defaultValue: null); ^"; static const field core::bool barFromEnvBool = #C1; -static const field core::bool barFromEnvOrNullBool = invalid-expression "pkg/front_end/testcases/general/constants/various.dart:33:49: Error: The value 'null' can't be assigned to the parameter type 'bool' because 'bool' is not nullable. +static const field core::bool barFromEnvOrNullBool = invalid-expression "pkg/front_end/testcases/general/constants/various.dart:33:49: Error: The argument type 'Null' can't be assigned to the parameter type 'bool'. const bool.fromEnvironment(\"bar\", defaultValue: null); ^"; static const field core::bool barFromEnvOrActualBool = #C2; -static const field core::bool nullFromEnvBool = invalid-expression "pkg/front_end/testcases/general/constants/various.dart:25:51: Error: The value 'null' can't be assigned to the parameter type 'String' because 'String' is not nullable. +static const field core::bool nullFromEnvBool = invalid-expression "pkg/front_end/testcases/general/constants/various.dart:25:51: Error: The argument type 'Null' can't be assigned to the parameter type 'String'. const String.fromEnvironment(\"bar\", defaultValue: null); ^"; static const field core::int barFromEnvInt = #C5; -static const field core::int barFromEnvOrNullInt = invalid-expression "pkg/front_end/testcases/general/constants/various.dart:40:48: Error: The value 'null' can't be assigned to the parameter type 'int' because 'int' is not nullable. +static const field core::int barFromEnvOrNullInt = invalid-expression "pkg/front_end/testcases/general/constants/various.dart:40:48: Error: The argument type 'Null' can't be assigned to the parameter type 'int'. const int.fromEnvironment(\"bar\", defaultValue: null); ^"; static const field core::int barFromEnvOrActualInt = #C6; -static const field core::int nullFromEnvInt = invalid-expression "pkg/front_end/testcases/general/constants/various.dart:25:51: Error: The value 'null' can't be assigned to the parameter type 'String' because 'String' is not nullable. +static const field core::int nullFromEnvInt = invalid-expression "pkg/front_end/testcases/general/constants/various.dart:25:51: Error: The argument type 'Null' can't be assigned to the parameter type 'String'. const String.fromEnvironment(\"bar\", defaultValue: null); ^"; static const field core::bool bazFromEnv = #C1; diff --git a/pkg/front_end/testcases/general/infer_field_from_multiple.dart.strong.expect b/pkg/front_end/testcases/general/infer_field_from_multiple.dart.strong.expect index aef76ac2676..d6acc225327 100644 --- a/pkg/front_end/testcases/general/infer_field_from_multiple.dart.strong.expect +++ b/pkg/front_end/testcases/general/infer_field_from_multiple.dart.strong.expect @@ -228,7 +228,7 @@ library; // S field14; // ^ // -// pkg/front_end/testcases/general/infer_field_from_multiple.dart:105:17: Error: The value 'null' can't be assigned to a variable of type 'T' because 'T' is not nullable. +// pkg/front_end/testcases/general/infer_field_from_multiple.dart:105:17: Error: A value of type 'Null' can't be assigned to a variable of type 'T'. // var field13 = null; // error // ^ // @@ -317,7 +317,7 @@ class D extends core::Object implements self: covariant-by-class field self::D::T% field10; covariant-by-class field self::D::T% field11; covariant-by-class field self::D::T% field12; - covariant-by-class field self::D::T% field13 = invalid-expression "pkg/front_end/testcases/general/infer_field_from_multiple.dart:105:17: Error: The value 'null' can't be assigned to a variable of type 'T' because 'T' is not nullable. + covariant-by-class field self::D::T% field13 = invalid-expression "pkg/front_end/testcases/general/infer_field_from_multiple.dart:105:17: Error: A value of type 'Null' can't be assigned to a variable of type 'T'. var field13 = null; // error ^" in null as{TypeError} Never; covariant-by-class field self::D::T% field14; diff --git a/pkg/front_end/testcases/general/infer_field_from_multiple.dart.strong.modular.expect b/pkg/front_end/testcases/general/infer_field_from_multiple.dart.strong.modular.expect index aef76ac2676..d6acc225327 100644 --- a/pkg/front_end/testcases/general/infer_field_from_multiple.dart.strong.modular.expect +++ b/pkg/front_end/testcases/general/infer_field_from_multiple.dart.strong.modular.expect @@ -228,7 +228,7 @@ library; // S field14; // ^ // -// pkg/front_end/testcases/general/infer_field_from_multiple.dart:105:17: Error: The value 'null' can't be assigned to a variable of type 'T' because 'T' is not nullable. +// pkg/front_end/testcases/general/infer_field_from_multiple.dart:105:17: Error: A value of type 'Null' can't be assigned to a variable of type 'T'. // var field13 = null; // error // ^ // @@ -317,7 +317,7 @@ class D extends core::Object implements self: covariant-by-class field self::D::T% field10; covariant-by-class field self::D::T% field11; covariant-by-class field self::D::T% field12; - covariant-by-class field self::D::T% field13 = invalid-expression "pkg/front_end/testcases/general/infer_field_from_multiple.dart:105:17: Error: The value 'null' can't be assigned to a variable of type 'T' because 'T' is not nullable. + covariant-by-class field self::D::T% field13 = invalid-expression "pkg/front_end/testcases/general/infer_field_from_multiple.dart:105:17: Error: A value of type 'Null' can't be assigned to a variable of type 'T'. var field13 = null; // error ^" in null as{TypeError} Never; covariant-by-class field self::D::T% field14; diff --git a/pkg/front_end/testcases/general/infer_field_from_multiple.dart.strong.transformed.expect b/pkg/front_end/testcases/general/infer_field_from_multiple.dart.strong.transformed.expect index 48211fe3dd3..f5db1302c26 100644 --- a/pkg/front_end/testcases/general/infer_field_from_multiple.dart.strong.transformed.expect +++ b/pkg/front_end/testcases/general/infer_field_from_multiple.dart.strong.transformed.expect @@ -228,7 +228,7 @@ library; // S field14; // ^ // -// pkg/front_end/testcases/general/infer_field_from_multiple.dart:105:17: Error: The value 'null' can't be assigned to a variable of type 'T' because 'T' is not nullable. +// pkg/front_end/testcases/general/infer_field_from_multiple.dart:105:17: Error: A value of type 'Null' can't be assigned to a variable of type 'T'. // var field13 = null; // error // ^ // @@ -317,7 +317,7 @@ class D extends core::Object implements self: covariant-by-class field self::D::T% field10; covariant-by-class field self::D::T% field11; covariant-by-class field self::D::T% field12; - covariant-by-class field self::D::T% field13 = invalid-expression "pkg/front_end/testcases/general/infer_field_from_multiple.dart:105:17: Error: The value 'null' can't be assigned to a variable of type 'T' because 'T' is not nullable. + covariant-by-class field self::D::T% field13 = invalid-expression "pkg/front_end/testcases/general/infer_field_from_multiple.dart:105:17: Error: A value of type 'Null' can't be assigned to a variable of type 'T'. var field13 = null; // error ^" in let Null #t1 = null in #t1 == null ?{Never} #t1 as{TypeError} Never : #t1{Never}; covariant-by-class field self::D::T% field14; diff --git a/pkg/front_end/testcases/general/invalid_for_in_iterable.dart.strong.expect b/pkg/front_end/testcases/general/invalid_for_in_iterable.dart.strong.expect index 0b0bc311b81..148895f0b57 100644 --- a/pkg/front_end/testcases/general/invalid_for_in_iterable.dart.strong.expect +++ b/pkg/front_end/testcases/general/invalid_for_in_iterable.dart.strong.expect @@ -2,7 +2,7 @@ library; // // Problems in library: // -// pkg/front_end/testcases/general/invalid_for_in_iterable.dart:5:26: Error: The value 'null' can't be returned from a function with return type 'Iterable' because 'Iterable' is not nullable. +// pkg/front_end/testcases/general/invalid_for_in_iterable.dart:5:26: Error: A value of type 'Null' can't be returned from a function with return type 'Iterable'. // - 'Iterable' is from 'dart:core'. // Iterable takesNoArg() => null; // ^ @@ -34,7 +34,7 @@ import self as self; import "dart:core" as core; static method takesNoArg() → core::Iterable - return invalid-expression "pkg/front_end/testcases/general/invalid_for_in_iterable.dart:5:26: Error: The value 'null' can't be returned from a function with return type 'Iterable' because 'Iterable' is not nullable. + return invalid-expression "pkg/front_end/testcases/general/invalid_for_in_iterable.dart:5:26: Error: A value of type 'Null' can't be returned from a function with return type 'Iterable'. - 'Iterable' is from 'dart:core'. Iterable takesNoArg() => null; ^" in null as{TypeError} core::Iterable; diff --git a/pkg/front_end/testcases/general/invalid_for_in_iterable.dart.strong.modular.expect b/pkg/front_end/testcases/general/invalid_for_in_iterable.dart.strong.modular.expect index 0b0bc311b81..148895f0b57 100644 --- a/pkg/front_end/testcases/general/invalid_for_in_iterable.dart.strong.modular.expect +++ b/pkg/front_end/testcases/general/invalid_for_in_iterable.dart.strong.modular.expect @@ -2,7 +2,7 @@ library; // // Problems in library: // -// pkg/front_end/testcases/general/invalid_for_in_iterable.dart:5:26: Error: The value 'null' can't be returned from a function with return type 'Iterable' because 'Iterable' is not nullable. +// pkg/front_end/testcases/general/invalid_for_in_iterable.dart:5:26: Error: A value of type 'Null' can't be returned from a function with return type 'Iterable'. // - 'Iterable' is from 'dart:core'. // Iterable takesNoArg() => null; // ^ @@ -34,7 +34,7 @@ import self as self; import "dart:core" as core; static method takesNoArg() → core::Iterable - return invalid-expression "pkg/front_end/testcases/general/invalid_for_in_iterable.dart:5:26: Error: The value 'null' can't be returned from a function with return type 'Iterable' because 'Iterable' is not nullable. + return invalid-expression "pkg/front_end/testcases/general/invalid_for_in_iterable.dart:5:26: Error: A value of type 'Null' can't be returned from a function with return type 'Iterable'. - 'Iterable' is from 'dart:core'. Iterable takesNoArg() => null; ^" in null as{TypeError} core::Iterable; diff --git a/pkg/front_end/testcases/general/invalid_for_in_iterable.dart.strong.transformed.expect b/pkg/front_end/testcases/general/invalid_for_in_iterable.dart.strong.transformed.expect index fe0cca021e8..896a27304f8 100644 --- a/pkg/front_end/testcases/general/invalid_for_in_iterable.dart.strong.transformed.expect +++ b/pkg/front_end/testcases/general/invalid_for_in_iterable.dart.strong.transformed.expect @@ -2,7 +2,7 @@ library; // // Problems in library: // -// pkg/front_end/testcases/general/invalid_for_in_iterable.dart:5:26: Error: The value 'null' can't be returned from a function with return type 'Iterable' because 'Iterable' is not nullable. +// pkg/front_end/testcases/general/invalid_for_in_iterable.dart:5:26: Error: A value of type 'Null' can't be returned from a function with return type 'Iterable'. // - 'Iterable' is from 'dart:core'. // Iterable takesNoArg() => null; // ^ @@ -34,7 +34,7 @@ import self as self; import "dart:core" as core; static method takesNoArg() → core::Iterable - return invalid-expression "pkg/front_end/testcases/general/invalid_for_in_iterable.dart:5:26: Error: The value 'null' can't be returned from a function with return type 'Iterable' because 'Iterable' is not nullable. + return invalid-expression "pkg/front_end/testcases/general/invalid_for_in_iterable.dart:5:26: Error: A value of type 'Null' can't be returned from a function with return type 'Iterable'. - 'Iterable' is from 'dart:core'. Iterable takesNoArg() => null; ^" in let Null #t1 = null in #t1 == null ?{core::Iterable} #t1 as{TypeError} core::Iterable : #t1{core::Iterable}; diff --git a/pkg/front_end/testcases/general/issue43400.dart.strong.expect b/pkg/front_end/testcases/general/issue43400.dart.strong.expect index 81f1725e4d4..21888359e3f 100644 --- a/pkg/front_end/testcases/general/issue43400.dart.strong.expect +++ b/pkg/front_end/testcases/general/issue43400.dart.strong.expect @@ -6,7 +6,7 @@ library; // static Generic field = null; // ^ // -// pkg/front_end/testcases/general/issue43400.dart:8:29: Error: The value 'null' can't be assigned to a variable of type 'Generic' because 'Generic' is not nullable. +// pkg/front_end/testcases/general/issue43400.dart:8:29: Error: A value of type 'Null' can't be assigned to a variable of type 'Generic'. // - 'Generic' is from 'pkg/front_end/testcases/general/issue43400.dart'. // static Generic field = null; // ^ @@ -22,7 +22,7 @@ class Generic extends core::Object { extension Extension on self::Generic { static field field = self::Extension|field; } -static field self::Generic Extension|field = invalid-expression "pkg/front_end/testcases/general/issue43400.dart:8:29: Error: The value 'null' can't be assigned to a variable of type 'Generic' because 'Generic' is not nullable. +static field self::Generic Extension|field = invalid-expression "pkg/front_end/testcases/general/issue43400.dart:8:29: Error: A value of type 'Null' can't be assigned to a variable of type 'Generic'. - 'Generic' is from 'pkg/front_end/testcases/general/issue43400.dart'. static Generic field = null; ^" in null as{TypeError} self::Generic; diff --git a/pkg/front_end/testcases/general/issue43400.dart.strong.modular.expect b/pkg/front_end/testcases/general/issue43400.dart.strong.modular.expect index 81f1725e4d4..21888359e3f 100644 --- a/pkg/front_end/testcases/general/issue43400.dart.strong.modular.expect +++ b/pkg/front_end/testcases/general/issue43400.dart.strong.modular.expect @@ -6,7 +6,7 @@ library; // static Generic field = null; // ^ // -// pkg/front_end/testcases/general/issue43400.dart:8:29: Error: The value 'null' can't be assigned to a variable of type 'Generic' because 'Generic' is not nullable. +// pkg/front_end/testcases/general/issue43400.dart:8:29: Error: A value of type 'Null' can't be assigned to a variable of type 'Generic'. // - 'Generic' is from 'pkg/front_end/testcases/general/issue43400.dart'. // static Generic field = null; // ^ @@ -22,7 +22,7 @@ class Generic extends core::Object { extension Extension on self::Generic { static field field = self::Extension|field; } -static field self::Generic Extension|field = invalid-expression "pkg/front_end/testcases/general/issue43400.dart:8:29: Error: The value 'null' can't be assigned to a variable of type 'Generic' because 'Generic' is not nullable. +static field self::Generic Extension|field = invalid-expression "pkg/front_end/testcases/general/issue43400.dart:8:29: Error: A value of type 'Null' can't be assigned to a variable of type 'Generic'. - 'Generic' is from 'pkg/front_end/testcases/general/issue43400.dart'. static Generic field = null; ^" in null as{TypeError} self::Generic; diff --git a/pkg/front_end/testcases/general/issue43400.dart.strong.transformed.expect b/pkg/front_end/testcases/general/issue43400.dart.strong.transformed.expect index 738b4c2de46..ec33d6a46ed 100644 --- a/pkg/front_end/testcases/general/issue43400.dart.strong.transformed.expect +++ b/pkg/front_end/testcases/general/issue43400.dart.strong.transformed.expect @@ -6,7 +6,7 @@ library; // static Generic field = null; // ^ // -// pkg/front_end/testcases/general/issue43400.dart:8:29: Error: The value 'null' can't be assigned to a variable of type 'Generic' because 'Generic' is not nullable. +// pkg/front_end/testcases/general/issue43400.dart:8:29: Error: A value of type 'Null' can't be assigned to a variable of type 'Generic'. // - 'Generic' is from 'pkg/front_end/testcases/general/issue43400.dart'. // static Generic field = null; // ^ @@ -22,7 +22,7 @@ class Generic extends core::Object { extension Extension on self::Generic { static field field = self::Extension|field; } -static field self::Generic Extension|field = invalid-expression "pkg/front_end/testcases/general/issue43400.dart:8:29: Error: The value 'null' can't be assigned to a variable of type 'Generic' because 'Generic' is not nullable. +static field self::Generic Extension|field = invalid-expression "pkg/front_end/testcases/general/issue43400.dart:8:29: Error: A value of type 'Null' can't be assigned to a variable of type 'Generic'. - 'Generic' is from 'pkg/front_end/testcases/general/issue43400.dart'. static Generic field = null; ^" in let Null #t1 = null in #t1 == null ?{self::Generic} #t1 as{TypeError} self::Generic : #t1{self::Generic}; diff --git a/pkg/front_end/testcases/general/issue44654.dart.strong.expect b/pkg/front_end/testcases/general/issue44654.dart.strong.expect index 8fbe3671b66..1877aeb4cae 100644 --- a/pkg/front_end/testcases/general/issue44654.dart.strong.expect +++ b/pkg/front_end/testcases/general/issue44654.dart.strong.expect @@ -2,7 +2,7 @@ library; // // Problems in library: // -// pkg/front_end/testcases/general/issue44654.dart:7:7: Error: A value of type 'bool?' can't be assigned to a variable of type 'bool' because 'bool?' is nullable and 'bool' isn't. +// pkg/front_end/testcases/general/issue44654.dart:7:7: Error: A value of type 'bool?' can't be assigned to a variable of type 'bool'. // if (string?.isNotEmpty) ; // ^ // @@ -11,7 +11,7 @@ import "dart:core" as core; static method test2() → void { has-declared-initializer core::String? string = null; - if(invalid-expression "pkg/front_end/testcases/general/issue44654.dart:7:7: Error: A value of type 'bool?' can't be assigned to a variable of type 'bool' because 'bool?' is nullable and 'bool' isn't. + if(invalid-expression "pkg/front_end/testcases/general/issue44654.dart:7:7: Error: A value of type 'bool?' can't be assigned to a variable of type 'bool'. if (string?.isNotEmpty) ; ^" in (let final core::String? #t1 = string in #t1 == null ?{core::bool?} null : #t1{core::String}.{core::String::isNotEmpty}{core::bool}) as{TypeError} core::bool) ; diff --git a/pkg/front_end/testcases/general/issue44654.dart.strong.modular.expect b/pkg/front_end/testcases/general/issue44654.dart.strong.modular.expect index 8fbe3671b66..1877aeb4cae 100644 --- a/pkg/front_end/testcases/general/issue44654.dart.strong.modular.expect +++ b/pkg/front_end/testcases/general/issue44654.dart.strong.modular.expect @@ -2,7 +2,7 @@ library; // // Problems in library: // -// pkg/front_end/testcases/general/issue44654.dart:7:7: Error: A value of type 'bool?' can't be assigned to a variable of type 'bool' because 'bool?' is nullable and 'bool' isn't. +// pkg/front_end/testcases/general/issue44654.dart:7:7: Error: A value of type 'bool?' can't be assigned to a variable of type 'bool'. // if (string?.isNotEmpty) ; // ^ // @@ -11,7 +11,7 @@ import "dart:core" as core; static method test2() → void { has-declared-initializer core::String? string = null; - if(invalid-expression "pkg/front_end/testcases/general/issue44654.dart:7:7: Error: A value of type 'bool?' can't be assigned to a variable of type 'bool' because 'bool?' is nullable and 'bool' isn't. + if(invalid-expression "pkg/front_end/testcases/general/issue44654.dart:7:7: Error: A value of type 'bool?' can't be assigned to a variable of type 'bool'. if (string?.isNotEmpty) ; ^" in (let final core::String? #t1 = string in #t1 == null ?{core::bool?} null : #t1{core::String}.{core::String::isNotEmpty}{core::bool}) as{TypeError} core::bool) ; diff --git a/pkg/front_end/testcases/general/issue44654.dart.strong.transformed.expect b/pkg/front_end/testcases/general/issue44654.dart.strong.transformed.expect index 3015852e1e5..dc6affbe619 100644 --- a/pkg/front_end/testcases/general/issue44654.dart.strong.transformed.expect +++ b/pkg/front_end/testcases/general/issue44654.dart.strong.transformed.expect @@ -2,7 +2,7 @@ library; // // Problems in library: // -// pkg/front_end/testcases/general/issue44654.dart:7:7: Error: A value of type 'bool?' can't be assigned to a variable of type 'bool' because 'bool?' is nullable and 'bool' isn't. +// pkg/front_end/testcases/general/issue44654.dart:7:7: Error: A value of type 'bool?' can't be assigned to a variable of type 'bool'. // if (string?.isNotEmpty) ; // ^ // @@ -11,7 +11,7 @@ import "dart:core" as core; static method test2() → void { has-declared-initializer core::String? string = null; - if(invalid-expression "pkg/front_end/testcases/general/issue44654.dart:7:7: Error: A value of type 'bool?' can't be assigned to a variable of type 'bool' because 'bool?' is nullable and 'bool' isn't. + if(invalid-expression "pkg/front_end/testcases/general/issue44654.dart:7:7: Error: A value of type 'bool?' can't be assigned to a variable of type 'bool'. if (string?.isNotEmpty) ; ^" in let core::bool? #t1 = let final core::String? #t2 = string in #t2 == null ?{core::bool?} null : #t2{core::String}.{core::String::isNotEmpty}{core::bool} in #t1 == null ?{core::bool} #t1 as{TypeError} core::bool : #t1{core::bool}) ; diff --git a/pkg/front_end/testcases/general/issue45660.dart.strong.expect b/pkg/front_end/testcases/general/issue45660.dart.strong.expect index bd316b25d96..1aaff222d46 100644 --- a/pkg/front_end/testcases/general/issue45660.dart.strong.expect +++ b/pkg/front_end/testcases/general/issue45660.dart.strong.expect @@ -2,7 +2,7 @@ library; // // Problems in library: // -// pkg/front_end/testcases/general/issue45660.dart:8:33: Error: The value 'null' can't be assigned to the parameter type 'num' because 'num' is not nullable. +// pkg/front_end/testcases/general/issue45660.dart:8:33: Error: The argument type 'Null' can't be assigned to the parameter type 'num'. // extendsNumReturnArg/**/(null); // ^ // @@ -15,7 +15,7 @@ import "dart:core" as core; static field (T) → T extendsNumReturnArg = (S s) → S => s; static method functionInvocations() → dynamic { - self::extendsNumReturnArg(invalid-expression "pkg/front_end/testcases/general/issue45660.dart:8:33: Error: The value 'null' can't be assigned to the parameter type 'num' because 'num' is not nullable. + self::extendsNumReturnArg(invalid-expression "pkg/front_end/testcases/general/issue45660.dart:8:33: Error: The argument type 'Null' can't be assigned to the parameter type 'num'. extendsNumReturnArg/**/(null); ^" in null as{TypeError} core::num){(core::num) → core::num}; self::extendsNumReturnArg(invalid-expression "pkg/front_end/testcases/general/issue45660.dart:9:35: Error: The argument type 'String' can't be assigned to the parameter type 'num'. diff --git a/pkg/front_end/testcases/general/issue45660.dart.strong.modular.expect b/pkg/front_end/testcases/general/issue45660.dart.strong.modular.expect index bd316b25d96..1aaff222d46 100644 --- a/pkg/front_end/testcases/general/issue45660.dart.strong.modular.expect +++ b/pkg/front_end/testcases/general/issue45660.dart.strong.modular.expect @@ -2,7 +2,7 @@ library; // // Problems in library: // -// pkg/front_end/testcases/general/issue45660.dart:8:33: Error: The value 'null' can't be assigned to the parameter type 'num' because 'num' is not nullable. +// pkg/front_end/testcases/general/issue45660.dart:8:33: Error: The argument type 'Null' can't be assigned to the parameter type 'num'. // extendsNumReturnArg/**/(null); // ^ // @@ -15,7 +15,7 @@ import "dart:core" as core; static field (T) → T extendsNumReturnArg = (S s) → S => s; static method functionInvocations() → dynamic { - self::extendsNumReturnArg(invalid-expression "pkg/front_end/testcases/general/issue45660.dart:8:33: Error: The value 'null' can't be assigned to the parameter type 'num' because 'num' is not nullable. + self::extendsNumReturnArg(invalid-expression "pkg/front_end/testcases/general/issue45660.dart:8:33: Error: The argument type 'Null' can't be assigned to the parameter type 'num'. extendsNumReturnArg/**/(null); ^" in null as{TypeError} core::num){(core::num) → core::num}; self::extendsNumReturnArg(invalid-expression "pkg/front_end/testcases/general/issue45660.dart:9:35: Error: The argument type 'String' can't be assigned to the parameter type 'num'. diff --git a/pkg/front_end/testcases/general/issue45660.dart.strong.transformed.expect b/pkg/front_end/testcases/general/issue45660.dart.strong.transformed.expect index affb3dff400..642c19b1c95 100644 --- a/pkg/front_end/testcases/general/issue45660.dart.strong.transformed.expect +++ b/pkg/front_end/testcases/general/issue45660.dart.strong.transformed.expect @@ -2,7 +2,7 @@ library; // // Problems in library: // -// pkg/front_end/testcases/general/issue45660.dart:8:33: Error: The value 'null' can't be assigned to the parameter type 'num' because 'num' is not nullable. +// pkg/front_end/testcases/general/issue45660.dart:8:33: Error: The argument type 'Null' can't be assigned to the parameter type 'num'. // extendsNumReturnArg/**/(null); // ^ // @@ -15,7 +15,7 @@ import "dart:core" as core; static field (T) → T extendsNumReturnArg = (S s) → S => s; static method functionInvocations() → dynamic { - self::extendsNumReturnArg(invalid-expression "pkg/front_end/testcases/general/issue45660.dart:8:33: Error: The value 'null' can't be assigned to the parameter type 'num' because 'num' is not nullable. + self::extendsNumReturnArg(invalid-expression "pkg/front_end/testcases/general/issue45660.dart:8:33: Error: The argument type 'Null' can't be assigned to the parameter type 'num'. extendsNumReturnArg/**/(null); ^" in let Null #t1 = null in #t1 == null ?{core::num} #t1 as{TypeError} core::num : #t1{core::num}){(core::num) → core::num}; self::extendsNumReturnArg(invalid-expression "pkg/front_end/testcases/general/issue45660.dart:9:35: Error: The argument type 'String' can't be assigned to the parameter type 'num'. diff --git a/pkg/front_end/testcases/general/issue48090.dart.strong.expect b/pkg/front_end/testcases/general/issue48090.dart.strong.expect index d3740360b69..b9d85f32b2a 100644 --- a/pkg/front_end/testcases/general/issue48090.dart.strong.expect +++ b/pkg/front_end/testcases/general/issue48090.dart.strong.expect @@ -2,7 +2,7 @@ library; // // Problems in library: // -// pkg/front_end/testcases/general/issue48090.dart:12:38: Error: A value of type 'String?' can't be assigned to a variable of type 'String' because 'String?' is nullable and 'String' isn't. +// pkg/front_end/testcases/general/issue48090.dart:12:38: Error: A value of type 'String?' can't be assigned to a variable of type 'String'. // String debugName = Isolate.current.debugName; // error // ^ // @@ -16,7 +16,7 @@ static method main() → void { core::String debugName = let final core::String? #t1 = iso::Isolate::current.{iso::Isolate::debugName}{core::String?} in #t1 == null ?{core::String} "" : #t1{core::String}; } static method test() → void { - core::String debugName = invalid-expression "pkg/front_end/testcases/general/issue48090.dart:12:38: Error: A value of type 'String?' can't be assigned to a variable of type 'String' because 'String?' is nullable and 'String' isn't. + core::String debugName = invalid-expression "pkg/front_end/testcases/general/issue48090.dart:12:38: Error: A value of type 'String?' can't be assigned to a variable of type 'String'. String debugName = Isolate.current.debugName; // error ^" in iso::Isolate::current.{iso::Isolate::debugName}{core::String?} as{TypeError} core::String; } diff --git a/pkg/front_end/testcases/general/issue48090.dart.strong.modular.expect b/pkg/front_end/testcases/general/issue48090.dart.strong.modular.expect index d3740360b69..b9d85f32b2a 100644 --- a/pkg/front_end/testcases/general/issue48090.dart.strong.modular.expect +++ b/pkg/front_end/testcases/general/issue48090.dart.strong.modular.expect @@ -2,7 +2,7 @@ library; // // Problems in library: // -// pkg/front_end/testcases/general/issue48090.dart:12:38: Error: A value of type 'String?' can't be assigned to a variable of type 'String' because 'String?' is nullable and 'String' isn't. +// pkg/front_end/testcases/general/issue48090.dart:12:38: Error: A value of type 'String?' can't be assigned to a variable of type 'String'. // String debugName = Isolate.current.debugName; // error // ^ // @@ -16,7 +16,7 @@ static method main() → void { core::String debugName = let final core::String? #t1 = iso::Isolate::current.{iso::Isolate::debugName}{core::String?} in #t1 == null ?{core::String} "" : #t1{core::String}; } static method test() → void { - core::String debugName = invalid-expression "pkg/front_end/testcases/general/issue48090.dart:12:38: Error: A value of type 'String?' can't be assigned to a variable of type 'String' because 'String?' is nullable and 'String' isn't. + core::String debugName = invalid-expression "pkg/front_end/testcases/general/issue48090.dart:12:38: Error: A value of type 'String?' can't be assigned to a variable of type 'String'. String debugName = Isolate.current.debugName; // error ^" in iso::Isolate::current.{iso::Isolate::debugName}{core::String?} as{TypeError} core::String; } diff --git a/pkg/front_end/testcases/general/issue48090.dart.strong.transformed.expect b/pkg/front_end/testcases/general/issue48090.dart.strong.transformed.expect index 1a88bc8dbe9..b4231daa7d2 100644 --- a/pkg/front_end/testcases/general/issue48090.dart.strong.transformed.expect +++ b/pkg/front_end/testcases/general/issue48090.dart.strong.transformed.expect @@ -2,7 +2,7 @@ library; // // Problems in library: // -// pkg/front_end/testcases/general/issue48090.dart:12:38: Error: A value of type 'String?' can't be assigned to a variable of type 'String' because 'String?' is nullable and 'String' isn't. +// pkg/front_end/testcases/general/issue48090.dart:12:38: Error: A value of type 'String?' can't be assigned to a variable of type 'String'. // String debugName = Isolate.current.debugName; // error // ^ // @@ -16,7 +16,7 @@ static method main() → void { core::String debugName = let final core::String? #t1 = iso::Isolate::current.{iso::Isolate::debugName}{core::String?} in #t1 == null ?{core::String} "" : #t1{core::String}; } static method test() → void { - core::String debugName = invalid-expression "pkg/front_end/testcases/general/issue48090.dart:12:38: Error: A value of type 'String?' can't be assigned to a variable of type 'String' because 'String?' is nullable and 'String' isn't. + core::String debugName = invalid-expression "pkg/front_end/testcases/general/issue48090.dart:12:38: Error: A value of type 'String?' can't be assigned to a variable of type 'String'. String debugName = Isolate.current.debugName; // error ^" in let core::String? #t2 = iso::Isolate::current.{iso::Isolate::debugName}{core::String?} in #t2 == null ?{core::String} #t2 as{TypeError} core::String : #t2{core::String}; } diff --git a/pkg/front_end/testcases/general/issue52726.dart.strong.expect b/pkg/front_end/testcases/general/issue52726.dart.strong.expect index c9fff9bbad0..09264789f96 100644 --- a/pkg/front_end/testcases/general/issue52726.dart.strong.expect +++ b/pkg/front_end/testcases/general/issue52726.dart.strong.expect @@ -2,7 +2,7 @@ library; // // Problems in library: // -// pkg/front_end/testcases/general/issue52726.dart:10:22: Error: A value of type 'Object?' can't be assigned to a variable of type 'Object' because 'Object?' is nullable and 'Object' isn't. +// pkg/front_end/testcases/general/issue52726.dart:10:22: Error: A value of type 'Object?' can't be assigned to a variable of type 'Object'. // - 'Object' is from 'dart:core'. // Object o = first.first; // Error. // ^ @@ -16,7 +16,7 @@ class WeakMap extends core::Iterable> mapped = entries.{core::Iterable::map}>(((self::WeakMap::K, self::WeakMap::V%) i) → core::List => [i.$1{self::WeakMap::K}, i.$2{self::WeakMap::V%}]){(((self::WeakMap::K, self::WeakMap::V%)) → core::List) → core::Iterable>}; core::List first = mapped.{core::Iterable::first}{core::List}; first.{core::List::add}(null){(core::Object?) → void}; - core::Object o = invalid-expression "pkg/front_end/testcases/general/issue52726.dart:10:22: Error: A value of type 'Object?' can't be assigned to a variable of type 'Object' because 'Object?' is nullable and 'Object' isn't. + core::Object o = invalid-expression "pkg/front_end/testcases/general/issue52726.dart:10:22: Error: A value of type 'Object?' can't be assigned to a variable of type 'Object'. - 'Object' is from 'dart:core'. Object o = first.first; // Error. ^" in first.{core::Iterable::first}{core::Object?} as{TypeError} core::Object; diff --git a/pkg/front_end/testcases/general/issue52726.dart.strong.modular.expect b/pkg/front_end/testcases/general/issue52726.dart.strong.modular.expect index c9fff9bbad0..09264789f96 100644 --- a/pkg/front_end/testcases/general/issue52726.dart.strong.modular.expect +++ b/pkg/front_end/testcases/general/issue52726.dart.strong.modular.expect @@ -2,7 +2,7 @@ library; // // Problems in library: // -// pkg/front_end/testcases/general/issue52726.dart:10:22: Error: A value of type 'Object?' can't be assigned to a variable of type 'Object' because 'Object?' is nullable and 'Object' isn't. +// pkg/front_end/testcases/general/issue52726.dart:10:22: Error: A value of type 'Object?' can't be assigned to a variable of type 'Object'. // - 'Object' is from 'dart:core'. // Object o = first.first; // Error. // ^ @@ -16,7 +16,7 @@ class WeakMap extends core::Iterable> mapped = entries.{core::Iterable::map}>(((self::WeakMap::K, self::WeakMap::V%) i) → core::List => [i.$1{self::WeakMap::K}, i.$2{self::WeakMap::V%}]){(((self::WeakMap::K, self::WeakMap::V%)) → core::List) → core::Iterable>}; core::List first = mapped.{core::Iterable::first}{core::List}; first.{core::List::add}(null){(core::Object?) → void}; - core::Object o = invalid-expression "pkg/front_end/testcases/general/issue52726.dart:10:22: Error: A value of type 'Object?' can't be assigned to a variable of type 'Object' because 'Object?' is nullable and 'Object' isn't. + core::Object o = invalid-expression "pkg/front_end/testcases/general/issue52726.dart:10:22: Error: A value of type 'Object?' can't be assigned to a variable of type 'Object'. - 'Object' is from 'dart:core'. Object o = first.first; // Error. ^" in first.{core::Iterable::first}{core::Object?} as{TypeError} core::Object; diff --git a/pkg/front_end/testcases/general/issue52726.dart.strong.transformed.expect b/pkg/front_end/testcases/general/issue52726.dart.strong.transformed.expect index 5b8cb5c34c5..650b6664b86 100644 --- a/pkg/front_end/testcases/general/issue52726.dart.strong.transformed.expect +++ b/pkg/front_end/testcases/general/issue52726.dart.strong.transformed.expect @@ -2,7 +2,7 @@ library; // // Problems in library: // -// pkg/front_end/testcases/general/issue52726.dart:10:22: Error: A value of type 'Object?' can't be assigned to a variable of type 'Object' because 'Object?' is nullable and 'Object' isn't. +// pkg/front_end/testcases/general/issue52726.dart:10:22: Error: A value of type 'Object?' can't be assigned to a variable of type 'Object'. // - 'Object' is from 'dart:core'. // Object o = first.first; // Error. // ^ @@ -16,7 +16,7 @@ class WeakMap extends core::Iterable> mapped = entries.{core::Iterable::map}>(((self::WeakMap::K, self::WeakMap::V%) i) → core::List => core::_GrowableList::_literal2(i.$1{self::WeakMap::K}, i.$2{self::WeakMap::V%})){(((self::WeakMap::K, self::WeakMap::V%)) → core::List) → core::Iterable>}; core::List first = mapped.{core::Iterable::first}{core::List}; first.{core::List::add}(null){(core::Object?) → void}; - core::Object o = invalid-expression "pkg/front_end/testcases/general/issue52726.dart:10:22: Error: A value of type 'Object?' can't be assigned to a variable of type 'Object' because 'Object?' is nullable and 'Object' isn't. + core::Object o = invalid-expression "pkg/front_end/testcases/general/issue52726.dart:10:22: Error: A value of type 'Object?' can't be assigned to a variable of type 'Object'. - 'Object' is from 'dart:core'. Object o = first.first; // Error. ^" in let core::Object? #t1 = first.{core::Iterable::first}{core::Object?} in #t1 == null ?{core::Object} #t1 as{TypeError} core::Object : #t1{core::Object}; diff --git a/pkg/front_end/testcases/general/nested_variance.dart.strong.expect b/pkg/front_end/testcases/general/nested_variance.dart.strong.expect index e848a9900a1..1f44980eeb0 100644 --- a/pkg/front_end/testcases/general/nested_variance.dart.strong.expect +++ b/pkg/front_end/testcases/general/nested_variance.dart.strong.expect @@ -2,7 +2,7 @@ library; // // Problems in library: // -// pkg/front_end/testcases/general/nested_variance.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. +// pkg/front_end/testcases/general/nested_variance.dart:84:42: Error: A value of type 'void Function>()' can't be assigned to a variable of type 'void Function>()'. // - 'Acon' is from 'pkg/front_end/testcases/general/nested_variance.dart'. // F, dynamic>> target2 = fsource2; // ^ @@ -125,7 +125,7 @@ static method testTypeAliasAsTypeArgument(self::Acov<() → dynamic, dynamic> so = dynamic>() → void fsource1 = self::toF>(source1); = dynamic>() → void target1 = fsource1; = dynamic>() → void fsource2 = self::toF>(source2); - = dynamic>() → void target2 = invalid-expression "pkg/front_end/testcases/general/nested_variance.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. + = dynamic>() → void target2 = invalid-expression "pkg/front_end/testcases/general/nested_variance.dart:84:42: Error: A value of type 'void Function>()' can't be assigned to a variable of type 'void Function>()'. - 'Acon' is from 'pkg/front_end/testcases/general/nested_variance.dart'. F, dynamic>> target2 = fsource2; ^" in fsource2 as{TypeError} = dynamic>() → void; diff --git a/pkg/front_end/testcases/general/nested_variance.dart.strong.modular.expect b/pkg/front_end/testcases/general/nested_variance.dart.strong.modular.expect index e848a9900a1..1f44980eeb0 100644 --- a/pkg/front_end/testcases/general/nested_variance.dart.strong.modular.expect +++ b/pkg/front_end/testcases/general/nested_variance.dart.strong.modular.expect @@ -2,7 +2,7 @@ library; // // Problems in library: // -// pkg/front_end/testcases/general/nested_variance.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. +// pkg/front_end/testcases/general/nested_variance.dart:84:42: Error: A value of type 'void Function>()' can't be assigned to a variable of type 'void Function>()'. // - 'Acon' is from 'pkg/front_end/testcases/general/nested_variance.dart'. // F, dynamic>> target2 = fsource2; // ^ @@ -125,7 +125,7 @@ static method testTypeAliasAsTypeArgument(self::Acov<() → dynamic, dynamic> so = dynamic>() → void fsource1 = self::toF>(source1); = dynamic>() → void target1 = fsource1; = dynamic>() → void fsource2 = self::toF>(source2); - = dynamic>() → void target2 = invalid-expression "pkg/front_end/testcases/general/nested_variance.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. + = dynamic>() → void target2 = invalid-expression "pkg/front_end/testcases/general/nested_variance.dart:84:42: Error: A value of type 'void Function>()' can't be assigned to a variable of type 'void Function>()'. - 'Acon' is from 'pkg/front_end/testcases/general/nested_variance.dart'. F, dynamic>> target2 = fsource2; ^" in fsource2 as{TypeError} = dynamic>() → void; diff --git a/pkg/front_end/testcases/general/nested_variance.dart.strong.transformed.expect b/pkg/front_end/testcases/general/nested_variance.dart.strong.transformed.expect index e848a9900a1..1f44980eeb0 100644 --- a/pkg/front_end/testcases/general/nested_variance.dart.strong.transformed.expect +++ b/pkg/front_end/testcases/general/nested_variance.dart.strong.transformed.expect @@ -2,7 +2,7 @@ library; // // Problems in library: // -// pkg/front_end/testcases/general/nested_variance.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. +// pkg/front_end/testcases/general/nested_variance.dart:84:42: Error: A value of type 'void Function>()' can't be assigned to a variable of type 'void Function>()'. // - 'Acon' is from 'pkg/front_end/testcases/general/nested_variance.dart'. // F, dynamic>> target2 = fsource2; // ^ @@ -125,7 +125,7 @@ static method testTypeAliasAsTypeArgument(self::Acov<() → dynamic, dynamic> so = dynamic>() → void fsource1 = self::toF>(source1); = dynamic>() → void target1 = fsource1; = dynamic>() → void fsource2 = self::toF>(source2); - = dynamic>() → void target2 = invalid-expression "pkg/front_end/testcases/general/nested_variance.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. + = dynamic>() → void target2 = invalid-expression "pkg/front_end/testcases/general/nested_variance.dart:84:42: Error: A value of type 'void Function>()' can't be assigned to a variable of type 'void Function>()'. - 'Acon' is from 'pkg/front_end/testcases/general/nested_variance.dart'. F, dynamic>> target2 = fsource2; ^" in fsource2 as{TypeError} = dynamic>() → void; diff --git a/pkg/front_end/testcases/general/type_variable_in_static_context.dart.strong.expect b/pkg/front_end/testcases/general/type_variable_in_static_context.dart.strong.expect index 727da883783..24b32e75c17 100644 --- a/pkg/front_end/testcases/general/type_variable_in_static_context.dart.strong.expect +++ b/pkg/front_end/testcases/general/type_variable_in_static_context.dart.strong.expect @@ -421,7 +421,7 @@ library; // void fun() {} // ^ // -// pkg/front_end/testcases/general/type_variable_in_static_context.dart:132:30: Error: The value 'null' can't be returned from a function with return type 'Mixin' because 'Mixin' is not nullable. +// pkg/front_end/testcases/general/type_variable_in_static_context.dart:132:30: Error: A value of type 'Null' can't be returned from a function with return type 'Mixin'. // - 'Mixin' is from 'pkg/front_end/testcases/general/type_variable_in_static_context.dart'. // factory Mixin.fact(T t) => null; // ^ @@ -550,7 +550,7 @@ abstract class Mixin extends core::Object /*i : super core::Object::•() ; static factory fact(self::Mixin::fact::T% t) → self::Mixin - return invalid-expression "pkg/front_end/testcases/general/type_variable_in_static_context.dart:132:30: Error: The value 'null' can't be returned from a function with return type 'Mixin' because 'Mixin' is not nullable. + return invalid-expression "pkg/front_end/testcases/general/type_variable_in_static_context.dart:132:30: Error: A value of type 'Null' can't be returned from a function with return type 'Mixin'. - 'Mixin' is from 'pkg/front_end/testcases/general/type_variable_in_static_context.dart'. factory Mixin.fact(T t) => null; ^" in null as{TypeError} Never; diff --git a/pkg/front_end/testcases/general/type_variable_in_static_context.dart.strong.modular.expect b/pkg/front_end/testcases/general/type_variable_in_static_context.dart.strong.modular.expect index 727da883783..24b32e75c17 100644 --- a/pkg/front_end/testcases/general/type_variable_in_static_context.dart.strong.modular.expect +++ b/pkg/front_end/testcases/general/type_variable_in_static_context.dart.strong.modular.expect @@ -421,7 +421,7 @@ library; // void fun() {} // ^ // -// pkg/front_end/testcases/general/type_variable_in_static_context.dart:132:30: Error: The value 'null' can't be returned from a function with return type 'Mixin' because 'Mixin' is not nullable. +// pkg/front_end/testcases/general/type_variable_in_static_context.dart:132:30: Error: A value of type 'Null' can't be returned from a function with return type 'Mixin'. // - 'Mixin' is from 'pkg/front_end/testcases/general/type_variable_in_static_context.dart'. // factory Mixin.fact(T t) => null; // ^ @@ -550,7 +550,7 @@ abstract class Mixin extends core::Object /*i : super core::Object::•() ; static factory fact(self::Mixin::fact::T% t) → self::Mixin - return invalid-expression "pkg/front_end/testcases/general/type_variable_in_static_context.dart:132:30: Error: The value 'null' can't be returned from a function with return type 'Mixin' because 'Mixin' is not nullable. + return invalid-expression "pkg/front_end/testcases/general/type_variable_in_static_context.dart:132:30: Error: A value of type 'Null' can't be returned from a function with return type 'Mixin'. - 'Mixin' is from 'pkg/front_end/testcases/general/type_variable_in_static_context.dart'. factory Mixin.fact(T t) => null; ^" in null as{TypeError} Never; diff --git a/pkg/front_end/testcases/general/type_variable_in_static_context.dart.strong.transformed.expect b/pkg/front_end/testcases/general/type_variable_in_static_context.dart.strong.transformed.expect index d7ffa52a703..1ab2f9bfbe8 100644 --- a/pkg/front_end/testcases/general/type_variable_in_static_context.dart.strong.transformed.expect +++ b/pkg/front_end/testcases/general/type_variable_in_static_context.dart.strong.transformed.expect @@ -421,7 +421,7 @@ library; // void fun() {} // ^ // -// pkg/front_end/testcases/general/type_variable_in_static_context.dart:132:30: Error: The value 'null' can't be returned from a function with return type 'Mixin' because 'Mixin' is not nullable. +// pkg/front_end/testcases/general/type_variable_in_static_context.dart:132:30: Error: A value of type 'Null' can't be returned from a function with return type 'Mixin'. // - 'Mixin' is from 'pkg/front_end/testcases/general/type_variable_in_static_context.dart'. // factory Mixin.fact(T t) => null; // ^ @@ -550,7 +550,7 @@ abstract class Mixin extends core::Object /*i : super core::Object::•() ; static factory fact(self::Mixin::fact::T% t) → self::Mixin - return invalid-expression "pkg/front_end/testcases/general/type_variable_in_static_context.dart:132:30: Error: The value 'null' can't be returned from a function with return type 'Mixin' because 'Mixin' is not nullable. + return invalid-expression "pkg/front_end/testcases/general/type_variable_in_static_context.dart:132:30: Error: A value of type 'Null' can't be returned from a function with return type 'Mixin'. - 'Mixin' is from 'pkg/front_end/testcases/general/type_variable_in_static_context.dart'. factory Mixin.fact(T t) => null; ^" in let Null #t1 = null in #t1 == null ?{Never} #t1 as{TypeError} Never : #t1{Never}; diff --git a/pkg/front_end/testcases/incremental/can_get_rid_of_nnbd_issue_error.yaml.world.1.expect b/pkg/front_end/testcases/incremental/can_get_rid_of_nnbd_issue_error.yaml.world.1.expect index b014f942a6f..bb4749d1b06 100644 --- a/pkg/front_end/testcases/incremental/can_get_rid_of_nnbd_issue_error.yaml.world.1.expect +++ b/pkg/front_end/testcases/incremental/can_get_rid_of_nnbd_issue_error.yaml.world.1.expect @@ -7,12 +7,12 @@ library from "package:bar/bar.dart" as bar { // // This file is in weak mode. // ^ // -// org-dartlang-test:///bar/lib/bar.dart:2:9: Error: The value 'null' can't be assigned to a variable of type 'int' because 'int' is not nullable. +// org-dartlang-test:///bar/lib/bar.dart:2:9: Error: A value of type 'Null' can't be assigned to a variable of type 'int'. // int y = null; // ^ // - static field dart.core::int y = invalid-expression "org-dartlang-test:///bar/lib/bar.dart:2:9: Error: The value 'null' can't be assigned to a variable of type 'int' because 'int' is not nullable.\nint y = null;\n ^" in let Null #t1 = null in #t1 == null ?{dart.core::int} #t1 as{TypeError} dart.core::int : #t1{dart.core::int}; + static field dart.core::int y = invalid-expression "org-dartlang-test:///bar/lib/bar.dart:2:9: Error: A value of type 'Null' can't be assigned to a variable of type 'int'.\nint y = null;\n ^" in let Null #t1 = null in #t1 == null ?{dart.core::int} #t1 as{TypeError} dart.core::int : #t1{dart.core::int}; } library from "package:baz/main.dart" as main { @@ -32,10 +32,10 @@ library from "package:foo/foo.dart" as foo { // // This file is in weak mode. // ^ // -// org-dartlang-test:///foo/lib/foo.dart:2:9: Error: The value 'null' can't be assigned to a variable of type 'int' because 'int' is not nullable. +// org-dartlang-test:///foo/lib/foo.dart:2:9: Error: A value of type 'Null' can't be assigned to a variable of type 'int'. // int x = null; // ^ // - static field dart.core::int x = invalid-expression "org-dartlang-test:///foo/lib/foo.dart:2:9: Error: The value 'null' can't be assigned to a variable of type 'int' because 'int' is not nullable.\nint x = null;\n ^" in let Null #t2 = null in #t2 == null ?{dart.core::int} #t2 as{TypeError} dart.core::int : #t2{dart.core::int}; + static field dart.core::int x = invalid-expression "org-dartlang-test:///foo/lib/foo.dart:2:9: Error: A value of type 'Null' can't be assigned to a variable of type 'int'.\nint x = null;\n ^" in let Null #t2 = null in #t2 == null ?{dart.core::int} #t2 as{TypeError} dart.core::int : #t2{dart.core::int}; } diff --git a/pkg/front_end/testcases/incremental/can_get_rid_of_nnbd_issue_error.yaml.world.2.expect b/pkg/front_end/testcases/incremental/can_get_rid_of_nnbd_issue_error.yaml.world.2.expect index 88093c5ee65..3fd66655bb8 100644 --- a/pkg/front_end/testcases/incremental/can_get_rid_of_nnbd_issue_error.yaml.world.2.expect +++ b/pkg/front_end/testcases/incremental/can_get_rid_of_nnbd_issue_error.yaml.world.2.expect @@ -7,12 +7,12 @@ library from "package:bar/bar.dart" as bar { // // This file is in weak mode. // ^ // -// org-dartlang-test:///bar/lib/bar.dart:2:9: Error: The value 'null' can't be assigned to a variable of type 'int' because 'int' is not nullable. +// org-dartlang-test:///bar/lib/bar.dart:2:9: Error: A value of type 'Null' can't be assigned to a variable of type 'int'. // int y = null; // ^ // - static field dart.core::int y = invalid-expression "org-dartlang-test:///bar/lib/bar.dart:2:9: Error: The value 'null' can't be assigned to a variable of type 'int' because 'int' is not nullable.\nint y = null;\n ^" in let Null #t1 = null in #t1 == null ?{dart.core::int} #t1 as{TypeError} dart.core::int : #t1{dart.core::int}; + static field dart.core::int y = invalid-expression "org-dartlang-test:///bar/lib/bar.dart:2:9: Error: A value of type 'Null' can't be assigned to a variable of type 'int'.\nint y = null;\n ^" in let Null #t1 = null in #t1 == null ?{dart.core::int} #t1 as{TypeError} dart.core::int : #t1{dart.core::int}; } library from "package:baz/main.dart" as main { @@ -33,10 +33,10 @@ library from "package:foo/foo.dart" as foo { // // This file is in weak mode. // ^ // -// org-dartlang-test:///foo/lib/foo.dart:2:9: Error: The value 'null' can't be assigned to a variable of type 'int' because 'int' is not nullable. +// org-dartlang-test:///foo/lib/foo.dart:2:9: Error: A value of type 'Null' can't be assigned to a variable of type 'int'. // int x = null; // ^ // - static field dart.core::int x = invalid-expression "org-dartlang-test:///foo/lib/foo.dart:2:9: Error: The value 'null' can't be assigned to a variable of type 'int' because 'int' is not nullable.\nint x = null;\n ^" in let Null #t2 = null in #t2 == null ?{dart.core::int} #t2 as{TypeError} dart.core::int : #t2{dart.core::int}; + static field dart.core::int x = invalid-expression "org-dartlang-test:///foo/lib/foo.dart:2:9: Error: A value of type 'Null' can't be assigned to a variable of type 'int'.\nint x = null;\n ^" in let Null #t2 = null in #t2 == null ?{dart.core::int} #t2 as{TypeError} dart.core::int : #t2{dart.core::int}; } diff --git a/pkg/front_end/testcases/incremental/can_get_rid_of_nnbd_issue_error.yaml.world.3.expect b/pkg/front_end/testcases/incremental/can_get_rid_of_nnbd_issue_error.yaml.world.3.expect index fdf6077ec38..f36d8ca73fd 100644 --- a/pkg/front_end/testcases/incremental/can_get_rid_of_nnbd_issue_error.yaml.world.3.expect +++ b/pkg/front_end/testcases/incremental/can_get_rid_of_nnbd_issue_error.yaml.world.3.expect @@ -7,12 +7,12 @@ library from "package:bar/bar.dart" as bar { // // This file is in weak mode. // ^ // -// org-dartlang-test:///bar/lib/bar.dart:2:9: Error: The value 'null' can't be assigned to a variable of type 'int' because 'int' is not nullable. +// org-dartlang-test:///bar/lib/bar.dart:2:9: Error: A value of type 'Null' can't be assigned to a variable of type 'int'. // int y = null; // ^ // - static field dart.core::int y = invalid-expression "org-dartlang-test:///bar/lib/bar.dart:2:9: Error: The value 'null' can't be assigned to a variable of type 'int' because 'int' is not nullable.\nint y = null;\n ^" in let Null #t1 = null in #t1 == null ?{dart.core::int} #t1 as{TypeError} dart.core::int : #t1{dart.core::int}; + static field dart.core::int y = invalid-expression "org-dartlang-test:///bar/lib/bar.dart:2:9: Error: A value of type 'Null' can't be assigned to a variable of type 'int'.\nint y = null;\n ^" in let Null #t1 = null in #t1 == null ?{dart.core::int} #t1 as{TypeError} dart.core::int : #t1{dart.core::int}; } library from "package:baz/main.dart" as main { diff --git a/pkg/front_end/testcases/inference/infer_correctly_on_multiple_variables_declared_together.dart.strong.expect b/pkg/front_end/testcases/inference/infer_correctly_on_multiple_variables_declared_together.dart.strong.expect index 7dcfafba7a5..82b2fa8d6e7 100644 --- a/pkg/front_end/testcases/inference/infer_correctly_on_multiple_variables_declared_together.dart.strong.expect +++ b/pkg/front_end/testcases/inference/infer_correctly_on_multiple_variables_declared_together.dart.strong.expect @@ -6,7 +6,7 @@ library test; // s = /*error:INVALID_ASSIGNMENT*/ new B(). /*@target=B.y*/ y; // ^ // -// pkg/front_end/testcases/inference/infer_correctly_on_multiple_variables_declared_together.dart:24:32: Error: A value of type 'String?' can't be assigned to a variable of type 'String' because 'String?' is nullable and 'String' isn't. +// pkg/front_end/testcases/inference/infer_correctly_on_multiple_variables_declared_together.dart:24:32: Error: A value of type 'String?' can't be assigned to a variable of type 'String'. // s = new B(). /*@target=B.z*/ z; // ^ // @@ -46,7 +46,7 @@ static method foo() → dynamic { s = invalid-expression "pkg/front_end/testcases/inference/infer_correctly_on_multiple_variables_declared_together.dart:23:61: Error: A value of type 'int' can't be assigned to a variable of type 'String'. s = /*error:INVALID_ASSIGNMENT*/ new B(). /*@target=B.y*/ y; ^" in new self::B::•().{self::B::y}{core::int} as{TypeError} core::String; - s = invalid-expression "pkg/front_end/testcases/inference/infer_correctly_on_multiple_variables_declared_together.dart:24:32: Error: A value of type 'String?' can't be assigned to a variable of type 'String' because 'String?' is nullable and 'String' isn't. + s = invalid-expression "pkg/front_end/testcases/inference/infer_correctly_on_multiple_variables_declared_together.dart:24:32: Error: A value of type 'String?' can't be assigned to a variable of type 'String'. s = new B(). /*@target=B.z*/ z; ^" in new self::B::•().{self::B::z}{core::String?} as{TypeError} core::String; s = invalid-expression "pkg/front_end/testcases/inference/infer_correctly_on_multiple_variables_declared_together.dart:25:61: Error: A value of type 'int' can't be assigned to a variable of type 'String'. diff --git a/pkg/front_end/testcases/inference/infer_correctly_on_multiple_variables_declared_together.dart.strong.modular.expect b/pkg/front_end/testcases/inference/infer_correctly_on_multiple_variables_declared_together.dart.strong.modular.expect index 7dcfafba7a5..82b2fa8d6e7 100644 --- a/pkg/front_end/testcases/inference/infer_correctly_on_multiple_variables_declared_together.dart.strong.modular.expect +++ b/pkg/front_end/testcases/inference/infer_correctly_on_multiple_variables_declared_together.dart.strong.modular.expect @@ -6,7 +6,7 @@ library test; // s = /*error:INVALID_ASSIGNMENT*/ new B(). /*@target=B.y*/ y; // ^ // -// pkg/front_end/testcases/inference/infer_correctly_on_multiple_variables_declared_together.dart:24:32: Error: A value of type 'String?' can't be assigned to a variable of type 'String' because 'String?' is nullable and 'String' isn't. +// pkg/front_end/testcases/inference/infer_correctly_on_multiple_variables_declared_together.dart:24:32: Error: A value of type 'String?' can't be assigned to a variable of type 'String'. // s = new B(). /*@target=B.z*/ z; // ^ // @@ -46,7 +46,7 @@ static method foo() → dynamic { s = invalid-expression "pkg/front_end/testcases/inference/infer_correctly_on_multiple_variables_declared_together.dart:23:61: Error: A value of type 'int' can't be assigned to a variable of type 'String'. s = /*error:INVALID_ASSIGNMENT*/ new B(). /*@target=B.y*/ y; ^" in new self::B::•().{self::B::y}{core::int} as{TypeError} core::String; - s = invalid-expression "pkg/front_end/testcases/inference/infer_correctly_on_multiple_variables_declared_together.dart:24:32: Error: A value of type 'String?' can't be assigned to a variable of type 'String' because 'String?' is nullable and 'String' isn't. + s = invalid-expression "pkg/front_end/testcases/inference/infer_correctly_on_multiple_variables_declared_together.dart:24:32: Error: A value of type 'String?' can't be assigned to a variable of type 'String'. s = new B(). /*@target=B.z*/ z; ^" in new self::B::•().{self::B::z}{core::String?} as{TypeError} core::String; s = invalid-expression "pkg/front_end/testcases/inference/infer_correctly_on_multiple_variables_declared_together.dart:25:61: Error: A value of type 'int' can't be assigned to a variable of type 'String'. diff --git a/pkg/front_end/testcases/inference/infer_correctly_on_multiple_variables_declared_together.dart.strong.transformed.expect b/pkg/front_end/testcases/inference/infer_correctly_on_multiple_variables_declared_together.dart.strong.transformed.expect index 568021626d4..30b353e9be9 100644 --- a/pkg/front_end/testcases/inference/infer_correctly_on_multiple_variables_declared_together.dart.strong.transformed.expect +++ b/pkg/front_end/testcases/inference/infer_correctly_on_multiple_variables_declared_together.dart.strong.transformed.expect @@ -6,7 +6,7 @@ library test; // s = /*error:INVALID_ASSIGNMENT*/ new B(). /*@target=B.y*/ y; // ^ // -// pkg/front_end/testcases/inference/infer_correctly_on_multiple_variables_declared_together.dart:24:32: Error: A value of type 'String?' can't be assigned to a variable of type 'String' because 'String?' is nullable and 'String' isn't. +// pkg/front_end/testcases/inference/infer_correctly_on_multiple_variables_declared_together.dart:24:32: Error: A value of type 'String?' can't be assigned to a variable of type 'String'. // s = new B(). /*@target=B.z*/ z; // ^ // @@ -46,7 +46,7 @@ static method foo() → dynamic { s = invalid-expression "pkg/front_end/testcases/inference/infer_correctly_on_multiple_variables_declared_together.dart:23:61: Error: A value of type 'int' can't be assigned to a variable of type 'String'. s = /*error:INVALID_ASSIGNMENT*/ new B(). /*@target=B.y*/ y; ^" in new self::B::•().{self::B::y}{core::int} as{TypeError} core::String; - s = invalid-expression "pkg/front_end/testcases/inference/infer_correctly_on_multiple_variables_declared_together.dart:24:32: Error: A value of type 'String?' can't be assigned to a variable of type 'String' because 'String?' is nullable and 'String' isn't. + s = invalid-expression "pkg/front_end/testcases/inference/infer_correctly_on_multiple_variables_declared_together.dart:24:32: Error: A value of type 'String?' can't be assigned to a variable of type 'String'. s = new B(). /*@target=B.z*/ z; ^" in let core::String? #t1 = new self::B::•().{self::B::z}{core::String?} in #t1 == null ?{core::String} #t1 as{TypeError} core::String : #t1{core::String}; s = invalid-expression "pkg/front_end/testcases/inference/infer_correctly_on_multiple_variables_declared_together.dart:25:61: Error: A value of type 'int' can't be assigned to a variable of type 'String'. diff --git a/pkg/front_end/testcases/inference_new/strongly_connected_component.dart.strong.expect b/pkg/front_end/testcases/inference_new/strongly_connected_component.dart.strong.expect index 26bcce50fcd..a8737c00bfa 100644 --- a/pkg/front_end/testcases/inference_new/strongly_connected_component.dart.strong.expect +++ b/pkg/front_end/testcases/inference_new/strongly_connected_component.dart.strong.expect @@ -7,7 +7,7 @@ library test; // var x = /*@returnType=() -> invalid-type*/ () => f() ? y : z; // ^ // -// pkg/front_end/testcases/inference_new/strongly_connected_component.dart:8:13: Error: The value 'null' can't be returned from a function with return type 'bool' because 'bool' is not nullable. +// pkg/front_end/testcases/inference_new/strongly_connected_component.dart:8:13: Error: A value of type 'Null' can't be returned from a function with return type 'bool'. // bool f() => null; // ^ // @@ -18,7 +18,7 @@ static field invalid-type x = () → () → invalid-type => self::f() ?{() → i static field () → invalid-type y = () → invalid-type => self::x; static field () → invalid-type z = () → invalid-type => self::x; static method f() → core::bool - return invalid-expression "pkg/front_end/testcases/inference_new/strongly_connected_component.dart:8:13: Error: The value 'null' can't be returned from a function with return type 'bool' because 'bool' is not nullable. + return invalid-expression "pkg/front_end/testcases/inference_new/strongly_connected_component.dart:8:13: Error: A value of type 'Null' can't be returned from a function with return type 'bool'. bool f() => null; ^" in null as{TypeError} core::bool; static method main() → dynamic {} diff --git a/pkg/front_end/testcases/inference_new/strongly_connected_component.dart.strong.modular.expect b/pkg/front_end/testcases/inference_new/strongly_connected_component.dart.strong.modular.expect index 26bcce50fcd..a8737c00bfa 100644 --- a/pkg/front_end/testcases/inference_new/strongly_connected_component.dart.strong.modular.expect +++ b/pkg/front_end/testcases/inference_new/strongly_connected_component.dart.strong.modular.expect @@ -7,7 +7,7 @@ library test; // var x = /*@returnType=() -> invalid-type*/ () => f() ? y : z; // ^ // -// pkg/front_end/testcases/inference_new/strongly_connected_component.dart:8:13: Error: The value 'null' can't be returned from a function with return type 'bool' because 'bool' is not nullable. +// pkg/front_end/testcases/inference_new/strongly_connected_component.dart:8:13: Error: A value of type 'Null' can't be returned from a function with return type 'bool'. // bool f() => null; // ^ // @@ -18,7 +18,7 @@ static field invalid-type x = () → () → invalid-type => self::f() ?{() → i static field () → invalid-type y = () → invalid-type => self::x; static field () → invalid-type z = () → invalid-type => self::x; static method f() → core::bool - return invalid-expression "pkg/front_end/testcases/inference_new/strongly_connected_component.dart:8:13: Error: The value 'null' can't be returned from a function with return type 'bool' because 'bool' is not nullable. + return invalid-expression "pkg/front_end/testcases/inference_new/strongly_connected_component.dart:8:13: Error: A value of type 'Null' can't be returned from a function with return type 'bool'. bool f() => null; ^" in null as{TypeError} core::bool; static method main() → dynamic {} diff --git a/pkg/front_end/testcases/inference_new/strongly_connected_component.dart.strong.transformed.expect b/pkg/front_end/testcases/inference_new/strongly_connected_component.dart.strong.transformed.expect index 86bd6fe54dd..ab24a75a953 100644 --- a/pkg/front_end/testcases/inference_new/strongly_connected_component.dart.strong.transformed.expect +++ b/pkg/front_end/testcases/inference_new/strongly_connected_component.dart.strong.transformed.expect @@ -7,7 +7,7 @@ library test; // var x = /*@returnType=() -> invalid-type*/ () => f() ? y : z; // ^ // -// pkg/front_end/testcases/inference_new/strongly_connected_component.dart:8:13: Error: The value 'null' can't be returned from a function with return type 'bool' because 'bool' is not nullable. +// pkg/front_end/testcases/inference_new/strongly_connected_component.dart:8:13: Error: A value of type 'Null' can't be returned from a function with return type 'bool'. // bool f() => null; // ^ // @@ -18,7 +18,7 @@ static field invalid-type x = () → () → invalid-type => self::f() ?{() → i static field () → invalid-type y = () → invalid-type => self::x; static field () → invalid-type z = () → invalid-type => self::x; static method f() → core::bool - return invalid-expression "pkg/front_end/testcases/inference_new/strongly_connected_component.dart:8:13: Error: The value 'null' can't be returned from a function with return type 'bool' because 'bool' is not nullable. + return invalid-expression "pkg/front_end/testcases/inference_new/strongly_connected_component.dart:8:13: Error: A value of type 'Null' can't be returned from a function with return type 'bool'. bool f() => null; ^" in let Null #t1 = null in #t1 == null ?{core::bool} #t1 as{TypeError} core::bool : #t1{core::bool}; static method main() → dynamic {} diff --git a/pkg/front_end/testcases/nnbd/assignability.dart.strong.expect b/pkg/front_end/testcases/nnbd/assignability.dart.strong.expect index 8bb6c59f5f1..1e33c04bde7 100644 --- a/pkg/front_end/testcases/nnbd/assignability.dart.strong.expect +++ b/pkg/front_end/testcases/nnbd/assignability.dart.strong.expect @@ -2,69 +2,69 @@ library; // // Problems in library: // -// pkg/front_end/testcases/nnbd/assignability.dart:114:22: Error: A value of type 'Object?' can't be assigned to a variable of type 'Object' because 'Object?' is nullable and 'Object' isn't. +// pkg/front_end/testcases/nnbd/assignability.dart:114:22: Error: A value of type 'Object?' can't be assigned to a variable of type 'Object'. // - 'Object' is from 'dart:core'. // Object objectVar = objectNullableArg; // ^ // -// pkg/front_end/testcases/nnbd/assignability.dart:115:15: Error: A value of type 'num?' can't be assigned to a variable of type 'Object' because 'num?' is nullable and 'Object' isn't. +// pkg/front_end/testcases/nnbd/assignability.dart:115:15: Error: A value of type 'num?' can't be assigned to a variable of type 'Object'. // - 'Object' is from 'dart:core'. // objectVar = numNullableArg; // ^ // -// pkg/front_end/testcases/nnbd/assignability.dart:116:15: Error: A value of type 'int?' can't be assigned to a variable of type 'Object' because 'int?' is nullable and 'Object' isn't. +// pkg/front_end/testcases/nnbd/assignability.dart:116:15: Error: A value of type 'int?' can't be assigned to a variable of type 'Object'. // - 'Object' is from 'dart:core'. // objectVar = intNullableArg; // ^ // -// pkg/front_end/testcases/nnbd/assignability.dart:117:15: Error: A value of type 'double?' can't be assigned to a variable of type 'Object' because 'double?' is nullable and 'Object' isn't. +// pkg/front_end/testcases/nnbd/assignability.dart:117:15: Error: A value of type 'double?' can't be assigned to a variable of type 'Object'. // - 'Object' is from 'dart:core'. // objectVar = doubleNullableArg; // ^ // -// pkg/front_end/testcases/nnbd/assignability.dart:118:15: Error: A value of type 'Function?' can't be assigned to a variable of type 'Object' because 'Function?' is nullable and 'Object' isn't. +// pkg/front_end/testcases/nnbd/assignability.dart:118:15: Error: A value of type 'Function?' can't be assigned to a variable of type 'Object'. // - 'Function' is from 'dart:core'. // - 'Object' is from 'dart:core'. // objectVar = functionNullableArg; // ^ // -// pkg/front_end/testcases/nnbd/assignability.dart:119:15: Error: A value of type 'void Function()?' can't be assigned to a variable of type 'Object' because 'void Function()?' is nullable and 'Object' isn't. +// pkg/front_end/testcases/nnbd/assignability.dart:119:15: Error: A value of type 'void Function()?' can't be assigned to a variable of type 'Object'. // - 'Object' is from 'dart:core'. // objectVar = toVoidNullableArg; // ^ // -// pkg/front_end/testcases/nnbd/assignability.dart:120:15: Error: A value of type 'Tearoffable?' can't be assigned to a variable of type 'Object' because 'Tearoffable?' is nullable and 'Object' isn't. +// pkg/front_end/testcases/nnbd/assignability.dart:120:15: Error: A value of type 'Tearoffable?' can't be assigned to a variable of type 'Object'. // - 'Tearoffable' is from 'pkg/front_end/testcases/nnbd/assignability.dart'. // - 'Object' is from 'dart:core'. // objectVar = tearoffableNullableArg; // ^ // -// pkg/front_end/testcases/nnbd/assignability.dart:121:15: Error: A value of type 'XnonNull?' can't be assigned to a variable of type 'Object' because 'XnonNull?' is nullable and 'Object' isn't. +// pkg/front_end/testcases/nnbd/assignability.dart:121:15: Error: A value of type 'XnonNull?' can't be assigned to a variable of type 'Object'. // - 'Object' is from 'dart:core'. // objectVar = xNonNullNullableArg; // ^ // -// pkg/front_end/testcases/nnbd/assignability.dart:122:15: Error: A value of type 'XpotentiallyNull' can't be assigned to a variable of type 'Object' because 'XpotentiallyNull' is nullable and 'Object' isn't. +// pkg/front_end/testcases/nnbd/assignability.dart:122:15: Error: A value of type 'XpotentiallyNull' can't be assigned to a variable of type 'Object'. // - 'Object' is from 'dart:core'. // objectVar = xPotentiallyNullArg; // ^ // -// pkg/front_end/testcases/nnbd/assignability.dart:123:15: Error: A value of type 'XpotentiallyNull?' can't be assigned to a variable of type 'Object' because 'XpotentiallyNull?' is nullable and 'Object' isn't. +// pkg/front_end/testcases/nnbd/assignability.dart:123:15: Error: A value of type 'XpotentiallyNull?' can't be assigned to a variable of type 'Object'. // - 'Object' is from 'dart:core'. // objectVar = xPotentiallyNullNullableArg; // ^ // -// pkg/front_end/testcases/nnbd/assignability.dart:124:15: Error: A value of type 'YnonNull?' can't be assigned to a variable of type 'Object' because 'YnonNull?' is nullable and 'Object' isn't. +// pkg/front_end/testcases/nnbd/assignability.dart:124:15: Error: A value of type 'YnonNull?' can't be assigned to a variable of type 'Object'. // - 'Object' is from 'dart:core'. // objectVar = yNonNullNullableArg; // ^ // -// pkg/front_end/testcases/nnbd/assignability.dart:125:15: Error: A value of type 'YpotentiallyNull' can't be assigned to a variable of type 'Object' because 'YpotentiallyNull' is nullable and 'Object' isn't. +// pkg/front_end/testcases/nnbd/assignability.dart:125:15: Error: A value of type 'YpotentiallyNull' can't be assigned to a variable of type 'Object'. // - 'Object' is from 'dart:core'. // objectVar = yPotentiallyNullArg; // ^ // -// pkg/front_end/testcases/nnbd/assignability.dart:126:15: Error: A value of type 'YpotentiallyNull?' can't be assigned to a variable of type 'Object' because 'YpotentiallyNull?' is nullable and 'Object' isn't. +// pkg/front_end/testcases/nnbd/assignability.dart:126:15: Error: A value of type 'YpotentiallyNull?' can't be assigned to a variable of type 'Object'. // - 'Object' is from 'dart:core'. // objectVar = yPotentiallyNullNullableArg; // ^ @@ -79,15 +79,15 @@ library; // numVar = objectNullableArg; // ^ // -// pkg/front_end/testcases/nnbd/assignability.dart:130:12: Error: A value of type 'num?' can't be assigned to a variable of type 'num' because 'num?' is nullable and 'num' isn't. +// pkg/front_end/testcases/nnbd/assignability.dart:130:12: Error: A value of type 'num?' can't be assigned to a variable of type 'num'. // numVar = numNullableArg; // ^ // -// pkg/front_end/testcases/nnbd/assignability.dart:131:12: Error: A value of type 'int?' can't be assigned to a variable of type 'num' because 'int?' is nullable and 'num' isn't. +// pkg/front_end/testcases/nnbd/assignability.dart:131:12: Error: A value of type 'int?' can't be assigned to a variable of type 'num'. // numVar = intNullableArg; // ^ // -// pkg/front_end/testcases/nnbd/assignability.dart:132:12: Error: A value of type 'double?' can't be assigned to a variable of type 'num' because 'double?' is nullable and 'num' isn't. +// pkg/front_end/testcases/nnbd/assignability.dart:132:12: Error: A value of type 'double?' can't be assigned to a variable of type 'num'. // numVar = doubleNullableArg; // ^ // @@ -169,7 +169,7 @@ library; // intVar = numNullableArg; // ^ // -// pkg/front_end/testcases/nnbd/assignability.dart:152:12: Error: A value of type 'int?' can't be assigned to a variable of type 'int' because 'int?' is nullable and 'int' isn't. +// pkg/front_end/testcases/nnbd/assignability.dart:152:12: Error: A value of type 'int?' can't be assigned to a variable of type 'int'. // intVar = intNullableArg; // ^ // @@ -267,7 +267,7 @@ library; // doubleVar = intNullableArg; // ^ // -// pkg/front_end/testcases/nnbd/assignability.dart:176:15: Error: A value of type 'double?' can't be assigned to a variable of type 'double' because 'double?' is nullable and 'double' isn't. +// pkg/front_end/testcases/nnbd/assignability.dart:176:15: Error: A value of type 'double?' can't be assigned to a variable of type 'double'. // doubleVar = doubleNullableArg; // ^ // @@ -373,12 +373,12 @@ library; // functionVar = doubleNullableArg; // ^ // -// pkg/front_end/testcases/nnbd/assignability.dart:200:17: Error: A value of type 'Function?' can't be assigned to a variable of type 'Function' because 'Function?' is nullable and 'Function' isn't. +// pkg/front_end/testcases/nnbd/assignability.dart:200:17: Error: A value of type 'Function?' can't be assigned to a variable of type 'Function'. // - 'Function' is from 'dart:core'. // functionVar = functionNullableArg; // ^ // -// pkg/front_end/testcases/nnbd/assignability.dart:201:17: Error: A value of type 'void Function()?' can't be assigned to a variable of type 'Function' because 'void Function()?' is nullable and 'Function' isn't. +// pkg/front_end/testcases/nnbd/assignability.dart:201:17: Error: A value of type 'void Function()?' can't be assigned to a variable of type 'Function'. // - 'Function' is from 'dart:core'. // functionVar = toVoidNullableArg; // ^ @@ -471,7 +471,7 @@ library; // toVoidVar = functionNullableArg; // ^ // -// pkg/front_end/testcases/nnbd/assignability.dart:222:15: Error: A value of type 'void Function()?' can't be assigned to a variable of type 'void Function()' because 'void Function()?' is nullable and 'void Function()' isn't. +// pkg/front_end/testcases/nnbd/assignability.dart:222:15: Error: A value of type 'void Function()?' can't be assigned to a variable of type 'void Function()'. // toVoidVar = toVoidNullableArg; // ^ // @@ -575,7 +575,7 @@ library; // tearoffableVar = toVoidNullableArg; // ^ // -// pkg/front_end/testcases/nnbd/assignability.dart:245:20: Error: A value of type 'Tearoffable?' can't be assigned to a variable of type 'Tearoffable' because 'Tearoffable?' is nullable and 'Tearoffable' isn't. +// pkg/front_end/testcases/nnbd/assignability.dart:245:20: Error: A value of type 'Tearoffable?' can't be assigned to a variable of type 'Tearoffable'. // - 'Tearoffable' is from 'pkg/front_end/testcases/nnbd/assignability.dart'. // tearoffableVar = tearoffableNullableArg; // ^ @@ -682,7 +682,7 @@ library; // xNonNullVar = tearoffableNullableArg; // ^ // -// pkg/front_end/testcases/nnbd/assignability.dart:269:17: Error: A value of type 'XnonNull?' can't be assigned to a variable of type 'XnonNull' because 'XnonNull?' is nullable and 'XnonNull' isn't. +// pkg/front_end/testcases/nnbd/assignability.dart:269:17: Error: A value of type 'XnonNull?' can't be assigned to a variable of type 'XnonNull'. // xNonNullVar = xNonNullNullableArg; // ^ // @@ -694,7 +694,7 @@ library; // xNonNullVar = xPotentiallyNullNullableArg; // ^ // -// pkg/front_end/testcases/nnbd/assignability.dart:272:17: Error: A value of type 'YnonNull?' can't be assigned to a variable of type 'XnonNull' because 'YnonNull?' is nullable and 'XnonNull' isn't. +// pkg/front_end/testcases/nnbd/assignability.dart:272:17: Error: A value of type 'YnonNull?' can't be assigned to a variable of type 'XnonNull'. // xNonNullVar = yNonNullNullableArg; // ^ // @@ -776,7 +776,7 @@ library; // xPotentiallyNullVar = xNonNullNullableArg; // ^ // -// pkg/front_end/testcases/nnbd/assignability.dart:292:25: Error: A value of type 'XpotentiallyNull?' can't be assigned to a variable of type 'XpotentiallyNull' because 'XpotentiallyNull?' is nullable and 'XpotentiallyNull' isn't. +// pkg/front_end/testcases/nnbd/assignability.dart:292:25: Error: A value of type 'XpotentiallyNull?' can't be assigned to a variable of type 'XpotentiallyNull'. // xPotentiallyNullVar = xPotentiallyNullNullableArg; // ^ // @@ -788,7 +788,7 @@ library; // xPotentiallyNullVar = yNonNullNullableArg; // ^ // -// pkg/front_end/testcases/nnbd/assignability.dart:295:25: Error: A value of type 'YpotentiallyNull?' can't be assigned to a variable of type 'XpotentiallyNull' because 'YpotentiallyNull?' is nullable and 'XpotentiallyNull' isn't. +// pkg/front_end/testcases/nnbd/assignability.dart:295:25: Error: A value of type 'YpotentiallyNull?' can't be assigned to a variable of type 'XpotentiallyNull'. // xPotentiallyNullVar = yPotentiallyNullNullableArg; // ^ // @@ -870,7 +870,7 @@ library; // yNonNullVar = xPotentiallyNullNullableArg; // ^ // -// pkg/front_end/testcases/nnbd/assignability.dart:315:17: Error: A value of type 'YnonNull?' can't be assigned to a variable of type 'YnonNull' because 'YnonNull?' is nullable and 'YnonNull' isn't. +// pkg/front_end/testcases/nnbd/assignability.dart:315:17: Error: A value of type 'YnonNull?' can't be assigned to a variable of type 'YnonNull'. // yNonNullVar = yNonNullNullableArg; // ^ // @@ -968,7 +968,7 @@ library; // yPotentiallyNullVar = yNonNullNullableArg; // ^ // -// pkg/front_end/testcases/nnbd/assignability.dart:339:25: Error: A value of type 'YpotentiallyNull?' can't be assigned to a variable of type 'YpotentiallyNull' because 'YpotentiallyNull?' is nullable and 'YpotentiallyNull' isn't. +// pkg/front_end/testcases/nnbd/assignability.dart:339:25: Error: A value of type 'YpotentiallyNull?' can't be assigned to a variable of type 'YpotentiallyNull'. // yPotentiallyNullVar = yPotentiallyNullNullableArg; // ^ // @@ -1032,57 +1032,57 @@ static method ok(core::Object objectArg, core::Object? objectNullableArg, core::num numArg, core::num? numNullableArg, core::int intArg, core::int? intNullableArg, core::double doubleArg, core::double? doubleNullableArg, core::Function functionArg, core::Function? functionNullableArg, () → void toVoidArg, () →? void toVoidNullableArg, self::Tearoffable tearoffableArg, self::Tearoffable? tearoffableNullableArg, self::error::XnonNull xNonNullArg, self::error::XnonNull? xNonNullNullableArg, self::error::XpotentiallyNull% xPotentiallyNullArg, self::error::XpotentiallyNull? xPotentiallyNullNullableArg, self::error::YnonNull yNonNullArg, self::error::YnonNull? yNonNullNullableArg, self::error::YpotentiallyNull% yPotentiallyNullArg, self::error::YpotentiallyNull? yPotentiallyNullNullableArg) → dynamic { - core::Object objectVar = invalid-expression "pkg/front_end/testcases/nnbd/assignability.dart:114:22: Error: A value of type 'Object?' can't be assigned to a variable of type 'Object' because 'Object?' is nullable and 'Object' isn't. + core::Object objectVar = invalid-expression "pkg/front_end/testcases/nnbd/assignability.dart:114:22: Error: A value of type 'Object?' can't be assigned to a variable of type 'Object'. - 'Object' is from 'dart:core'. Object objectVar = objectNullableArg; ^" in objectNullableArg as{TypeError} core::Object; - objectVar = invalid-expression "pkg/front_end/testcases/nnbd/assignability.dart:115:15: Error: A value of type 'num?' can't be assigned to a variable of type 'Object' because 'num?' is nullable and 'Object' isn't. + objectVar = invalid-expression "pkg/front_end/testcases/nnbd/assignability.dart:115:15: Error: A value of type 'num?' can't be assigned to a variable of type 'Object'. - 'Object' is from 'dart:core'. objectVar = numNullableArg; ^" in numNullableArg as{TypeError} core::Object; - objectVar = invalid-expression "pkg/front_end/testcases/nnbd/assignability.dart:116:15: Error: A value of type 'int?' can't be assigned to a variable of type 'Object' because 'int?' is nullable and 'Object' isn't. + objectVar = invalid-expression "pkg/front_end/testcases/nnbd/assignability.dart:116:15: Error: A value of type 'int?' can't be assigned to a variable of type 'Object'. - 'Object' is from 'dart:core'. objectVar = intNullableArg; ^" in intNullableArg as{TypeError} core::Object; - objectVar = invalid-expression "pkg/front_end/testcases/nnbd/assignability.dart:117:15: Error: A value of type 'double?' can't be assigned to a variable of type 'Object' because 'double?' is nullable and 'Object' isn't. + objectVar = invalid-expression "pkg/front_end/testcases/nnbd/assignability.dart:117:15: Error: A value of type 'double?' can't be assigned to a variable of type 'Object'. - 'Object' is from 'dart:core'. objectVar = doubleNullableArg; ^" in doubleNullableArg as{TypeError} core::Object; - objectVar = invalid-expression "pkg/front_end/testcases/nnbd/assignability.dart:118:15: Error: A value of type 'Function?' can't be assigned to a variable of type 'Object' because 'Function?' is nullable and 'Object' isn't. + objectVar = invalid-expression "pkg/front_end/testcases/nnbd/assignability.dart:118:15: Error: A value of type 'Function?' can't be assigned to a variable of type 'Object'. - 'Function' is from 'dart:core'. - 'Object' is from 'dart:core'. objectVar = functionNullableArg; ^" in functionNullableArg as{TypeError} core::Object; - objectVar = invalid-expression "pkg/front_end/testcases/nnbd/assignability.dart:119:15: Error: A value of type 'void Function()?' can't be assigned to a variable of type 'Object' because 'void Function()?' is nullable and 'Object' isn't. + objectVar = invalid-expression "pkg/front_end/testcases/nnbd/assignability.dart:119:15: Error: A value of type 'void Function()?' can't be assigned to a variable of type 'Object'. - 'Object' is from 'dart:core'. objectVar = toVoidNullableArg; ^" in toVoidNullableArg as{TypeError} core::Object; - objectVar = invalid-expression "pkg/front_end/testcases/nnbd/assignability.dart:120:15: Error: A value of type 'Tearoffable?' can't be assigned to a variable of type 'Object' because 'Tearoffable?' is nullable and 'Object' isn't. + objectVar = invalid-expression "pkg/front_end/testcases/nnbd/assignability.dart:120:15: Error: A value of type 'Tearoffable?' can't be assigned to a variable of type 'Object'. - 'Tearoffable' is from 'pkg/front_end/testcases/nnbd/assignability.dart'. - 'Object' is from 'dart:core'. objectVar = tearoffableNullableArg; ^" in tearoffableNullableArg as{TypeError} core::Object; - objectVar = invalid-expression "pkg/front_end/testcases/nnbd/assignability.dart:121:15: Error: A value of type 'XnonNull?' can't be assigned to a variable of type 'Object' because 'XnonNull?' is nullable and 'Object' isn't. + objectVar = invalid-expression "pkg/front_end/testcases/nnbd/assignability.dart:121:15: Error: A value of type 'XnonNull?' can't be assigned to a variable of type 'Object'. - 'Object' is from 'dart:core'. objectVar = xNonNullNullableArg; ^" in xNonNullNullableArg as{TypeError} core::Object; - objectVar = invalid-expression "pkg/front_end/testcases/nnbd/assignability.dart:122:15: Error: A value of type 'XpotentiallyNull' can't be assigned to a variable of type 'Object' because 'XpotentiallyNull' is nullable and 'Object' isn't. + objectVar = invalid-expression "pkg/front_end/testcases/nnbd/assignability.dart:122:15: Error: A value of type 'XpotentiallyNull' can't be assigned to a variable of type 'Object'. - 'Object' is from 'dart:core'. objectVar = xPotentiallyNullArg; ^" in xPotentiallyNullArg as{TypeError} core::Object; - objectVar = invalid-expression "pkg/front_end/testcases/nnbd/assignability.dart:123:15: Error: A value of type 'XpotentiallyNull?' can't be assigned to a variable of type 'Object' because 'XpotentiallyNull?' is nullable and 'Object' isn't. + objectVar = invalid-expression "pkg/front_end/testcases/nnbd/assignability.dart:123:15: Error: A value of type 'XpotentiallyNull?' can't be assigned to a variable of type 'Object'. - 'Object' is from 'dart:core'. objectVar = xPotentiallyNullNullableArg; ^" in xPotentiallyNullNullableArg as{TypeError} core::Object; - objectVar = invalid-expression "pkg/front_end/testcases/nnbd/assignability.dart:124:15: Error: A value of type 'YnonNull?' can't be assigned to a variable of type 'Object' because 'YnonNull?' is nullable and 'Object' isn't. + objectVar = invalid-expression "pkg/front_end/testcases/nnbd/assignability.dart:124:15: Error: A value of type 'YnonNull?' can't be assigned to a variable of type 'Object'. - 'Object' is from 'dart:core'. objectVar = yNonNullNullableArg; ^" in yNonNullNullableArg as{TypeError} core::Object; - objectVar = invalid-expression "pkg/front_end/testcases/nnbd/assignability.dart:125:15: Error: A value of type 'YpotentiallyNull' can't be assigned to a variable of type 'Object' because 'YpotentiallyNull' is nullable and 'Object' isn't. + objectVar = invalid-expression "pkg/front_end/testcases/nnbd/assignability.dart:125:15: Error: A value of type 'YpotentiallyNull' can't be assigned to a variable of type 'Object'. - 'Object' is from 'dart:core'. objectVar = yPotentiallyNullArg; ^" in yPotentiallyNullArg as{TypeError} core::Object; - objectVar = invalid-expression "pkg/front_end/testcases/nnbd/assignability.dart:126:15: Error: A value of type 'YpotentiallyNull?' can't be assigned to a variable of type 'Object' because 'YpotentiallyNull?' is nullable and 'Object' isn't. + objectVar = invalid-expression "pkg/front_end/testcases/nnbd/assignability.dart:126:15: Error: A value of type 'YpotentiallyNull?' can't be assigned to a variable of type 'Object'. - 'Object' is from 'dart:core'. objectVar = yPotentiallyNullNullableArg; ^" in yPotentiallyNullNullableArg as{TypeError} core::Object; @@ -1094,13 +1094,13 @@ static method error(core::Object objectArg, core::Object? objectNullableArg, core::num numArg, core::num? numNullableArg, core::int intArg, core::int? intNullableArg, core::double doubleArg, core::double? doubleNullableArg, core::Function functionArg, core::Function? functionNullableArg, () → void toVoidArg, () →? void toVoidNullableArg, self::Tearoffable tearoffableArg, self::Tearoffable? tearoffableNullableArg, self::error::XnonNull xNonNullArg, self::error::XnonNull? xNonNullNullableArg, self::error::XpotentiallyNull% xPotentiallyNullArg, self::error::XpotentiallyNull? xPotentiallyNullNullableArg, self::error::YnonNull yNonNullArg, self::error::YnonNull? yNonNullNullableArg, self::error::YpotentiallyNull% yPotentiallyNullArg, self::error::YpotentiallyNull? yPotentiallyNullNullableArg) → dynamic { - core::Object objectVar = invalid-expression "pkg/front_end/testcases/nnbd/assignability.dart:114:22: Error: A value of type 'Object?' can't be assigned to a variable of type 'Object' because 'Object?' is nullable and 'Object' isn't. + core::Object objectVar = invalid-expression "pkg/front_end/testcases/nnbd/assignability.dart:114:22: Error: A value of type 'Object?' can't be assigned to a variable of type 'Object'. - 'Object' is from 'dart:core'. Object objectVar = objectNullableArg; ^" in objectNullableArg as{TypeError} core::Object; - objectVar = invalid-expression "pkg/front_end/testcases/nnbd/assignability.dart:115:15: Error: A value of type 'num?' can't be assigned to a variable of type 'Object' because 'num?' is nullable and 'Object' isn't. + objectVar = invalid-expression "pkg/front_end/testcases/nnbd/assignability.dart:115:15: Error: A value of type 'num?' can't be assigned to a variable of type 'Object'. - 'Object' is from 'dart:core'. objectVar = numNullableArg; ^" in numNullableArg as{TypeError} core::Object; - objectVar = invalid-expression "pkg/front_end/testcases/nnbd/assignability.dart:116:15: Error: A value of type 'int?' can't be assigned to a variable of type 'Object' because 'int?' is nullable and 'Object' isn't. + objectVar = invalid-expression "pkg/front_end/testcases/nnbd/assignability.dart:116:15: Error: A value of type 'int?' can't be assigned to a variable of type 'Object'. - 'Object' is from 'dart:core'. objectVar = intNullableArg; ^" in intNullableArg as{TypeError} core::Object; - objectVar = invalid-expression "pkg/front_end/testcases/nnbd/assignability.dart:117:15: Error: A value of type 'double?' can't be assigned to a variable of type 'Object' because 'double?' is nullable and 'Object' isn't. + objectVar = invalid-expression "pkg/front_end/testcases/nnbd/assignability.dart:117:15: Error: A value of type 'double?' can't be assigned to a variable of type 'Object'. - 'Object' is from 'dart:core'. objectVar = doubleNullableArg; ^" in doubleNullableArg as{TypeError} core::Object; - objectVar = invalid-expression "pkg/front_end/testcases/nnbd/assignability.dart:118:15: Error: A value of type 'Function?' can't be assigned to a variable of type 'Object' because 'Function?' is nullable and 'Object' isn't. + objectVar = invalid-expression "pkg/front_end/testcases/nnbd/assignability.dart:118:15: Error: A value of type 'Function?' can't be assigned to a variable of type 'Object'. - 'Function' is from 'dart:core'. - 'Object' is from 'dart:core'. objectVar = functionNullableArg; ^" in functionNullableArg as{TypeError} core::Object; - objectVar = invalid-expression "pkg/front_end/testcases/nnbd/assignability.dart:119:15: Error: A value of type 'void Function()?' can't be assigned to a variable of type 'Object' because 'void Function()?' is nullable and 'Object' isn't. + objectVar = invalid-expression "pkg/front_end/testcases/nnbd/assignability.dart:119:15: Error: A value of type 'void Function()?' can't be assigned to a variable of type 'Object'. - 'Object' is from 'dart:core'. objectVar = toVoidNullableArg; ^" in toVoidNullableArg as{TypeError} core::Object; - objectVar = invalid-expression "pkg/front_end/testcases/nnbd/assignability.dart:120:15: Error: A value of type 'Tearoffable?' can't be assigned to a variable of type 'Object' because 'Tearoffable?' is nullable and 'Object' isn't. + objectVar = invalid-expression "pkg/front_end/testcases/nnbd/assignability.dart:120:15: Error: A value of type 'Tearoffable?' can't be assigned to a variable of type 'Object'. - 'Tearoffable' is from 'pkg/front_end/testcases/nnbd/assignability.dart'. - 'Object' is from 'dart:core'. objectVar = tearoffableNullableArg; ^" in tearoffableNullableArg as{TypeError} core::Object; - objectVar = invalid-expression "pkg/front_end/testcases/nnbd/assignability.dart:121:15: Error: A value of type 'XnonNull?' can't be assigned to a variable of type 'Object' because 'XnonNull?' is nullable and 'Object' isn't. + objectVar = invalid-expression "pkg/front_end/testcases/nnbd/assignability.dart:121:15: Error: A value of type 'XnonNull?' can't be assigned to a variable of type 'Object'. - 'Object' is from 'dart:core'. objectVar = xNonNullNullableArg; ^" in xNonNullNullableArg as{TypeError} core::Object; - objectVar = invalid-expression "pkg/front_end/testcases/nnbd/assignability.dart:122:15: Error: A value of type 'XpotentiallyNull' can't be assigned to a variable of type 'Object' because 'XpotentiallyNull' is nullable and 'Object' isn't. + objectVar = invalid-expression "pkg/front_end/testcases/nnbd/assignability.dart:122:15: Error: A value of type 'XpotentiallyNull' can't be assigned to a variable of type 'Object'. - 'Object' is from 'dart:core'. objectVar = xPotentiallyNullArg; ^" in xPotentiallyNullArg as{TypeError} core::Object; - objectVar = invalid-expression "pkg/front_end/testcases/nnbd/assignability.dart:123:15: Error: A value of type 'XpotentiallyNull?' can't be assigned to a variable of type 'Object' because 'XpotentiallyNull?' is nullable and 'Object' isn't. + objectVar = invalid-expression "pkg/front_end/testcases/nnbd/assignability.dart:123:15: Error: A value of type 'XpotentiallyNull?' can't be assigned to a variable of type 'Object'. - 'Object' is from 'dart:core'. objectVar = xPotentiallyNullNullableArg; ^" in xPotentiallyNullNullableArg as{TypeError} core::Object; - objectVar = invalid-expression "pkg/front_end/testcases/nnbd/assignability.dart:124:15: Error: A value of type 'YnonNull?' can't be assigned to a variable of type 'Object' because 'YnonNull?' is nullable and 'Object' isn't. + objectVar = invalid-expression "pkg/front_end/testcases/nnbd/assignability.dart:124:15: Error: A value of type 'YnonNull?' can't be assigned to a variable of type 'Object'. - 'Object' is from 'dart:core'. objectVar = yNonNullNullableArg; ^" in yNonNullNullableArg as{TypeError} core::Object; - objectVar = invalid-expression "pkg/front_end/testcases/nnbd/assignability.dart:125:15: Error: A value of type 'YpotentiallyNull' can't be assigned to a variable of type 'Object' because 'YpotentiallyNull' is nullable and 'Object' isn't. + objectVar = invalid-expression "pkg/front_end/testcases/nnbd/assignability.dart:125:15: Error: A value of type 'YpotentiallyNull' can't be assigned to a variable of type 'Object'. - 'Object' is from 'dart:core'. objectVar = yPotentiallyNullArg; ^" in yPotentiallyNullArg as{TypeError} core::Object; - objectVar = invalid-expression "pkg/front_end/testcases/nnbd/assignability.dart:126:15: Error: A value of type 'YpotentiallyNull?' can't be assigned to a variable of type 'Object' because 'YpotentiallyNull?' is nullable and 'Object' isn't. + objectVar = invalid-expression "pkg/front_end/testcases/nnbd/assignability.dart:126:15: Error: A value of type 'YpotentiallyNull?' can't be assigned to a variable of type 'Object'. - 'Object' is from 'dart:core'. objectVar = yPotentiallyNullNullableArg; ^" in yPotentiallyNullNullableArg as{TypeError} core::Object; @@ -1094,13 +1094,13 @@ static method error(core::Object objectArg, core::Object? objectNullableArg, core::num numArg, core::num? numNullableArg, core::int intArg, core::int? intNullableArg, core::double doubleArg, core::double? doubleNullableArg, core::Function functionArg, core::Function? functionNullableArg, () → void toVoidArg, () →? void toVoidNullableArg, self::Tearoffable tearoffableArg, self::Tearoffable? tearoffableNullableArg, self::error::XnonNull xNonNullArg, self::error::XnonNull? xNonNullNullableArg, self::error::XpotentiallyNull% xPotentiallyNullArg, self::error::XpotentiallyNull? xPotentiallyNullNullableArg, self::error::YnonNull yNonNullArg, self::error::YnonNull? yNonNullNullableArg, self::error::YpotentiallyNull% yPotentiallyNullArg, self::error::YpotentiallyNull? yPotentiallyNullNullableArg) → dynamic { - core::Object objectVar = invalid-expression "pkg/front_end/testcases/nnbd/assignability.dart:114:22: Error: A value of type 'Object?' can't be assigned to a variable of type 'Object' because 'Object?' is nullable and 'Object' isn't. + core::Object objectVar = invalid-expression "pkg/front_end/testcases/nnbd/assignability.dart:114:22: Error: A value of type 'Object?' can't be assigned to a variable of type 'Object'. - 'Object' is from 'dart:core'. Object objectVar = objectNullableArg; ^" in let core::Object? #t4 = objectNullableArg in #t4 == null ?{core::Object} #t4 as{TypeError} core::Object : #t4{core::Object}; - objectVar = invalid-expression "pkg/front_end/testcases/nnbd/assignability.dart:115:15: Error: A value of type 'num?' can't be assigned to a variable of type 'Object' because 'num?' is nullable and 'Object' isn't. + objectVar = invalid-expression "pkg/front_end/testcases/nnbd/assignability.dart:115:15: Error: A value of type 'num?' can't be assigned to a variable of type 'Object'. - 'Object' is from 'dart:core'. objectVar = numNullableArg; ^" in let core::num? #t5 = numNullableArg in #t5 == null ?{core::Object} #t5 as{TypeError} core::Object : #t5{core::Object}; - objectVar = invalid-expression "pkg/front_end/testcases/nnbd/assignability.dart:116:15: Error: A value of type 'int?' can't be assigned to a variable of type 'Object' because 'int?' is nullable and 'Object' isn't. + objectVar = invalid-expression "pkg/front_end/testcases/nnbd/assignability.dart:116:15: Error: A value of type 'int?' can't be assigned to a variable of type 'Object'. - 'Object' is from 'dart:core'. objectVar = intNullableArg; ^" in let core::int? #t6 = intNullableArg in #t6 == null ?{core::Object} #t6 as{TypeError} core::Object : #t6{core::Object}; - objectVar = invalid-expression "pkg/front_end/testcases/nnbd/assignability.dart:117:15: Error: A value of type 'double?' can't be assigned to a variable of type 'Object' because 'double?' is nullable and 'Object' isn't. + objectVar = invalid-expression "pkg/front_end/testcases/nnbd/assignability.dart:117:15: Error: A value of type 'double?' can't be assigned to a variable of type 'Object'. - 'Object' is from 'dart:core'. objectVar = doubleNullableArg; ^" in let core::double? #t7 = doubleNullableArg in #t7 == null ?{core::Object} #t7 as{TypeError} core::Object : #t7{core::Object}; - objectVar = invalid-expression "pkg/front_end/testcases/nnbd/assignability.dart:118:15: Error: A value of type 'Function?' can't be assigned to a variable of type 'Object' because 'Function?' is nullable and 'Object' isn't. + objectVar = invalid-expression "pkg/front_end/testcases/nnbd/assignability.dart:118:15: Error: A value of type 'Function?' can't be assigned to a variable of type 'Object'. - 'Function' is from 'dart:core'. - 'Object' is from 'dart:core'. objectVar = functionNullableArg; ^" in let core::Function? #t8 = functionNullableArg in #t8 == null ?{core::Object} #t8 as{TypeError} core::Object : #t8{core::Object}; - objectVar = invalid-expression "pkg/front_end/testcases/nnbd/assignability.dart:119:15: Error: A value of type 'void Function()?' can't be assigned to a variable of type 'Object' because 'void Function()?' is nullable and 'Object' isn't. + objectVar = invalid-expression "pkg/front_end/testcases/nnbd/assignability.dart:119:15: Error: A value of type 'void Function()?' can't be assigned to a variable of type 'Object'. - 'Object' is from 'dart:core'. objectVar = toVoidNullableArg; ^" in let () →? void #t9 = toVoidNullableArg in #t9 == null ?{core::Object} #t9 as{TypeError} core::Object : #t9{core::Object}; - objectVar = invalid-expression "pkg/front_end/testcases/nnbd/assignability.dart:120:15: Error: A value of type 'Tearoffable?' can't be assigned to a variable of type 'Object' because 'Tearoffable?' is nullable and 'Object' isn't. + objectVar = invalid-expression "pkg/front_end/testcases/nnbd/assignability.dart:120:15: Error: A value of type 'Tearoffable?' can't be assigned to a variable of type 'Object'. - 'Tearoffable' is from 'pkg/front_end/testcases/nnbd/assignability.dart'. - 'Object' is from 'dart:core'. objectVar = tearoffableNullableArg; ^" in let self::Tearoffable? #t10 = tearoffableNullableArg in #t10 == null ?{core::Object} #t10 as{TypeError} core::Object : #t10{core::Object}; - objectVar = invalid-expression "pkg/front_end/testcases/nnbd/assignability.dart:121:15: Error: A value of type 'XnonNull?' can't be assigned to a variable of type 'Object' because 'XnonNull?' is nullable and 'Object' isn't. + objectVar = invalid-expression "pkg/front_end/testcases/nnbd/assignability.dart:121:15: Error: A value of type 'XnonNull?' can't be assigned to a variable of type 'Object'. - 'Object' is from 'dart:core'. objectVar = xNonNullNullableArg; ^" in let self::error::XnonNull? #t11 = xNonNullNullableArg in #t11 == null ?{core::Object} #t11 as{TypeError} core::Object : #t11{core::Object}; - objectVar = invalid-expression "pkg/front_end/testcases/nnbd/assignability.dart:122:15: Error: A value of type 'XpotentiallyNull' can't be assigned to a variable of type 'Object' because 'XpotentiallyNull' is nullable and 'Object' isn't. + objectVar = invalid-expression "pkg/front_end/testcases/nnbd/assignability.dart:122:15: Error: A value of type 'XpotentiallyNull' can't be assigned to a variable of type 'Object'. - 'Object' is from 'dart:core'. objectVar = xPotentiallyNullArg; ^" in let self::error::XpotentiallyNull% #t12 = xPotentiallyNullArg in #t12 == null ?{core::Object} #t12 as{TypeError} core::Object : #t12{core::Object}; - objectVar = invalid-expression "pkg/front_end/testcases/nnbd/assignability.dart:123:15: Error: A value of type 'XpotentiallyNull?' can't be assigned to a variable of type 'Object' because 'XpotentiallyNull?' is nullable and 'Object' isn't. + objectVar = invalid-expression "pkg/front_end/testcases/nnbd/assignability.dart:123:15: Error: A value of type 'XpotentiallyNull?' can't be assigned to a variable of type 'Object'. - 'Object' is from 'dart:core'. objectVar = xPotentiallyNullNullableArg; ^" in let self::error::XpotentiallyNull? #t13 = xPotentiallyNullNullableArg in #t13 == null ?{core::Object} #t13 as{TypeError} core::Object : #t13{core::Object}; - objectVar = invalid-expression "pkg/front_end/testcases/nnbd/assignability.dart:124:15: Error: A value of type 'YnonNull?' can't be assigned to a variable of type 'Object' because 'YnonNull?' is nullable and 'Object' isn't. + objectVar = invalid-expression "pkg/front_end/testcases/nnbd/assignability.dart:124:15: Error: A value of type 'YnonNull?' can't be assigned to a variable of type 'Object'. - 'Object' is from 'dart:core'. objectVar = yNonNullNullableArg; ^" in let self::error::YnonNull? #t14 = yNonNullNullableArg in #t14 == null ?{core::Object} #t14 as{TypeError} core::Object : #t14{core::Object}; - objectVar = invalid-expression "pkg/front_end/testcases/nnbd/assignability.dart:125:15: Error: A value of type 'YpotentiallyNull' can't be assigned to a variable of type 'Object' because 'YpotentiallyNull' is nullable and 'Object' isn't. + objectVar = invalid-expression "pkg/front_end/testcases/nnbd/assignability.dart:125:15: Error: A value of type 'YpotentiallyNull' can't be assigned to a variable of type 'Object'. - 'Object' is from 'dart:core'. objectVar = yPotentiallyNullArg; ^" in let self::error::YpotentiallyNull% #t15 = yPotentiallyNullArg in #t15 == null ?{core::Object} #t15 as{TypeError} core::Object : #t15{core::Object}; - objectVar = invalid-expression "pkg/front_end/testcases/nnbd/assignability.dart:126:15: Error: A value of type 'YpotentiallyNull?' can't be assigned to a variable of type 'Object' because 'YpotentiallyNull?' is nullable and 'Object' isn't. + objectVar = invalid-expression "pkg/front_end/testcases/nnbd/assignability.dart:126:15: Error: A value of type 'YpotentiallyNull?' can't be assigned to a variable of type 'Object'. - 'Object' is from 'dart:core'. objectVar = yPotentiallyNullNullableArg; ^" in let self::error::YpotentiallyNull? #t16 = yPotentiallyNullNullableArg in #t16 == null ?{core::Object} #t16 as{TypeError} core::Object : #t16{core::Object}; @@ -1094,13 +1094,13 @@ static method error{...m2}; // Error. // ^ // -// pkg/front_end/testcases/nnbd/assignability_error_messages.dart:35:10: Error: A value of type 'B?' can't be assigned to a variable of type 'A' because 'B?' is nullable and 'A' isn't. +// pkg/front_end/testcases/nnbd/assignability_error_messages.dart:35:10: Error: A value of type 'B?' can't be assigned to a variable of type 'A'. // - 'B' is from 'pkg/front_end/testcases/nnbd/assignability_error_messages.dart'. // - 'A' is from 'pkg/front_end/testcases/nnbd/assignability_error_messages.dart'. // Try changing the type of the variable. // for (A y in l) {} // Error. // ^ // -// pkg/front_end/testcases/nnbd/assignability_error_messages.dart:36:15: Error: The type 'List?' used in the 'for' loop must implement 'Iterable' because 'List?' is nullable and 'Iterable' isn't. +// pkg/front_end/testcases/nnbd/assignability_error_messages.dart:36:15: Error: The type 'List?' used in the 'for' loop must implement 'Iterable'. // - 'List' is from 'dart:core'. // - 'B' is from 'pkg/front_end/testcases/nnbd/assignability_error_messages.dart'. // - 'Iterable' is from 'dart:core'. @@ -63,7 +63,7 @@ library; // switch (x) /* Error. */ { // ^ // -// pkg/front_end/testcases/nnbd/assignability_error_messages.dart:45:14: Error: A value of type 'B?' can't be returned from an async function with return type 'FutureOr' because 'B?' is nullable and 'FutureOr' isn't. +// pkg/front_end/testcases/nnbd/assignability_error_messages.dart:45:14: Error: A value of type 'B?' can't be returned from an async function with return type 'FutureOr'. // - 'B' is from 'pkg/front_end/testcases/nnbd/assignability_error_messages.dart'. // - 'A' is from 'pkg/front_end/testcases/nnbd/assignability_error_messages.dart'. // return x; // Error. @@ -76,20 +76,20 @@ library; // return new Future.value(x); // Error. // ^ // -// pkg/front_end/testcases/nnbd/assignability_error_messages.dart:51:10: Error: A value of type 'B?' can't be returned from a function with return type 'A' because 'B?' is nullable and 'A' isn't. +// pkg/front_end/testcases/nnbd/assignability_error_messages.dart:51:10: Error: A value of type 'B?' can't be returned from a function with return type 'A'. // - 'B' is from 'pkg/front_end/testcases/nnbd/assignability_error_messages.dart'. // - 'A' is from 'pkg/front_end/testcases/nnbd/assignability_error_messages.dart'. // return x; // Error. // ^ // -// pkg/front_end/testcases/nnbd/assignability_error_messages.dart:55:14: Error: The argument type 'List' can't be assigned to the parameter type 'List' because 'B?' is nullable and 'A' isn't. +// pkg/front_end/testcases/nnbd/assignability_error_messages.dart:55:14: Error: The argument type 'List' can't be assigned to the parameter type 'List'. // - 'List' is from 'dart:core'. // - 'B' is from 'pkg/front_end/testcases/nnbd/assignability_error_messages.dart'. // - 'A' is from 'pkg/front_end/testcases/nnbd/assignability_error_messages.dart'. // barContext(x); // Error. // ^ // -// pkg/front_end/testcases/nnbd/assignability_error_messages.dart:56:15: Error: A value of type 'List' can't be assigned to a variable of type 'List' because 'B?' is nullable and 'A' isn't. +// pkg/front_end/testcases/nnbd/assignability_error_messages.dart:56:15: Error: A value of type 'List' can't be assigned to a variable of type 'List'. // - 'List' is from 'dart:core'. // - 'B' is from 'pkg/front_end/testcases/nnbd/assignability_error_messages.dart'. // - 'A' is from 'pkg/front_end/testcases/nnbd/assignability_error_messages.dart'. @@ -117,7 +117,7 @@ library; // , List>{...m}; // Error. // ^ // -// pkg/front_end/testcases/nnbd/assignability_error_messages.dart:59:16: Error: A value of type 'List' can't be assigned to a variable of type 'List' because 'B?' is nullable and 'A' isn't. +// pkg/front_end/testcases/nnbd/assignability_error_messages.dart:59:16: Error: A value of type 'List' can't be assigned to a variable of type 'List'. // - 'List' is from 'dart:core'. // - 'B' is from 'pkg/front_end/testcases/nnbd/assignability_error_messages.dart'. // - 'A' is from 'pkg/front_end/testcases/nnbd/assignability_error_messages.dart'. @@ -125,48 +125,48 @@ library; // for (List y in l) {} // Error. // ^ // -// pkg/front_end/testcases/nnbd/assignability_error_messages.dart:60:10: Error: A value of type 'List' can't be returned from a function with return type 'List' because 'B?' is nullable and 'A' isn't. +// pkg/front_end/testcases/nnbd/assignability_error_messages.dart:60:10: Error: A value of type 'List' can't be returned from a function with return type 'List'. // - 'List' is from 'dart:core'. // - 'B' is from 'pkg/front_end/testcases/nnbd/assignability_error_messages.dart'. // - 'A' is from 'pkg/front_end/testcases/nnbd/assignability_error_messages.dart'. // return x; // Error. // ^ // -// pkg/front_end/testcases/nnbd/assignability_error_messages.dart:64:14: Error: The argument type 'num? Function()' can't be assigned to the parameter type 'num Function()' because 'num?' is nullable and 'num' isn't. +// pkg/front_end/testcases/nnbd/assignability_error_messages.dart:64:14: Error: The argument type 'num? Function()' can't be assigned to the parameter type 'num Function()'. // bazContext(c); // ^ // -// pkg/front_end/testcases/nnbd/assignability_error_messages.dart:68:14: Error: The argument type 'Null' can't be assigned to the parameter type 'A' because 'A' is not nullable. +// pkg/front_end/testcases/nnbd/assignability_error_messages.dart:68:14: Error: The argument type 'Null' can't be assigned to the parameter type 'A'. // - 'A' is from 'pkg/front_end/testcases/nnbd/assignability_error_messages.dart'. // fooContext(x); // Error. // ^ // -// pkg/front_end/testcases/nnbd/assignability_error_messages.dart:69:14: Error: The value 'null' can't be assigned to the parameter type 'A' because 'A' is not nullable. +// pkg/front_end/testcases/nnbd/assignability_error_messages.dart:69:14: Error: The argument type 'Null' can't be assigned to the parameter type 'A'. // - 'A' is from 'pkg/front_end/testcases/nnbd/assignability_error_messages.dart'. // fooContext(null); // Error. // ^ // -// pkg/front_end/testcases/nnbd/assignability_error_messages.dart:70:10: Error: A value of type 'Null' can't be assigned to a variable of type 'A' because 'A' is not nullable. +// pkg/front_end/testcases/nnbd/assignability_error_messages.dart:70:10: Error: A value of type 'Null' can't be assigned to a variable of type 'A'. // - 'A' is from 'pkg/front_end/testcases/nnbd/assignability_error_messages.dart'. // A a1 = x; // Error. // ^ // -// pkg/front_end/testcases/nnbd/assignability_error_messages.dart:71:10: Error: The value 'null' can't be assigned to a variable of type 'A' because 'A' is not nullable. +// pkg/front_end/testcases/nnbd/assignability_error_messages.dart:71:10: Error: A value of type 'Null' can't be assigned to a variable of type 'A'. // - 'A' is from 'pkg/front_end/testcases/nnbd/assignability_error_messages.dart'. // A a2 = null; // Error. // ^ // -// pkg/front_end/testcases/nnbd/assignability_error_messages.dart:73:12: Error: A value of type 'Null' can't be returned from a function with return type 'A' because 'A' is not nullable. +// pkg/front_end/testcases/nnbd/assignability_error_messages.dart:73:12: Error: A value of type 'Null' can't be returned from a function with return type 'A'. // - 'A' is from 'pkg/front_end/testcases/nnbd/assignability_error_messages.dart'. // return x; // Error. // ^ // -// pkg/front_end/testcases/nnbd/assignability_error_messages.dart:75:12: Error: The value 'null' can't be returned from a function with return type 'A' because 'A' is not nullable. +// pkg/front_end/testcases/nnbd/assignability_error_messages.dart:75:12: Error: A value of type 'Null' can't be returned from a function with return type 'A'. // - 'A' is from 'pkg/front_end/testcases/nnbd/assignability_error_messages.dart'. // return null; // Error. // ^ // -// pkg/front_end/testcases/nnbd/assignability_error_messages.dart:79:14: Error: The value 'null' can't be returned from an async function with return type 'FutureOr' because 'FutureOr' is not nullable. +// pkg/front_end/testcases/nnbd/assignability_error_messages.dart:79:14: Error: A value of type 'Null' can't be returned from an async function with return type 'FutureOr'. // - 'A' is from 'pkg/front_end/testcases/nnbd/assignability_error_messages.dart'. // return null; // Error. // ^ @@ -203,12 +203,12 @@ static method fooContext(self::A x) → void {} static method barContext(core::List x) → void {} static method bazContext(() → core::num f) → void {} static method foo(self::B? x, core::List l, core::Map m, core::List? l2, core::Map? m2) → self::A { - self::fooContext(invalid-expression "pkg/front_end/testcases/nnbd/assignability_error_messages.dart:29:14: Error: The argument type 'B?' can't be assigned to the parameter type 'A' because 'B?' is nullable and 'A' isn't. + self::fooContext(invalid-expression "pkg/front_end/testcases/nnbd/assignability_error_messages.dart:29:14: Error: The argument type 'B?' can't be assigned to the parameter type 'A'. - 'B' is from 'pkg/front_end/testcases/nnbd/assignability_error_messages.dart'. - 'A' is from 'pkg/front_end/testcases/nnbd/assignability_error_messages.dart'. fooContext(x); // Error. ^" in x as{TypeError} self::A); - self::A a = invalid-expression "pkg/front_end/testcases/nnbd/assignability_error_messages.dart:30:9: Error: A value of type 'B?' can't be assigned to a variable of type 'A' because 'B?' is nullable and 'A' isn't. + self::A a = invalid-expression "pkg/front_end/testcases/nnbd/assignability_error_messages.dart:30:9: Error: A value of type 'B?' can't be assigned to a variable of type 'A'. - 'B' is from 'pkg/front_end/testcases/nnbd/assignability_error_messages.dart'. - 'A' is from 'pkg/front_end/testcases/nnbd/assignability_error_messages.dart'. A a = x; // Error. @@ -234,14 +234,14 @@ static method foo(self::B? x, core::List l, core::Map{...m2}; // Error. ^": null}; for (final self::B? #t1 in l) { - self::A y = invalid-expression "pkg/front_end/testcases/nnbd/assignability_error_messages.dart:35:10: Error: A value of type 'B?' can't be assigned to a variable of type 'A' because 'B?' is nullable and 'A' isn't. + self::A y = invalid-expression "pkg/front_end/testcases/nnbd/assignability_error_messages.dart:35:10: Error: A value of type 'B?' can't be assigned to a variable of type 'A'. - 'B' is from 'pkg/front_end/testcases/nnbd/assignability_error_messages.dart'. - 'A' is from 'pkg/front_end/testcases/nnbd/assignability_error_messages.dart'. Try changing the type of the variable. for (A y in l) {} // Error. ^" in #t1 as{TypeError} self::A; } - for (self::A y in invalid-expression "pkg/front_end/testcases/nnbd/assignability_error_messages.dart:36:15: Error: The type 'List?' used in the 'for' loop must implement 'Iterable' because 'List?' is nullable and 'Iterable' isn't. + for (self::A y in invalid-expression "pkg/front_end/testcases/nnbd/assignability_error_messages.dart:36:15: Error: The type 'List?' used in the 'for' loop must implement 'Iterable'. - 'List' is from 'dart:core'. - 'B' is from 'pkg/front_end/testcases/nnbd/assignability_error_messages.dart'. - 'Iterable' is from 'dart:core'. @@ -263,7 +263,7 @@ Try changing the type of the variable. } function local() → FutureOr async /* emittedValueType= self::A */ { if(true) { - return invalid-expression "pkg/front_end/testcases/nnbd/assignability_error_messages.dart:45:14: Error: A value of type 'B?' can't be returned from an async function with return type 'FutureOr' because 'B?' is nullable and 'FutureOr' isn't. + return invalid-expression "pkg/front_end/testcases/nnbd/assignability_error_messages.dart:45:14: Error: A value of type 'B?' can't be returned from an async function with return type 'FutureOr'. - 'B' is from 'pkg/front_end/testcases/nnbd/assignability_error_messages.dart'. - 'A' is from 'pkg/front_end/testcases/nnbd/assignability_error_messages.dart'. return x; // Error. @@ -278,20 +278,20 @@ Try changing the type of the variable. ^" in asy::Future::value(x) as{TypeError} self::A; } } - return invalid-expression "pkg/front_end/testcases/nnbd/assignability_error_messages.dart:51:10: Error: A value of type 'B?' can't be returned from a function with return type 'A' because 'B?' is nullable and 'A' isn't. + return invalid-expression "pkg/front_end/testcases/nnbd/assignability_error_messages.dart:51:10: Error: A value of type 'B?' can't be returned from a function with return type 'A'. - 'B' is from 'pkg/front_end/testcases/nnbd/assignability_error_messages.dart'. - 'A' is from 'pkg/front_end/testcases/nnbd/assignability_error_messages.dart'. return x; // Error. ^" in x as{TypeError} self::A; } static method bar(core::List x, core::List> l, core::Map, core::List> m) → core::List { - self::barContext(invalid-expression "pkg/front_end/testcases/nnbd/assignability_error_messages.dart:55:14: Error: The argument type 'List' can't be assigned to the parameter type 'List' because 'B?' is nullable and 'A' isn't. + self::barContext(invalid-expression "pkg/front_end/testcases/nnbd/assignability_error_messages.dart:55:14: Error: The argument type 'List' can't be assigned to the parameter type 'List'. - 'List' is from 'dart:core'. - 'B' is from 'pkg/front_end/testcases/nnbd/assignability_error_messages.dart'. - 'A' is from 'pkg/front_end/testcases/nnbd/assignability_error_messages.dart'. barContext(x); // Error. ^" in x as{TypeError} core::List); - core::List y = invalid-expression "pkg/front_end/testcases/nnbd/assignability_error_messages.dart:56:15: Error: A value of type 'List' can't be assigned to a variable of type 'List' because 'B?' is nullable and 'A' isn't. + core::List y = invalid-expression "pkg/front_end/testcases/nnbd/assignability_error_messages.dart:56:15: Error: A value of type 'List' can't be assigned to a variable of type 'List'. - 'List' is from 'dart:core'. - 'B' is from 'pkg/front_end/testcases/nnbd/assignability_error_messages.dart'. - 'A' is from 'pkg/front_end/testcases/nnbd/assignability_error_messages.dart'. @@ -315,7 +315,7 @@ static method bar(core::List x, core::List> l, co , List>{...m}; // Error. ^"}; for (final core::List #t2 in l) { - core::List y = invalid-expression "pkg/front_end/testcases/nnbd/assignability_error_messages.dart:59:16: Error: A value of type 'List' can't be assigned to a variable of type 'List' because 'B?' is nullable and 'A' isn't. + core::List y = invalid-expression "pkg/front_end/testcases/nnbd/assignability_error_messages.dart:59:16: Error: A value of type 'List' can't be assigned to a variable of type 'List'. - 'List' is from 'dart:core'. - 'B' is from 'pkg/front_end/testcases/nnbd/assignability_error_messages.dart'. - 'A' is from 'pkg/front_end/testcases/nnbd/assignability_error_messages.dart'. @@ -323,7 +323,7 @@ Try changing the type of the variable. for (List y in l) {} // Error. ^" in #t2 as{TypeError} core::List; } - return invalid-expression "pkg/front_end/testcases/nnbd/assignability_error_messages.dart:60:10: Error: A value of type 'List' can't be returned from a function with return type 'List' because 'B?' is nullable and 'A' isn't. + return invalid-expression "pkg/front_end/testcases/nnbd/assignability_error_messages.dart:60:10: Error: A value of type 'List' can't be returned from a function with return type 'List'. - 'List' is from 'dart:core'. - 'B' is from 'pkg/front_end/testcases/nnbd/assignability_error_messages.dart'. - 'A' is from 'pkg/front_end/testcases/nnbd/assignability_error_messages.dart'. @@ -331,42 +331,42 @@ Try changing the type of the variable. ^" in x as{TypeError} core::List; } static method baz(self::C c) → void { - self::bazContext(invalid-expression "pkg/front_end/testcases/nnbd/assignability_error_messages.dart:64:14: Error: The argument type 'num? Function()' can't be assigned to the parameter type 'num Function()' because 'num?' is nullable and 'num' isn't. + self::bazContext(invalid-expression "pkg/front_end/testcases/nnbd/assignability_error_messages.dart:64:14: Error: The argument type 'num? Function()' can't be assigned to the parameter type 'num Function()'. bazContext(c); ^" in (let final self::C #t3 = c in #t3 == null ?{() → core::num?} null : #t3.{self::C::call}{() → core::num?}) as{TypeError} () → core::num); } static method boz(Null x) → self::A { - self::fooContext(invalid-expression "pkg/front_end/testcases/nnbd/assignability_error_messages.dart:68:14: Error: The argument type 'Null' can't be assigned to the parameter type 'A' because 'A' is not nullable. + self::fooContext(invalid-expression "pkg/front_end/testcases/nnbd/assignability_error_messages.dart:68:14: Error: The argument type 'Null' can't be assigned to the parameter type 'A'. - 'A' is from 'pkg/front_end/testcases/nnbd/assignability_error_messages.dart'. fooContext(x); // Error. ^" in x as{TypeError} self::A); - self::fooContext(invalid-expression "pkg/front_end/testcases/nnbd/assignability_error_messages.dart:69:14: Error: The value 'null' can't be assigned to the parameter type 'A' because 'A' is not nullable. + self::fooContext(invalid-expression "pkg/front_end/testcases/nnbd/assignability_error_messages.dart:69:14: Error: The argument type 'Null' can't be assigned to the parameter type 'A'. - 'A' is from 'pkg/front_end/testcases/nnbd/assignability_error_messages.dart'. fooContext(null); // Error. ^" in null as{TypeError} self::A); - self::A a1 = invalid-expression "pkg/front_end/testcases/nnbd/assignability_error_messages.dart:70:10: Error: A value of type 'Null' can't be assigned to a variable of type 'A' because 'A' is not nullable. + self::A a1 = invalid-expression "pkg/front_end/testcases/nnbd/assignability_error_messages.dart:70:10: Error: A value of type 'Null' can't be assigned to a variable of type 'A'. - 'A' is from 'pkg/front_end/testcases/nnbd/assignability_error_messages.dart'. A a1 = x; // Error. ^" in x as{TypeError} self::A; - self::A a2 = invalid-expression "pkg/front_end/testcases/nnbd/assignability_error_messages.dart:71:10: Error: The value 'null' can't be assigned to a variable of type 'A' because 'A' is not nullable. + self::A a2 = invalid-expression "pkg/front_end/testcases/nnbd/assignability_error_messages.dart:71:10: Error: A value of type 'Null' can't be assigned to a variable of type 'A'. - 'A' is from 'pkg/front_end/testcases/nnbd/assignability_error_messages.dart'. A a2 = null; // Error. ^" in null as{TypeError} self::A; if(true) { - return invalid-expression "pkg/front_end/testcases/nnbd/assignability_error_messages.dart:73:12: Error: A value of type 'Null' can't be returned from a function with return type 'A' because 'A' is not nullable. + return invalid-expression "pkg/front_end/testcases/nnbd/assignability_error_messages.dart:73:12: Error: A value of type 'Null' can't be returned from a function with return type 'A'. - 'A' is from 'pkg/front_end/testcases/nnbd/assignability_error_messages.dart'. return x; // Error. ^" in x as{TypeError} self::A; } else { - return invalid-expression "pkg/front_end/testcases/nnbd/assignability_error_messages.dart:75:12: Error: The value 'null' can't be returned from a function with return type 'A' because 'A' is not nullable. + return invalid-expression "pkg/front_end/testcases/nnbd/assignability_error_messages.dart:75:12: Error: A value of type 'Null' can't be returned from a function with return type 'A'. - 'A' is from 'pkg/front_end/testcases/nnbd/assignability_error_messages.dart'. return null; // Error. ^" in null as{TypeError} self::A; } function local() → FutureOr async /* emittedValueType= self::A */ { if(true) { - return invalid-expression "pkg/front_end/testcases/nnbd/assignability_error_messages.dart:79:14: Error: The value 'null' can't be returned from an async function with return type 'FutureOr' because 'FutureOr' is not nullable. + return invalid-expression "pkg/front_end/testcases/nnbd/assignability_error_messages.dart:79:14: Error: A value of type 'Null' can't be returned from an async function with return type 'FutureOr'. - 'A' is from 'pkg/front_end/testcases/nnbd/assignability_error_messages.dart'. return null; // Error. ^" in null as{TypeError} self::A; diff --git a/pkg/front_end/testcases/nnbd/assignability_error_messages.dart.strong.modular.expect b/pkg/front_end/testcases/nnbd/assignability_error_messages.dart.strong.modular.expect index 4bc63e40ca4..f418868a1d7 100644 --- a/pkg/front_end/testcases/nnbd/assignability_error_messages.dart.strong.modular.expect +++ b/pkg/front_end/testcases/nnbd/assignability_error_messages.dart.strong.modular.expect @@ -2,13 +2,13 @@ library; // // Problems in library: // -// pkg/front_end/testcases/nnbd/assignability_error_messages.dart:29:14: Error: The argument type 'B?' can't be assigned to the parameter type 'A' because 'B?' is nullable and 'A' isn't. +// pkg/front_end/testcases/nnbd/assignability_error_messages.dart:29:14: Error: The argument type 'B?' can't be assigned to the parameter type 'A'. // - 'B' is from 'pkg/front_end/testcases/nnbd/assignability_error_messages.dart'. // - 'A' is from 'pkg/front_end/testcases/nnbd/assignability_error_messages.dart'. // fooContext(x); // Error. // ^ // -// pkg/front_end/testcases/nnbd/assignability_error_messages.dart:30:9: Error: A value of type 'B?' can't be assigned to a variable of type 'A' because 'B?' is nullable and 'A' isn't. +// pkg/front_end/testcases/nnbd/assignability_error_messages.dart:30:9: Error: A value of type 'B?' can't be assigned to a variable of type 'A'. // - 'B' is from 'pkg/front_end/testcases/nnbd/assignability_error_messages.dart'. // - 'A' is from 'pkg/front_end/testcases/nnbd/assignability_error_messages.dart'. // A a = x; // Error. @@ -40,14 +40,14 @@ library; // {...m2}; // Error. // ^ // -// pkg/front_end/testcases/nnbd/assignability_error_messages.dart:35:10: Error: A value of type 'B?' can't be assigned to a variable of type 'A' because 'B?' is nullable and 'A' isn't. +// pkg/front_end/testcases/nnbd/assignability_error_messages.dart:35:10: Error: A value of type 'B?' can't be assigned to a variable of type 'A'. // - 'B' is from 'pkg/front_end/testcases/nnbd/assignability_error_messages.dart'. // - 'A' is from 'pkg/front_end/testcases/nnbd/assignability_error_messages.dart'. // Try changing the type of the variable. // for (A y in l) {} // Error. // ^ // -// pkg/front_end/testcases/nnbd/assignability_error_messages.dart:36:15: Error: The type 'List?' used in the 'for' loop must implement 'Iterable' because 'List?' is nullable and 'Iterable' isn't. +// pkg/front_end/testcases/nnbd/assignability_error_messages.dart:36:15: Error: The type 'List?' used in the 'for' loop must implement 'Iterable'. // - 'List' is from 'dart:core'. // - 'B' is from 'pkg/front_end/testcases/nnbd/assignability_error_messages.dart'. // - 'Iterable' is from 'dart:core'. @@ -63,7 +63,7 @@ library; // switch (x) /* Error. */ { // ^ // -// pkg/front_end/testcases/nnbd/assignability_error_messages.dart:45:14: Error: A value of type 'B?' can't be returned from an async function with return type 'FutureOr' because 'B?' is nullable and 'FutureOr' isn't. +// pkg/front_end/testcases/nnbd/assignability_error_messages.dart:45:14: Error: A value of type 'B?' can't be returned from an async function with return type 'FutureOr'. // - 'B' is from 'pkg/front_end/testcases/nnbd/assignability_error_messages.dart'. // - 'A' is from 'pkg/front_end/testcases/nnbd/assignability_error_messages.dart'. // return x; // Error. @@ -76,20 +76,20 @@ library; // return new Future.value(x); // Error. // ^ // -// pkg/front_end/testcases/nnbd/assignability_error_messages.dart:51:10: Error: A value of type 'B?' can't be returned from a function with return type 'A' because 'B?' is nullable and 'A' isn't. +// pkg/front_end/testcases/nnbd/assignability_error_messages.dart:51:10: Error: A value of type 'B?' can't be returned from a function with return type 'A'. // - 'B' is from 'pkg/front_end/testcases/nnbd/assignability_error_messages.dart'. // - 'A' is from 'pkg/front_end/testcases/nnbd/assignability_error_messages.dart'. // return x; // Error. // ^ // -// pkg/front_end/testcases/nnbd/assignability_error_messages.dart:55:14: Error: The argument type 'List' can't be assigned to the parameter type 'List' because 'B?' is nullable and 'A' isn't. +// pkg/front_end/testcases/nnbd/assignability_error_messages.dart:55:14: Error: The argument type 'List' can't be assigned to the parameter type 'List'. // - 'List' is from 'dart:core'. // - 'B' is from 'pkg/front_end/testcases/nnbd/assignability_error_messages.dart'. // - 'A' is from 'pkg/front_end/testcases/nnbd/assignability_error_messages.dart'. // barContext(x); // Error. // ^ // -// pkg/front_end/testcases/nnbd/assignability_error_messages.dart:56:15: Error: A value of type 'List' can't be assigned to a variable of type 'List' because 'B?' is nullable and 'A' isn't. +// pkg/front_end/testcases/nnbd/assignability_error_messages.dart:56:15: Error: A value of type 'List' can't be assigned to a variable of type 'List'. // - 'List' is from 'dart:core'. // - 'B' is from 'pkg/front_end/testcases/nnbd/assignability_error_messages.dart'. // - 'A' is from 'pkg/front_end/testcases/nnbd/assignability_error_messages.dart'. @@ -117,7 +117,7 @@ library; // , List>{...m}; // Error. // ^ // -// pkg/front_end/testcases/nnbd/assignability_error_messages.dart:59:16: Error: A value of type 'List' can't be assigned to a variable of type 'List' because 'B?' is nullable and 'A' isn't. +// pkg/front_end/testcases/nnbd/assignability_error_messages.dart:59:16: Error: A value of type 'List' can't be assigned to a variable of type 'List'. // - 'List' is from 'dart:core'. // - 'B' is from 'pkg/front_end/testcases/nnbd/assignability_error_messages.dart'. // - 'A' is from 'pkg/front_end/testcases/nnbd/assignability_error_messages.dart'. @@ -125,48 +125,48 @@ library; // for (List y in l) {} // Error. // ^ // -// pkg/front_end/testcases/nnbd/assignability_error_messages.dart:60:10: Error: A value of type 'List' can't be returned from a function with return type 'List' because 'B?' is nullable and 'A' isn't. +// pkg/front_end/testcases/nnbd/assignability_error_messages.dart:60:10: Error: A value of type 'List' can't be returned from a function with return type 'List'. // - 'List' is from 'dart:core'. // - 'B' is from 'pkg/front_end/testcases/nnbd/assignability_error_messages.dart'. // - 'A' is from 'pkg/front_end/testcases/nnbd/assignability_error_messages.dart'. // return x; // Error. // ^ // -// pkg/front_end/testcases/nnbd/assignability_error_messages.dart:64:14: Error: The argument type 'num? Function()' can't be assigned to the parameter type 'num Function()' because 'num?' is nullable and 'num' isn't. +// pkg/front_end/testcases/nnbd/assignability_error_messages.dart:64:14: Error: The argument type 'num? Function()' can't be assigned to the parameter type 'num Function()'. // bazContext(c); // ^ // -// pkg/front_end/testcases/nnbd/assignability_error_messages.dart:68:14: Error: The argument type 'Null' can't be assigned to the parameter type 'A' because 'A' is not nullable. +// pkg/front_end/testcases/nnbd/assignability_error_messages.dart:68:14: Error: The argument type 'Null' can't be assigned to the parameter type 'A'. // - 'A' is from 'pkg/front_end/testcases/nnbd/assignability_error_messages.dart'. // fooContext(x); // Error. // ^ // -// pkg/front_end/testcases/nnbd/assignability_error_messages.dart:69:14: Error: The value 'null' can't be assigned to the parameter type 'A' because 'A' is not nullable. +// pkg/front_end/testcases/nnbd/assignability_error_messages.dart:69:14: Error: The argument type 'Null' can't be assigned to the parameter type 'A'. // - 'A' is from 'pkg/front_end/testcases/nnbd/assignability_error_messages.dart'. // fooContext(null); // Error. // ^ // -// pkg/front_end/testcases/nnbd/assignability_error_messages.dart:70:10: Error: A value of type 'Null' can't be assigned to a variable of type 'A' because 'A' is not nullable. +// pkg/front_end/testcases/nnbd/assignability_error_messages.dart:70:10: Error: A value of type 'Null' can't be assigned to a variable of type 'A'. // - 'A' is from 'pkg/front_end/testcases/nnbd/assignability_error_messages.dart'. // A a1 = x; // Error. // ^ // -// pkg/front_end/testcases/nnbd/assignability_error_messages.dart:71:10: Error: The value 'null' can't be assigned to a variable of type 'A' because 'A' is not nullable. +// pkg/front_end/testcases/nnbd/assignability_error_messages.dart:71:10: Error: A value of type 'Null' can't be assigned to a variable of type 'A'. // - 'A' is from 'pkg/front_end/testcases/nnbd/assignability_error_messages.dart'. // A a2 = null; // Error. // ^ // -// pkg/front_end/testcases/nnbd/assignability_error_messages.dart:73:12: Error: A value of type 'Null' can't be returned from a function with return type 'A' because 'A' is not nullable. +// pkg/front_end/testcases/nnbd/assignability_error_messages.dart:73:12: Error: A value of type 'Null' can't be returned from a function with return type 'A'. // - 'A' is from 'pkg/front_end/testcases/nnbd/assignability_error_messages.dart'. // return x; // Error. // ^ // -// pkg/front_end/testcases/nnbd/assignability_error_messages.dart:75:12: Error: The value 'null' can't be returned from a function with return type 'A' because 'A' is not nullable. +// pkg/front_end/testcases/nnbd/assignability_error_messages.dart:75:12: Error: A value of type 'Null' can't be returned from a function with return type 'A'. // - 'A' is from 'pkg/front_end/testcases/nnbd/assignability_error_messages.dart'. // return null; // Error. // ^ // -// pkg/front_end/testcases/nnbd/assignability_error_messages.dart:79:14: Error: The value 'null' can't be returned from an async function with return type 'FutureOr' because 'FutureOr' is not nullable. +// pkg/front_end/testcases/nnbd/assignability_error_messages.dart:79:14: Error: A value of type 'Null' can't be returned from an async function with return type 'FutureOr'. // - 'A' is from 'pkg/front_end/testcases/nnbd/assignability_error_messages.dart'. // return null; // Error. // ^ @@ -203,12 +203,12 @@ static method fooContext(self::A x) → void {} static method barContext(core::List x) → void {} static method bazContext(() → core::num f) → void {} static method foo(self::B? x, core::List l, core::Map m, core::List? l2, core::Map? m2) → self::A { - self::fooContext(invalid-expression "pkg/front_end/testcases/nnbd/assignability_error_messages.dart:29:14: Error: The argument type 'B?' can't be assigned to the parameter type 'A' because 'B?' is nullable and 'A' isn't. + self::fooContext(invalid-expression "pkg/front_end/testcases/nnbd/assignability_error_messages.dart:29:14: Error: The argument type 'B?' can't be assigned to the parameter type 'A'. - 'B' is from 'pkg/front_end/testcases/nnbd/assignability_error_messages.dart'. - 'A' is from 'pkg/front_end/testcases/nnbd/assignability_error_messages.dart'. fooContext(x); // Error. ^" in x as{TypeError} self::A); - self::A a = invalid-expression "pkg/front_end/testcases/nnbd/assignability_error_messages.dart:30:9: Error: A value of type 'B?' can't be assigned to a variable of type 'A' because 'B?' is nullable and 'A' isn't. + self::A a = invalid-expression "pkg/front_end/testcases/nnbd/assignability_error_messages.dart:30:9: Error: A value of type 'B?' can't be assigned to a variable of type 'A'. - 'B' is from 'pkg/front_end/testcases/nnbd/assignability_error_messages.dart'. - 'A' is from 'pkg/front_end/testcases/nnbd/assignability_error_messages.dart'. A a = x; // Error. @@ -234,14 +234,14 @@ static method foo(self::B? x, core::List l, core::Map{...m2}; // Error. ^": null}; for (final self::B? #t1 in l) { - self::A y = invalid-expression "pkg/front_end/testcases/nnbd/assignability_error_messages.dart:35:10: Error: A value of type 'B?' can't be assigned to a variable of type 'A' because 'B?' is nullable and 'A' isn't. + self::A y = invalid-expression "pkg/front_end/testcases/nnbd/assignability_error_messages.dart:35:10: Error: A value of type 'B?' can't be assigned to a variable of type 'A'. - 'B' is from 'pkg/front_end/testcases/nnbd/assignability_error_messages.dart'. - 'A' is from 'pkg/front_end/testcases/nnbd/assignability_error_messages.dart'. Try changing the type of the variable. for (A y in l) {} // Error. ^" in #t1 as{TypeError} self::A; } - for (self::A y in invalid-expression "pkg/front_end/testcases/nnbd/assignability_error_messages.dart:36:15: Error: The type 'List?' used in the 'for' loop must implement 'Iterable' because 'List?' is nullable and 'Iterable' isn't. + for (self::A y in invalid-expression "pkg/front_end/testcases/nnbd/assignability_error_messages.dart:36:15: Error: The type 'List?' used in the 'for' loop must implement 'Iterable'. - 'List' is from 'dart:core'. - 'B' is from 'pkg/front_end/testcases/nnbd/assignability_error_messages.dart'. - 'Iterable' is from 'dart:core'. @@ -263,7 +263,7 @@ Try changing the type of the variable. } function local() → FutureOr async /* emittedValueType= self::A */ { if(true) { - return invalid-expression "pkg/front_end/testcases/nnbd/assignability_error_messages.dart:45:14: Error: A value of type 'B?' can't be returned from an async function with return type 'FutureOr' because 'B?' is nullable and 'FutureOr' isn't. + return invalid-expression "pkg/front_end/testcases/nnbd/assignability_error_messages.dart:45:14: Error: A value of type 'B?' can't be returned from an async function with return type 'FutureOr'. - 'B' is from 'pkg/front_end/testcases/nnbd/assignability_error_messages.dart'. - 'A' is from 'pkg/front_end/testcases/nnbd/assignability_error_messages.dart'. return x; // Error. @@ -278,20 +278,20 @@ Try changing the type of the variable. ^" in asy::Future::value(x) as{TypeError} self::A; } } - return invalid-expression "pkg/front_end/testcases/nnbd/assignability_error_messages.dart:51:10: Error: A value of type 'B?' can't be returned from a function with return type 'A' because 'B?' is nullable and 'A' isn't. + return invalid-expression "pkg/front_end/testcases/nnbd/assignability_error_messages.dart:51:10: Error: A value of type 'B?' can't be returned from a function with return type 'A'. - 'B' is from 'pkg/front_end/testcases/nnbd/assignability_error_messages.dart'. - 'A' is from 'pkg/front_end/testcases/nnbd/assignability_error_messages.dart'. return x; // Error. ^" in x as{TypeError} self::A; } static method bar(core::List x, core::List> l, core::Map, core::List> m) → core::List { - self::barContext(invalid-expression "pkg/front_end/testcases/nnbd/assignability_error_messages.dart:55:14: Error: The argument type 'List' can't be assigned to the parameter type 'List' because 'B?' is nullable and 'A' isn't. + self::barContext(invalid-expression "pkg/front_end/testcases/nnbd/assignability_error_messages.dart:55:14: Error: The argument type 'List' can't be assigned to the parameter type 'List'. - 'List' is from 'dart:core'. - 'B' is from 'pkg/front_end/testcases/nnbd/assignability_error_messages.dart'. - 'A' is from 'pkg/front_end/testcases/nnbd/assignability_error_messages.dart'. barContext(x); // Error. ^" in x as{TypeError} core::List); - core::List y = invalid-expression "pkg/front_end/testcases/nnbd/assignability_error_messages.dart:56:15: Error: A value of type 'List' can't be assigned to a variable of type 'List' because 'B?' is nullable and 'A' isn't. + core::List y = invalid-expression "pkg/front_end/testcases/nnbd/assignability_error_messages.dart:56:15: Error: A value of type 'List' can't be assigned to a variable of type 'List'. - 'List' is from 'dart:core'. - 'B' is from 'pkg/front_end/testcases/nnbd/assignability_error_messages.dart'. - 'A' is from 'pkg/front_end/testcases/nnbd/assignability_error_messages.dart'. @@ -315,7 +315,7 @@ static method bar(core::List x, core::List> l, co , List>{...m}; // Error. ^"}; for (final core::List #t2 in l) { - core::List y = invalid-expression "pkg/front_end/testcases/nnbd/assignability_error_messages.dart:59:16: Error: A value of type 'List' can't be assigned to a variable of type 'List' because 'B?' is nullable and 'A' isn't. + core::List y = invalid-expression "pkg/front_end/testcases/nnbd/assignability_error_messages.dart:59:16: Error: A value of type 'List' can't be assigned to a variable of type 'List'. - 'List' is from 'dart:core'. - 'B' is from 'pkg/front_end/testcases/nnbd/assignability_error_messages.dart'. - 'A' is from 'pkg/front_end/testcases/nnbd/assignability_error_messages.dart'. @@ -323,7 +323,7 @@ Try changing the type of the variable. for (List y in l) {} // Error. ^" in #t2 as{TypeError} core::List; } - return invalid-expression "pkg/front_end/testcases/nnbd/assignability_error_messages.dart:60:10: Error: A value of type 'List' can't be returned from a function with return type 'List' because 'B?' is nullable and 'A' isn't. + return invalid-expression "pkg/front_end/testcases/nnbd/assignability_error_messages.dart:60:10: Error: A value of type 'List' can't be returned from a function with return type 'List'. - 'List' is from 'dart:core'. - 'B' is from 'pkg/front_end/testcases/nnbd/assignability_error_messages.dart'. - 'A' is from 'pkg/front_end/testcases/nnbd/assignability_error_messages.dart'. @@ -331,42 +331,42 @@ Try changing the type of the variable. ^" in x as{TypeError} core::List; } static method baz(self::C c) → void { - self::bazContext(invalid-expression "pkg/front_end/testcases/nnbd/assignability_error_messages.dart:64:14: Error: The argument type 'num? Function()' can't be assigned to the parameter type 'num Function()' because 'num?' is nullable and 'num' isn't. + self::bazContext(invalid-expression "pkg/front_end/testcases/nnbd/assignability_error_messages.dart:64:14: Error: The argument type 'num? Function()' can't be assigned to the parameter type 'num Function()'. bazContext(c); ^" in (let final self::C #t3 = c in #t3 == null ?{() → core::num?} null : #t3.{self::C::call}{() → core::num?}) as{TypeError} () → core::num); } static method boz(Null x) → self::A { - self::fooContext(invalid-expression "pkg/front_end/testcases/nnbd/assignability_error_messages.dart:68:14: Error: The argument type 'Null' can't be assigned to the parameter type 'A' because 'A' is not nullable. + self::fooContext(invalid-expression "pkg/front_end/testcases/nnbd/assignability_error_messages.dart:68:14: Error: The argument type 'Null' can't be assigned to the parameter type 'A'. - 'A' is from 'pkg/front_end/testcases/nnbd/assignability_error_messages.dart'. fooContext(x); // Error. ^" in x as{TypeError} self::A); - self::fooContext(invalid-expression "pkg/front_end/testcases/nnbd/assignability_error_messages.dart:69:14: Error: The value 'null' can't be assigned to the parameter type 'A' because 'A' is not nullable. + self::fooContext(invalid-expression "pkg/front_end/testcases/nnbd/assignability_error_messages.dart:69:14: Error: The argument type 'Null' can't be assigned to the parameter type 'A'. - 'A' is from 'pkg/front_end/testcases/nnbd/assignability_error_messages.dart'. fooContext(null); // Error. ^" in null as{TypeError} self::A); - self::A a1 = invalid-expression "pkg/front_end/testcases/nnbd/assignability_error_messages.dart:70:10: Error: A value of type 'Null' can't be assigned to a variable of type 'A' because 'A' is not nullable. + self::A a1 = invalid-expression "pkg/front_end/testcases/nnbd/assignability_error_messages.dart:70:10: Error: A value of type 'Null' can't be assigned to a variable of type 'A'. - 'A' is from 'pkg/front_end/testcases/nnbd/assignability_error_messages.dart'. A a1 = x; // Error. ^" in x as{TypeError} self::A; - self::A a2 = invalid-expression "pkg/front_end/testcases/nnbd/assignability_error_messages.dart:71:10: Error: The value 'null' can't be assigned to a variable of type 'A' because 'A' is not nullable. + self::A a2 = invalid-expression "pkg/front_end/testcases/nnbd/assignability_error_messages.dart:71:10: Error: A value of type 'Null' can't be assigned to a variable of type 'A'. - 'A' is from 'pkg/front_end/testcases/nnbd/assignability_error_messages.dart'. A a2 = null; // Error. ^" in null as{TypeError} self::A; if(true) { - return invalid-expression "pkg/front_end/testcases/nnbd/assignability_error_messages.dart:73:12: Error: A value of type 'Null' can't be returned from a function with return type 'A' because 'A' is not nullable. + return invalid-expression "pkg/front_end/testcases/nnbd/assignability_error_messages.dart:73:12: Error: A value of type 'Null' can't be returned from a function with return type 'A'. - 'A' is from 'pkg/front_end/testcases/nnbd/assignability_error_messages.dart'. return x; // Error. ^" in x as{TypeError} self::A; } else { - return invalid-expression "pkg/front_end/testcases/nnbd/assignability_error_messages.dart:75:12: Error: The value 'null' can't be returned from a function with return type 'A' because 'A' is not nullable. + return invalid-expression "pkg/front_end/testcases/nnbd/assignability_error_messages.dart:75:12: Error: A value of type 'Null' can't be returned from a function with return type 'A'. - 'A' is from 'pkg/front_end/testcases/nnbd/assignability_error_messages.dart'. return null; // Error. ^" in null as{TypeError} self::A; } function local() → FutureOr async /* emittedValueType= self::A */ { if(true) { - return invalid-expression "pkg/front_end/testcases/nnbd/assignability_error_messages.dart:79:14: Error: The value 'null' can't be returned from an async function with return type 'FutureOr' because 'FutureOr' is not nullable. + return invalid-expression "pkg/front_end/testcases/nnbd/assignability_error_messages.dart:79:14: Error: A value of type 'Null' can't be returned from an async function with return type 'FutureOr'. - 'A' is from 'pkg/front_end/testcases/nnbd/assignability_error_messages.dart'. return null; // Error. ^" in null as{TypeError} self::A; diff --git a/pkg/front_end/testcases/nnbd/assignability_error_messages.dart.strong.transformed.expect b/pkg/front_end/testcases/nnbd/assignability_error_messages.dart.strong.transformed.expect index 86b15520e80..9375d63d789 100644 --- a/pkg/front_end/testcases/nnbd/assignability_error_messages.dart.strong.transformed.expect +++ b/pkg/front_end/testcases/nnbd/assignability_error_messages.dart.strong.transformed.expect @@ -2,13 +2,13 @@ library; // // Problems in library: // -// pkg/front_end/testcases/nnbd/assignability_error_messages.dart:29:14: Error: The argument type 'B?' can't be assigned to the parameter type 'A' because 'B?' is nullable and 'A' isn't. +// pkg/front_end/testcases/nnbd/assignability_error_messages.dart:29:14: Error: The argument type 'B?' can't be assigned to the parameter type 'A'. // - 'B' is from 'pkg/front_end/testcases/nnbd/assignability_error_messages.dart'. // - 'A' is from 'pkg/front_end/testcases/nnbd/assignability_error_messages.dart'. // fooContext(x); // Error. // ^ // -// pkg/front_end/testcases/nnbd/assignability_error_messages.dart:30:9: Error: A value of type 'B?' can't be assigned to a variable of type 'A' because 'B?' is nullable and 'A' isn't. +// pkg/front_end/testcases/nnbd/assignability_error_messages.dart:30:9: Error: A value of type 'B?' can't be assigned to a variable of type 'A'. // - 'B' is from 'pkg/front_end/testcases/nnbd/assignability_error_messages.dart'. // - 'A' is from 'pkg/front_end/testcases/nnbd/assignability_error_messages.dart'. // A a = x; // Error. @@ -40,14 +40,14 @@ library; // {...m2}; // Error. // ^ // -// pkg/front_end/testcases/nnbd/assignability_error_messages.dart:35:10: Error: A value of type 'B?' can't be assigned to a variable of type 'A' because 'B?' is nullable and 'A' isn't. +// pkg/front_end/testcases/nnbd/assignability_error_messages.dart:35:10: Error: A value of type 'B?' can't be assigned to a variable of type 'A'. // - 'B' is from 'pkg/front_end/testcases/nnbd/assignability_error_messages.dart'. // - 'A' is from 'pkg/front_end/testcases/nnbd/assignability_error_messages.dart'. // Try changing the type of the variable. // for (A y in l) {} // Error. // ^ // -// pkg/front_end/testcases/nnbd/assignability_error_messages.dart:36:15: Error: The type 'List?' used in the 'for' loop must implement 'Iterable' because 'List?' is nullable and 'Iterable' isn't. +// pkg/front_end/testcases/nnbd/assignability_error_messages.dart:36:15: Error: The type 'List?' used in the 'for' loop must implement 'Iterable'. // - 'List' is from 'dart:core'. // - 'B' is from 'pkg/front_end/testcases/nnbd/assignability_error_messages.dart'. // - 'Iterable' is from 'dart:core'. @@ -63,7 +63,7 @@ library; // switch (x) /* Error. */ { // ^ // -// pkg/front_end/testcases/nnbd/assignability_error_messages.dart:45:14: Error: A value of type 'B?' can't be returned from an async function with return type 'FutureOr' because 'B?' is nullable and 'FutureOr' isn't. +// pkg/front_end/testcases/nnbd/assignability_error_messages.dart:45:14: Error: A value of type 'B?' can't be returned from an async function with return type 'FutureOr'. // - 'B' is from 'pkg/front_end/testcases/nnbd/assignability_error_messages.dart'. // - 'A' is from 'pkg/front_end/testcases/nnbd/assignability_error_messages.dart'. // return x; // Error. @@ -76,20 +76,20 @@ library; // return new Future.value(x); // Error. // ^ // -// pkg/front_end/testcases/nnbd/assignability_error_messages.dart:51:10: Error: A value of type 'B?' can't be returned from a function with return type 'A' because 'B?' is nullable and 'A' isn't. +// pkg/front_end/testcases/nnbd/assignability_error_messages.dart:51:10: Error: A value of type 'B?' can't be returned from a function with return type 'A'. // - 'B' is from 'pkg/front_end/testcases/nnbd/assignability_error_messages.dart'. // - 'A' is from 'pkg/front_end/testcases/nnbd/assignability_error_messages.dart'. // return x; // Error. // ^ // -// pkg/front_end/testcases/nnbd/assignability_error_messages.dart:55:14: Error: The argument type 'List' can't be assigned to the parameter type 'List' because 'B?' is nullable and 'A' isn't. +// pkg/front_end/testcases/nnbd/assignability_error_messages.dart:55:14: Error: The argument type 'List' can't be assigned to the parameter type 'List'. // - 'List' is from 'dart:core'. // - 'B' is from 'pkg/front_end/testcases/nnbd/assignability_error_messages.dart'. // - 'A' is from 'pkg/front_end/testcases/nnbd/assignability_error_messages.dart'. // barContext(x); // Error. // ^ // -// pkg/front_end/testcases/nnbd/assignability_error_messages.dart:56:15: Error: A value of type 'List' can't be assigned to a variable of type 'List' because 'B?' is nullable and 'A' isn't. +// pkg/front_end/testcases/nnbd/assignability_error_messages.dart:56:15: Error: A value of type 'List' can't be assigned to a variable of type 'List'. // - 'List' is from 'dart:core'. // - 'B' is from 'pkg/front_end/testcases/nnbd/assignability_error_messages.dart'. // - 'A' is from 'pkg/front_end/testcases/nnbd/assignability_error_messages.dart'. @@ -117,7 +117,7 @@ library; // , List>{...m}; // Error. // ^ // -// pkg/front_end/testcases/nnbd/assignability_error_messages.dart:59:16: Error: A value of type 'List' can't be assigned to a variable of type 'List' because 'B?' is nullable and 'A' isn't. +// pkg/front_end/testcases/nnbd/assignability_error_messages.dart:59:16: Error: A value of type 'List' can't be assigned to a variable of type 'List'. // - 'List' is from 'dart:core'. // - 'B' is from 'pkg/front_end/testcases/nnbd/assignability_error_messages.dart'. // - 'A' is from 'pkg/front_end/testcases/nnbd/assignability_error_messages.dart'. @@ -125,48 +125,48 @@ library; // for (List y in l) {} // Error. // ^ // -// pkg/front_end/testcases/nnbd/assignability_error_messages.dart:60:10: Error: A value of type 'List' can't be returned from a function with return type 'List' because 'B?' is nullable and 'A' isn't. +// pkg/front_end/testcases/nnbd/assignability_error_messages.dart:60:10: Error: A value of type 'List' can't be returned from a function with return type 'List'. // - 'List' is from 'dart:core'. // - 'B' is from 'pkg/front_end/testcases/nnbd/assignability_error_messages.dart'. // - 'A' is from 'pkg/front_end/testcases/nnbd/assignability_error_messages.dart'. // return x; // Error. // ^ // -// pkg/front_end/testcases/nnbd/assignability_error_messages.dart:64:14: Error: The argument type 'num? Function()' can't be assigned to the parameter type 'num Function()' because 'num?' is nullable and 'num' isn't. +// pkg/front_end/testcases/nnbd/assignability_error_messages.dart:64:14: Error: The argument type 'num? Function()' can't be assigned to the parameter type 'num Function()'. // bazContext(c); // ^ // -// pkg/front_end/testcases/nnbd/assignability_error_messages.dart:68:14: Error: The argument type 'Null' can't be assigned to the parameter type 'A' because 'A' is not nullable. +// pkg/front_end/testcases/nnbd/assignability_error_messages.dart:68:14: Error: The argument type 'Null' can't be assigned to the parameter type 'A'. // - 'A' is from 'pkg/front_end/testcases/nnbd/assignability_error_messages.dart'. // fooContext(x); // Error. // ^ // -// pkg/front_end/testcases/nnbd/assignability_error_messages.dart:69:14: Error: The value 'null' can't be assigned to the parameter type 'A' because 'A' is not nullable. +// pkg/front_end/testcases/nnbd/assignability_error_messages.dart:69:14: Error: The argument type 'Null' can't be assigned to the parameter type 'A'. // - 'A' is from 'pkg/front_end/testcases/nnbd/assignability_error_messages.dart'. // fooContext(null); // Error. // ^ // -// pkg/front_end/testcases/nnbd/assignability_error_messages.dart:70:10: Error: A value of type 'Null' can't be assigned to a variable of type 'A' because 'A' is not nullable. +// pkg/front_end/testcases/nnbd/assignability_error_messages.dart:70:10: Error: A value of type 'Null' can't be assigned to a variable of type 'A'. // - 'A' is from 'pkg/front_end/testcases/nnbd/assignability_error_messages.dart'. // A a1 = x; // Error. // ^ // -// pkg/front_end/testcases/nnbd/assignability_error_messages.dart:71:10: Error: The value 'null' can't be assigned to a variable of type 'A' because 'A' is not nullable. +// pkg/front_end/testcases/nnbd/assignability_error_messages.dart:71:10: Error: A value of type 'Null' can't be assigned to a variable of type 'A'. // - 'A' is from 'pkg/front_end/testcases/nnbd/assignability_error_messages.dart'. // A a2 = null; // Error. // ^ // -// pkg/front_end/testcases/nnbd/assignability_error_messages.dart:73:12: Error: A value of type 'Null' can't be returned from a function with return type 'A' because 'A' is not nullable. +// pkg/front_end/testcases/nnbd/assignability_error_messages.dart:73:12: Error: A value of type 'Null' can't be returned from a function with return type 'A'. // - 'A' is from 'pkg/front_end/testcases/nnbd/assignability_error_messages.dart'. // return x; // Error. // ^ // -// pkg/front_end/testcases/nnbd/assignability_error_messages.dart:75:12: Error: The value 'null' can't be returned from a function with return type 'A' because 'A' is not nullable. +// pkg/front_end/testcases/nnbd/assignability_error_messages.dart:75:12: Error: A value of type 'Null' can't be returned from a function with return type 'A'. // - 'A' is from 'pkg/front_end/testcases/nnbd/assignability_error_messages.dart'. // return null; // Error. // ^ // -// pkg/front_end/testcases/nnbd/assignability_error_messages.dart:79:14: Error: The value 'null' can't be returned from an async function with return type 'FutureOr' because 'FutureOr' is not nullable. +// pkg/front_end/testcases/nnbd/assignability_error_messages.dart:79:14: Error: A value of type 'Null' can't be returned from an async function with return type 'FutureOr'. // - 'A' is from 'pkg/front_end/testcases/nnbd/assignability_error_messages.dart'. // return null; // Error. // ^ @@ -203,12 +203,12 @@ static method fooContext(self::A x) → void {} static method barContext(core::List x) → void {} static method bazContext(() → core::num f) → void {} static method foo(self::B? x, core::List l, core::Map m, core::List? l2, core::Map? m2) → self::A { - self::fooContext(invalid-expression "pkg/front_end/testcases/nnbd/assignability_error_messages.dart:29:14: Error: The argument type 'B?' can't be assigned to the parameter type 'A' because 'B?' is nullable and 'A' isn't. + self::fooContext(invalid-expression "pkg/front_end/testcases/nnbd/assignability_error_messages.dart:29:14: Error: The argument type 'B?' can't be assigned to the parameter type 'A'. - 'B' is from 'pkg/front_end/testcases/nnbd/assignability_error_messages.dart'. - 'A' is from 'pkg/front_end/testcases/nnbd/assignability_error_messages.dart'. fooContext(x); // Error. ^" in let self::B? #t1 = x in #t1 == null ?{self::A} #t1 as{TypeError} self::A : #t1{self::A}); - self::A a = invalid-expression "pkg/front_end/testcases/nnbd/assignability_error_messages.dart:30:9: Error: A value of type 'B?' can't be assigned to a variable of type 'A' because 'B?' is nullable and 'A' isn't. + self::A a = invalid-expression "pkg/front_end/testcases/nnbd/assignability_error_messages.dart:30:9: Error: A value of type 'B?' can't be assigned to a variable of type 'A'. - 'B' is from 'pkg/front_end/testcases/nnbd/assignability_error_messages.dart'. - 'A' is from 'pkg/front_end/testcases/nnbd/assignability_error_messages.dart'. A a = x; // Error. @@ -238,7 +238,7 @@ static method foo(self::B? x, core::List l, core::Map :sync-for-iterator = invalid-expression "pkg/front_end/testcases/nnbd/assignability_error_messages.dart:36:15: Error: The type 'List?' used in the 'for' loop must implement 'Iterable' because 'List?' is nullable and 'Iterable' isn't. + synthesized core::Iterator :sync-for-iterator = invalid-expression "pkg/front_end/testcases/nnbd/assignability_error_messages.dart:36:15: Error: The type 'List?' used in the 'for' loop must implement 'Iterable'. - 'List' is from 'dart:core'. - 'B' is from 'pkg/front_end/testcases/nnbd/assignability_error_messages.dart'. - 'Iterable' is from 'dart:core'. @@ -274,7 +274,7 @@ Try changing the type of the variable. } function local() → FutureOr async /* emittedValueType= self::A */ { if(true) { - return invalid-expression "pkg/front_end/testcases/nnbd/assignability_error_messages.dart:45:14: Error: A value of type 'B?' can't be returned from an async function with return type 'FutureOr' because 'B?' is nullable and 'FutureOr' isn't. + return invalid-expression "pkg/front_end/testcases/nnbd/assignability_error_messages.dart:45:14: Error: A value of type 'B?' can't be returned from an async function with return type 'FutureOr'. - 'B' is from 'pkg/front_end/testcases/nnbd/assignability_error_messages.dart'. - 'A' is from 'pkg/front_end/testcases/nnbd/assignability_error_messages.dart'. return x; // Error. @@ -289,20 +289,20 @@ Try changing the type of the variable. ^" in asy::Future::value(x) as{TypeError} self::A; } } - return invalid-expression "pkg/front_end/testcases/nnbd/assignability_error_messages.dart:51:10: Error: A value of type 'B?' can't be returned from a function with return type 'A' because 'B?' is nullable and 'A' isn't. + return invalid-expression "pkg/front_end/testcases/nnbd/assignability_error_messages.dart:51:10: Error: A value of type 'B?' can't be returned from a function with return type 'A'. - 'B' is from 'pkg/front_end/testcases/nnbd/assignability_error_messages.dart'. - 'A' is from 'pkg/front_end/testcases/nnbd/assignability_error_messages.dart'. return x; // Error. ^" in let self::B? #t7 = x in #t7 == null ?{self::A} #t7 as{TypeError} self::A : #t7{self::A}; } static method bar(core::List x, core::List> l, core::Map, core::List> m) → core::List { - self::barContext(invalid-expression "pkg/front_end/testcases/nnbd/assignability_error_messages.dart:55:14: Error: The argument type 'List' can't be assigned to the parameter type 'List' because 'B?' is nullable and 'A' isn't. + self::barContext(invalid-expression "pkg/front_end/testcases/nnbd/assignability_error_messages.dart:55:14: Error: The argument type 'List' can't be assigned to the parameter type 'List'. - 'List' is from 'dart:core'. - 'B' is from 'pkg/front_end/testcases/nnbd/assignability_error_messages.dart'. - 'A' is from 'pkg/front_end/testcases/nnbd/assignability_error_messages.dart'. barContext(x); // Error. ^" in x as{TypeError} core::List); - core::List y = invalid-expression "pkg/front_end/testcases/nnbd/assignability_error_messages.dart:56:15: Error: A value of type 'List' can't be assigned to a variable of type 'List' because 'B?' is nullable and 'A' isn't. + core::List y = invalid-expression "pkg/front_end/testcases/nnbd/assignability_error_messages.dart:56:15: Error: A value of type 'List' can't be assigned to a variable of type 'List'. - 'List' is from 'dart:core'. - 'B' is from 'pkg/front_end/testcases/nnbd/assignability_error_messages.dart'. - 'A' is from 'pkg/front_end/testcases/nnbd/assignability_error_messages.dart'. @@ -330,7 +330,7 @@ static method bar(core::List x, core::List> l, co for (; :sync-for-iterator.{core::Iterator::moveNext}(){() → core::bool}; ) { final core::List #t8 = :sync-for-iterator.{core::Iterator::current}{core::List}; { - core::List y = invalid-expression "pkg/front_end/testcases/nnbd/assignability_error_messages.dart:59:16: Error: A value of type 'List' can't be assigned to a variable of type 'List' because 'B?' is nullable and 'A' isn't. + core::List y = invalid-expression "pkg/front_end/testcases/nnbd/assignability_error_messages.dart:59:16: Error: A value of type 'List' can't be assigned to a variable of type 'List'. - 'List' is from 'dart:core'. - 'B' is from 'pkg/front_end/testcases/nnbd/assignability_error_messages.dart'. - 'A' is from 'pkg/front_end/testcases/nnbd/assignability_error_messages.dart'. @@ -340,7 +340,7 @@ Try changing the type of the variable. } } } - return invalid-expression "pkg/front_end/testcases/nnbd/assignability_error_messages.dart:60:10: Error: A value of type 'List' can't be returned from a function with return type 'List' because 'B?' is nullable and 'A' isn't. + return invalid-expression "pkg/front_end/testcases/nnbd/assignability_error_messages.dart:60:10: Error: A value of type 'List' can't be returned from a function with return type 'List'. - 'List' is from 'dart:core'. - 'B' is from 'pkg/front_end/testcases/nnbd/assignability_error_messages.dart'. - 'A' is from 'pkg/front_end/testcases/nnbd/assignability_error_messages.dart'. @@ -348,42 +348,42 @@ Try changing the type of the variable. ^" in x as{TypeError} core::List; } static method baz(self::C c) → void { - self::bazContext(invalid-expression "pkg/front_end/testcases/nnbd/assignability_error_messages.dart:64:14: Error: The argument type 'num? Function()' can't be assigned to the parameter type 'num Function()' because 'num?' is nullable and 'num' isn't. + self::bazContext(invalid-expression "pkg/front_end/testcases/nnbd/assignability_error_messages.dart:64:14: Error: The argument type 'num? Function()' can't be assigned to the parameter type 'num Function()'. bazContext(c); ^" in (let final self::C #t9 = c in #t9 == null ?{() → core::num?} null : #t9.{self::C::call}{() → core::num?}) as{TypeError} () → core::num); } static method boz(Null x) → self::A { - self::fooContext(invalid-expression "pkg/front_end/testcases/nnbd/assignability_error_messages.dart:68:14: Error: The argument type 'Null' can't be assigned to the parameter type 'A' because 'A' is not nullable. + self::fooContext(invalid-expression "pkg/front_end/testcases/nnbd/assignability_error_messages.dart:68:14: Error: The argument type 'Null' can't be assigned to the parameter type 'A'. - 'A' is from 'pkg/front_end/testcases/nnbd/assignability_error_messages.dart'. fooContext(x); // Error. ^" in let Null #t10 = x in #t10 == null ?{self::A} #t10 as{TypeError} self::A : #t10{self::A}); - self::fooContext(invalid-expression "pkg/front_end/testcases/nnbd/assignability_error_messages.dart:69:14: Error: The value 'null' can't be assigned to the parameter type 'A' because 'A' is not nullable. + self::fooContext(invalid-expression "pkg/front_end/testcases/nnbd/assignability_error_messages.dart:69:14: Error: The argument type 'Null' can't be assigned to the parameter type 'A'. - 'A' is from 'pkg/front_end/testcases/nnbd/assignability_error_messages.dart'. fooContext(null); // Error. ^" in let Null #t11 = null in #t11 == null ?{self::A} #t11 as{TypeError} self::A : #t11{self::A}); - self::A a1 = invalid-expression "pkg/front_end/testcases/nnbd/assignability_error_messages.dart:70:10: Error: A value of type 'Null' can't be assigned to a variable of type 'A' because 'A' is not nullable. + self::A a1 = invalid-expression "pkg/front_end/testcases/nnbd/assignability_error_messages.dart:70:10: Error: A value of type 'Null' can't be assigned to a variable of type 'A'. - 'A' is from 'pkg/front_end/testcases/nnbd/assignability_error_messages.dart'. A a1 = x; // Error. ^" in let Null #t12 = x in #t12 == null ?{self::A} #t12 as{TypeError} self::A : #t12{self::A}; - self::A a2 = invalid-expression "pkg/front_end/testcases/nnbd/assignability_error_messages.dart:71:10: Error: The value 'null' can't be assigned to a variable of type 'A' because 'A' is not nullable. + self::A a2 = invalid-expression "pkg/front_end/testcases/nnbd/assignability_error_messages.dart:71:10: Error: A value of type 'Null' can't be assigned to a variable of type 'A'. - 'A' is from 'pkg/front_end/testcases/nnbd/assignability_error_messages.dart'. A a2 = null; // Error. ^" in let Null #t13 = null in #t13 == null ?{self::A} #t13 as{TypeError} self::A : #t13{self::A}; if(true) { - return invalid-expression "pkg/front_end/testcases/nnbd/assignability_error_messages.dart:73:12: Error: A value of type 'Null' can't be returned from a function with return type 'A' because 'A' is not nullable. + return invalid-expression "pkg/front_end/testcases/nnbd/assignability_error_messages.dart:73:12: Error: A value of type 'Null' can't be returned from a function with return type 'A'. - 'A' is from 'pkg/front_end/testcases/nnbd/assignability_error_messages.dart'. return x; // Error. ^" in let Null #t14 = x in #t14 == null ?{self::A} #t14 as{TypeError} self::A : #t14{self::A}; } else { - return invalid-expression "pkg/front_end/testcases/nnbd/assignability_error_messages.dart:75:12: Error: The value 'null' can't be returned from a function with return type 'A' because 'A' is not nullable. + return invalid-expression "pkg/front_end/testcases/nnbd/assignability_error_messages.dart:75:12: Error: A value of type 'Null' can't be returned from a function with return type 'A'. - 'A' is from 'pkg/front_end/testcases/nnbd/assignability_error_messages.dart'. return null; // Error. ^" in let Null #t15 = null in #t15 == null ?{self::A} #t15 as{TypeError} self::A : #t15{self::A}; } function local() → FutureOr async /* emittedValueType= self::A */ { if(true) { - return invalid-expression "pkg/front_end/testcases/nnbd/assignability_error_messages.dart:79:14: Error: The value 'null' can't be returned from an async function with return type 'FutureOr' because 'FutureOr' is not nullable. + return invalid-expression "pkg/front_end/testcases/nnbd/assignability_error_messages.dart:79:14: Error: A value of type 'Null' can't be returned from an async function with return type 'FutureOr'. - 'A' is from 'pkg/front_end/testcases/nnbd/assignability_error_messages.dart'. return null; // Error. ^" in let Null #t16 = null in #t16 == null ?{self::A} #t16 as{TypeError} self::A : #t16{self::A}; diff --git a/pkg/front_end/testcases/nnbd/forin.dart.strong.expect b/pkg/front_end/testcases/nnbd/forin.dart.strong.expect index 020625b634a..cb86ab19190 100644 --- a/pkg/front_end/testcases/nnbd/forin.dart.strong.expect +++ b/pkg/front_end/testcases/nnbd/forin.dart.strong.expect @@ -2,23 +2,23 @@ library; // // Problems in library: // -// pkg/front_end/testcases/nnbd/forin.dart:9:17: Error: The type 'Iterable?' used in the 'for' loop must implement 'Iterable' because 'Iterable?' is nullable and 'Iterable' isn't. +// pkg/front_end/testcases/nnbd/forin.dart:9:17: Error: The type 'Iterable?' used in the 'for' loop must implement 'Iterable'. // - 'Iterable' is from 'dart:core'. // for (int x in i2) x; // ^ // -// pkg/front_end/testcases/nnbd/forin.dart:10:18: Error: The type 'Iterable?' used in the 'for' loop must implement 'Iterable' because 'Iterable?' is nullable and 'Iterable' isn't. +// pkg/front_end/testcases/nnbd/forin.dart:10:18: Error: The type 'Iterable?' used in the 'for' loop must implement 'Iterable'. // - 'Iterable' is from 'dart:core'. // [for (int x in i2) x]; // ^ // -// pkg/front_end/testcases/nnbd/forin.dart:12:17: Error: The type 'List?' used in the 'for' loop must implement 'Iterable' because 'List?' is nullable and 'Iterable' isn't. +// pkg/front_end/testcases/nnbd/forin.dart:12:17: Error: The type 'List?' used in the 'for' loop must implement 'Iterable'. // - 'List' is from 'dart:core'. // - 'Iterable' is from 'dart:core'. // for (int x in l2) x; // ^ // -// pkg/front_end/testcases/nnbd/forin.dart:13:18: Error: The type 'List?' used in the 'for' loop must implement 'Iterable' because 'List?' is nullable and 'Iterable' isn't. +// pkg/front_end/testcases/nnbd/forin.dart:13:18: Error: The type 'List?' used in the 'for' loop must implement 'Iterable'. // - 'List' is from 'dart:core'. // - 'Iterable' is from 'dart:core'. // [for (int x in l2) x]; @@ -52,20 +52,20 @@ import self as self; import "dart:core" as core; static method error(core::Iterable? i2, core::List? l2, core::Object o1, core::Object? o2) → dynamic { - for (core::int x in invalid-expression "pkg/front_end/testcases/nnbd/forin.dart:9:17: Error: The type 'Iterable?' used in the 'for' loop must implement 'Iterable' because 'Iterable?' is nullable and 'Iterable' isn't. + for (core::int x in invalid-expression "pkg/front_end/testcases/nnbd/forin.dart:9:17: Error: The type 'Iterable?' used in the 'for' loop must implement 'Iterable'. - 'Iterable' is from 'dart:core'. for (int x in i2) x; ^" in i2 as{TypeError} core::Iterable) x; { final core::List #t1 = []; - for (core::int x in invalid-expression "pkg/front_end/testcases/nnbd/forin.dart:10:18: Error: The type 'Iterable?' used in the 'for' loop must implement 'Iterable' because 'Iterable?' is nullable and 'Iterable' isn't. + for (core::int x in invalid-expression "pkg/front_end/testcases/nnbd/forin.dart:10:18: Error: The type 'Iterable?' used in the 'for' loop must implement 'Iterable'. - 'Iterable' is from 'dart:core'. [for (int x in i2) x]; ^" in i2 as{TypeError} core::Iterable) #t1.{core::List::add}{Invariant}(x){(core::int) → void}; } - for (core::int x in invalid-expression "pkg/front_end/testcases/nnbd/forin.dart:12:17: Error: The type 'List?' used in the 'for' loop must implement 'Iterable' because 'List?' is nullable and 'Iterable' isn't. + for (core::int x in invalid-expression "pkg/front_end/testcases/nnbd/forin.dart:12:17: Error: The type 'List?' used in the 'for' loop must implement 'Iterable'. - 'List' is from 'dart:core'. - 'Iterable' is from 'dart:core'. for (int x in l2) x; @@ -73,7 +73,7 @@ static method error(core::Iterable? i2, core::List? l2, co x; { final core::List #t2 = []; - for (core::int x in invalid-expression "pkg/front_end/testcases/nnbd/forin.dart:13:18: Error: The type 'List?' used in the 'for' loop must implement 'Iterable' because 'List?' is nullable and 'Iterable' isn't. + for (core::int x in invalid-expression "pkg/front_end/testcases/nnbd/forin.dart:13:18: Error: The type 'List?' used in the 'for' loop must implement 'Iterable'. - 'List' is from 'dart:core'. - 'Iterable' is from 'dart:core'. [for (int x in l2) x]; diff --git a/pkg/front_end/testcases/nnbd/forin.dart.strong.modular.expect b/pkg/front_end/testcases/nnbd/forin.dart.strong.modular.expect index 020625b634a..cb86ab19190 100644 --- a/pkg/front_end/testcases/nnbd/forin.dart.strong.modular.expect +++ b/pkg/front_end/testcases/nnbd/forin.dart.strong.modular.expect @@ -2,23 +2,23 @@ library; // // Problems in library: // -// pkg/front_end/testcases/nnbd/forin.dart:9:17: Error: The type 'Iterable?' used in the 'for' loop must implement 'Iterable' because 'Iterable?' is nullable and 'Iterable' isn't. +// pkg/front_end/testcases/nnbd/forin.dart:9:17: Error: The type 'Iterable?' used in the 'for' loop must implement 'Iterable'. // - 'Iterable' is from 'dart:core'. // for (int x in i2) x; // ^ // -// pkg/front_end/testcases/nnbd/forin.dart:10:18: Error: The type 'Iterable?' used in the 'for' loop must implement 'Iterable' because 'Iterable?' is nullable and 'Iterable' isn't. +// pkg/front_end/testcases/nnbd/forin.dart:10:18: Error: The type 'Iterable?' used in the 'for' loop must implement 'Iterable'. // - 'Iterable' is from 'dart:core'. // [for (int x in i2) x]; // ^ // -// pkg/front_end/testcases/nnbd/forin.dart:12:17: Error: The type 'List?' used in the 'for' loop must implement 'Iterable' because 'List?' is nullable and 'Iterable' isn't. +// pkg/front_end/testcases/nnbd/forin.dart:12:17: Error: The type 'List?' used in the 'for' loop must implement 'Iterable'. // - 'List' is from 'dart:core'. // - 'Iterable' is from 'dart:core'. // for (int x in l2) x; // ^ // -// pkg/front_end/testcases/nnbd/forin.dart:13:18: Error: The type 'List?' used in the 'for' loop must implement 'Iterable' because 'List?' is nullable and 'Iterable' isn't. +// pkg/front_end/testcases/nnbd/forin.dart:13:18: Error: The type 'List?' used in the 'for' loop must implement 'Iterable'. // - 'List' is from 'dart:core'. // - 'Iterable' is from 'dart:core'. // [for (int x in l2) x]; @@ -52,20 +52,20 @@ import self as self; import "dart:core" as core; static method error(core::Iterable? i2, core::List? l2, core::Object o1, core::Object? o2) → dynamic { - for (core::int x in invalid-expression "pkg/front_end/testcases/nnbd/forin.dart:9:17: Error: The type 'Iterable?' used in the 'for' loop must implement 'Iterable' because 'Iterable?' is nullable and 'Iterable' isn't. + for (core::int x in invalid-expression "pkg/front_end/testcases/nnbd/forin.dart:9:17: Error: The type 'Iterable?' used in the 'for' loop must implement 'Iterable'. - 'Iterable' is from 'dart:core'. for (int x in i2) x; ^" in i2 as{TypeError} core::Iterable) x; { final core::List #t1 = []; - for (core::int x in invalid-expression "pkg/front_end/testcases/nnbd/forin.dart:10:18: Error: The type 'Iterable?' used in the 'for' loop must implement 'Iterable' because 'Iterable?' is nullable and 'Iterable' isn't. + for (core::int x in invalid-expression "pkg/front_end/testcases/nnbd/forin.dart:10:18: Error: The type 'Iterable?' used in the 'for' loop must implement 'Iterable'. - 'Iterable' is from 'dart:core'. [for (int x in i2) x]; ^" in i2 as{TypeError} core::Iterable) #t1.{core::List::add}{Invariant}(x){(core::int) → void}; } - for (core::int x in invalid-expression "pkg/front_end/testcases/nnbd/forin.dart:12:17: Error: The type 'List?' used in the 'for' loop must implement 'Iterable' because 'List?' is nullable and 'Iterable' isn't. + for (core::int x in invalid-expression "pkg/front_end/testcases/nnbd/forin.dart:12:17: Error: The type 'List?' used in the 'for' loop must implement 'Iterable'. - 'List' is from 'dart:core'. - 'Iterable' is from 'dart:core'. for (int x in l2) x; @@ -73,7 +73,7 @@ static method error(core::Iterable? i2, core::List? l2, co x; { final core::List #t2 = []; - for (core::int x in invalid-expression "pkg/front_end/testcases/nnbd/forin.dart:13:18: Error: The type 'List?' used in the 'for' loop must implement 'Iterable' because 'List?' is nullable and 'Iterable' isn't. + for (core::int x in invalid-expression "pkg/front_end/testcases/nnbd/forin.dart:13:18: Error: The type 'List?' used in the 'for' loop must implement 'Iterable'. - 'List' is from 'dart:core'. - 'Iterable' is from 'dart:core'. [for (int x in l2) x]; diff --git a/pkg/front_end/testcases/nnbd/forin.dart.strong.transformed.expect b/pkg/front_end/testcases/nnbd/forin.dart.strong.transformed.expect index cd6bf1a6b15..7c2d1ab08c0 100644 --- a/pkg/front_end/testcases/nnbd/forin.dart.strong.transformed.expect +++ b/pkg/front_end/testcases/nnbd/forin.dart.strong.transformed.expect @@ -2,23 +2,23 @@ library; // // Problems in library: // -// pkg/front_end/testcases/nnbd/forin.dart:9:17: Error: The type 'Iterable?' used in the 'for' loop must implement 'Iterable' because 'Iterable?' is nullable and 'Iterable' isn't. +// pkg/front_end/testcases/nnbd/forin.dart:9:17: Error: The type 'Iterable?' used in the 'for' loop must implement 'Iterable'. // - 'Iterable' is from 'dart:core'. // for (int x in i2) x; // ^ // -// pkg/front_end/testcases/nnbd/forin.dart:10:18: Error: The type 'Iterable?' used in the 'for' loop must implement 'Iterable' because 'Iterable?' is nullable and 'Iterable' isn't. +// pkg/front_end/testcases/nnbd/forin.dart:10:18: Error: The type 'Iterable?' used in the 'for' loop must implement 'Iterable'. // - 'Iterable' is from 'dart:core'. // [for (int x in i2) x]; // ^ // -// pkg/front_end/testcases/nnbd/forin.dart:12:17: Error: The type 'List?' used in the 'for' loop must implement 'Iterable' because 'List?' is nullable and 'Iterable' isn't. +// pkg/front_end/testcases/nnbd/forin.dart:12:17: Error: The type 'List?' used in the 'for' loop must implement 'Iterable'. // - 'List' is from 'dart:core'. // - 'Iterable' is from 'dart:core'. // for (int x in l2) x; // ^ // -// pkg/front_end/testcases/nnbd/forin.dart:13:18: Error: The type 'List?' used in the 'for' loop must implement 'Iterable' because 'List?' is nullable and 'Iterable' isn't. +// pkg/front_end/testcases/nnbd/forin.dart:13:18: Error: The type 'List?' used in the 'for' loop must implement 'Iterable'. // - 'List' is from 'dart:core'. // - 'Iterable' is from 'dart:core'. // [for (int x in l2) x]; @@ -53,7 +53,7 @@ import "dart:core" as core; static method error(core::Iterable? i2, core::List? l2, core::Object o1, core::Object? o2) → dynamic { { - synthesized core::Iterator :sync-for-iterator = invalid-expression "pkg/front_end/testcases/nnbd/forin.dart:9:17: Error: The type 'Iterable?' used in the 'for' loop must implement 'Iterable' because 'Iterable?' is nullable and 'Iterable' isn't. + synthesized core::Iterator :sync-for-iterator = invalid-expression "pkg/front_end/testcases/nnbd/forin.dart:9:17: Error: The type 'Iterable?' used in the 'for' loop must implement 'Iterable'. - 'Iterable' is from 'dart:core'. for (int x in i2) x; ^" in let core::Iterable? #t1 = i2 in #t1 == null ?{core::Iterable} #t1 as{TypeError} core::Iterable : #t1{core::Iterable}.{core::Iterable::iterator}{core::Iterator}; @@ -65,7 +65,7 @@ static method error(core::Iterable? i2, core::List? l2, co { final core::List #t2 = core::_GrowableList::•(0); { - synthesized core::Iterator :sync-for-iterator = invalid-expression "pkg/front_end/testcases/nnbd/forin.dart:10:18: Error: The type 'Iterable?' used in the 'for' loop must implement 'Iterable' because 'Iterable?' is nullable and 'Iterable' isn't. + synthesized core::Iterator :sync-for-iterator = invalid-expression "pkg/front_end/testcases/nnbd/forin.dart:10:18: Error: The type 'Iterable?' used in the 'for' loop must implement 'Iterable'. - 'Iterable' is from 'dart:core'. [for (int x in i2) x]; ^" in let core::Iterable? #t3 = i2 in #t3 == null ?{core::Iterable} #t3 as{TypeError} core::Iterable : #t3{core::Iterable}.{core::Iterable::iterator}{core::Iterator}; @@ -76,7 +76,7 @@ static method error(core::Iterable? i2, core::List? l2, co } } { - synthesized core::Iterator :sync-for-iterator = invalid-expression "pkg/front_end/testcases/nnbd/forin.dart:12:17: Error: The type 'List?' used in the 'for' loop must implement 'Iterable' because 'List?' is nullable and 'Iterable' isn't. + synthesized core::Iterator :sync-for-iterator = invalid-expression "pkg/front_end/testcases/nnbd/forin.dart:12:17: Error: The type 'List?' used in the 'for' loop must implement 'Iterable'. - 'List' is from 'dart:core'. - 'Iterable' is from 'dart:core'. for (int x in l2) x; @@ -89,7 +89,7 @@ static method error(core::Iterable? i2, core::List? l2, co { final core::List #t5 = core::_GrowableList::•(0); { - synthesized core::Iterator :sync-for-iterator = invalid-expression "pkg/front_end/testcases/nnbd/forin.dart:13:18: Error: The type 'List?' used in the 'for' loop must implement 'Iterable' because 'List?' is nullable and 'Iterable' isn't. + synthesized core::Iterator :sync-for-iterator = invalid-expression "pkg/front_end/testcases/nnbd/forin.dart:13:18: Error: The type 'List?' used in the 'for' loop must implement 'Iterable'. - 'List' is from 'dart:core'. - 'Iterable' is from 'dart:core'. [for (int x in l2) x]; diff --git a/pkg/front_end/testcases/nnbd/issue41102.dart.strong.expect b/pkg/front_end/testcases/nnbd/issue41102.dart.strong.expect index 94a9cdbfddf..e99ac57ee07 100644 --- a/pkg/front_end/testcases/nnbd/issue41102.dart.strong.expect +++ b/pkg/front_end/testcases/nnbd/issue41102.dart.strong.expect @@ -2,7 +2,7 @@ library; // // Problems in library: // -// pkg/front_end/testcases/nnbd/issue41102.dart:19:36: Error: The value 'null' can't be assigned to the parameter type 'int' because 'int' is not nullable. +// pkg/front_end/testcases/nnbd/issue41102.dart:19:36: Error: The argument type 'Null' can't be assigned to the parameter type 'int'. // final s3 = new List.filled(2, null); // ^ // @@ -65,7 +65,7 @@ import "dart:async"; static final field asy::StreamTransformer t = new asy::_StreamHandlerTransformer::•(handleData: (core::Object? data, asy::EventSink sink) → void => asy::Future::microtask(() → void => sink.{asy::EventSink::add}(data){(core::Object?) → void}), handleDone: (asy::EventSink sink) → void => asy::Future::microtask(() → void => sink.{asy::EventSink::close}(){() → void})); static final field core::List s1 = []; static final field core::int? s2 = let final core::List #t1 = self::s1 in #t1 == null ?{core::int?} null : #t1.{core::List::length}{core::int}; -static final field core::List s3 = core::List::filled(2, invalid-expression "pkg/front_end/testcases/nnbd/issue41102.dart:19:36: Error: The value 'null' can't be assigned to the parameter type 'int' because 'int' is not nullable. +static final field core::List s3 = core::List::filled(2, invalid-expression "pkg/front_end/testcases/nnbd/issue41102.dart:19:36: Error: The argument type 'Null' can't be assigned to the parameter type 'int'. final s3 = new List.filled(2, null); ^" in null as{TypeError} core::int); static final field dynamic s4 = (() → Null { diff --git a/pkg/front_end/testcases/nnbd/issue41102.dart.strong.modular.expect b/pkg/front_end/testcases/nnbd/issue41102.dart.strong.modular.expect index 94a9cdbfddf..e99ac57ee07 100644 --- a/pkg/front_end/testcases/nnbd/issue41102.dart.strong.modular.expect +++ b/pkg/front_end/testcases/nnbd/issue41102.dart.strong.modular.expect @@ -2,7 +2,7 @@ library; // // Problems in library: // -// pkg/front_end/testcases/nnbd/issue41102.dart:19:36: Error: The value 'null' can't be assigned to the parameter type 'int' because 'int' is not nullable. +// pkg/front_end/testcases/nnbd/issue41102.dart:19:36: Error: The argument type 'Null' can't be assigned to the parameter type 'int'. // final s3 = new List.filled(2, null); // ^ // @@ -65,7 +65,7 @@ import "dart:async"; static final field asy::StreamTransformer t = new asy::_StreamHandlerTransformer::•(handleData: (core::Object? data, asy::EventSink sink) → void => asy::Future::microtask(() → void => sink.{asy::EventSink::add}(data){(core::Object?) → void}), handleDone: (asy::EventSink sink) → void => asy::Future::microtask(() → void => sink.{asy::EventSink::close}(){() → void})); static final field core::List s1 = []; static final field core::int? s2 = let final core::List #t1 = self::s1 in #t1 == null ?{core::int?} null : #t1.{core::List::length}{core::int}; -static final field core::List s3 = core::List::filled(2, invalid-expression "pkg/front_end/testcases/nnbd/issue41102.dart:19:36: Error: The value 'null' can't be assigned to the parameter type 'int' because 'int' is not nullable. +static final field core::List s3 = core::List::filled(2, invalid-expression "pkg/front_end/testcases/nnbd/issue41102.dart:19:36: Error: The argument type 'Null' can't be assigned to the parameter type 'int'. final s3 = new List.filled(2, null); ^" in null as{TypeError} core::int); static final field dynamic s4 = (() → Null { diff --git a/pkg/front_end/testcases/nnbd/issue41102.dart.strong.outline.expect b/pkg/front_end/testcases/nnbd/issue41102.dart.strong.outline.expect index 90634dd1aa2..d5a89439dd0 100644 --- a/pkg/front_end/testcases/nnbd/issue41102.dart.strong.outline.expect +++ b/pkg/front_end/testcases/nnbd/issue41102.dart.strong.outline.expect @@ -2,7 +2,7 @@ library; // // Problems in library: // -// pkg/front_end/testcases/nnbd/issue41102.dart:19:36: Error: The value 'null' can't be assigned to the parameter type 'int' because 'int' is not nullable. +// pkg/front_end/testcases/nnbd/issue41102.dart:19:36: Error: The argument type 'Null' can't be assigned to the parameter type 'int'. // final s3 = new List.filled(2, null); // ^ // diff --git a/pkg/front_end/testcases/nnbd/issue41102.dart.strong.transformed.expect b/pkg/front_end/testcases/nnbd/issue41102.dart.strong.transformed.expect index 369ef0bd993..7e8199b874a 100644 --- a/pkg/front_end/testcases/nnbd/issue41102.dart.strong.transformed.expect +++ b/pkg/front_end/testcases/nnbd/issue41102.dart.strong.transformed.expect @@ -2,7 +2,7 @@ library; // // Problems in library: // -// pkg/front_end/testcases/nnbd/issue41102.dart:19:36: Error: The value 'null' can't be assigned to the parameter type 'int' because 'int' is not nullable. +// pkg/front_end/testcases/nnbd/issue41102.dart:19:36: Error: The argument type 'Null' can't be assigned to the parameter type 'int'. // final s3 = new List.filled(2, null); // ^ // @@ -65,7 +65,7 @@ import "dart:async"; static final field asy::StreamTransformer t = new asy::_StreamHandlerTransformer::•(handleData: (core::Object? data, asy::EventSink sink) → void => asy::Future::microtask(() → void => sink.{asy::EventSink::add}(data){(core::Object?) → void}), handleDone: (asy::EventSink sink) → void => asy::Future::microtask(() → void => sink.{asy::EventSink::close}(){() → void})); static final field core::List s1 = core::_GrowableList::•(0); static final field core::int? s2 = let final core::List #t1 = self::s1 in #t1 == null ?{core::int?} null : #t1.{core::List::length}{core::int}; -static final field core::List s3 = core::_List::filled(2, invalid-expression "pkg/front_end/testcases/nnbd/issue41102.dart:19:36: Error: The value 'null' can't be assigned to the parameter type 'int' because 'int' is not nullable. +static final field core::List s3 = core::_List::filled(2, invalid-expression "pkg/front_end/testcases/nnbd/issue41102.dart:19:36: Error: The argument type 'Null' can't be assigned to the parameter type 'int'. final s3 = new List.filled(2, null); ^" in let Null #t2 = null in #t2 == null ?{core::int} #t2 as{TypeError} core::int : #t2{core::int}); static final field dynamic s4 = (() → Null { diff --git a/pkg/front_end/testcases/nnbd/issue41108.dart.strong.expect b/pkg/front_end/testcases/nnbd/issue41108.dart.strong.expect index 63909d3d8bd..4a5710bc97d 100644 --- a/pkg/front_end/testcases/nnbd/issue41108.dart.strong.expect +++ b/pkg/front_end/testcases/nnbd/issue41108.dart.strong.expect @@ -2,7 +2,7 @@ library; // // Problems in library: // -// pkg/front_end/testcases/nnbd/issue41108.dart:6:12: Error: A value of type 'List?' can't be assigned to a variable of type 'List' because 'List?' is nullable and 'List' isn't. +// pkg/front_end/testcases/nnbd/issue41108.dart:6:12: Error: A value of type 'List?' can't be assigned to a variable of type 'List'. // - 'List' is from 'dart:core'. // List y = await l(); // should be a List? // ^ @@ -12,7 +12,7 @@ import "dart:core" as core; import "dart:async" as asy; static method test() → dynamic async /* emittedValueType= dynamic */ { - core::List y = invalid-expression "pkg/front_end/testcases/nnbd/issue41108.dart:6:12: Error: A value of type 'List?' can't be assigned to a variable of type 'List' because 'List?' is nullable and 'List' isn't. + core::List y = invalid-expression "pkg/front_end/testcases/nnbd/issue41108.dart:6:12: Error: A value of type 'List?' can't be assigned to a variable of type 'List'. - 'List' is from 'dart:core'. List y = await l(); // should be a List? ^" in await self::l() /* runtimeCheckType= asy::Future?> */ as{TypeError} core::List; diff --git a/pkg/front_end/testcases/nnbd/issue41108.dart.strong.modular.expect b/pkg/front_end/testcases/nnbd/issue41108.dart.strong.modular.expect index 63909d3d8bd..4a5710bc97d 100644 --- a/pkg/front_end/testcases/nnbd/issue41108.dart.strong.modular.expect +++ b/pkg/front_end/testcases/nnbd/issue41108.dart.strong.modular.expect @@ -2,7 +2,7 @@ library; // // Problems in library: // -// pkg/front_end/testcases/nnbd/issue41108.dart:6:12: Error: A value of type 'List?' can't be assigned to a variable of type 'List' because 'List?' is nullable and 'List' isn't. +// pkg/front_end/testcases/nnbd/issue41108.dart:6:12: Error: A value of type 'List?' can't be assigned to a variable of type 'List'. // - 'List' is from 'dart:core'. // List y = await l(); // should be a List? // ^ @@ -12,7 +12,7 @@ import "dart:core" as core; import "dart:async" as asy; static method test() → dynamic async /* emittedValueType= dynamic */ { - core::List y = invalid-expression "pkg/front_end/testcases/nnbd/issue41108.dart:6:12: Error: A value of type 'List?' can't be assigned to a variable of type 'List' because 'List?' is nullable and 'List' isn't. + core::List y = invalid-expression "pkg/front_end/testcases/nnbd/issue41108.dart:6:12: Error: A value of type 'List?' can't be assigned to a variable of type 'List'. - 'List' is from 'dart:core'. List y = await l(); // should be a List? ^" in await self::l() /* runtimeCheckType= asy::Future?> */ as{TypeError} core::List; diff --git a/pkg/front_end/testcases/nnbd/issue41108.dart.strong.transformed.expect b/pkg/front_end/testcases/nnbd/issue41108.dart.strong.transformed.expect index dfff98d8731..c0ec06a0115 100644 --- a/pkg/front_end/testcases/nnbd/issue41108.dart.strong.transformed.expect +++ b/pkg/front_end/testcases/nnbd/issue41108.dart.strong.transformed.expect @@ -2,7 +2,7 @@ library; // // Problems in library: // -// pkg/front_end/testcases/nnbd/issue41108.dart:6:12: Error: A value of type 'List?' can't be assigned to a variable of type 'List' because 'List?' is nullable and 'List' isn't. +// pkg/front_end/testcases/nnbd/issue41108.dart:6:12: Error: A value of type 'List?' can't be assigned to a variable of type 'List'. // - 'List' is from 'dart:core'. // List y = await l(); // should be a List? // ^ @@ -12,7 +12,7 @@ import "dart:core" as core; import "dart:async" as asy; static method test() → dynamic async /* emittedValueType= dynamic */ { - core::List y = invalid-expression "pkg/front_end/testcases/nnbd/issue41108.dart:6:12: Error: A value of type 'List?' can't be assigned to a variable of type 'List' because 'List?' is nullable and 'List' isn't. + core::List y = invalid-expression "pkg/front_end/testcases/nnbd/issue41108.dart:6:12: Error: A value of type 'List?' can't be assigned to a variable of type 'List'. - 'List' is from 'dart:core'. List y = await l(); // should be a List? ^" in let core::List? #t1 = await self::l() /* runtimeCheckType= asy::Future?> */ in #t1 == null ?{core::List} #t1 as{TypeError} core::List : #t1{core::List}; diff --git a/pkg/front_end/testcases/nnbd/issue41700b.dart.strong.expect b/pkg/front_end/testcases/nnbd/issue41700b.dart.strong.expect index c56522c7801..20e30b99423 100644 --- a/pkg/front_end/testcases/nnbd/issue41700b.dart.strong.expect +++ b/pkg/front_end/testcases/nnbd/issue41700b.dart.strong.expect @@ -2,7 +2,7 @@ library; // // Problems in library: // -// pkg/front_end/testcases/nnbd/issue41700b.dart:8:12: Error: The value 'null' can't be assigned to a variable of type 'Null' because 'Null' is not nullable. +// pkg/front_end/testcases/nnbd/issue41700b.dart:8:12: Error: A value of type 'Null' can't be assigned to a variable of type 'Null'. // - 'Null' is from 'pkg/front_end/testcases/nnbd/issue41700b.dart'. // Null x = null; // ^ @@ -28,7 +28,7 @@ class Null extends core::Object { ; } static method test() → dynamic { - self::Null x = invalid-expression "pkg/front_end/testcases/nnbd/issue41700b.dart:8:12: Error: The value 'null' can't be assigned to a variable of type 'Null' because 'Null' is not nullable. + self::Null x = invalid-expression "pkg/front_end/testcases/nnbd/issue41700b.dart:8:12: Error: A value of type 'Null' can't be assigned to a variable of type 'Null'. - 'Null' is from 'pkg/front_end/testcases/nnbd/issue41700b.dart'. Null x = null; ^" in null as{TypeError} self::Null; diff --git a/pkg/front_end/testcases/nnbd/issue41700b.dart.strong.modular.expect b/pkg/front_end/testcases/nnbd/issue41700b.dart.strong.modular.expect index c56522c7801..20e30b99423 100644 --- a/pkg/front_end/testcases/nnbd/issue41700b.dart.strong.modular.expect +++ b/pkg/front_end/testcases/nnbd/issue41700b.dart.strong.modular.expect @@ -2,7 +2,7 @@ library; // // Problems in library: // -// pkg/front_end/testcases/nnbd/issue41700b.dart:8:12: Error: The value 'null' can't be assigned to a variable of type 'Null' because 'Null' is not nullable. +// pkg/front_end/testcases/nnbd/issue41700b.dart:8:12: Error: A value of type 'Null' can't be assigned to a variable of type 'Null'. // - 'Null' is from 'pkg/front_end/testcases/nnbd/issue41700b.dart'. // Null x = null; // ^ @@ -28,7 +28,7 @@ class Null extends core::Object { ; } static method test() → dynamic { - self::Null x = invalid-expression "pkg/front_end/testcases/nnbd/issue41700b.dart:8:12: Error: The value 'null' can't be assigned to a variable of type 'Null' because 'Null' is not nullable. + self::Null x = invalid-expression "pkg/front_end/testcases/nnbd/issue41700b.dart:8:12: Error: A value of type 'Null' can't be assigned to a variable of type 'Null'. - 'Null' is from 'pkg/front_end/testcases/nnbd/issue41700b.dart'. Null x = null; ^" in null as{TypeError} self::Null; diff --git a/pkg/front_end/testcases/nnbd/issue41700b.dart.strong.transformed.expect b/pkg/front_end/testcases/nnbd/issue41700b.dart.strong.transformed.expect index 1cba2d36123..74bf3a62b99 100644 --- a/pkg/front_end/testcases/nnbd/issue41700b.dart.strong.transformed.expect +++ b/pkg/front_end/testcases/nnbd/issue41700b.dart.strong.transformed.expect @@ -2,7 +2,7 @@ library; // // Problems in library: // -// pkg/front_end/testcases/nnbd/issue41700b.dart:8:12: Error: The value 'null' can't be assigned to a variable of type 'Null' because 'Null' is not nullable. +// pkg/front_end/testcases/nnbd/issue41700b.dart:8:12: Error: A value of type 'Null' can't be assigned to a variable of type 'Null'. // - 'Null' is from 'pkg/front_end/testcases/nnbd/issue41700b.dart'. // Null x = null; // ^ @@ -28,7 +28,7 @@ class Null extends core::Object { ; } static method test() → dynamic { - self::Null x = invalid-expression "pkg/front_end/testcases/nnbd/issue41700b.dart:8:12: Error: The value 'null' can't be assigned to a variable of type 'Null' because 'Null' is not nullable. + self::Null x = invalid-expression "pkg/front_end/testcases/nnbd/issue41700b.dart:8:12: Error: A value of type 'Null' can't be assigned to a variable of type 'Null'. - 'Null' is from 'pkg/front_end/testcases/nnbd/issue41700b.dart'. Null x = null; ^" in let Null #t1 = null in #t1 == null ?{self::Null} #t1 as{TypeError} self::Null : #t1{self::Null}; diff --git a/pkg/front_end/testcases/nnbd/issue42089.dart.strong.expect b/pkg/front_end/testcases/nnbd/issue42089.dart.strong.expect index f887a11fa9f..2601d3d8f35 100644 --- a/pkg/front_end/testcases/nnbd/issue42089.dart.strong.expect +++ b/pkg/front_end/testcases/nnbd/issue42089.dart.strong.expect @@ -2,12 +2,12 @@ library; // // Problems in library: // -// pkg/front_end/testcases/nnbd/issue42089.dart:7:16: Error: A value of type 'X?' can't be assigned to a variable of type 'Object' because 'X?' is nullable and 'Object' isn't. +// pkg/front_end/testcases/nnbd/issue42089.dart:7:16: Error: A value of type 'X?' can't be assigned to a variable of type 'Object'. // - 'Object' is from 'dart:core'. // Object o = x; // ^ // -// pkg/front_end/testcases/nnbd/issue42089.dart:8:9: Error: A value of type 'X?' can't be assigned to a variable of type 'Object' because 'X?' is nullable and 'Object' isn't. +// pkg/front_end/testcases/nnbd/issue42089.dart:8:9: Error: A value of type 'X?' can't be assigned to a variable of type 'Object'. // - 'Object' is from 'dart:core'. // o = x; // ^ @@ -17,11 +17,11 @@ import "dart:core" as core; static method test(self::test::X? x) → dynamic { if(x is core::String?) { - core::Object o = invalid-expression "pkg/front_end/testcases/nnbd/issue42089.dart:7:16: Error: A value of type 'X?' can't be assigned to a variable of type 'Object' because 'X?' is nullable and 'Object' isn't. + core::Object o = invalid-expression "pkg/front_end/testcases/nnbd/issue42089.dart:7:16: Error: A value of type 'X?' can't be assigned to a variable of type 'Object'. - 'Object' is from 'dart:core'. Object o = x; ^" in x{self::test::X? & core::String? /* '?' & '?' = '?' */} as{TypeError} core::Object; - o = invalid-expression "pkg/front_end/testcases/nnbd/issue42089.dart:8:9: Error: A value of type 'X?' can't be assigned to a variable of type 'Object' because 'X?' is nullable and 'Object' isn't. + o = invalid-expression "pkg/front_end/testcases/nnbd/issue42089.dart:8:9: Error: A value of type 'X?' can't be assigned to a variable of type 'Object'. - 'Object' is from 'dart:core'. o = x; ^" in x{self::test::X? & core::String? /* '?' & '?' = '?' */} as{TypeError} core::Object; diff --git a/pkg/front_end/testcases/nnbd/issue42089.dart.strong.modular.expect b/pkg/front_end/testcases/nnbd/issue42089.dart.strong.modular.expect index f887a11fa9f..2601d3d8f35 100644 --- a/pkg/front_end/testcases/nnbd/issue42089.dart.strong.modular.expect +++ b/pkg/front_end/testcases/nnbd/issue42089.dart.strong.modular.expect @@ -2,12 +2,12 @@ library; // // Problems in library: // -// pkg/front_end/testcases/nnbd/issue42089.dart:7:16: Error: A value of type 'X?' can't be assigned to a variable of type 'Object' because 'X?' is nullable and 'Object' isn't. +// pkg/front_end/testcases/nnbd/issue42089.dart:7:16: Error: A value of type 'X?' can't be assigned to a variable of type 'Object'. // - 'Object' is from 'dart:core'. // Object o = x; // ^ // -// pkg/front_end/testcases/nnbd/issue42089.dart:8:9: Error: A value of type 'X?' can't be assigned to a variable of type 'Object' because 'X?' is nullable and 'Object' isn't. +// pkg/front_end/testcases/nnbd/issue42089.dart:8:9: Error: A value of type 'X?' can't be assigned to a variable of type 'Object'. // - 'Object' is from 'dart:core'. // o = x; // ^ @@ -17,11 +17,11 @@ import "dart:core" as core; static method test(self::test::X? x) → dynamic { if(x is core::String?) { - core::Object o = invalid-expression "pkg/front_end/testcases/nnbd/issue42089.dart:7:16: Error: A value of type 'X?' can't be assigned to a variable of type 'Object' because 'X?' is nullable and 'Object' isn't. + core::Object o = invalid-expression "pkg/front_end/testcases/nnbd/issue42089.dart:7:16: Error: A value of type 'X?' can't be assigned to a variable of type 'Object'. - 'Object' is from 'dart:core'. Object o = x; ^" in x{self::test::X? & core::String? /* '?' & '?' = '?' */} as{TypeError} core::Object; - o = invalid-expression "pkg/front_end/testcases/nnbd/issue42089.dart:8:9: Error: A value of type 'X?' can't be assigned to a variable of type 'Object' because 'X?' is nullable and 'Object' isn't. + o = invalid-expression "pkg/front_end/testcases/nnbd/issue42089.dart:8:9: Error: A value of type 'X?' can't be assigned to a variable of type 'Object'. - 'Object' is from 'dart:core'. o = x; ^" in x{self::test::X? & core::String? /* '?' & '?' = '?' */} as{TypeError} core::Object; diff --git a/pkg/front_end/testcases/nnbd/issue42089.dart.strong.transformed.expect b/pkg/front_end/testcases/nnbd/issue42089.dart.strong.transformed.expect index 7c03e706c9a..3c5cdaa967f 100644 --- a/pkg/front_end/testcases/nnbd/issue42089.dart.strong.transformed.expect +++ b/pkg/front_end/testcases/nnbd/issue42089.dart.strong.transformed.expect @@ -2,12 +2,12 @@ library; // // Problems in library: // -// pkg/front_end/testcases/nnbd/issue42089.dart:7:16: Error: A value of type 'X?' can't be assigned to a variable of type 'Object' because 'X?' is nullable and 'Object' isn't. +// pkg/front_end/testcases/nnbd/issue42089.dart:7:16: Error: A value of type 'X?' can't be assigned to a variable of type 'Object'. // - 'Object' is from 'dart:core'. // Object o = x; // ^ // -// pkg/front_end/testcases/nnbd/issue42089.dart:8:9: Error: A value of type 'X?' can't be assigned to a variable of type 'Object' because 'X?' is nullable and 'Object' isn't. +// pkg/front_end/testcases/nnbd/issue42089.dart:8:9: Error: A value of type 'X?' can't be assigned to a variable of type 'Object'. // - 'Object' is from 'dart:core'. // o = x; // ^ @@ -17,11 +17,11 @@ import "dart:core" as core; static method test(self::test::X? x) → dynamic { if(x is core::String?) { - core::Object o = invalid-expression "pkg/front_end/testcases/nnbd/issue42089.dart:7:16: Error: A value of type 'X?' can't be assigned to a variable of type 'Object' because 'X?' is nullable and 'Object' isn't. + core::Object o = invalid-expression "pkg/front_end/testcases/nnbd/issue42089.dart:7:16: Error: A value of type 'X?' can't be assigned to a variable of type 'Object'. - 'Object' is from 'dart:core'. Object o = x; ^" in let self::test::X? & core::String? /* '?' & '?' = '?' */ #t1 = x{self::test::X? & core::String? /* '?' & '?' = '?' */} in #t1 == null ?{core::Object} #t1 as{TypeError} core::Object : #t1{core::Object}; - o = invalid-expression "pkg/front_end/testcases/nnbd/issue42089.dart:8:9: Error: A value of type 'X?' can't be assigned to a variable of type 'Object' because 'X?' is nullable and 'Object' isn't. + o = invalid-expression "pkg/front_end/testcases/nnbd/issue42089.dart:8:9: Error: A value of type 'X?' can't be assigned to a variable of type 'Object'. - 'Object' is from 'dart:core'. o = x; ^" in let self::test::X? & core::String? /* '?' & '?' = '?' */ #t2 = x{self::test::X? & core::String? /* '?' & '?' = '?' */} in #t2 == null ?{core::Object} #t2 as{TypeError} core::Object : #t2{core::Object}; diff --git a/pkg/front_end/testcases/nnbd/issue42362.dart.strong.expect b/pkg/front_end/testcases/nnbd/issue42362.dart.strong.expect index 344b2383e56..52d01f284eb 100644 --- a/pkg/front_end/testcases/nnbd/issue42362.dart.strong.expect +++ b/pkg/front_end/testcases/nnbd/issue42362.dart.strong.expect @@ -82,19 +82,19 @@ library; // factory C.factory9({int i}) => new C.constructor4(); // error // ^ // -// pkg/front_end/testcases/nnbd/issue42362.dart:19:18: Error: A value of type 'int?' can't be assigned to a variable of type 'int' because 'int?' is nullable and 'int' isn't. +// pkg/front_end/testcases/nnbd/issue42362.dart:19:18: Error: A value of type 'int?' can't be assigned to a variable of type 'int'. // : this.i = i; // error // ^ // -// pkg/front_end/testcases/nnbd/issue42362.dart:22:18: Error: A value of type 'int?' can't be assigned to a variable of type 'int' because 'int?' is nullable and 'int' isn't. +// pkg/front_end/testcases/nnbd/issue42362.dart:22:18: Error: A value of type 'int?' can't be assigned to a variable of type 'int'. // : this.i = i; // error // ^ // -// pkg/front_end/testcases/nnbd/issue42362.dart:85:39: Error: A value of type 'int?' can't be assigned to a variable of type 'int' because 'int?' is nullable and 'int' isn't. +// pkg/front_end/testcases/nnbd/issue42362.dart:85:39: Error: A value of type 'int?' can't be assigned to a variable of type 'int'. // C.constructor5([int? i]) : this.i = i; // error // ^ // -// pkg/front_end/testcases/nnbd/issue42362.dart:87:39: Error: A value of type 'int?' can't be assigned to a variable of type 'int' because 'int?' is nullable and 'int' isn't. +// pkg/front_end/testcases/nnbd/issue42362.dart:87:39: Error: A value of type 'int?' can't be assigned to a variable of type 'int'. // C.constructor6({int? i}) : this.i = i; // error // ^ // @@ -116,12 +116,12 @@ class A extends core::Object { : self::A::i = i, super core::Object::•() ; constructor constructor5([core::int? i = #C1]) → self::A - : self::A::i = invalid-expression "pkg/front_end/testcases/nnbd/issue42362.dart:19:18: Error: A value of type 'int?' can't be assigned to a variable of type 'int' because 'int?' is nullable and 'int' isn't. + : self::A::i = invalid-expression "pkg/front_end/testcases/nnbd/issue42362.dart:19:18: Error: A value of type 'int?' can't be assigned to a variable of type 'int'. : this.i = i; // error ^" in i as{TypeError} core::int, super core::Object::•() ; constructor constructor6({core::int? i = #C1}) → self::A - : self::A::i = invalid-expression "pkg/front_end/testcases/nnbd/issue42362.dart:22:18: Error: A value of type 'int?' can't be assigned to a variable of type 'int' because 'int?' is nullable and 'int' isn't. + : self::A::i = invalid-expression "pkg/front_end/testcases/nnbd/issue42362.dart:22:18: Error: A value of type 'int?' can't be assigned to a variable of type 'int'. : this.i = i; // error ^" in i as{TypeError} core::int, super core::Object::•() ; @@ -178,12 +178,12 @@ class C extends core::Object implements self::B { : self::C::i = i, super core::Object::•() ; constructor constructor5([core::int? i = #C1]) → self::C - : self::C::i = invalid-expression "pkg/front_end/testcases/nnbd/issue42362.dart:85:39: Error: A value of type 'int?' can't be assigned to a variable of type 'int' because 'int?' is nullable and 'int' isn't. + : self::C::i = invalid-expression "pkg/front_end/testcases/nnbd/issue42362.dart:85:39: Error: A value of type 'int?' can't be assigned to a variable of type 'int'. C.constructor5([int? i]) : this.i = i; // error ^" in i as{TypeError} core::int, super core::Object::•() ; constructor constructor6({core::int? i = #C1}) → self::C - : self::C::i = invalid-expression "pkg/front_end/testcases/nnbd/issue42362.dart:87:39: Error: A value of type 'int?' can't be assigned to a variable of type 'int' because 'int?' is nullable and 'int' isn't. + : self::C::i = invalid-expression "pkg/front_end/testcases/nnbd/issue42362.dart:87:39: Error: A value of type 'int?' can't be assigned to a variable of type 'int'. C.constructor6({int? i}) : this.i = i; // error ^" in i as{TypeError} core::int, super core::Object::•() ; diff --git a/pkg/front_end/testcases/nnbd/issue42362.dart.strong.modular.expect b/pkg/front_end/testcases/nnbd/issue42362.dart.strong.modular.expect index 344b2383e56..52d01f284eb 100644 --- a/pkg/front_end/testcases/nnbd/issue42362.dart.strong.modular.expect +++ b/pkg/front_end/testcases/nnbd/issue42362.dart.strong.modular.expect @@ -82,19 +82,19 @@ library; // factory C.factory9({int i}) => new C.constructor4(); // error // ^ // -// pkg/front_end/testcases/nnbd/issue42362.dart:19:18: Error: A value of type 'int?' can't be assigned to a variable of type 'int' because 'int?' is nullable and 'int' isn't. +// pkg/front_end/testcases/nnbd/issue42362.dart:19:18: Error: A value of type 'int?' can't be assigned to a variable of type 'int'. // : this.i = i; // error // ^ // -// pkg/front_end/testcases/nnbd/issue42362.dart:22:18: Error: A value of type 'int?' can't be assigned to a variable of type 'int' because 'int?' is nullable and 'int' isn't. +// pkg/front_end/testcases/nnbd/issue42362.dart:22:18: Error: A value of type 'int?' can't be assigned to a variable of type 'int'. // : this.i = i; // error // ^ // -// pkg/front_end/testcases/nnbd/issue42362.dart:85:39: Error: A value of type 'int?' can't be assigned to a variable of type 'int' because 'int?' is nullable and 'int' isn't. +// pkg/front_end/testcases/nnbd/issue42362.dart:85:39: Error: A value of type 'int?' can't be assigned to a variable of type 'int'. // C.constructor5([int? i]) : this.i = i; // error // ^ // -// pkg/front_end/testcases/nnbd/issue42362.dart:87:39: Error: A value of type 'int?' can't be assigned to a variable of type 'int' because 'int?' is nullable and 'int' isn't. +// pkg/front_end/testcases/nnbd/issue42362.dart:87:39: Error: A value of type 'int?' can't be assigned to a variable of type 'int'. // C.constructor6({int? i}) : this.i = i; // error // ^ // @@ -116,12 +116,12 @@ class A extends core::Object { : self::A::i = i, super core::Object::•() ; constructor constructor5([core::int? i = #C1]) → self::A - : self::A::i = invalid-expression "pkg/front_end/testcases/nnbd/issue42362.dart:19:18: Error: A value of type 'int?' can't be assigned to a variable of type 'int' because 'int?' is nullable and 'int' isn't. + : self::A::i = invalid-expression "pkg/front_end/testcases/nnbd/issue42362.dart:19:18: Error: A value of type 'int?' can't be assigned to a variable of type 'int'. : this.i = i; // error ^" in i as{TypeError} core::int, super core::Object::•() ; constructor constructor6({core::int? i = #C1}) → self::A - : self::A::i = invalid-expression "pkg/front_end/testcases/nnbd/issue42362.dart:22:18: Error: A value of type 'int?' can't be assigned to a variable of type 'int' because 'int?' is nullable and 'int' isn't. + : self::A::i = invalid-expression "pkg/front_end/testcases/nnbd/issue42362.dart:22:18: Error: A value of type 'int?' can't be assigned to a variable of type 'int'. : this.i = i; // error ^" in i as{TypeError} core::int, super core::Object::•() ; @@ -178,12 +178,12 @@ class C extends core::Object implements self::B { : self::C::i = i, super core::Object::•() ; constructor constructor5([core::int? i = #C1]) → self::C - : self::C::i = invalid-expression "pkg/front_end/testcases/nnbd/issue42362.dart:85:39: Error: A value of type 'int?' can't be assigned to a variable of type 'int' because 'int?' is nullable and 'int' isn't. + : self::C::i = invalid-expression "pkg/front_end/testcases/nnbd/issue42362.dart:85:39: Error: A value of type 'int?' can't be assigned to a variable of type 'int'. C.constructor5([int? i]) : this.i = i; // error ^" in i as{TypeError} core::int, super core::Object::•() ; constructor constructor6({core::int? i = #C1}) → self::C - : self::C::i = invalid-expression "pkg/front_end/testcases/nnbd/issue42362.dart:87:39: Error: A value of type 'int?' can't be assigned to a variable of type 'int' because 'int?' is nullable and 'int' isn't. + : self::C::i = invalid-expression "pkg/front_end/testcases/nnbd/issue42362.dart:87:39: Error: A value of type 'int?' can't be assigned to a variable of type 'int'. C.constructor6({int? i}) : this.i = i; // error ^" in i as{TypeError} core::int, super core::Object::•() ; diff --git a/pkg/front_end/testcases/nnbd/issue42362.dart.strong.transformed.expect b/pkg/front_end/testcases/nnbd/issue42362.dart.strong.transformed.expect index 9cc6771f258..7b529ce0508 100644 --- a/pkg/front_end/testcases/nnbd/issue42362.dart.strong.transformed.expect +++ b/pkg/front_end/testcases/nnbd/issue42362.dart.strong.transformed.expect @@ -82,19 +82,19 @@ library; // factory C.factory9({int i}) => new C.constructor4(); // error // ^ // -// pkg/front_end/testcases/nnbd/issue42362.dart:19:18: Error: A value of type 'int?' can't be assigned to a variable of type 'int' because 'int?' is nullable and 'int' isn't. +// pkg/front_end/testcases/nnbd/issue42362.dart:19:18: Error: A value of type 'int?' can't be assigned to a variable of type 'int'. // : this.i = i; // error // ^ // -// pkg/front_end/testcases/nnbd/issue42362.dart:22:18: Error: A value of type 'int?' can't be assigned to a variable of type 'int' because 'int?' is nullable and 'int' isn't. +// pkg/front_end/testcases/nnbd/issue42362.dart:22:18: Error: A value of type 'int?' can't be assigned to a variable of type 'int'. // : this.i = i; // error // ^ // -// pkg/front_end/testcases/nnbd/issue42362.dart:85:39: Error: A value of type 'int?' can't be assigned to a variable of type 'int' because 'int?' is nullable and 'int' isn't. +// pkg/front_end/testcases/nnbd/issue42362.dart:85:39: Error: A value of type 'int?' can't be assigned to a variable of type 'int'. // C.constructor5([int? i]) : this.i = i; // error // ^ // -// pkg/front_end/testcases/nnbd/issue42362.dart:87:39: Error: A value of type 'int?' can't be assigned to a variable of type 'int' because 'int?' is nullable and 'int' isn't. +// pkg/front_end/testcases/nnbd/issue42362.dart:87:39: Error: A value of type 'int?' can't be assigned to a variable of type 'int'. // C.constructor6({int? i}) : this.i = i; // error // ^ // @@ -116,12 +116,12 @@ class A extends core::Object { : self::A::i = i, super core::Object::•() ; constructor constructor5([core::int? i = #C1]) → self::A - : self::A::i = invalid-expression "pkg/front_end/testcases/nnbd/issue42362.dart:19:18: Error: A value of type 'int?' can't be assigned to a variable of type 'int' because 'int?' is nullable and 'int' isn't. + : self::A::i = invalid-expression "pkg/front_end/testcases/nnbd/issue42362.dart:19:18: Error: A value of type 'int?' can't be assigned to a variable of type 'int'. : this.i = i; // error ^" in let core::int? #t1 = i in #t1 == null ?{core::int} #t1 as{TypeError} core::int : #t1{core::int}, super core::Object::•() ; constructor constructor6({core::int? i = #C1}) → self::A - : self::A::i = invalid-expression "pkg/front_end/testcases/nnbd/issue42362.dart:22:18: Error: A value of type 'int?' can't be assigned to a variable of type 'int' because 'int?' is nullable and 'int' isn't. + : self::A::i = invalid-expression "pkg/front_end/testcases/nnbd/issue42362.dart:22:18: Error: A value of type 'int?' can't be assigned to a variable of type 'int'. : this.i = i; // error ^" in let core::int? #t2 = i in #t2 == null ?{core::int} #t2 as{TypeError} core::int : #t2{core::int}, super core::Object::•() ; @@ -178,12 +178,12 @@ class C extends core::Object implements self::B { : self::C::i = i, super core::Object::•() ; constructor constructor5([core::int? i = #C1]) → self::C - : self::C::i = invalid-expression "pkg/front_end/testcases/nnbd/issue42362.dart:85:39: Error: A value of type 'int?' can't be assigned to a variable of type 'int' because 'int?' is nullable and 'int' isn't. + : self::C::i = invalid-expression "pkg/front_end/testcases/nnbd/issue42362.dart:85:39: Error: A value of type 'int?' can't be assigned to a variable of type 'int'. C.constructor5([int? i]) : this.i = i; // error ^" in let core::int? #t3 = i in #t3 == null ?{core::int} #t3 as{TypeError} core::int : #t3{core::int}, super core::Object::•() ; constructor constructor6({core::int? i = #C1}) → self::C - : self::C::i = invalid-expression "pkg/front_end/testcases/nnbd/issue42362.dart:87:39: Error: A value of type 'int?' can't be assigned to a variable of type 'int' because 'int?' is nullable and 'int' isn't. + : self::C::i = invalid-expression "pkg/front_end/testcases/nnbd/issue42362.dart:87:39: Error: A value of type 'int?' can't be assigned to a variable of type 'int'. C.constructor6({int? i}) : this.i = i; // error ^" in let core::int? #t4 = i in #t4 == null ?{core::int} #t4 as{TypeError} core::int : #t4{core::int}, super core::Object::•() ; diff --git a/pkg/front_end/testcases/nnbd/issue43716a.dart.strong.expect b/pkg/front_end/testcases/nnbd/issue43716a.dart.strong.expect index 01649b5add5..ddf57f47b7f 100644 --- a/pkg/front_end/testcases/nnbd/issue43716a.dart.strong.expect +++ b/pkg/front_end/testcases/nnbd/issue43716a.dart.strong.expect @@ -2,7 +2,7 @@ library; // // Problems in library: // -// pkg/front_end/testcases/nnbd/issue43716a.dart:15:14: Error: A value of type 'Object?' can't be returned from a function with return type 'Object' because 'Object?' is nullable and 'Object' isn't. +// pkg/front_end/testcases/nnbd/issue43716a.dart:15:14: Error: A value of type 'Object?' can't be returned from a function with return type 'Object'. // - 'Object' is from 'dart:core'. // return z.x; // Error. // ^ @@ -19,7 +19,7 @@ class C? = self::C self::C? z = self::b ?{self::C?} x : y; if(z == null) throw 0; - return invalid-expression "pkg/front_end/testcases/nnbd/issue43716a.dart:15:14: Error: A value of type 'Object?' can't be returned from a function with return type 'Object' because 'Object?' is nullable and 'Object' isn't. + return invalid-expression "pkg/front_end/testcases/nnbd/issue43716a.dart:15:14: Error: A value of type 'Object?' can't be returned from a function with return type 'Object'. - 'Object' is from 'dart:core'. return z.x; // Error. ^" in z{self::C}.{self::C::x}{core::Object?} as{TypeError} core::Object; diff --git a/pkg/front_end/testcases/nnbd/issue43716a.dart.strong.modular.expect b/pkg/front_end/testcases/nnbd/issue43716a.dart.strong.modular.expect index 01649b5add5..ddf57f47b7f 100644 --- a/pkg/front_end/testcases/nnbd/issue43716a.dart.strong.modular.expect +++ b/pkg/front_end/testcases/nnbd/issue43716a.dart.strong.modular.expect @@ -2,7 +2,7 @@ library; // // Problems in library: // -// pkg/front_end/testcases/nnbd/issue43716a.dart:15:14: Error: A value of type 'Object?' can't be returned from a function with return type 'Object' because 'Object?' is nullable and 'Object' isn't. +// pkg/front_end/testcases/nnbd/issue43716a.dart:15:14: Error: A value of type 'Object?' can't be returned from a function with return type 'Object'. // - 'Object' is from 'dart:core'. // return z.x; // Error. // ^ @@ -19,7 +19,7 @@ class C? = self::C self::C? z = self::b ?{self::C?} x : y; if(z == null) throw 0; - return invalid-expression "pkg/front_end/testcases/nnbd/issue43716a.dart:15:14: Error: A value of type 'Object?' can't be returned from a function with return type 'Object' because 'Object?' is nullable and 'Object' isn't. + return invalid-expression "pkg/front_end/testcases/nnbd/issue43716a.dart:15:14: Error: A value of type 'Object?' can't be returned from a function with return type 'Object'. - 'Object' is from 'dart:core'. return z.x; // Error. ^" in z{self::C}.{self::C::x}{core::Object?} as{TypeError} core::Object; diff --git a/pkg/front_end/testcases/nnbd/issue43716a.dart.strong.transformed.expect b/pkg/front_end/testcases/nnbd/issue43716a.dart.strong.transformed.expect index 2824d0a301d..09af150d587 100644 --- a/pkg/front_end/testcases/nnbd/issue43716a.dart.strong.transformed.expect +++ b/pkg/front_end/testcases/nnbd/issue43716a.dart.strong.transformed.expect @@ -2,7 +2,7 @@ library; // // Problems in library: // -// pkg/front_end/testcases/nnbd/issue43716a.dart:15:14: Error: A value of type 'Object?' can't be returned from a function with return type 'Object' because 'Object?' is nullable and 'Object' isn't. +// pkg/front_end/testcases/nnbd/issue43716a.dart:15:14: Error: A value of type 'Object?' can't be returned from a function with return type 'Object'. // - 'Object' is from 'dart:core'. // return z.x; // Error. // ^ @@ -19,7 +19,7 @@ class C? = self::C self::C? z = self::b ?{self::C?} x : y; if(z == null) throw 0; - return invalid-expression "pkg/front_end/testcases/nnbd/issue43716a.dart:15:14: Error: A value of type 'Object?' can't be returned from a function with return type 'Object' because 'Object?' is nullable and 'Object' isn't. + return invalid-expression "pkg/front_end/testcases/nnbd/issue43716a.dart:15:14: Error: A value of type 'Object?' can't be returned from a function with return type 'Object'. - 'Object' is from 'dart:core'. return z.x; // Error. ^" in let core::Object? #t1 = z{self::C}.{self::C::x}{core::Object?} in #t1 == null ?{core::Object} #t1 as{TypeError} core::Object : #t1{core::Object}; diff --git a/pkg/front_end/testcases/nnbd/issue43721.dart.strong.expect b/pkg/front_end/testcases/nnbd/issue43721.dart.strong.expect index ec41b5695f2..3149f8cb5db 100644 --- a/pkg/front_end/testcases/nnbd/issue43721.dart.strong.expect +++ b/pkg/front_end/testcases/nnbd/issue43721.dart.strong.expect @@ -2,7 +2,7 @@ library; // // Problems in library: // -// pkg/front_end/testcases/nnbd/issue43721.dart:13:7: Error: The argument type 'FutureOr' can't be assigned to the parameter type 'Object' because 'num?' is nullable and 'Object' isn't. +// pkg/front_end/testcases/nnbd/issue43721.dart:13:7: Error: The argument type 'FutureOr' can't be assigned to the parameter type 'Object'. // - 'Object' is from 'dart:core'. // foo(z); // Error. // ^ @@ -17,7 +17,7 @@ static method bar(core::bool condition) → dynamic { has-declared-initializer FutureOrx = null; core::num n = 1; FutureOrz = condition ?{FutureOr} x : n; - self::foo(invalid-expression "pkg/front_end/testcases/nnbd/issue43721.dart:13:7: Error: The argument type 'FutureOr' can't be assigned to the parameter type 'Object' because 'num?' is nullable and 'Object' isn't. + self::foo(invalid-expression "pkg/front_end/testcases/nnbd/issue43721.dart:13:7: Error: The argument type 'FutureOr' can't be assigned to the parameter type 'Object'. - 'Object' is from 'dart:core'. foo(z); // Error. ^" in z as{TypeError} core::Object); diff --git a/pkg/front_end/testcases/nnbd/issue43721.dart.strong.modular.expect b/pkg/front_end/testcases/nnbd/issue43721.dart.strong.modular.expect index ec41b5695f2..3149f8cb5db 100644 --- a/pkg/front_end/testcases/nnbd/issue43721.dart.strong.modular.expect +++ b/pkg/front_end/testcases/nnbd/issue43721.dart.strong.modular.expect @@ -2,7 +2,7 @@ library; // // Problems in library: // -// pkg/front_end/testcases/nnbd/issue43721.dart:13:7: Error: The argument type 'FutureOr' can't be assigned to the parameter type 'Object' because 'num?' is nullable and 'Object' isn't. +// pkg/front_end/testcases/nnbd/issue43721.dart:13:7: Error: The argument type 'FutureOr' can't be assigned to the parameter type 'Object'. // - 'Object' is from 'dart:core'. // foo(z); // Error. // ^ @@ -17,7 +17,7 @@ static method bar(core::bool condition) → dynamic { has-declared-initializer FutureOrx = null; core::num n = 1; FutureOrz = condition ?{FutureOr} x : n; - self::foo(invalid-expression "pkg/front_end/testcases/nnbd/issue43721.dart:13:7: Error: The argument type 'FutureOr' can't be assigned to the parameter type 'Object' because 'num?' is nullable and 'Object' isn't. + self::foo(invalid-expression "pkg/front_end/testcases/nnbd/issue43721.dart:13:7: Error: The argument type 'FutureOr' can't be assigned to the parameter type 'Object'. - 'Object' is from 'dart:core'. foo(z); // Error. ^" in z as{TypeError} core::Object); diff --git a/pkg/front_end/testcases/nnbd/issue43721.dart.strong.transformed.expect b/pkg/front_end/testcases/nnbd/issue43721.dart.strong.transformed.expect index dda096c6617..c89b3e21e35 100644 --- a/pkg/front_end/testcases/nnbd/issue43721.dart.strong.transformed.expect +++ b/pkg/front_end/testcases/nnbd/issue43721.dart.strong.transformed.expect @@ -2,7 +2,7 @@ library; // // Problems in library: // -// pkg/front_end/testcases/nnbd/issue43721.dart:13:7: Error: The argument type 'FutureOr' can't be assigned to the parameter type 'Object' because 'num?' is nullable and 'Object' isn't. +// pkg/front_end/testcases/nnbd/issue43721.dart:13:7: Error: The argument type 'FutureOr' can't be assigned to the parameter type 'Object'. // - 'Object' is from 'dart:core'. // foo(z); // Error. // ^ @@ -17,7 +17,7 @@ static method bar(core::bool condition) → dynamic { has-declared-initializer FutureOrx = null; core::num n = 1; FutureOrz = condition ?{FutureOr} x : n; - self::foo(invalid-expression "pkg/front_end/testcases/nnbd/issue43721.dart:13:7: Error: The argument type 'FutureOr' can't be assigned to the parameter type 'Object' because 'num?' is nullable and 'Object' isn't. + self::foo(invalid-expression "pkg/front_end/testcases/nnbd/issue43721.dart:13:7: Error: The argument type 'FutureOr' can't be assigned to the parameter type 'Object'. - 'Object' is from 'dart:core'. foo(z); // Error. ^" in let FutureOr#t1 = z in #t1 == null ?{core::Object} #t1 as{TypeError} core::Object : #t1{core::Object}); diff --git a/pkg/front_end/testcases/nnbd/return_null.dart.strong.expect b/pkg/front_end/testcases/nnbd/return_null.dart.strong.expect index d2cf0b593cc..2c1b4771687 100644 --- a/pkg/front_end/testcases/nnbd/return_null.dart.strong.expect +++ b/pkg/front_end/testcases/nnbd/return_null.dart.strong.expect @@ -6,11 +6,11 @@ library; // String returnImplicit() /*error*/ { // ^ // -// pkg/front_end/testcases/nnbd/return_null.dart:13:10: Error: The value 'null' can't be returned from a function with return type 'String' because 'String' is not nullable. +// pkg/front_end/testcases/nnbd/return_null.dart:13:10: Error: A value of type 'Null' can't be returned from a function with return type 'String'. // return null; // error // ^ // -// pkg/front_end/testcases/nnbd/return_null.dart:19:12: Error: The value 'null' can't be returned from a function with return type 'String' because 'String' is not nullable. +// pkg/front_end/testcases/nnbd/return_null.dart:19:12: Error: A value of type 'Null' can't be returned from a function with return type 'String'. // return null; // error // ^ // @@ -31,11 +31,11 @@ library; // String returnImplicit() /* error */ { // ^ // -// pkg/front_end/testcases/nnbd/return_null.dart:69:12: Error: The value 'null' can't be returned from a function with return type 'String' because 'String' is not nullable. +// pkg/front_end/testcases/nnbd/return_null.dart:69:12: Error: A value of type 'Null' can't be returned from a function with return type 'String'. // return null; // error // ^ // -// pkg/front_end/testcases/nnbd/return_null.dart:75:14: Error: The value 'null' can't be returned from a function with return type 'String' because 'String' is not nullable. +// pkg/front_end/testcases/nnbd/return_null.dart:75:14: Error: A value of type 'Null' can't be returned from a function with return type 'String'. // return null; // error // ^ // @@ -76,14 +76,14 @@ String returnImplicit() /*error*/ { } static method returnExplicit() → core::String { core::print("foo"); - return invalid-expression "pkg/front_end/testcases/nnbd/return_null.dart:13:10: Error: The value 'null' can't be returned from a function with return type 'String' because 'String' is not nullable. + return invalid-expression "pkg/front_end/testcases/nnbd/return_null.dart:13:10: Error: A value of type 'Null' can't be returned from a function with return type 'String'. return null; // error ^" in null as{TypeError} core::String; } static method returnMixed(core::bool b) → core::String { if(b) { core::print("foo"); - return invalid-expression "pkg/front_end/testcases/nnbd/return_null.dart:19:12: Error: The value 'null' can't be returned from a function with return type 'String' because 'String' is not nullable. + return invalid-expression "pkg/front_end/testcases/nnbd/return_null.dart:19:12: Error: A value of type 'Null' can't be returned from a function with return type 'String'. return null; // error ^" in null as{TypeError} core::String; } @@ -147,14 +147,14 @@ static method localFunctions() → dynamic { } function returnExplicit() → core::String { core::print("foo"); - return invalid-expression "pkg/front_end/testcases/nnbd/return_null.dart:69:12: Error: The value 'null' can't be returned from a function with return type 'String' because 'String' is not nullable. + return invalid-expression "pkg/front_end/testcases/nnbd/return_null.dart:69:12: Error: A value of type 'Null' can't be returned from a function with return type 'String'. return null; // error ^" in null as{TypeError} core::String; } function returnMixed(core::bool b) → core::String { if(b) { core::print("foo"); - return invalid-expression "pkg/front_end/testcases/nnbd/return_null.dart:75:14: Error: The value 'null' can't be returned from a function with return type 'String' because 'String' is not nullable. + return invalid-expression "pkg/front_end/testcases/nnbd/return_null.dart:75:14: Error: A value of type 'Null' can't be returned from a function with return type 'String'. return null; // error ^" in null as{TypeError} core::String; } diff --git a/pkg/front_end/testcases/nnbd/return_null.dart.strong.modular.expect b/pkg/front_end/testcases/nnbd/return_null.dart.strong.modular.expect index d2cf0b593cc..2c1b4771687 100644 --- a/pkg/front_end/testcases/nnbd/return_null.dart.strong.modular.expect +++ b/pkg/front_end/testcases/nnbd/return_null.dart.strong.modular.expect @@ -6,11 +6,11 @@ library; // String returnImplicit() /*error*/ { // ^ // -// pkg/front_end/testcases/nnbd/return_null.dart:13:10: Error: The value 'null' can't be returned from a function with return type 'String' because 'String' is not nullable. +// pkg/front_end/testcases/nnbd/return_null.dart:13:10: Error: A value of type 'Null' can't be returned from a function with return type 'String'. // return null; // error // ^ // -// pkg/front_end/testcases/nnbd/return_null.dart:19:12: Error: The value 'null' can't be returned from a function with return type 'String' because 'String' is not nullable. +// pkg/front_end/testcases/nnbd/return_null.dart:19:12: Error: A value of type 'Null' can't be returned from a function with return type 'String'. // return null; // error // ^ // @@ -31,11 +31,11 @@ library; // String returnImplicit() /* error */ { // ^ // -// pkg/front_end/testcases/nnbd/return_null.dart:69:12: Error: The value 'null' can't be returned from a function with return type 'String' because 'String' is not nullable. +// pkg/front_end/testcases/nnbd/return_null.dart:69:12: Error: A value of type 'Null' can't be returned from a function with return type 'String'. // return null; // error // ^ // -// pkg/front_end/testcases/nnbd/return_null.dart:75:14: Error: The value 'null' can't be returned from a function with return type 'String' because 'String' is not nullable. +// pkg/front_end/testcases/nnbd/return_null.dart:75:14: Error: A value of type 'Null' can't be returned from a function with return type 'String'. // return null; // error // ^ // @@ -76,14 +76,14 @@ String returnImplicit() /*error*/ { } static method returnExplicit() → core::String { core::print("foo"); - return invalid-expression "pkg/front_end/testcases/nnbd/return_null.dart:13:10: Error: The value 'null' can't be returned from a function with return type 'String' because 'String' is not nullable. + return invalid-expression "pkg/front_end/testcases/nnbd/return_null.dart:13:10: Error: A value of type 'Null' can't be returned from a function with return type 'String'. return null; // error ^" in null as{TypeError} core::String; } static method returnMixed(core::bool b) → core::String { if(b) { core::print("foo"); - return invalid-expression "pkg/front_end/testcases/nnbd/return_null.dart:19:12: Error: The value 'null' can't be returned from a function with return type 'String' because 'String' is not nullable. + return invalid-expression "pkg/front_end/testcases/nnbd/return_null.dart:19:12: Error: A value of type 'Null' can't be returned from a function with return type 'String'. return null; // error ^" in null as{TypeError} core::String; } @@ -147,14 +147,14 @@ static method localFunctions() → dynamic { } function returnExplicit() → core::String { core::print("foo"); - return invalid-expression "pkg/front_end/testcases/nnbd/return_null.dart:69:12: Error: The value 'null' can't be returned from a function with return type 'String' because 'String' is not nullable. + return invalid-expression "pkg/front_end/testcases/nnbd/return_null.dart:69:12: Error: A value of type 'Null' can't be returned from a function with return type 'String'. return null; // error ^" in null as{TypeError} core::String; } function returnMixed(core::bool b) → core::String { if(b) { core::print("foo"); - return invalid-expression "pkg/front_end/testcases/nnbd/return_null.dart:75:14: Error: The value 'null' can't be returned from a function with return type 'String' because 'String' is not nullable. + return invalid-expression "pkg/front_end/testcases/nnbd/return_null.dart:75:14: Error: A value of type 'Null' can't be returned from a function with return type 'String'. return null; // error ^" in null as{TypeError} core::String; } diff --git a/pkg/front_end/testcases/nnbd/return_null.dart.strong.transformed.expect b/pkg/front_end/testcases/nnbd/return_null.dart.strong.transformed.expect index 1ffb400e122..a0694b27795 100644 --- a/pkg/front_end/testcases/nnbd/return_null.dart.strong.transformed.expect +++ b/pkg/front_end/testcases/nnbd/return_null.dart.strong.transformed.expect @@ -6,11 +6,11 @@ library; // String returnImplicit() /*error*/ { // ^ // -// pkg/front_end/testcases/nnbd/return_null.dart:13:10: Error: The value 'null' can't be returned from a function with return type 'String' because 'String' is not nullable. +// pkg/front_end/testcases/nnbd/return_null.dart:13:10: Error: A value of type 'Null' can't be returned from a function with return type 'String'. // return null; // error // ^ // -// pkg/front_end/testcases/nnbd/return_null.dart:19:12: Error: The value 'null' can't be returned from a function with return type 'String' because 'String' is not nullable. +// pkg/front_end/testcases/nnbd/return_null.dart:19:12: Error: A value of type 'Null' can't be returned from a function with return type 'String'. // return null; // error // ^ // @@ -31,11 +31,11 @@ library; // String returnImplicit() /* error */ { // ^ // -// pkg/front_end/testcases/nnbd/return_null.dart:69:12: Error: The value 'null' can't be returned from a function with return type 'String' because 'String' is not nullable. +// pkg/front_end/testcases/nnbd/return_null.dart:69:12: Error: A value of type 'Null' can't be returned from a function with return type 'String'. // return null; // error // ^ // -// pkg/front_end/testcases/nnbd/return_null.dart:75:14: Error: The value 'null' can't be returned from a function with return type 'String' because 'String' is not nullable. +// pkg/front_end/testcases/nnbd/return_null.dart:75:14: Error: A value of type 'Null' can't be returned from a function with return type 'String'. // return null; // error // ^ // @@ -76,14 +76,14 @@ String returnImplicit() /*error*/ { } static method returnExplicit() → core::String { core::print("foo"); - return invalid-expression "pkg/front_end/testcases/nnbd/return_null.dart:13:10: Error: The value 'null' can't be returned from a function with return type 'String' because 'String' is not nullable. + return invalid-expression "pkg/front_end/testcases/nnbd/return_null.dart:13:10: Error: A value of type 'Null' can't be returned from a function with return type 'String'. return null; // error ^" in let Null #t1 = null in #t1 == null ?{core::String} #t1 as{TypeError} core::String : #t1{core::String}; } static method returnMixed(core::bool b) → core::String { if(b) { core::print("foo"); - return invalid-expression "pkg/front_end/testcases/nnbd/return_null.dart:19:12: Error: The value 'null' can't be returned from a function with return type 'String' because 'String' is not nullable. + return invalid-expression "pkg/front_end/testcases/nnbd/return_null.dart:19:12: Error: A value of type 'Null' can't be returned from a function with return type 'String'. return null; // error ^" in let Null #t2 = null in #t2 == null ?{core::String} #t2 as{TypeError} core::String : #t2{core::String}; } @@ -147,14 +147,14 @@ static method localFunctions() → dynamic { } function returnExplicit() → core::String { core::print("foo"); - return invalid-expression "pkg/front_end/testcases/nnbd/return_null.dart:69:12: Error: The value 'null' can't be returned from a function with return type 'String' because 'String' is not nullable. + return invalid-expression "pkg/front_end/testcases/nnbd/return_null.dart:69:12: Error: A value of type 'Null' can't be returned from a function with return type 'String'. return null; // error ^" in let Null #t3 = null in #t3 == null ?{core::String} #t3 as{TypeError} core::String : #t3{core::String}; } function returnMixed(core::bool b) → core::String { if(b) { core::print("foo"); - return invalid-expression "pkg/front_end/testcases/nnbd/return_null.dart:75:14: Error: The value 'null' can't be returned from a function with return type 'String' because 'String' is not nullable. + return invalid-expression "pkg/front_end/testcases/nnbd/return_null.dart:75:14: Error: A value of type 'Null' can't be returned from a function with return type 'String'. return null; // error ^" in let Null #t4 = null in #t4 == null ?{core::String} #t4 as{TypeError} core::String : #t4{core::String}; } diff --git a/tests/language/const/syntax_test.dart b/tests/language/const/syntax_test.dart index 3e5a2c90c4c..db4a765888e 100644 --- a/tests/language/const/syntax_test.dart +++ b/tests/language/const/syntax_test.dart @@ -68,7 +68,7 @@ const int F3; // [cfe] Field 'F3' should be initialized because its type 'int' doesn't allow null. // [cfe] The const variable 'F3' must be initialized. // ^ -// [cfe] The value 'null' can't be assigned to a variable of type 'int' because 'int' is not nullable. +// [cfe] A value of type 'Null' can't be assigned to a variable of type 'int'. class Point { final x, y; diff --git a/tests/language/control_flow_collections/await_for_null_test.dart b/tests/language/control_flow_collections/await_for_null_test.dart index bd4b28a0dba..61fd04c988b 100644 --- a/tests/language/control_flow_collections/await_for_null_test.dart +++ b/tests/language/control_flow_collections/await_for_null_test.dart @@ -9,13 +9,13 @@ void main() async { var a = [await for (var i in nullStream) 1]; // ^^^^^^^^^^ // [analyzer] COMPILE_TIME_ERROR.UNCHECKED_USE_OF_NULLABLE_VALUE - // [cfe] The type 'Stream?' used in the 'for' loop must implement 'Stream' because 'Stream?' is nullable and 'Stream' isn't. + // [cfe] The type 'Stream?' used in the 'for' loop must implement 'Stream'. var b = {await for (var i in nullStream) 1: 1}; // ^^^^^^^^^^ // [analyzer] COMPILE_TIME_ERROR.UNCHECKED_USE_OF_NULLABLE_VALUE - // [cfe] The type 'Stream?' used in the 'for' loop must implement 'Stream' because 'Stream?' is nullable and 'Stream' isn't. + // [cfe] The type 'Stream?' used in the 'for' loop must implement 'Stream'. var c = {await for (var i in nullStream) 1}; // ^^^^^^^^^^ // [analyzer] COMPILE_TIME_ERROR.UNCHECKED_USE_OF_NULLABLE_VALUE - // [cfe] The type 'Stream?' used in the 'for' loop must implement 'Stream' because 'Stream?' is nullable and 'Stream' isn't. + // [cfe] The type 'Stream?' used in the 'for' loop must implement 'Stream'. } diff --git a/tests/language/control_flow_collections/for_downcast_test.dart b/tests/language/control_flow_collections/for_downcast_test.dart index 737a1125f48..0c44543fad4 100644 --- a/tests/language/control_flow_collections/for_downcast_test.dart +++ b/tests/language/control_flow_collections/for_downcast_test.dart @@ -118,13 +118,13 @@ void testNullIterable() { var a = [for (var i in nullIterable) 1]; // ^^^^^^^^^^^^ // [analyzer] COMPILE_TIME_ERROR.UNCHECKED_USE_OF_NULLABLE_VALUE - // [cfe] The type 'Iterable?' used in the 'for' loop must implement 'Iterable' because 'Iterable?' is nullable and 'Iterable' isn't. + // [cfe] The type 'Iterable?' used in the 'for' loop must implement 'Iterable'. var b = {for (var i in nullIterable) 1: 1}; // ^^^^^^^^^^^^ // [analyzer] COMPILE_TIME_ERROR.UNCHECKED_USE_OF_NULLABLE_VALUE - // [cfe] The type 'Iterable?' used in the 'for' loop must implement 'Iterable' because 'Iterable?' is nullable and 'Iterable' isn't. + // [cfe] The type 'Iterable?' used in the 'for' loop must implement 'Iterable'. var c = {for (var i in nullIterable) 1}; // ^^^^^^^^^^^^ // [analyzer] COMPILE_TIME_ERROR.UNCHECKED_USE_OF_NULLABLE_VALUE - // [cfe] The type 'Iterable?' used in the 'for' loop must implement 'Iterable' because 'Iterable?' is nullable and 'Iterable' isn't. + // [cfe] The type 'Iterable?' used in the 'for' loop must implement 'Iterable'. } diff --git a/tests/language/control_flow_collections/for_null_condition_test.dart b/tests/language/control_flow_collections/for_null_condition_test.dart index 018f74ab0a4..ebddf4c9ffe 100644 --- a/tests/language/control_flow_collections/for_null_condition_test.dart +++ b/tests/language/control_flow_collections/for_null_condition_test.dart @@ -10,13 +10,13 @@ void main() { var a = [for (; nullBool;) 1]; // ^^^^^^^^ // [analyzer] COMPILE_TIME_ERROR.UNCHECKED_USE_OF_NULLABLE_VALUE - // [cfe] A value of type 'bool?' can't be assigned to a variable of type 'bool' because 'bool?' is nullable and 'bool' isn't. + // [cfe] A value of type 'bool?' can't be assigned to a variable of type 'bool'. var b = {for (; nullBool;) 1: 1}; // ^^^^^^^^ // [analyzer] COMPILE_TIME_ERROR.UNCHECKED_USE_OF_NULLABLE_VALUE - // [cfe] A value of type 'bool?' can't be assigned to a variable of type 'bool' because 'bool?' is nullable and 'bool' isn't. + // [cfe] A value of type 'bool?' can't be assigned to a variable of type 'bool'. var c = {for (; nullBool;) 1}; // ^^^^^^^^ // [analyzer] COMPILE_TIME_ERROR.UNCHECKED_USE_OF_NULLABLE_VALUE - // [cfe] A value of type 'bool?' can't be assigned to a variable of type 'bool' because 'bool?' is nullable and 'bool' isn't. + // [cfe] A value of type 'bool?' can't be assigned to a variable of type 'bool'. } diff --git a/tests/language/control_flow_collections/if_null_condition_test.dart b/tests/language/control_flow_collections/if_null_condition_test.dart index ca7aa5c6d07..bec649f39a7 100644 --- a/tests/language/control_flow_collections/if_null_condition_test.dart +++ b/tests/language/control_flow_collections/if_null_condition_test.dart @@ -7,15 +7,15 @@ void main() { var a = [if (nullBool) 1]; // ^^^^^^^^ // [analyzer] COMPILE_TIME_ERROR.UNCHECKED_USE_OF_NULLABLE_VALUE - // [cfe] A value of type 'bool?' can't be assigned to a variable of type 'bool' because 'bool?' is nullable and 'bool' isn't. + // [cfe] A value of type 'bool?' can't be assigned to a variable of type 'bool'. var b = {if (nullBool) 1: 1}; // ^^^^^^^^ // [analyzer] COMPILE_TIME_ERROR.UNCHECKED_USE_OF_NULLABLE_VALUE - // [cfe] A value of type 'bool?' can't be assigned to a variable of type 'bool' because 'bool?' is nullable and 'bool' isn't. + // [cfe] A value of type 'bool?' can't be assigned to a variable of type 'bool'. var c = {if (nullBool) 1}; // ^^^^^^^^ // [analyzer] COMPILE_TIME_ERROR.UNCHECKED_USE_OF_NULLABLE_VALUE - // [cfe] A value of type 'bool?' can't be assigned to a variable of type 'bool' because 'bool?' is nullable and 'bool' isn't. + // [cfe] A value of type 'bool?' can't be assigned to a variable of type 'bool'. } diff --git a/tests/language/if_null/precedence_test.dart b/tests/language/if_null/precedence_test.dart index 6cea6f5f71b..9dcc8827206 100644 --- a/tests/language/if_null/precedence_test.dart +++ b/tests/language/if_null/precedence_test.dart @@ -52,7 +52,7 @@ main() { Expect.throwsAssertionError(() => false || null ?? true); // ^^^^ // [analyzer] COMPILE_TIME_ERROR.NON_BOOL_OPERAND - // [cfe] The value 'null' can't be assigned to a variable of type 'bool' because 'bool' is not nullable. + // [cfe] A value of type 'Null' can't be assigned to a variable of type 'bool'. // ^^^^ // [analyzer] STATIC_WARNING.DEAD_NULL_AWARE_EXPRESSION } diff --git a/tests/language/map/literal15_test.dart b/tests/language/map/literal15_test.dart index 049486ea41a..42f7cb842fb 100644 --- a/tests/language/map/literal15_test.dart +++ b/tests/language/map/literal15_test.dart @@ -12,10 +12,10 @@ void main() { var m1 = const {null: 10, 'null': 20}; // ^^^^ // [analyzer] COMPILE_TIME_ERROR.MAP_KEY_TYPE_NOT_ASSIGNABLE - // [cfe] The value 'null' can't be assigned to a variable of type 'String' because 'String' is not nullable. + // [cfe] A value of type 'Null' can't be assigned to a variable of type 'String'. var m2 = const {null: 10, 'null': 20}; // ^^^^ // [analyzer] COMPILE_TIME_ERROR.MAP_KEY_TYPE_NOT_ASSIGNABLE - // [cfe] The value 'null' can't be assigned to a variable of type 'Comparable' because 'Comparable' is not nullable. + // [cfe] A value of type 'Null' can't be assigned to a variable of type 'Comparable'. } diff --git a/tests/language/nnbd/boolean_conversion/boolean_conversion_error_test.dart b/tests/language/nnbd/boolean_conversion/boolean_conversion_error_test.dart index efa8cb06020..cb947af2e01 100644 --- a/tests/language/nnbd/boolean_conversion/boolean_conversion_error_test.dart +++ b/tests/language/nnbd/boolean_conversion/boolean_conversion_error_test.dart @@ -57,47 +57,47 @@ void main() { if (nil) {} // ^^^ // [analyzer] COMPILE_TIME_ERROR.NON_BOOL_CONDITION - // [cfe] A value of type 'Null' can't be assigned to a variable of type 'bool' because 'bool' is not nullable. + // [cfe] A value of type 'Null' can't be assigned to a variable of type 'bool'. [if (nil) 3]; // ^^^ // [analyzer] COMPILE_TIME_ERROR.NON_BOOL_CONDITION - // [cfe] A value of type 'Null' can't be assigned to a variable of type 'bool' because 'bool' is not nullable. + // [cfe] A value of type 'Null' can't be assigned to a variable of type 'bool'. nil ? 3 : 4; // [error column 5, length 3] // [analyzer] COMPILE_TIME_ERROR.NON_BOOL_CONDITION - // [cfe] A value of type 'Null' can't be assigned to a variable of type 'bool' because 'bool' is not nullable. + // [cfe] A value of type 'Null' can't be assigned to a variable of type 'bool'. while (nil) {} // ^^^ // [analyzer] COMPILE_TIME_ERROR.NON_BOOL_CONDITION - // [cfe] A value of type 'Null' can't be assigned to a variable of type 'bool' because 'bool' is not nullable. + // [cfe] A value of type 'Null' can't be assigned to a variable of type 'bool'. do {} while (nil); // ^^^ // [analyzer] COMPILE_TIME_ERROR.NON_BOOL_CONDITION - // [cfe] A value of type 'Null' can't be assigned to a variable of type 'bool' because 'bool' is not nullable. + // [cfe] A value of type 'Null' can't be assigned to a variable of type 'bool'. nil || true; // [error column 5, length 3] // [analyzer] COMPILE_TIME_ERROR.NON_BOOL_OPERAND - // [cfe] A value of type 'Null' can't be assigned to a variable of type 'bool' because 'bool' is not nullable. + // [cfe] A value of type 'Null' can't be assigned to a variable of type 'bool'. nil && true; // [error column 5, length 3] // [analyzer] COMPILE_TIME_ERROR.NON_BOOL_OPERAND - // [cfe] A value of type 'Null' can't be assigned to a variable of type 'bool' because 'bool' is not nullable. + // [cfe] A value of type 'Null' can't be assigned to a variable of type 'bool'. true || nil; // ^^^ // [analyzer] COMPILE_TIME_ERROR.NON_BOOL_OPERAND - // [cfe] A value of type 'Null' can't be assigned to a variable of type 'bool' because 'bool' is not nullable. + // [cfe] A value of type 'Null' can't be assigned to a variable of type 'bool'. true && nil; // ^^^ // [analyzer] COMPILE_TIME_ERROR.NON_BOOL_OPERAND - // [cfe] A value of type 'Null' can't be assigned to a variable of type 'bool' because 'bool' is not nullable. + // [cfe] A value of type 'Null' can't be assigned to a variable of type 'bool'. for (int i = 0; nil; i++) {} // ^^^ // [analyzer] COMPILE_TIME_ERROR.NON_BOOL_CONDITION - // [cfe] A value of type 'Null' can't be assigned to a variable of type 'bool' because 'bool' is not nullable. + // [cfe] A value of type 'Null' can't be assigned to a variable of type 'bool'. [for (int i = 0; nil; i++) 3]; // ^^^ // [analyzer] COMPILE_TIME_ERROR.NON_BOOL_CONDITION - // [cfe] A value of type 'Null' can't be assigned to a variable of type 'bool' because 'bool' is not nullable. + // [cfe] A value of type 'Null' can't be assigned to a variable of type 'bool'. } { // Check that values of type `Object` are not usable as booleans. diff --git a/tests/language/nnbd/experiment_release_version/opt_in_test.dart b/tests/language/nnbd/experiment_release_version/opt_in_test.dart index 706bb14a4bf..1f1a6e2a98c 100644 --- a/tests/language/nnbd/experiment_release_version/opt_in_test.dart +++ b/tests/language/nnbd/experiment_release_version/opt_in_test.dart @@ -11,5 +11,5 @@ void main() { int x = null; // ^^^^ // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT - // [cfe] The value 'null' can't be assigned to a variable of type 'int' because 'int' is not nullable. + // [cfe] A value of type 'Null' can't be assigned to a variable of type 'int'. } diff --git a/tests/language/nnbd/never/never_null_assignability_error_test.dart b/tests/language/nnbd/never/never_null_assignability_error_test.dart index d51ce54aa38..74d26426b43 100644 --- a/tests/language/nnbd/never/never_null_assignability_error_test.dart +++ b/tests/language/nnbd/never/never_null_assignability_error_test.dart @@ -29,7 +29,7 @@ void testNullSafeCalls() { takesNever(nil); // ^^^ // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE - // [cfe] The argument type 'Null' can't be assigned to the parameter type 'Never' because 'Never' is not nullable. + // [cfe] The argument type 'Null' can't be assigned to the parameter type 'Never'. takesNever(never); takesNever(3 as dynamic); (takesNever as dynamic)(3); @@ -41,7 +41,7 @@ void testNullSafeCalls() { takesInt(nil); // ^^^ // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE - // [cfe] The argument type 'Null' can't be assigned to the parameter type 'int' because 'int' is not nullable. + // [cfe] The argument type 'Null' can't be assigned to the parameter type 'int'. takesInt(nil as dynamic); (takesInt as dynamic)(nil); (takesInt as dynamic)("hello"); @@ -53,7 +53,7 @@ void testNullSafeCalls() { takesObject(nil); // ^^^ // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE - // [cfe] The argument type 'Null' can't be assigned to the parameter type 'Object' because 'Object' is not nullable. + // [cfe] The argument type 'Null' can't be assigned to the parameter type 'Object'. takesObject(nil as dynamic); (takesObject as dynamic)(nil); } @@ -75,17 +75,17 @@ void testNullSafeApply() { applyTakesNull(takesNever, nil); // ^^^^^^^^^^ // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE - // [cfe] The argument type 'void Function(Never)' can't be assigned to the parameter type 'void Function(Null)' because 'Null' is nullable and 'Never' isn't. + // [cfe] The argument type 'void Function(Never)' can't be assigned to the parameter type 'void Function(Null)'. applyTakesNull(takesAny, nil); applyTakesNull(takesInt, nil); // ^^^^^^^^ // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE - // [cfe] The argument type 'void Function(int)' can't be assigned to the parameter type 'void Function(Null)' because 'Null' is nullable and 'int' isn't. + // [cfe] The argument type 'void Function(int)' can't be assigned to the parameter type 'void Function(Null)'. applyTakesNull(takesObject, nil); // ^^^^^^^^^^^ // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE - // [cfe] The argument type 'void Function(Object)' can't be assigned to the parameter type 'void Function(Null)' because 'Null' is nullable and 'Object' isn't. + // [cfe] The argument type 'void Function(Object)' can't be assigned to the parameter type 'void Function(Null)'. } // Test applying a null safe function of static type void Function(Null) @@ -96,15 +96,15 @@ void testNullSafeApply() { applyTakesNull(takesNever, 3); // ^^^^^^^^^^ // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE - // [cfe] The argument type 'void Function(Never)' can't be assigned to the parameter type 'void Function(Null)' because 'Null' is nullable and 'Never' isn't. + // [cfe] The argument type 'void Function(Never)' can't be assigned to the parameter type 'void Function(Null)'. applyTakesNull(takesInt, 3); // ^^^^^^^^ // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE - // [cfe] The argument type 'void Function(int)' can't be assigned to the parameter type 'void Function(Null)' because 'Null' is nullable and 'int' isn't. + // [cfe] The argument type 'void Function(int)' can't be assigned to the parameter type 'void Function(Null)'. applyTakesNull(takesObject, 3); // ^^^^^^^^^^^ // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE - // [cfe] The argument type 'void Function(Object)' can't be assigned to the parameter type 'void Function(Null)' because 'Null' is nullable and 'Object' isn't. + // [cfe] The argument type 'void Function(Object)' can't be assigned to the parameter type 'void Function(Null)'. applyTakesNull(takesAny, 3); } @@ -140,16 +140,16 @@ void testNullSafeApplyDynamically() { applyTakesNullDynamically(takesNever, nil); // ^^^^^^^^^^ // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE - // [cfe] The argument type 'void Function(Never)' can't be assigned to the parameter type 'void Function(Null)' because 'Null' is nullable and 'Never' isn't. + // [cfe] The argument type 'void Function(Never)' can't be assigned to the parameter type 'void Function(Null)'. applyTakesNullDynamically(takesAny, nil); applyTakesNullDynamically(takesInt, nil); // ^^^^^^^^ // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE - // [cfe] The argument type 'void Function(int)' can't be assigned to the parameter type 'void Function(Null)' because 'Null' is nullable and 'int' isn't. + // [cfe] The argument type 'void Function(int)' can't be assigned to the parameter type 'void Function(Null)'. applyTakesNullDynamically(takesObject, nil); // ^^^^^^^^^^^ // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE - // [cfe] The argument type 'void Function(Object)' can't be assigned to the parameter type 'void Function(Null)' because 'Null' is nullable and 'Object' isn't. + // [cfe] The argument type 'void Function(Object)' can't be assigned to the parameter type 'void Function(Null)'. } // Test dynamically applying a null safe function of static type @@ -160,19 +160,19 @@ void testNullSafeApplyDynamically() { applyTakesNullDynamically(takesNever, 3); // ^^^^^^^^^^ // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE - // [cfe] The argument type 'void Function(Never)' can't be assigned to the parameter type 'void Function(Null)' because 'Null' is nullable and 'Never' isn't. + // [cfe] The argument type 'void Function(Never)' can't be assigned to the parameter type 'void Function(Null)'. applyTakesNullDynamically(takesInt, 3); // ^^^^^^^^ // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE - // [cfe] The argument type 'void Function(int)' can't be assigned to the parameter type 'void Function(Null)' because 'Null' is nullable and 'int' isn't. + // [cfe] The argument type 'void Function(int)' can't be assigned to the parameter type 'void Function(Null)'. applyTakesNullDynamically(takesInt, "hello"); // ^^^^^^^^ // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE - // [cfe] The argument type 'void Function(int)' can't be assigned to the parameter type 'void Function(Null)' because 'Null' is nullable and 'int' isn't. + // [cfe] The argument type 'void Function(int)' can't be assigned to the parameter type 'void Function(Null)'. applyTakesNullDynamically(takesObject, 3); // ^^^^^^^^^^^ // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE - // [cfe] The argument type 'void Function(Object)' can't be assigned to the parameter type 'void Function(Null)' because 'Null' is nullable and 'Object' isn't. + // [cfe] The argument type 'void Function(Object)' can't be assigned to the parameter type 'void Function(Null)'. applyTakesNullDynamically(takesAny, 3); } @@ -204,11 +204,11 @@ void main() { never = null; // ^^^^ // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT - // [cfe] The value 'null' can't be assigned to a variable of type 'Never' because 'Never' is not nullable. + // [cfe] A value of type 'Null' can't be assigned to a variable of type 'Never'. never = nil; // ^^^ // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT - // [cfe] A value of type 'Null' can't be assigned to a variable of type 'Never' because 'Never' is not nullable. + // [cfe] A value of type 'Null' can't be assigned to a variable of type 'Never'. nil = never; testNullSafeCalls(); testNullSafeApply(); diff --git a/tests/language/nnbd/operator_type_test.dart b/tests/language/nnbd/operator_type_test.dart index 8cc4e88d8d3..6f5dd381559 100644 --- a/tests/language/nnbd/operator_type_test.dart +++ b/tests/language/nnbd/operator_type_test.dart @@ -25,52 +25,52 @@ dynamic nonNullable() { x = bq && b; // ^^ // [analyzer] COMPILE_TIME_ERROR.UNCHECKED_USE_OF_NULLABLE_VALUE - // [cfe] A value of type 'bool?' can't be assigned to a variable of type 'bool' because 'bool?' is nullable and 'bool' isn't. + // [cfe] A value of type 'bool?' can't be assigned to a variable of type 'bool'. x = b && bq; // ^^ // [analyzer] COMPILE_TIME_ERROR.UNCHECKED_USE_OF_NULLABLE_VALUE - // [cfe] A value of type 'bool?' can't be assigned to a variable of type 'bool' because 'bool?' is nullable and 'bool' isn't. + // [cfe] A value of type 'bool?' can't be assigned to a variable of type 'bool'. x = bq || b; // ^^ // [analyzer] COMPILE_TIME_ERROR.UNCHECKED_USE_OF_NULLABLE_VALUE - // [cfe] A value of type 'bool?' can't be assigned to a variable of type 'bool' because 'bool?' is nullable and 'bool' isn't. + // [cfe] A value of type 'bool?' can't be assigned to a variable of type 'bool'. x = b || bq; // ^^ // [analyzer] COMPILE_TIME_ERROR.UNCHECKED_USE_OF_NULLABLE_VALUE - // [cfe] A value of type 'bool?' can't be assigned to a variable of type 'bool' because 'bool?' is nullable and 'bool' isn't. + // [cfe] A value of type 'bool?' can't be assigned to a variable of type 'bool'. x = !bq; // ^^ // [analyzer] COMPILE_TIME_ERROR.UNCHECKED_USE_OF_NULLABLE_VALUE - // [cfe] A value of type 'bool?' can't be assigned to a variable of type 'bool' because 'bool?' is nullable and 'bool' isn't. + // [cfe] A value of type 'bool?' can't be assigned to a variable of type 'bool'. x = bq ? "a" : "b"; // ^^ // [analyzer] COMPILE_TIME_ERROR.UNCHECKED_USE_OF_NULLABLE_VALUE - // [cfe] A value of type 'bool?' can't be assigned to a variable of type 'bool' because 'bool?' is nullable and 'bool' isn't. + // [cfe] A value of type 'bool?' can't be assigned to a variable of type 'bool'. if (bq) {} // ^^ // [analyzer] COMPILE_TIME_ERROR.UNCHECKED_USE_OF_NULLABLE_VALUE - // [cfe] A value of type 'bool?' can't be assigned to a variable of type 'bool' because 'bool?' is nullable and 'bool' isn't. + // [cfe] A value of type 'bool?' can't be assigned to a variable of type 'bool'. while (bq) {} // ^^ // [analyzer] COMPILE_TIME_ERROR.UNCHECKED_USE_OF_NULLABLE_VALUE - // [cfe] A value of type 'bool?' can't be assigned to a variable of type 'bool' because 'bool?' is nullable and 'bool' isn't. + // [cfe] A value of type 'bool?' can't be assigned to a variable of type 'bool'. do {} while (bq); // ^^ // [analyzer] COMPILE_TIME_ERROR.UNCHECKED_USE_OF_NULLABLE_VALUE - // [cfe] A value of type 'bool?' can't be assigned to a variable of type 'bool' because 'bool?' is nullable and 'bool' isn't. + // [cfe] A value of type 'bool?' can't be assigned to a variable of type 'bool'. for (; bq;) {} // ^^ // [analyzer] COMPILE_TIME_ERROR.UNCHECKED_USE_OF_NULLABLE_VALUE - // [cfe] A value of type 'bool?' can't be assigned to a variable of type 'bool' because 'bool?' is nullable and 'bool' isn't. + // [cfe] A value of type 'bool?' can't be assigned to a variable of type 'bool'. try { throw bq; @@ -82,23 +82,23 @@ dynamic nonNullable() { assert(bq); // ^^ // [analyzer] COMPILE_TIME_ERROR.UNCHECKED_USE_OF_NULLABLE_VALUE - // [cfe] A value of type 'bool?' can't be assigned to a variable of type 'bool' because 'bool?' is nullable and 'bool' isn't. + // [cfe] A value of type 'bool?' can't be assigned to a variable of type 'bool'. x = [if (bq) 1]; // ^^ // [analyzer] COMPILE_TIME_ERROR.UNCHECKED_USE_OF_NULLABLE_VALUE - // [cfe] A value of type 'bool?' can't be assigned to a variable of type 'bool' because 'bool?' is nullable and 'bool' isn't. + // [cfe] A value of type 'bool?' can't be assigned to a variable of type 'bool'. x = [for (; bq;) 1]; // ^^ // [analyzer] COMPILE_TIME_ERROR.UNCHECKED_USE_OF_NULLABLE_VALUE - // [cfe] A value of type 'bool?' can't be assigned to a variable of type 'bool' because 'bool?' is nullable and 'bool' isn't. + // [cfe] A value of type 'bool?' can't be assigned to a variable of type 'bool'. Iterable? iq = maybeNullable([1]); for (var v in iq) {} // ^^ // [analyzer] COMPILE_TIME_ERROR.UNCHECKED_USE_OF_NULLABLE_VALUE - // [cfe] The type 'Iterable?' used in the 'for' loop must implement 'Iterable' because 'Iterable?' is nullable and 'Iterable' isn't. + // [cfe] The type 'Iterable?' used in the 'for' loop must implement 'Iterable'. x = [...iq]; // ^^ @@ -110,13 +110,13 @@ dynamic nonNullable() { await for (var v in sq) {} // ^^ // [analyzer] COMPILE_TIME_ERROR.UNCHECKED_USE_OF_NULLABLE_VALUE - // [cfe] The type 'Stream?' used in the 'for' loop must implement 'Stream' because 'Stream?' is nullable and 'Stream' isn't. + // [cfe] The type 'Stream?' used in the 'for' loop must implement 'Stream'. yield* sq; // ^^ // [analyzer] COMPILE_TIME_ERROR.UNCHECKED_USE_OF_NULLABLE_VALUE // [analyzer] COMPILE_TIME_ERROR.YIELD_OF_INVALID_TYPE - // [cfe] A value of type 'Stream?' can't be assigned to a variable of type 'Stream' because 'Stream?' is nullable and 'Stream' isn't. + // [cfe] A value of type 'Stream?' can't be assigned to a variable of type 'Stream'. } foo().toList(); @@ -137,52 +137,52 @@ dynamic potentiallyNonNullable() { x = bq && b; // ^^ // [analyzer] COMPILE_TIME_ERROR.NON_BOOL_OPERAND - // [cfe] A value of type 'BQ' can't be assigned to a variable of type 'bool' because 'bool?' is nullable and 'bool' isn't. + // [cfe] A value of type 'BQ' can't be assigned to a variable of type 'bool'. x = b && bq; // ^^ // [analyzer] COMPILE_TIME_ERROR.NON_BOOL_OPERAND - // [cfe] A value of type 'BQ' can't be assigned to a variable of type 'bool' because 'bool?' is nullable and 'bool' isn't. + // [cfe] A value of type 'BQ' can't be assigned to a variable of type 'bool'. x = bq || b; // ^^ // [analyzer] COMPILE_TIME_ERROR.NON_BOOL_OPERAND - // [cfe] A value of type 'BQ' can't be assigned to a variable of type 'bool' because 'bool?' is nullable and 'bool' isn't. + // [cfe] A value of type 'BQ' can't be assigned to a variable of type 'bool'. x = b || bq; // ^^ // [analyzer] COMPILE_TIME_ERROR.NON_BOOL_OPERAND - // [cfe] A value of type 'BQ' can't be assigned to a variable of type 'bool' because 'bool?' is nullable and 'bool' isn't. + // [cfe] A value of type 'BQ' can't be assigned to a variable of type 'bool'. x = !bq; // ^^ // [analyzer] COMPILE_TIME_ERROR.NON_BOOL_NEGATION_EXPRESSION - // [cfe] A value of type 'BQ' can't be assigned to a variable of type 'bool' because 'bool?' is nullable and 'bool' isn't. + // [cfe] A value of type 'BQ' can't be assigned to a variable of type 'bool'. x = bq ? "a" : "b"; // ^^ // [analyzer] COMPILE_TIME_ERROR.NON_BOOL_CONDITION - // [cfe] A value of type 'BQ' can't be assigned to a variable of type 'bool' because 'bool?' is nullable and 'bool' isn't. + // [cfe] A value of type 'BQ' can't be assigned to a variable of type 'bool'. if (bq) {} // ^^ // [analyzer] COMPILE_TIME_ERROR.NON_BOOL_CONDITION - // [cfe] A value of type 'BQ' can't be assigned to a variable of type 'bool' because 'bool?' is nullable and 'bool' isn't. + // [cfe] A value of type 'BQ' can't be assigned to a variable of type 'bool'. while (bq) {} // ^^ // [analyzer] COMPILE_TIME_ERROR.NON_BOOL_CONDITION - // [cfe] A value of type 'BQ' can't be assigned to a variable of type 'bool' because 'bool?' is nullable and 'bool' isn't. + // [cfe] A value of type 'BQ' can't be assigned to a variable of type 'bool'. do {} while (bq); // ^^ // [analyzer] COMPILE_TIME_ERROR.NON_BOOL_CONDITION - // [cfe] A value of type 'BQ' can't be assigned to a variable of type 'bool' because 'bool?' is nullable and 'bool' isn't. + // [cfe] A value of type 'BQ' can't be assigned to a variable of type 'bool'. for (; bq;) {} // ^^ // [analyzer] COMPILE_TIME_ERROR.NON_BOOL_CONDITION - // [cfe] A value of type 'BQ' can't be assigned to a variable of type 'bool' because 'bool?' is nullable and 'bool' isn't. + // [cfe] A value of type 'BQ' can't be assigned to a variable of type 'bool'. try { throw bq; @@ -194,23 +194,23 @@ dynamic potentiallyNonNullable() { assert(bq); // ^^ // [analyzer] COMPILE_TIME_ERROR.NON_BOOL_EXPRESSION - // [cfe] A value of type 'BQ' can't be assigned to a variable of type 'bool' because 'bool?' is nullable and 'bool' isn't. + // [cfe] A value of type 'BQ' can't be assigned to a variable of type 'bool'. x = [if (bq) 1]; // ^^ // [analyzer] COMPILE_TIME_ERROR.NON_BOOL_CONDITION - // [cfe] A value of type 'BQ' can't be assigned to a variable of type 'bool' because 'bool?' is nullable and 'bool' isn't. + // [cfe] A value of type 'BQ' can't be assigned to a variable of type 'bool'. x = [for (; bq;) 1]; // ^^ // [analyzer] COMPILE_TIME_ERROR.NON_BOOL_CONDITION - // [cfe] A value of type 'BQ' can't be assigned to a variable of type 'bool' because 'bool?' is nullable and 'bool' isn't. + // [cfe] A value of type 'BQ' can't be assigned to a variable of type 'bool'. Iterable? iq = maybeNullable([1]); for (var v in iq) {} // ^^ // [analyzer] COMPILE_TIME_ERROR.UNCHECKED_USE_OF_NULLABLE_VALUE - // [cfe] The type 'Iterable?' used in the 'for' loop must implement 'Iterable' because 'Iterable?' is nullable and 'Iterable' isn't. + // [cfe] The type 'Iterable?' used in the 'for' loop must implement 'Iterable'. x = [...iq]; // ^^ @@ -223,13 +223,13 @@ dynamic potentiallyNonNullable() { // ^^ // [analyzer] COMPILE_TIME_ERROR.FOR_IN_OF_INVALID_TYPE // [analyzer] COMPILE_TIME_ERROR.UNCHECKED_USE_OF_NULLABLE_VALUE - // [cfe] The type 'Stream?' used in the 'for' loop must implement 'Stream' because 'Stream?' is nullable and 'Stream' isn't. + // [cfe] The type 'Stream?' used in the 'for' loop must implement 'Stream'. yield* sq; // ^^ // [analyzer] COMPILE_TIME_ERROR.UNCHECKED_USE_OF_NULLABLE_VALUE // [analyzer] COMPILE_TIME_ERROR.YIELD_OF_INVALID_TYPE - // [cfe] A value of type 'SQ' can't be assigned to a variable of type 'Stream' because 'Stream?' is nullable and 'Stream' isn't. + // [cfe] A value of type 'SQ' can't be assigned to a variable of type 'Stream'. } foo>().toList(); @@ -251,7 +251,7 @@ class C { return cq; // ^^ // [analyzer] COMPILE_TIME_ERROR.RETURN_OF_INVALID_TYPE - // [cfe] A value of type 'C?' can't be returned from a function with return type 'C' because 'C?' is nullable and 'C' isn't. + // [cfe] A value of type 'C?' can't be returned from a function with return type 'C'. } } diff --git a/tests/language/nnbd/resolution/null_aware_subscript_produces_nullable_type_test.dart b/tests/language/nnbd/resolution/null_aware_subscript_produces_nullable_type_test.dart index abbd15f69f6..9cf3c981d23 100644 --- a/tests/language/nnbd/resolution/null_aware_subscript_produces_nullable_type_test.dart +++ b/tests/language/nnbd/resolution/null_aware_subscript_produces_nullable_type_test.dart @@ -25,23 +25,23 @@ void f2(NotGeneric? x) { useNonNullable(x?[0] = 1); // ^^^^^^^^^ // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE - // [cfe] The argument type 'int?' can't be assigned to the parameter type 'int' because 'int?' is nullable and 'int' isn't. + // [cfe] The argument type 'int?' can't be assigned to the parameter type 'int'. x?[0] += 1; useNonNullable(x?[0] += 1); // ^^^^^^^^^^ // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE - // [cfe] The argument type 'int?' can't be assigned to the parameter type 'int' because 'int?' is nullable and 'int' isn't. + // [cfe] The argument type 'int?' can't be assigned to the parameter type 'int'. x?[0]++; useNonNullable(x?[0]++); // ^^^^^^^ // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE - // [cfe] The argument type 'int?' can't be assigned to the parameter type 'int' because 'int?' is nullable and 'int' isn't. + // [cfe] The argument type 'int?' can't be assigned to the parameter type 'int'. ++x?[0]; useNonNullable(++x?[0]); // ^^^^^^^ // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE // ^ - // [cfe] The argument type 'int?' can't be assigned to the parameter type 'int' because 'int?' is nullable and 'int' isn't. + // [cfe] The argument type 'int?' can't be assigned to the parameter type 'int'. } void f3(Generic? x) { diff --git a/tests/language/nnbd/syntax/class_member_declarations_error_test.dart b/tests/language/nnbd/syntax/class_member_declarations_error_test.dart index 56c680ff73b..ad63e7606b1 100644 --- a/tests/language/nnbd/syntax/class_member_declarations_error_test.dart +++ b/tests/language/nnbd/syntax/class_member_declarations_error_test.dart @@ -31,7 +31,7 @@ class A { // [cfe] The modifier 'late' should be before the modifier 'final'. // ^^^^ // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT - // [cfe] The value 'null' can't be assigned to a variable of type 'A' because 'A' is not nullable. + // [cfe] A value of type 'Null' can't be assigned to a variable of type 'A'. covariant late x15; // ^^^ diff --git a/tests/language/nnbd/top_merge/top_merge_interfaces_direct_error_test.dart b/tests/language/nnbd/top_merge/top_merge_interfaces_direct_error_test.dart index 0380f5d3e06..76518ee10ef 100644 --- a/tests/language/nnbd/top_merge/top_merge_interfaces_direct_error_test.dart +++ b/tests/language/nnbd/top_merge/top_merge_interfaces_direct_error_test.dart @@ -25,7 +25,7 @@ class D0 extends A implements B { takesObject(x); // Check that we do not implement A // ^ // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE - // [cfe] The argument type 'Object?' can't be assigned to the parameter type 'Object' because 'Object?' is nullable and 'Object' isn't. + // [cfe] The argument type 'Object?' can't be assigned to the parameter type 'Object'. } } @@ -40,7 +40,7 @@ class D1 extends A implements B { takesObject(x); // Check that we do not implement A // ^ // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE - // [cfe] The argument type 'Object?' can't be assigned to the parameter type 'Object' because 'Object?' is nullable and 'Object' isn't. + // [cfe] The argument type 'Object?' can't be assigned to the parameter type 'Object'. } } @@ -55,7 +55,7 @@ class D2 extends A implements B { takesObject(x); // Check that we do not implement A // ^ // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE - // [cfe] The argument type 'Object?' can't be assigned to the parameter type 'Object' because 'Object?' is nullable and 'Object' isn't. + // [cfe] The argument type 'Object?' can't be assigned to the parameter type 'Object'. } } @@ -70,7 +70,7 @@ class D3 extends A implements B { takesObject(x); // Check that we do not implement A // ^ // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE - // [cfe] The argument type 'Object?' can't be assigned to the parameter type 'Object' because 'Object?' is nullable and 'Object' isn't. + // [cfe] The argument type 'Object?' can't be assigned to the parameter type 'Object'. } } @@ -85,7 +85,7 @@ class D4 extends A implements B { takesObject(x); // Check that we do not implement A // ^ // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE - // [cfe] The argument type 'Object?' can't be assigned to the parameter type 'Object' because 'Object?' is nullable and 'Object' isn't. + // [cfe] The argument type 'Object?' can't be assigned to the parameter type 'Object'. } } @@ -100,7 +100,7 @@ class D5 extends A implements B { takesObject(x); // Check that we do not implement A // ^ // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE - // [cfe] The argument type 'Object?' can't be assigned to the parameter type 'Object' because 'Object?' is nullable and 'Object' isn't. + // [cfe] The argument type 'Object?' can't be assigned to the parameter type 'Object'. } } @@ -145,7 +145,7 @@ class ND0 extends A> implements B { takesObject(x); // Check that we do not implement A // ^ // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE - // [cfe] The argument type 'Object?' can't be assigned to the parameter type 'Object' because 'Object?' is nullable and 'Object' isn't. + // [cfe] The argument type 'Object?' can't be assigned to the parameter type 'Object'. } } @@ -160,7 +160,7 @@ class ND1 extends A> implements B { takesObject(x); // Check that we do not implement A // ^ // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE - // [cfe] The argument type 'Object?' can't be assigned to the parameter type 'Object' because 'Object?' is nullable and 'Object' isn't. + // [cfe] The argument type 'Object?' can't be assigned to the parameter type 'Object'. } } @@ -175,7 +175,7 @@ class ND2 extends A> implements B { takesObject(x); // Check that we do not implement A // ^ // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE - // [cfe] The argument type 'Object?' can't be assigned to the parameter type 'Object' because 'Object?' is nullable and 'Object' isn't. + // [cfe] The argument type 'Object?' can't be assigned to the parameter type 'Object'. } } @@ -190,7 +190,7 @@ class ND3 extends A> implements B { takesObject(x); // Check that we do not implement A // ^ // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE - // [cfe] The argument type 'Object?' can't be assigned to the parameter type 'Object' because 'Object?' is nullable and 'Object' isn't. + // [cfe] The argument type 'Object?' can't be assigned to the parameter type 'Object'. } } @@ -205,7 +205,7 @@ class ND4 extends A> implements B { takesObject(x); // Check that we do not implement A // ^ // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE - // [cfe] The argument type 'Object?' can't be assigned to the parameter type 'Object' because 'Object?' is nullable and 'Object' isn't. + // [cfe] The argument type 'Object?' can't be assigned to the parameter type 'Object'. } } @@ -220,7 +220,7 @@ class ND5 extends A> implements B { takesObject(x); // Check that we do not implement A // ^ // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE - // [cfe] The argument type 'Object?' can't be assigned to the parameter type 'Object' because 'Object?' is nullable and 'Object' isn't. + // [cfe] The argument type 'Object?' can't be assigned to the parameter type 'Object'. } } @@ -266,7 +266,7 @@ class DND0 extends A Function()> takesObject(x); // Check that we do not implement A // ^ // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE - // [cfe] The argument type 'Object?' can't be assigned to the parameter type 'Object' because 'Object?' is nullable and 'Object' isn't. + // [cfe] The argument type 'Object?' can't be assigned to the parameter type 'Object'. } } @@ -282,7 +282,7 @@ class DND1 extends A Function()> takesObject(x); // Check that we do not implement A // ^ // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE - // [cfe] The argument type 'Object?' can't be assigned to the parameter type 'Object' because 'Object?' is nullable and 'Object' isn't. + // [cfe] The argument type 'Object?' can't be assigned to the parameter type 'Object'. } } @@ -298,7 +298,7 @@ class DND2 extends A Function()> takesObject(x); // Check that we do not implement A // ^ // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE - // [cfe] The argument type 'Object?' can't be assigned to the parameter type 'Object' because 'Object?' is nullable and 'Object' isn't. + // [cfe] The argument type 'Object?' can't be assigned to the parameter type 'Object'. } } @@ -314,7 +314,7 @@ class DND3 extends A Function()> takesObject(x); // Check that we do not implement A // ^ // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE - // [cfe] The argument type 'Object?' can't be assigned to the parameter type 'Object' because 'Object?' is nullable and 'Object' isn't. + // [cfe] The argument type 'Object?' can't be assigned to the parameter type 'Object'. } } @@ -330,7 +330,7 @@ class DND4 extends A Function()> takesObject(x); // Check that we do not implement A // ^ // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE - // [cfe] The argument type 'Object?' can't be assigned to the parameter type 'Object' because 'Object?' is nullable and 'Object' isn't. + // [cfe] The argument type 'Object?' can't be assigned to the parameter type 'Object'. } } @@ -346,7 +346,7 @@ class DND5 extends A Function()> takesObject(x); // Check that we do not implement A // ^ // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE - // [cfe] The argument type 'Object?' can't be assigned to the parameter type 'Object' because 'Object?' is nullable and 'Object' isn't. + // [cfe] The argument type 'Object?' can't be assigned to the parameter type 'Object'. } } @@ -394,7 +394,7 @@ class WND0 extends A>> implements B> { takesObject(x); // Check that we do not implement A // ^ // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE - // [cfe] The argument type 'Object?' can't be assigned to the parameter type 'Object' because 'Object?' is nullable and 'Object' isn't. + // [cfe] The argument type 'Object?' can't be assigned to the parameter type 'Object'. } } @@ -409,7 +409,7 @@ class WND1 extends A>> implements B> { takesObject(x); // Check that we do not implement A // ^ // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE - // [cfe] The argument type 'Object?' can't be assigned to the parameter type 'Object' because 'Object?' is nullable and 'Object' isn't. + // [cfe] The argument type 'Object?' can't be assigned to the parameter type 'Object'. } } @@ -424,7 +424,7 @@ class WND2 extends A>> implements B> { takesObject(x); // Check that we do not implement A // ^ // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE - // [cfe] The argument type 'Object?' can't be assigned to the parameter type 'Object' because 'Object?' is nullable and 'Object' isn't. + // [cfe] The argument type 'Object?' can't be assigned to the parameter type 'Object'. } } @@ -439,7 +439,7 @@ class WND3 extends A>> implements B> { takesObject(x); // Check that we do not implement A // ^ // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE - // [cfe] The argument type 'Object?' can't be assigned to the parameter type 'Object' because 'Object?' is nullable and 'Object' isn't. + // [cfe] The argument type 'Object?' can't be assigned to the parameter type 'Object'. } } @@ -454,7 +454,7 @@ class WND4 extends A>> implements B> { takesObject(x); // Check that we do not implement A // ^ // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE - // [cfe] The argument type 'Object?' can't be assigned to the parameter type 'Object' because 'Object?' is nullable and 'Object' isn't. + // [cfe] The argument type 'Object?' can't be assigned to the parameter type 'Object'. } } @@ -469,7 +469,7 @@ class WND5 extends A>> implements B> { takesObject(x); // Check that we do not implement A // ^ // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE - // [cfe] The argument type 'Object?' can't be assigned to the parameter type 'Object' because 'Object?' is nullable and 'Object' isn't. + // [cfe] The argument type 'Object?' can't be assigned to the parameter type 'Object'. } } diff --git a/tests/language/nnbd/top_merge/top_merge_interfaces_mixin_error_test.dart b/tests/language/nnbd/top_merge/top_merge_interfaces_mixin_error_test.dart index 807f0bab764..d9bd4cd9cc7 100644 --- a/tests/language/nnbd/top_merge/top_merge_interfaces_mixin_error_test.dart +++ b/tests/language/nnbd/top_merge/top_merge_interfaces_mixin_error_test.dart @@ -25,7 +25,7 @@ class D0 extends A with M { takesObject(x); // Check that we do not implement A // ^ // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE - // [cfe] The argument type 'Object?' can't be assigned to the parameter type 'Object' because 'Object?' is nullable and 'Object' isn't. + // [cfe] The argument type 'Object?' can't be assigned to the parameter type 'Object'. } } @@ -40,7 +40,7 @@ class D1 extends A with M { takesObject(x); // Check that we do not implement A // ^ // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE - // [cfe] The argument type 'Object?' can't be assigned to the parameter type 'Object' because 'Object?' is nullable and 'Object' isn't. + // [cfe] The argument type 'Object?' can't be assigned to the parameter type 'Object'. } } @@ -55,7 +55,7 @@ class D2 extends A with M { takesObject(x); // Check that we do not implement A // ^ // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE - // [cfe] The argument type 'Object?' can't be assigned to the parameter type 'Object' because 'Object?' is nullable and 'Object' isn't. + // [cfe] The argument type 'Object?' can't be assigned to the parameter type 'Object'. } } @@ -70,7 +70,7 @@ class D3 extends A with M { takesObject(x); // Check that we do not implement A // ^ // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE - // [cfe] The argument type 'Object?' can't be assigned to the parameter type 'Object' because 'Object?' is nullable and 'Object' isn't. + // [cfe] The argument type 'Object?' can't be assigned to the parameter type 'Object'. } } @@ -85,7 +85,7 @@ class D4 extends A with M { takesObject(x); // Check that we do not implement A // ^ // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE - // [cfe] The argument type 'Object?' can't be assigned to the parameter type 'Object' because 'Object?' is nullable and 'Object' isn't. + // [cfe] The argument type 'Object?' can't be assigned to the parameter type 'Object'. } } @@ -100,7 +100,7 @@ class D5 extends A with M { takesObject(x); // Check that we do not implement A // ^ // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE - // [cfe] The argument type 'Object?' can't be assigned to the parameter type 'Object' because 'Object?' is nullable and 'Object' isn't. + // [cfe] The argument type 'Object?' can't be assigned to the parameter type 'Object'. } } @@ -145,7 +145,7 @@ class ND0 extends A> with M { takesObject(x); // Check that we do not implement A // ^ // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE - // [cfe] The argument type 'Object?' can't be assigned to the parameter type 'Object' because 'Object?' is nullable and 'Object' isn't. + // [cfe] The argument type 'Object?' can't be assigned to the parameter type 'Object'. } } @@ -160,7 +160,7 @@ class ND1 extends A> with M { takesObject(x); // Check that we do not implement A // ^ // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE - // [cfe] The argument type 'Object?' can't be assigned to the parameter type 'Object' because 'Object?' is nullable and 'Object' isn't. + // [cfe] The argument type 'Object?' can't be assigned to the parameter type 'Object'. } } @@ -175,7 +175,7 @@ class ND2 extends A> with M { takesObject(x); // Check that we do not implement A // ^ // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE - // [cfe] The argument type 'Object?' can't be assigned to the parameter type 'Object' because 'Object?' is nullable and 'Object' isn't. + // [cfe] The argument type 'Object?' can't be assigned to the parameter type 'Object'. } } @@ -190,7 +190,7 @@ class ND3 extends A> with M { takesObject(x); // Check that we do not implement A // ^ // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE - // [cfe] The argument type 'Object?' can't be assigned to the parameter type 'Object' because 'Object?' is nullable and 'Object' isn't. + // [cfe] The argument type 'Object?' can't be assigned to the parameter type 'Object'. } } @@ -205,7 +205,7 @@ class ND4 extends A> with M { takesObject(x); // Check that we do not implement A // ^ // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE - // [cfe] The argument type 'Object?' can't be assigned to the parameter type 'Object' because 'Object?' is nullable and 'Object' isn't. + // [cfe] The argument type 'Object?' can't be assigned to the parameter type 'Object'. } } @@ -220,7 +220,7 @@ class ND5 extends A> with M { takesObject(x); // Check that we do not implement A // ^ // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE - // [cfe] The argument type 'Object?' can't be assigned to the parameter type 'Object' because 'Object?' is nullable and 'Object' isn't. + // [cfe] The argument type 'Object?' can't be assigned to the parameter type 'Object'. } } @@ -265,7 +265,7 @@ class DND0 extends A Function()> with M { takesObject(x); // Check that we do not implement A // ^ // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE - // [cfe] The argument type 'Object?' can't be assigned to the parameter type 'Object' because 'Object?' is nullable and 'Object' isn't. + // [cfe] The argument type 'Object?' can't be assigned to the parameter type 'Object'. } } @@ -280,7 +280,7 @@ class DND1 extends A Function()> with M { takesObject(x); // Check that we do not implement A // ^ // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE - // [cfe] The argument type 'Object?' can't be assigned to the parameter type 'Object' because 'Object?' is nullable and 'Object' isn't. + // [cfe] The argument type 'Object?' can't be assigned to the parameter type 'Object'. } } @@ -295,7 +295,7 @@ class DND2 extends A Function()> with M { takesObject(x); // Check that we do not implement A // ^ // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE - // [cfe] The argument type 'Object?' can't be assigned to the parameter type 'Object' because 'Object?' is nullable and 'Object' isn't. + // [cfe] The argument type 'Object?' can't be assigned to the parameter type 'Object'. } } @@ -310,7 +310,7 @@ class DND3 extends A Function()> with M { takesObject(x); // Check that we do not implement A // ^ // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE - // [cfe] The argument type 'Object?' can't be assigned to the parameter type 'Object' because 'Object?' is nullable and 'Object' isn't. + // [cfe] The argument type 'Object?' can't be assigned to the parameter type 'Object'. } } @@ -325,7 +325,7 @@ class DND4 extends A Function()> with M { takesObject(x); // Check that we do not implement A // ^ // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE - // [cfe] The argument type 'Object?' can't be assigned to the parameter type 'Object' because 'Object?' is nullable and 'Object' isn't. + // [cfe] The argument type 'Object?' can't be assigned to the parameter type 'Object'. } } @@ -340,7 +340,7 @@ class DND5 extends A Function()> with M { takesObject(x); // Check that we do not implement A // ^ // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE - // [cfe] The argument type 'Object?' can't be assigned to the parameter type 'Object' because 'Object?' is nullable and 'Object' isn't. + // [cfe] The argument type 'Object?' can't be assigned to the parameter type 'Object'. } } @@ -387,7 +387,7 @@ class WND0 extends A>> with M> { takesObject(x); // Check that we do not implement A // ^ // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE - // [cfe] The argument type 'Object?' can't be assigned to the parameter type 'Object' because 'Object?' is nullable and 'Object' isn't. + // [cfe] The argument type 'Object?' can't be assigned to the parameter type 'Object'. } } @@ -402,7 +402,7 @@ class WND1 extends A>> with M> { takesObject(x); // Check that we do not implement A // ^ // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE - // [cfe] The argument type 'Object?' can't be assigned to the parameter type 'Object' because 'Object?' is nullable and 'Object' isn't. + // [cfe] The argument type 'Object?' can't be assigned to the parameter type 'Object'. } } @@ -417,7 +417,7 @@ class WND2 extends A>> with M> { takesObject(x); // Check that we do not implement A // ^ // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE - // [cfe] The argument type 'Object?' can't be assigned to the parameter type 'Object' because 'Object?' is nullable and 'Object' isn't. + // [cfe] The argument type 'Object?' can't be assigned to the parameter type 'Object'. } } @@ -432,7 +432,7 @@ class WND3 extends A>> with M> { takesObject(x); // Check that we do not implement A // ^ // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE - // [cfe] The argument type 'Object?' can't be assigned to the parameter type 'Object' because 'Object?' is nullable and 'Object' isn't. + // [cfe] The argument type 'Object?' can't be assigned to the parameter type 'Object'. } } @@ -447,7 +447,7 @@ class WND4 extends A>> with M> { takesObject(x); // Check that we do not implement A // ^ // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE - // [cfe] The argument type 'Object?' can't be assigned to the parameter type 'Object' because 'Object?' is nullable and 'Object' isn't. + // [cfe] The argument type 'Object?' can't be assigned to the parameter type 'Object'. } } @@ -462,7 +462,7 @@ class WND5 extends A>> with M> { takesObject(x); // Check that we do not implement A // ^ // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE - // [cfe] The argument type 'Object?' can't be assigned to the parameter type 'Object' because 'Object?' is nullable and 'Object' isn't. + // [cfe] The argument type 'Object?' can't be assigned to the parameter type 'Object'. } } diff --git a/tests/language/nnbd/top_merge/top_merge_members_direct_error_test.dart b/tests/language/nnbd/top_merge/top_merge_members_direct_error_test.dart index 7b6257aa1a6..8f10be507c2 100644 --- a/tests/language/nnbd/top_merge/top_merge_members_direct_error_test.dart +++ b/tests/language/nnbd/top_merge/top_merge_members_direct_error_test.dart @@ -32,7 +32,7 @@ class D0 extends A implements B { takesObject(x); // Check that member does not return Object // ^ // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE - // [cfe] The argument type 'Object?' can't be assigned to the parameter type 'Object' because 'Object?' is nullable and 'Object' isn't. + // [cfe] The argument type 'Object?' can't be assigned to the parameter type 'Object'. } } @@ -48,7 +48,7 @@ class D1 extends A implements B { takesObject(x); // Check that member does not return Object // ^ // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE - // [cfe] The argument type 'Object?' can't be assigned to the parameter type 'Object' because 'Object?' is nullable and 'Object' isn't. + // [cfe] The argument type 'Object?' can't be assigned to the parameter type 'Object'. } } @@ -64,7 +64,7 @@ class D2 extends A implements B { takesObject(x); // Check that member does not return Object // ^ // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE - // [cfe] The argument type 'Object?' can't be assigned to the parameter type 'Object' because 'Object?' is nullable and 'Object' isn't. + // [cfe] The argument type 'Object?' can't be assigned to the parameter type 'Object'. } } @@ -80,7 +80,7 @@ class D3 extends A implements B { takesObject(x); // Check that member does not return Object // ^ // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE - // [cfe] The argument type 'Object?' can't be assigned to the parameter type 'Object' because 'Object?' is nullable and 'Object' isn't. + // [cfe] The argument type 'Object?' can't be assigned to the parameter type 'Object'. } } @@ -96,7 +96,7 @@ class D4 extends A implements B { takesObject(x); // Check that member does not return Object // ^ // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE - // [cfe] The argument type 'Object?' can't be assigned to the parameter type 'Object' because 'Object?' is nullable and 'Object' isn't. + // [cfe] The argument type 'Object?' can't be assigned to the parameter type 'Object'. } } @@ -112,7 +112,7 @@ class D5 extends A implements B { takesObject(x); // Check that member does not return Object // ^ // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE - // [cfe] The argument type 'Object?' can't be assigned to the parameter type 'Object' because 'Object?' is nullable and 'Object' isn't. + // [cfe] The argument type 'Object?' can't be assigned to the parameter type 'Object'. } } @@ -160,7 +160,7 @@ class ND0 extends A> implements B { takesObject(x); // Check that member does not return Object // ^ // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE - // [cfe] The argument type 'Object?' can't be assigned to the parameter type 'Object' because 'Object?' is nullable and 'Object' isn't. + // [cfe] The argument type 'Object?' can't be assigned to the parameter type 'Object'. } } @@ -176,7 +176,7 @@ class ND1 extends A> implements B { takesObject(x); // Check that member does not return Object // ^ // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE - // [cfe] The argument type 'Object?' can't be assigned to the parameter type 'Object' because 'Object?' is nullable and 'Object' isn't. + // [cfe] The argument type 'Object?' can't be assigned to the parameter type 'Object'. } } @@ -192,7 +192,7 @@ class ND2 extends A> implements B { takesObject(x); // Check that member does not return Object // ^ // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE - // [cfe] The argument type 'Object?' can't be assigned to the parameter type 'Object' because 'Object?' is nullable and 'Object' isn't. + // [cfe] The argument type 'Object?' can't be assigned to the parameter type 'Object'. } } @@ -208,7 +208,7 @@ class ND3 extends A> implements B { takesObject(x); // Check that member does not return Object // ^ // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE - // [cfe] The argument type 'Object?' can't be assigned to the parameter type 'Object' because 'Object?' is nullable and 'Object' isn't. + // [cfe] The argument type 'Object?' can't be assigned to the parameter type 'Object'. } } @@ -224,7 +224,7 @@ class ND4 extends A> implements B { takesObject(x); // Check that member does not return Object // ^ // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE - // [cfe] The argument type 'Object?' can't be assigned to the parameter type 'Object' because 'Object?' is nullable and 'Object' isn't. + // [cfe] The argument type 'Object?' can't be assigned to the parameter type 'Object'. } } @@ -240,7 +240,7 @@ class ND5 extends A> implements B { takesObject(x); // Check that member does not return Object // ^ // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE - // [cfe] The argument type 'Object?' can't be assigned to the parameter type 'Object' because 'Object?' is nullable and 'Object' isn't. + // [cfe] The argument type 'Object?' can't be assigned to the parameter type 'Object'. } } @@ -289,7 +289,7 @@ class DND0 extends A Function()> takesObject(x); // Check that member does not return Object Function() // ^ // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE - // [cfe] The argument type 'Object?' can't be assigned to the parameter type 'Object' because 'Object?' is nullable and 'Object' isn't. + // [cfe] The argument type 'Object?' can't be assigned to the parameter type 'Object'. } } @@ -306,7 +306,7 @@ class DND1 extends A Function()> takesObject(x); // Check that member does not return Object Function() // ^ // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE - // [cfe] The argument type 'Object?' can't be assigned to the parameter type 'Object' because 'Object?' is nullable and 'Object' isn't. + // [cfe] The argument type 'Object?' can't be assigned to the parameter type 'Object'. } } @@ -323,7 +323,7 @@ class DND2 extends A Function()> takesObject(x); // Check that member does not return Object Function() // ^ // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE - // [cfe] The argument type 'Object?' can't be assigned to the parameter type 'Object' because 'Object?' is nullable and 'Object' isn't. + // [cfe] The argument type 'Object?' can't be assigned to the parameter type 'Object'. } } @@ -340,7 +340,7 @@ class DND3 extends A Function()> takesObject(x); // Check that member does not return Object Function() // ^ // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE - // [cfe] The argument type 'Object?' can't be assigned to the parameter type 'Object' because 'Object?' is nullable and 'Object' isn't. + // [cfe] The argument type 'Object?' can't be assigned to the parameter type 'Object'. } } @@ -357,7 +357,7 @@ class DND4 extends A Function()> takesObject(x); // Check that member does not return Object Function() // ^ // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE - // [cfe] The argument type 'Object?' can't be assigned to the parameter type 'Object' because 'Object?' is nullable and 'Object' isn't. + // [cfe] The argument type 'Object?' can't be assigned to the parameter type 'Object'. } } @@ -374,7 +374,7 @@ class DND5 extends A Function()> takesObject(x); // Check that member does not return Object Function() // ^ // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE - // [cfe] The argument type 'Object?' can't be assigned to the parameter type 'Object' because 'Object?' is nullable and 'Object' isn't. + // [cfe] The argument type 'Object?' can't be assigned to the parameter type 'Object'. } } @@ -425,7 +425,7 @@ class WND0 extends A>> implements B> { takesObject(x); // Check that member does not return Object Function() // ^ // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE - // [cfe] The argument type 'Object?' can't be assigned to the parameter type 'Object' because 'Object?' is nullable and 'Object' isn't. + // [cfe] The argument type 'Object?' can't be assigned to the parameter type 'Object'. } } @@ -441,7 +441,7 @@ class WND1 extends A>> implements B> { takesObject(x); // Check that member does not return Object Function() // ^ // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE - // [cfe] The argument type 'Object?' can't be assigned to the parameter type 'Object' because 'Object?' is nullable and 'Object' isn't. + // [cfe] The argument type 'Object?' can't be assigned to the parameter type 'Object'. } } @@ -457,7 +457,7 @@ class WND2 extends A>> implements B> { takesObject(x); // Check that member does not return Object Function() // ^ // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE - // [cfe] The argument type 'Object?' can't be assigned to the parameter type 'Object' because 'Object?' is nullable and 'Object' isn't. + // [cfe] The argument type 'Object?' can't be assigned to the parameter type 'Object'. } } @@ -473,7 +473,7 @@ class WND3 extends A>> implements B> { takesObject(x); // Check that member does not return Object Function() // ^ // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE - // [cfe] The argument type 'Object?' can't be assigned to the parameter type 'Object' because 'Object?' is nullable and 'Object' isn't. + // [cfe] The argument type 'Object?' can't be assigned to the parameter type 'Object'. } } @@ -489,7 +489,7 @@ class WND4 extends A>> implements B> { takesObject(x); // Check that member does not return Object Function() // ^ // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE - // [cfe] The argument type 'Object?' can't be assigned to the parameter type 'Object' because 'Object?' is nullable and 'Object' isn't. + // [cfe] The argument type 'Object?' can't be assigned to the parameter type 'Object'. } } @@ -505,7 +505,7 @@ class WND5 extends A>> implements B> { takesObject(x); // Check that member does not return Object Function() // ^ // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE - // [cfe] The argument type 'Object?' can't be assigned to the parameter type 'Object' because 'Object?' is nullable and 'Object' isn't. + // [cfe] The argument type 'Object?' can't be assigned to the parameter type 'Object'. } } diff --git a/tests/language/nnbd/top_merge/top_merge_members_mixin_error_test.dart b/tests/language/nnbd/top_merge/top_merge_members_mixin_error_test.dart index 71a66d989d6..c2b72fbf996 100644 --- a/tests/language/nnbd/top_merge/top_merge_members_mixin_error_test.dart +++ b/tests/language/nnbd/top_merge/top_merge_members_mixin_error_test.dart @@ -34,7 +34,7 @@ class D0 extends A with M { takesObject(x); // Check that member does not return `Object` // ^ // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE - // [cfe] The argument type 'Object?' can't be assigned to the parameter type 'Object' because 'Object?' is nullable and 'Object' isn't. + // [cfe] The argument type 'Object?' can't be assigned to the parameter type 'Object'. } } @@ -58,7 +58,7 @@ class D2 extends A with M { takesObject(x); // Check that member does not return `Object` // ^ // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE - // [cfe] The argument type 'Object?' can't be assigned to the parameter type 'Object' because 'Object?' is nullable and 'Object' isn't. + // [cfe] The argument type 'Object?' can't be assigned to the parameter type 'Object'. } } @@ -159,7 +159,7 @@ class ND0 extends A> with M { takesObject(x); // Check that member does not return `Object` // ^ // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE - // [cfe] The argument type 'Object?' can't be assigned to the parameter type 'Object' because 'Object?' is nullable and 'Object' isn't. + // [cfe] The argument type 'Object?' can't be assigned to the parameter type 'Object'. } } @@ -183,7 +183,7 @@ class ND2 extends A> with M { takesObject(x); // Check that member does not return `Object` // ^ // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE - // [cfe] The argument type 'Object?' can't be assigned to the parameter type 'Object' because 'Object?' is nullable and 'Object' isn't. + // [cfe] The argument type 'Object?' can't be assigned to the parameter type 'Object'. } } @@ -283,7 +283,7 @@ class DND0 extends A Function()> with M { takesObject(x); // Check that member does not return `Object Function()` // ^ // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE - // [cfe] The argument type 'Object?' can't be assigned to the parameter type 'Object' because 'Object?' is nullable and 'Object' isn't. + // [cfe] The argument type 'Object?' can't be assigned to the parameter type 'Object'. } } @@ -307,7 +307,7 @@ class DND2 extends A Function()> with M { takesObject(x); // Check that member does not return `Object Function()` // ^ // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE - // [cfe] The argument type 'Object?' can't be assigned to the parameter type 'Object' because 'Object?' is nullable and 'Object' isn't. + // [cfe] The argument type 'Object?' can't be assigned to the parameter type 'Object'. } } @@ -414,7 +414,7 @@ class WND0 extends A>> with M> { takesObject(x); // Check that member does not return `Object Function()` // ^ // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE - // [cfe] The argument type 'FutureOr?' can't be assigned to the parameter type 'Object' because 'Object?' is nullable and 'Object' isn't. + // [cfe] The argument type 'FutureOr?' can't be assigned to the parameter type 'Object'. } } @@ -430,7 +430,7 @@ class WND1 extends A>> with M> { takesObject(x); // Check that member does not return `Object Function()` // ^ // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE - // [cfe] The argument type 'FutureOr?' can't be assigned to the parameter type 'Object' because 'dynamic' is nullable and 'Object' isn't. + // [cfe] The argument type 'FutureOr?' can't be assigned to the parameter type 'Object'. } } @@ -446,7 +446,7 @@ class WND2 extends A>> with M> { takesObject(x); // Check that member does not return `Object Function()` // ^ // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE - // [cfe] The argument type 'FutureOr?' can't be assigned to the parameter type 'Object' because 'Object?' is nullable and 'Object' isn't. + // [cfe] The argument type 'FutureOr?' can't be assigned to the parameter type 'Object'. } } @@ -462,7 +462,7 @@ class WND3 extends A>> with M> { takesObject(x); // Check that member does not return `Object Function()` // ^ // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE - // [cfe] The argument type 'FutureOr?' can't be assigned to the parameter type 'Object' because 'void' is nullable and 'Object' isn't. + // [cfe] The argument type 'FutureOr?' can't be assigned to the parameter type 'Object'. } } @@ -478,7 +478,7 @@ class WND4 extends A>> with M> { takesObject(x); // Check that member does not return `Object Function()` // ^ // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE - // [cfe] The argument type 'FutureOr?' can't be assigned to the parameter type 'Object' because 'dynamic' is nullable and 'Object' isn't. + // [cfe] The argument type 'FutureOr?' can't be assigned to the parameter type 'Object'. } } @@ -494,7 +494,7 @@ class WND5 extends A>> with M> { takesObject(x); // Check that member does not return `Object Function()` // ^ // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE - // [cfe] The argument type 'FutureOr?' can't be assigned to the parameter type 'Object' because 'void' is nullable and 'Object' isn't. + // [cfe] The argument type 'FutureOr?' can't be assigned to the parameter type 'Object'. } } @@ -510,7 +510,7 @@ class WND6 extends A>> with M> { takesObject(x); // Check that member does not return `Object Function()` // ^ // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE - // [cfe] The argument type 'FutureOr?' can't be assigned to the parameter type 'Object' because 'void' is nullable and 'Object' isn't. + // [cfe] The argument type 'FutureOr?' can't be assigned to the parameter type 'Object'. } } @@ -526,6 +526,6 @@ class WND7 extends A>> with M> { takesObject(x); // Check that member does not return `Object Function()` // ^ // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE - // [cfe] The argument type 'FutureOr?' can't be assigned to the parameter type 'Object' because 'dynamic' is nullable and 'Object' isn't. + // [cfe] The argument type 'FutureOr?' can't be assigned to the parameter type 'Object'. } } diff --git a/tests/language/nnbd/top_merge/top_merge_members_override_error_test.dart b/tests/language/nnbd/top_merge/top_merge_members_override_error_test.dart index 27f1a986f0c..d26170dab0f 100644 --- a/tests/language/nnbd/top_merge/top_merge_members_override_error_test.dart +++ b/tests/language/nnbd/top_merge/top_merge_members_override_error_test.dart @@ -32,7 +32,7 @@ class D0 extends A { takesObject(x); // Check that member does not return `Object` // ^ // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE - // [cfe] The argument type 'Object?' can't be assigned to the parameter type 'Object' because 'Object?' is nullable and 'Object' isn't. + // [cfe] The argument type 'Object?' can't be assigned to the parameter type 'Object'. } } @@ -64,7 +64,7 @@ class D2 extends A { takesObject(x); // Check that member does not return `Object` // ^ // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE - // [cfe] The argument type 'Object?' can't be assigned to the parameter type 'Object' because 'Object?' is nullable and 'Object' isn't. + // [cfe] The argument type 'Object?' can't be assigned to the parameter type 'Object'. } } @@ -189,7 +189,7 @@ class ND0 extends A> { takesObject(x); // Check that member does not return `Object` // ^ // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE - // [cfe] The argument type 'Object?' can't be assigned to the parameter type 'Object' because 'Object?' is nullable and 'Object' isn't. + // [cfe] The argument type 'Object?' can't be assigned to the parameter type 'Object'. } } @@ -221,7 +221,7 @@ class ND2 extends A> { takesObject(x); // Check that member does not return `Object` // ^ // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE - // [cfe] The argument type 'Object?' can't be assigned to the parameter type 'Object' because 'Object?' is nullable and 'Object' isn't. + // [cfe] The argument type 'Object?' can't be assigned to the parameter type 'Object'. } } @@ -345,7 +345,7 @@ class DND0 extends A Function()> { takesObject(x); // Check that member does not return `Object Function()` // ^ // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE - // [cfe] The argument type 'Object?' can't be assigned to the parameter type 'Object' because 'Object?' is nullable and 'Object' isn't. + // [cfe] The argument type 'Object?' can't be assigned to the parameter type 'Object'. } } @@ -377,7 +377,7 @@ class DND2 extends A Function()> { takesObject(x); // Check that member does not return `Object Function()` // ^ // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE - // [cfe] The argument type 'Object?' can't be assigned to the parameter type 'Object' because 'Object?' is nullable and 'Object' isn't. + // [cfe] The argument type 'Object?' can't be assigned to the parameter type 'Object'. } } @@ -508,7 +508,7 @@ class WND0 extends A>> { takesObject(x); // Check that member does not return `Object Function()` // ^ // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE - // [cfe] The argument type 'FutureOr>?' can't be assigned to the parameter type 'Object' because 'Object?' is nullable and 'Object' isn't. + // [cfe] The argument type 'FutureOr>?' can't be assigned to the parameter type 'Object'. } } @@ -528,7 +528,7 @@ class WND1 extends A>> { takesObject(x); // Check that member does not return `Object Function()` // ^ // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE - // [cfe] The argument type 'FutureOr?' can't be assigned to the parameter type 'Object' because 'dynamic' is nullable and 'Object' isn't. + // [cfe] The argument type 'FutureOr?' can't be assigned to the parameter type 'Object'. } } @@ -548,7 +548,7 @@ class WND2 extends A>> { takesObject(x); // Check that member does not return `Object Function()` // ^ // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE - // [cfe] The argument type 'FutureOr?' can't be assigned to the parameter type 'Object' because 'Object?' is nullable and 'Object' isn't. + // [cfe] The argument type 'FutureOr?' can't be assigned to the parameter type 'Object'. } } @@ -568,7 +568,7 @@ class WND3 extends A>> { takesObject(x); // Check that member does not return `Object Function()` // ^ // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE - // [cfe] The argument type 'FutureOr?' can't be assigned to the parameter type 'Object' because 'void' is nullable and 'Object' isn't. + // [cfe] The argument type 'FutureOr?' can't be assigned to the parameter type 'Object'. } } @@ -588,7 +588,7 @@ class WND4 extends A>> { takesObject(x); // Check that member does not return `Object Function()` // ^ // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE - // [cfe] The argument type 'FutureOr?' can't be assigned to the parameter type 'Object' because 'dynamic' is nullable and 'Object' isn't. + // [cfe] The argument type 'FutureOr?' can't be assigned to the parameter type 'Object'. } } @@ -608,7 +608,7 @@ class WND5 extends A>> { takesObject(x); // Check that member does not return `Object Function()` // ^ // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE - // [cfe] The argument type 'FutureOr?' can't be assigned to the parameter type 'Object' because 'void' is nullable and 'Object' isn't. + // [cfe] The argument type 'FutureOr?' can't be assigned to the parameter type 'Object'. } } @@ -628,7 +628,7 @@ class WND6 extends A>> { takesObject(x); // Check that member does not return `Object Function()` // ^ // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE - // [cfe] The argument type 'FutureOr?' can't be assigned to the parameter type 'Object' because 'void' is nullable and 'Object' isn't. + // [cfe] The argument type 'FutureOr?' can't be assigned to the parameter type 'Object'. } } @@ -648,6 +648,6 @@ class WND7 extends A>> { takesObject(x); // Check that member does not return `Object Function()` // ^ // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE - // [cfe] The argument type 'FutureOr?' can't be assigned to the parameter type 'Object' because 'dynamic' is nullable and 'Object' isn't. + // [cfe] The argument type 'FutureOr?' can't be assigned to the parameter type 'Object'. } } diff --git a/tests/language/null_aware_elements/type_inference_simple_error_test.dart b/tests/language/null_aware_elements/type_inference_simple_error_test.dart index b414c2c1c05..4508247b46f 100644 --- a/tests/language/null_aware_elements/type_inference_simple_error_test.dart +++ b/tests/language/null_aware_elements/type_inference_simple_error_test.dart @@ -146,12 +146,12 @@ main() { // [analyzer] STATIC_WARNING.INVALID_NULL_AWARE_OPERATOR // ^^^ // [analyzer] COMPILE_TIME_ERROR.EXPRESSION_IN_MAP + // [cfe] A value of type 'Null' can't be assigned to a variable of type 'String'. // [cfe] Expected ':' after this. - // [cfe] The value 'null' can't be assigned to a variable of type 'String' because 'String' is not nullable. {0: "", ?stringQuestion()}; // ^^^^^^^^^^^^^^^^^ // [analyzer] COMPILE_TIME_ERROR.EXPRESSION_IN_MAP + // [cfe] A value of type 'Null' can't be assigned to a variable of type 'String'. // [cfe] Expected ':' after this. - // [cfe] The value 'null' can't be assigned to a variable of type 'String' because 'String' is not nullable. } diff --git a/tests/language/patterns/flow_analysis/pattern_assignment_lookahead_error_test.dart b/tests/language/patterns/flow_analysis/pattern_assignment_lookahead_error_test.dart index e522458c051..8345164ef4f 100644 --- a/tests/language/patterns/flow_analysis/pattern_assignment_lookahead_error_test.dart +++ b/tests/language/patterns/flow_analysis/pattern_assignment_lookahead_error_test.dart @@ -18,7 +18,7 @@ int f(int? i) { // [cfe] A value of type 'num' can't be assigned to a variable of type 'int'. // ^ // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE - // [cfe] A value of type 'int?' can't be assigned to a variable of type 'num' because 'int?' is nullable and 'num' isn't. + // [cfe] A value of type 'int?' can't be assigned to a variable of type 'num'. // Now assign a nullable value to `i`. (i,) = (null,); diff --git a/tests/language/patterns/for_in_nullable_error_test.dart b/tests/language/patterns/for_in_nullable_error_test.dart index 24d358ae756..336352b6749 100644 --- a/tests/language/patterns/for_in_nullable_error_test.dart +++ b/tests/language/patterns/for_in_nullable_error_test.dart @@ -9,14 +9,13 @@ void statement_sync_nullable(Iterable? x) { for (var (y) in x) {} // ^ // [analyzer] COMPILE_TIME_ERROR.UNCHECKED_USE_OF_NULLABLE_VALUE - // [cfe] The type 'Iterable?' used in the 'for' loop must implement 'Iterable' because 'Iterable?' is nullable and 'Iterable' isn't. + // [cfe] The type 'Iterable?' used in the 'for' loop must implement 'Iterable'. } void statement_sync_potentiallyNullable?>(T x) { for (var (y) in x) {} // ^ // [analyzer] COMPILE_TIME_ERROR.UNCHECKED_USE_OF_NULLABLE_VALUE - // [cfe] The type 'T' used in the 'for' loop must implement 'Iterable' because 'Iterable?' is nullable and 'Iterable' isn't. // [cfe] The type 'T' used in the 'for' loop must implement 'Iterable'. } @@ -24,7 +23,7 @@ Future statement_async_nullable(Stream? x) async { await for (var (y) in x) {} // ^ // [analyzer] COMPILE_TIME_ERROR.UNCHECKED_USE_OF_NULLABLE_VALUE - // [cfe] The type 'Stream?' used in the 'for' loop must implement 'Stream' because 'Stream?' is nullable and 'Stream' isn't. + // [cfe] The type 'Stream?' used in the 'for' loop must implement 'Stream'. } Future statement_async_potentiallyNullable?>( @@ -34,26 +33,25 @@ Future statement_async_potentiallyNullable?>( // ^ // [analyzer] COMPILE_TIME_ERROR.UNCHECKED_USE_OF_NULLABLE_VALUE // [cfe] The type 'T' used in the 'for' loop must implement 'Iterable'. - // [cfe] The type 'T' used in the 'for' loop must implement 'Stream' because 'Stream?' is nullable and 'Stream' isn't. + // [cfe] The type 'T' used in the 'for' loop must implement 'Stream'. } List listElement_sync_nullable(Iterable? x) => [for (var (y) in x) y]; // ^ // [analyzer] COMPILE_TIME_ERROR.UNCHECKED_USE_OF_NULLABLE_VALUE -// [cfe] The type 'Iterable?' used in the 'for' loop must implement 'Iterable' because 'Iterable?' is nullable and 'Iterable' isn't. +// [cfe] The type 'Iterable?' used in the 'for' loop must implement 'Iterable'. List listElement_sync_potentiallyNullable?>(T x) => [for (var (y) in x) y]; // ^ // [analyzer] COMPILE_TIME_ERROR.UNCHECKED_USE_OF_NULLABLE_VALUE -// [cfe] The type 'T' used in the 'for' loop must implement 'Iterable' because 'Iterable?' is nullable and 'Iterable' isn't. // [cfe] The type 'T' used in the 'for' loop must implement 'Iterable'. Future> listElement_async_nullable(Stream? x) async => [ await for (var (y) in x) y, // ^ // [analyzer] COMPILE_TIME_ERROR.UNCHECKED_USE_OF_NULLABLE_VALUE - // [cfe] The type 'Stream?' used in the 'for' loop must implement 'Stream' because 'Stream?' is nullable and 'Stream' isn't. + // [cfe] The type 'Stream?' used in the 'for' loop must implement 'Stream'. ]; Future> listElement_async_potentiallyNullable?>( @@ -62,18 +60,17 @@ Future> listElement_async_potentiallyNullable?>( // ^ // [analyzer] COMPILE_TIME_ERROR.UNCHECKED_USE_OF_NULLABLE_VALUE // [cfe] The type 'T' used in the 'for' loop must implement 'Iterable'. -// [cfe] The type 'T' used in the 'for' loop must implement 'Stream' because 'Stream?' is nullable and 'Stream' isn't. +// [cfe] The type 'T' used in the 'for' loop must implement 'Stream'. Set setElement_sync_nullable(Iterable? x) => {for (var (y) in x) y}; // ^ // [analyzer] COMPILE_TIME_ERROR.UNCHECKED_USE_OF_NULLABLE_VALUE -// [cfe] The type 'Iterable?' used in the 'for' loop must implement 'Iterable' because 'Iterable?' is nullable and 'Iterable' isn't. +// [cfe] The type 'Iterable?' used in the 'for' loop must implement 'Iterable'. Set setElement_sync_potentiallyNullable?>(T x) => { for (var (y) in x) y, // ^ // [analyzer] COMPILE_TIME_ERROR.UNCHECKED_USE_OF_NULLABLE_VALUE - // [cfe] The type 'T' used in the 'for' loop must implement 'Iterable' because 'Iterable?' is nullable and 'Iterable' isn't. // [cfe] The type 'T' used in the 'for' loop must implement 'Iterable'. }; @@ -81,7 +78,7 @@ Future> setElement_async_nullable(Stream? x) async => { await for (var (y) in x) y, // ^ // [analyzer] COMPILE_TIME_ERROR.UNCHECKED_USE_OF_NULLABLE_VALUE - // [cfe] The type 'Stream?' used in the 'for' loop must implement 'Stream' because 'Stream?' is nullable and 'Stream' isn't. + // [cfe] The type 'Stream?' used in the 'for' loop must implement 'Stream'. }; Future> setElement_async_potentiallyNullable?>( @@ -90,13 +87,13 @@ Future> setElement_async_potentiallyNullable?>( // ^ // [analyzer] COMPILE_TIME_ERROR.UNCHECKED_USE_OF_NULLABLE_VALUE // [cfe] The type 'T' used in the 'for' loop must implement 'Iterable'. -// [cfe] The type 'T' used in the 'for' loop must implement 'Stream' because 'Stream?' is nullable and 'Stream' isn't. +// [cfe] The type 'T' used in the 'for' loop must implement 'Stream'. Map mapElement_sync_nullable(Iterable? x) => { for (var (y) in x) y: y, // ^ // [analyzer] COMPILE_TIME_ERROR.UNCHECKED_USE_OF_NULLABLE_VALUE - // [cfe] The type 'Iterable?' used in the 'for' loop must implement 'Iterable' because 'Iterable?' is nullable and 'Iterable' isn't. + // [cfe] The type 'Iterable?' used in the 'for' loop must implement 'Iterable'. }; Map mapElement_sync_potentiallyNullable?>( @@ -104,14 +101,13 @@ Map mapElement_sync_potentiallyNullable?>( ) => {for (var (y) in x) y: y}; // ^ // [analyzer] COMPILE_TIME_ERROR.UNCHECKED_USE_OF_NULLABLE_VALUE -// [cfe] The type 'T' used in the 'for' loop must implement 'Iterable' because 'Iterable?' is nullable and 'Iterable' isn't. // [cfe] The type 'T' used in the 'for' loop must implement 'Iterable'. Future> mapElement_async_nullable(Stream? x) async => { await for (var (y) in x) y: y, // ^ // [analyzer] COMPILE_TIME_ERROR.UNCHECKED_USE_OF_NULLABLE_VALUE - // [cfe] The type 'Stream?' used in the 'for' loop must implement 'Stream' because 'Stream?' is nullable and 'Stream' isn't. + // [cfe] The type 'Stream?' used in the 'for' loop must implement 'Stream'. }; Future> mapElement_async_potentiallyNullable< @@ -120,6 +116,6 @@ Future> mapElement_async_potentiallyNullable< // ^ // [analyzer] COMPILE_TIME_ERROR.UNCHECKED_USE_OF_NULLABLE_VALUE // [cfe] The type 'T' used in the 'for' loop must implement 'Iterable'. -// [cfe] The type 'T' used in the 'for' loop must implement 'Stream' because 'Stream?' is nullable and 'Stream' isn't. +// [cfe] The type 'T' used in the 'for' loop must implement 'Stream'. main() {} diff --git a/tests/language/string/multiline_newline_test.dart b/tests/language/string/multiline_newline_test.dart index 91df275e492..36a9cee17e4 100644 --- a/tests/language/string/multiline_newline_test.dart +++ b/tests/language/string/multiline_newline_test.dart @@ -78,37 +78,37 @@ main() { const c4 = c1 ? 1 : 2; // ^^ // [analyzer] COMPILE_TIME_ERROR.UNCHECKED_USE_OF_NULLABLE_VALUE - // [cfe] A value of type 'bool?' can't be assigned to a variable of type 'bool' because 'bool?' is nullable and 'bool' isn't. + // [cfe] A value of type 'bool?' can't be assigned to a variable of type 'bool'. Expect.equals(1, c4); const c5 = c2 ? 2 : 3; // ^^ // [analyzer] COMPILE_TIME_ERROR.UNCHECKED_USE_OF_NULLABLE_VALUE - // [cfe] A value of type 'bool?' can't be assigned to a variable of type 'bool' because 'bool?' is nullable and 'bool' isn't. + // [cfe] A value of type 'bool?' can't be assigned to a variable of type 'bool'. Expect.equals(2, c5); const c6 = c3 ? 3 : 4; // ^^ // [analyzer] COMPILE_TIME_ERROR.UNCHECKED_USE_OF_NULLABLE_VALUE - // [cfe] A value of type 'bool?' can't be assigned to a variable of type 'bool' because 'bool?' is nullable and 'bool' isn't. + // [cfe] A value of type 'bool?' can't be assigned to a variable of type 'bool'. Expect.equals(3, c6); const c4r = c1r ? 1 : 2; // ^^^ // [analyzer] COMPILE_TIME_ERROR.UNCHECKED_USE_OF_NULLABLE_VALUE - // [cfe] A value of type 'bool?' can't be assigned to a variable of type 'bool' because 'bool?' is nullable and 'bool' isn't. + // [cfe] A value of type 'bool?' can't be assigned to a variable of type 'bool'. Expect.equals(1, c4r); const c5r = c2r ? 2 : 3; // ^^^ // [analyzer] COMPILE_TIME_ERROR.UNCHECKED_USE_OF_NULLABLE_VALUE - // [cfe] A value of type 'bool?' can't be assigned to a variable of type 'bool' because 'bool?' is nullable and 'bool' isn't. + // [cfe] A value of type 'bool?' can't be assigned to a variable of type 'bool'. Expect.equals(2, c5r); const c6r = c3r ? 3 : 4; // ^^^ // [analyzer] COMPILE_TIME_ERROR.UNCHECKED_USE_OF_NULLABLE_VALUE - // [cfe] A value of type 'bool?' can't be assigned to a variable of type 'bool' because 'bool?' is nullable and 'bool' isn't. + // [cfe] A value of type 'bool?' can't be assigned to a variable of type 'bool'. Expect.equals(3, c6r); const c7 = cr.constantMultilineString != crlf.constantMultilineString @@ -149,31 +149,31 @@ main() { // ^^ // [analyzer] COMPILE_TIME_ERROR.CONST_EVAL_TYPE_BOOL // [analyzer] COMPILE_TIME_ERROR.UNCHECKED_USE_OF_NULLABLE_VALUE - // [cfe] A value of type 'bool?' can't be assigned to a variable of type 'bool' because 'bool?' is nullable and 'bool' isn't. + // [cfe] A value of type 'bool?' can't be assigned to a variable of type 'bool'. const c11 = c8 ? 2 : 3; // ^^ // [analyzer] COMPILE_TIME_ERROR.CONST_EVAL_TYPE_BOOL // [analyzer] COMPILE_TIME_ERROR.UNCHECKED_USE_OF_NULLABLE_VALUE - // [cfe] A value of type 'bool?' can't be assigned to a variable of type 'bool' because 'bool?' is nullable and 'bool' isn't. + // [cfe] A value of type 'bool?' can't be assigned to a variable of type 'bool'. const c12 = c9 ? 3 : 4; // ^^ // [analyzer] COMPILE_TIME_ERROR.CONST_EVAL_TYPE_BOOL // [analyzer] COMPILE_TIME_ERROR.UNCHECKED_USE_OF_NULLABLE_VALUE - // [cfe] A value of type 'bool?' can't be assigned to a variable of type 'bool' because 'bool?' is nullable and 'bool' isn't. + // [cfe] A value of type 'bool?' can't be assigned to a variable of type 'bool'. const c10r = c7r ? 1 : 2; // ^^^ // [analyzer] COMPILE_TIME_ERROR.CONST_EVAL_TYPE_BOOL // [analyzer] COMPILE_TIME_ERROR.UNCHECKED_USE_OF_NULLABLE_VALUE - // [cfe] A value of type 'bool?' can't be assigned to a variable of type 'bool' because 'bool?' is nullable and 'bool' isn't. + // [cfe] A value of type 'bool?' can't be assigned to a variable of type 'bool'. const c11r = c8r ? 2 : 3; // ^^^ // [analyzer] COMPILE_TIME_ERROR.CONST_EVAL_TYPE_BOOL // [analyzer] COMPILE_TIME_ERROR.UNCHECKED_USE_OF_NULLABLE_VALUE - // [cfe] A value of type 'bool?' can't be assigned to a variable of type 'bool' because 'bool?' is nullable and 'bool' isn't. + // [cfe] A value of type 'bool?' can't be assigned to a variable of type 'bool'. const c12r = c9r ? 3 : 4; // ^^^ // [analyzer] COMPILE_TIME_ERROR.CONST_EVAL_TYPE_BOOL // [analyzer] COMPILE_TIME_ERROR.UNCHECKED_USE_OF_NULLABLE_VALUE - // [cfe] A value of type 'bool?' can't be assigned to a variable of type 'bool' because 'bool?' is nullable and 'bool' isn't. + // [cfe] A value of type 'bool?' can't be assigned to a variable of type 'bool'. } diff --git a/tests/language/why_not_promoted/argument_type_not_assignable_nullability_error_test.dart b/tests/language/why_not_promoted/argument_type_not_assignable_nullability_error_test.dart index 1119f19a0ad..8cf0ab5e9f5 100644 --- a/tests/language/why_not_promoted/argument_type_not_assignable_nullability_error_test.dart +++ b/tests/language/why_not_promoted/argument_type_not_assignable_nullability_error_test.dart @@ -8,9 +8,6 @@ class C1 { int? bad; - // ^^^ - // [context 1] 'bad' refers to a public property so it couldn't be promoted. See http://dart.dev/go/non-promo-public-field - // [context 50] 'bad' refers to a public property so it couldn't be promoted. f(int i) {} } @@ -18,16 +15,13 @@ required_unnamed(C1 c) { if (c.bad == null) return; c.f(c.bad); // ^^^^^ - // [analyzer 1] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE + // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE // ^ - // [cfe 50] The argument type 'int?' can't be assigned to the parameter type 'int' because 'int?' is nullable and 'int' isn't. + // [cfe] The argument type 'int?' can't be assigned to the parameter type 'int'. } class C2 { int? bad; - // ^^^ - // [context 2] 'bad' refers to a public property so it couldn't be promoted. See http://dart.dev/go/non-promo-public-field - // [context 51] 'bad' refers to a public property so it couldn't be promoted. f([int i = 0]) {} } @@ -35,16 +29,13 @@ optional_unnamed(C2 c) { if (c.bad == null) return; c.f(c.bad); // ^^^^^ - // [analyzer 2] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE + // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE // ^ - // [cfe 51] The argument type 'int?' can't be assigned to the parameter type 'int' because 'int?' is nullable and 'int' isn't. + // [cfe] The argument type 'int?' can't be assigned to the parameter type 'int'. } class C3 { int? bad; - // ^^^ - // [context 3] 'bad' refers to a public property so it couldn't be promoted. See http://dart.dev/go/non-promo-public-field - // [context 52] 'bad' refers to a public property so it couldn't be promoted. f({required int i}) {} } @@ -52,16 +43,13 @@ required_named(C3 c) { if (c.bad == null) return; c.f(i: c.bad); // ^^^^^ - // [analyzer 3] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE + // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE // ^ - // [cfe 52] The argument type 'int?' can't be assigned to the parameter type 'int' because 'int?' is nullable and 'int' isn't. + // [cfe] The argument type 'int?' can't be assigned to the parameter type 'int'. } class C4 { int? bad; - // ^^^ - // [context 4] 'bad' refers to a public property so it couldn't be promoted. See http://dart.dev/go/non-promo-public-field - // [context 53] 'bad' refers to a public property so it couldn't be promoted. f({int i = 0}) {} } @@ -69,16 +57,13 @@ optional_named(C4 c) { if (c.bad == null) return; c.f(i: c.bad); // ^^^^^ - // [analyzer 4] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE + // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE // ^ - // [cfe 53] The argument type 'int?' can't be assigned to the parameter type 'int' because 'int?' is nullable and 'int' isn't. + // [cfe] The argument type 'int?' can't be assigned to the parameter type 'int'. } class C5 { List? bad; - // ^^^ - // [context 5] 'bad' refers to a public property so it couldn't be promoted. See http://dart.dev/go/non-promo-public-field - // [context 54] 'bad' refers to a public property so it couldn't be promoted. f(List x) {} } @@ -86,16 +71,13 @@ type_inferred(C5 c) { if (c.bad == null) return; c.f(c.bad); // ^^^^^ - // [analyzer 5] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE + // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE // ^ - // [cfe 54] The argument type 'List?' can't be assigned to the parameter type 'List' because 'List?' is nullable and 'List' isn't. + // [cfe] The argument type 'List?' can't be assigned to the parameter type 'List'. } class C6 { int? bad; - // ^^^ - // [context 6] 'bad' refers to a public property so it couldn't be promoted. See http://dart.dev/go/non-promo-public-field - // [context 55] 'bad' refers to a public property so it couldn't be promoted. C6(int i); } @@ -103,16 +85,13 @@ C6? constructor_with_implicit_new(C6 c) { if (c.bad == null) return null; return C6(c.bad); // ^^^^^ - // [analyzer 6] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE + // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE // ^ - // [cfe 55] The argument type 'int?' can't be assigned to the parameter type 'int' because 'int?' is nullable and 'int' isn't. + // [cfe] The argument type 'int?' can't be assigned to the parameter type 'int'. } class C7 { int? bad; - // ^^^ - // [context 7] 'bad' refers to a public property so it couldn't be promoted. See http://dart.dev/go/non-promo-public-field - // [context 56] 'bad' refers to a public property so it couldn't be promoted. C7(int i); } @@ -120,25 +99,22 @@ C7? constructor_with_explicit_new(C7 c) { if (c.bad == null) return null; return new C7(c.bad); // ^^^^^ - // [analyzer 7] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE + // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE // ^ - // [cfe 56] The argument type 'int?' can't be assigned to the parameter type 'int' because 'int?' is nullable and 'int' isn't. + // [cfe] The argument type 'int?' can't be assigned to the parameter type 'int'. } class C8 { int? bad; - // ^^^ - // [context 8] 'bad' refers to a public property so it couldn't be promoted. See http://dart.dev/go/non-promo-public-field - // [context 57] 'bad' refers to a public property so it couldn't be promoted. } userDefinableBinaryOpRhs(C8 c) { if (c.bad == null) return; 1 + c.bad; // ^^^^^ - // [analyzer 8] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE + // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE // ^ - // [cfe 57] A value of type 'int?' can't be assigned to a variable of type 'num' because 'int?' is nullable and 'num' isn't. + // [cfe] A value of type 'int?' can't be assigned to a variable of type 'num'. } class C9 { @@ -158,7 +134,7 @@ questionQuestionRhs(C9 c, int? i) { // ^^^^^^^^^^ // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE // ^ - // [cfe] The argument type 'int?' can't be assigned to the parameter type 'int' because 'int?' is nullable and 'int' isn't. + // [cfe] The argument type 'int?' can't be assigned to the parameter type 'int'. } class C10 { @@ -179,11 +155,6 @@ equalRhs(C10 c, D10 d) { class C11 { bool? bad; - // ^^^ - // [context 9] 'bad' refers to a public property so it couldn't be promoted. See http://dart.dev/go/non-promo-public-field - // [context 10] 'bad' refers to a public property so it couldn't be promoted. See http://dart.dev/go/non-promo-public-field - // [context 58] 'bad' refers to a public property so it couldn't be promoted. - // [context 59] 'bad' refers to a public property so it couldn't be promoted. f(bool b) {} } @@ -191,23 +162,18 @@ andOperand(C11 c, bool b) { if (c.bad == null) return; c.f(c.bad && b); // ^^^^^ - // [analyzer 9] COMPILE_TIME_ERROR.UNCHECKED_USE_OF_NULLABLE_VALUE + // [analyzer] COMPILE_TIME_ERROR.UNCHECKED_USE_OF_NULLABLE_VALUE // ^ - // [cfe 58] A value of type 'bool?' can't be assigned to a variable of type 'bool' because 'bool?' is nullable and 'bool' isn't. + // [cfe] A value of type 'bool?' can't be assigned to a variable of type 'bool'. c.f(b && c.bad); // ^^^^^ - // [analyzer 10] COMPILE_TIME_ERROR.UNCHECKED_USE_OF_NULLABLE_VALUE + // [analyzer] COMPILE_TIME_ERROR.UNCHECKED_USE_OF_NULLABLE_VALUE // ^ - // [cfe 59] A value of type 'bool?' can't be assigned to a variable of type 'bool' because 'bool?' is nullable and 'bool' isn't. + // [cfe] A value of type 'bool?' can't be assigned to a variable of type 'bool'. } class C12 { bool? bad; - // ^^^ - // [context 11] 'bad' refers to a public property so it couldn't be promoted. See http://dart.dev/go/non-promo-public-field - // [context 12] 'bad' refers to a public property so it couldn't be promoted. See http://dart.dev/go/non-promo-public-field - // [context 60] 'bad' refers to a public property so it couldn't be promoted. - // [context 61] 'bad' refers to a public property so it couldn't be promoted. f(bool b) {} } @@ -215,49 +181,40 @@ orOperand(C12 c, bool b) { if (c.bad == null) return; c.f(c.bad || b); // ^^^^^ - // [analyzer 11] COMPILE_TIME_ERROR.UNCHECKED_USE_OF_NULLABLE_VALUE + // [analyzer] COMPILE_TIME_ERROR.UNCHECKED_USE_OF_NULLABLE_VALUE // ^ - // [cfe 60] A value of type 'bool?' can't be assigned to a variable of type 'bool' because 'bool?' is nullable and 'bool' isn't. + // [cfe] A value of type 'bool?' can't be assigned to a variable of type 'bool'. c.f(b || c.bad); // ^^^^^ - // [analyzer 12] COMPILE_TIME_ERROR.UNCHECKED_USE_OF_NULLABLE_VALUE + // [analyzer] COMPILE_TIME_ERROR.UNCHECKED_USE_OF_NULLABLE_VALUE // ^ - // [cfe 61] A value of type 'bool?' can't be assigned to a variable of type 'bool' because 'bool?' is nullable and 'bool' isn't. + // [cfe] A value of type 'bool?' can't be assigned to a variable of type 'bool'. } class C13 { bool? bad; - // ^^^ - // [context 13] 'bad' refers to a public property so it couldn't be promoted. See http://dart.dev/go/non-promo-public-field - // [context 62] 'bad' refers to a public property so it couldn't be promoted. } assertStatementCondition(C13 c) { if (c.bad == null) return; assert(c.bad); // ^^^^^ - // [analyzer 13] COMPILE_TIME_ERROR.UNCHECKED_USE_OF_NULLABLE_VALUE + // [analyzer] COMPILE_TIME_ERROR.UNCHECKED_USE_OF_NULLABLE_VALUE // ^ - // [cfe 62] A value of type 'bool?' can't be assigned to a variable of type 'bool' because 'bool?' is nullable and 'bool' isn't. + // [cfe] A value of type 'bool?' can't be assigned to a variable of type 'bool'. } class C14 { bool? bad; - // ^^^ - // [context 14] 'bad' refers to a public property so it couldn't be promoted. See http://dart.dev/go/non-promo-public-field - // [context 63] 'bad' refers to a public property so it couldn't be promoted. C14.assertInitializerCondition(C14 c) : bad = c.bad!, assert(c.bad); // ^^^^^ - // [analyzer 14] COMPILE_TIME_ERROR.UNCHECKED_USE_OF_NULLABLE_VALUE + // [analyzer] COMPILE_TIME_ERROR.UNCHECKED_USE_OF_NULLABLE_VALUE // ^ - // [cfe 63] A value of type 'bool?' can't be assigned to a variable of type 'bool' because 'bool?' is nullable and 'bool' isn't. + // [cfe] A value of type 'bool?' can't be assigned to a variable of type 'bool'. } class C15 { bool? bad; - // ^^^ - // [context 15] 'bad' refers to a public property so it couldn't be promoted. See http://dart.dev/go/non-promo-public-field - // [context 64] 'bad' refers to a public property so it couldn't be promoted. f(bool b) {} } @@ -265,53 +222,41 @@ notOperand(C15 c) { if (c.bad == null) return; c.f(!c.bad); // ^^^^^ - // [analyzer 15] COMPILE_TIME_ERROR.UNCHECKED_USE_OF_NULLABLE_VALUE + // [analyzer] COMPILE_TIME_ERROR.UNCHECKED_USE_OF_NULLABLE_VALUE // ^ - // [cfe 64] A value of type 'bool?' can't be assigned to a variable of type 'bool' because 'bool?' is nullable and 'bool' isn't. + // [cfe] A value of type 'bool?' can't be assigned to a variable of type 'bool'. } class C16 { bool? bad; - // ^^^ - // [context 16] 'bad' refers to a public property so it couldn't be promoted. See http://dart.dev/go/non-promo-public-field - // [context 17] 'bad' refers to a public property so it couldn't be promoted. See http://dart.dev/go/non-promo-public-field - // [context 18] 'bad' refers to a public property so it couldn't be promoted. See http://dart.dev/go/non-promo-public-field - // [context 19] 'bad' refers to a public property so it couldn't be promoted. See http://dart.dev/go/non-promo-public-field - // [context 65] 'bad' refers to a public property so it couldn't be promoted. - // [context 66] 'bad' refers to a public property so it couldn't be promoted. - // [context 67] 'bad' refers to a public property so it couldn't be promoted. - // [context 68] 'bad' refers to a public property so it couldn't be promoted. } forLoopCondition(C16 c) { if (c.bad == null) return; for (; c.bad;) {} // ^^^^^ - // [analyzer 16] COMPILE_TIME_ERROR.UNCHECKED_USE_OF_NULLABLE_VALUE + // [analyzer] COMPILE_TIME_ERROR.UNCHECKED_USE_OF_NULLABLE_VALUE // ^ - // [cfe 65] A value of type 'bool?' can't be assigned to a variable of type 'bool' because 'bool?' is nullable and 'bool' isn't. + // [cfe] A value of type 'bool?' can't be assigned to a variable of type 'bool'. [for (; c.bad;) null]; // ^^^^^ - // [analyzer 17] COMPILE_TIME_ERROR.UNCHECKED_USE_OF_NULLABLE_VALUE + // [analyzer] COMPILE_TIME_ERROR.UNCHECKED_USE_OF_NULLABLE_VALUE // ^ - // [cfe 66] A value of type 'bool?' can't be assigned to a variable of type 'bool' because 'bool?' is nullable and 'bool' isn't. + // [cfe] A value of type 'bool?' can't be assigned to a variable of type 'bool'. ({for (; c.bad;) null}); // ^^^^^ - // [analyzer 18] COMPILE_TIME_ERROR.UNCHECKED_USE_OF_NULLABLE_VALUE + // [analyzer] COMPILE_TIME_ERROR.UNCHECKED_USE_OF_NULLABLE_VALUE // ^ - // [cfe 67] A value of type 'bool?' can't be assigned to a variable of type 'bool' because 'bool?' is nullable and 'bool' isn't. + // [cfe] A value of type 'bool?' can't be assigned to a variable of type 'bool'. ({for (; c.bad;) null: null}); // ^^^^^ - // [analyzer 19] COMPILE_TIME_ERROR.UNCHECKED_USE_OF_NULLABLE_VALUE + // [analyzer] COMPILE_TIME_ERROR.UNCHECKED_USE_OF_NULLABLE_VALUE // ^ - // [cfe 68] A value of type 'bool?' can't be assigned to a variable of type 'bool' because 'bool?' is nullable and 'bool' isn't. + // [cfe] A value of type 'bool?' can't be assigned to a variable of type 'bool'. } class C17 { bool? bad; - // ^^^ - // [context 20] 'bad' refers to a public property so it couldn't be promoted. See http://dart.dev/go/non-promo-public-field - // [context 69] 'bad' refers to a public property so it couldn't be promoted. f(int i) {} } @@ -319,205 +264,160 @@ conditionalExpressionCondition(C17 c) { if (c.bad == null) return; c.f(c.bad ? 1 : 2); // ^^^^^ - // [analyzer 20] COMPILE_TIME_ERROR.UNCHECKED_USE_OF_NULLABLE_VALUE + // [analyzer] COMPILE_TIME_ERROR.UNCHECKED_USE_OF_NULLABLE_VALUE // ^ - // [cfe 69] A value of type 'bool?' can't be assigned to a variable of type 'bool' because 'bool?' is nullable and 'bool' isn't. + // [cfe] A value of type 'bool?' can't be assigned to a variable of type 'bool'. } class C18 { bool? bad; - // ^^^ - // [context 21] 'bad' refers to a public property so it couldn't be promoted. See http://dart.dev/go/non-promo-public-field - // [context 70] 'bad' refers to a public property so it couldn't be promoted. } doLoopCondition(C18 c) { if (c.bad == null) return; do {} while (c.bad); // ^^^^^ - // [analyzer 21] COMPILE_TIME_ERROR.UNCHECKED_USE_OF_NULLABLE_VALUE + // [analyzer] COMPILE_TIME_ERROR.UNCHECKED_USE_OF_NULLABLE_VALUE // ^ - // [cfe 70] A value of type 'bool?' can't be assigned to a variable of type 'bool' because 'bool?' is nullable and 'bool' isn't. + // [cfe] A value of type 'bool?' can't be assigned to a variable of type 'bool'. } class C19 { bool? bad; - // ^^^ - // [context 22] 'bad' refers to a public property so it couldn't be promoted. See http://dart.dev/go/non-promo-public-field - // [context 23] 'bad' refers to a public property so it couldn't be promoted. See http://dart.dev/go/non-promo-public-field - // [context 24] 'bad' refers to a public property so it couldn't be promoted. See http://dart.dev/go/non-promo-public-field - // [context 25] 'bad' refers to a public property so it couldn't be promoted. See http://dart.dev/go/non-promo-public-field - // [context 71] 'bad' refers to a public property so it couldn't be promoted. - // [context 72] 'bad' refers to a public property so it couldn't be promoted. - // [context 73] 'bad' refers to a public property so it couldn't be promoted. - // [context 74] 'bad' refers to a public property so it couldn't be promoted. } ifCondition(C19 c) { if (c.bad == null) return; if (c.bad) {} // ^^^^^ - // [analyzer 22] COMPILE_TIME_ERROR.UNCHECKED_USE_OF_NULLABLE_VALUE + // [analyzer] COMPILE_TIME_ERROR.UNCHECKED_USE_OF_NULLABLE_VALUE // ^ - // [cfe 71] A value of type 'bool?' can't be assigned to a variable of type 'bool' because 'bool?' is nullable and 'bool' isn't. + // [cfe] A value of type 'bool?' can't be assigned to a variable of type 'bool'. [if (c.bad) null]; // ^^^^^ - // [analyzer 23] COMPILE_TIME_ERROR.UNCHECKED_USE_OF_NULLABLE_VALUE + // [analyzer] COMPILE_TIME_ERROR.UNCHECKED_USE_OF_NULLABLE_VALUE // ^ - // [cfe 72] A value of type 'bool?' can't be assigned to a variable of type 'bool' because 'bool?' is nullable and 'bool' isn't. + // [cfe] A value of type 'bool?' can't be assigned to a variable of type 'bool'. ({if (c.bad) null}); // ^^^^^ - // [analyzer 24] COMPILE_TIME_ERROR.UNCHECKED_USE_OF_NULLABLE_VALUE + // [analyzer] COMPILE_TIME_ERROR.UNCHECKED_USE_OF_NULLABLE_VALUE // ^ - // [cfe 73] A value of type 'bool?' can't be assigned to a variable of type 'bool' because 'bool?' is nullable and 'bool' isn't. + // [cfe] A value of type 'bool?' can't be assigned to a variable of type 'bool'. ({if (c.bad) null: null}); // ^^^^^ - // [analyzer 25] COMPILE_TIME_ERROR.UNCHECKED_USE_OF_NULLABLE_VALUE + // [analyzer] COMPILE_TIME_ERROR.UNCHECKED_USE_OF_NULLABLE_VALUE // ^ - // [cfe 74] A value of type 'bool?' can't be assigned to a variable of type 'bool' because 'bool?' is nullable and 'bool' isn't. + // [cfe] A value of type 'bool?' can't be assigned to a variable of type 'bool'. } class C20 { bool? bad; - // ^^^ - // [context 26] 'bad' refers to a public property so it couldn't be promoted. See http://dart.dev/go/non-promo-public-field - // [context 75] 'bad' refers to a public property so it couldn't be promoted. } whileCondition(C20 c) { if (c.bad == null) return; while (c.bad) {} // ^^^^^ - // [analyzer 26] COMPILE_TIME_ERROR.UNCHECKED_USE_OF_NULLABLE_VALUE + // [analyzer] COMPILE_TIME_ERROR.UNCHECKED_USE_OF_NULLABLE_VALUE // ^ - // [cfe 75] A value of type 'bool?' can't be assigned to a variable of type 'bool' because 'bool?' is nullable and 'bool' isn't. + // [cfe] A value of type 'bool?' can't be assigned to a variable of type 'bool'. } class C21 { int? bad; - // ^^^ - // [context 27] 'bad' refers to a public property so it couldn't be promoted. See http://dart.dev/go/non-promo-public-field - // [context 76] 'bad' refers to a public property so it couldn't be promoted. } assignmentRhs(C21 c, int i) { if (c.bad == null) return; i = c.bad; // ^^^^^ - // [analyzer 27] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT + // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT // ^ - // [cfe 76] A value of type 'int?' can't be assigned to a variable of type 'int' because 'int?' is nullable and 'int' isn't. + // [cfe] A value of type 'int?' can't be assigned to a variable of type 'int'. } class C22 { int? bad; - // ^^^ - // [context 28] 'bad' refers to a public property so it couldn't be promoted. See http://dart.dev/go/non-promo-public-field - // [context 77] 'bad' refers to a public property so it couldn't be promoted. } variableInitializer(C22 c) { if (c.bad == null) return; int i = c.bad; // ^^^^^ - // [analyzer 28] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT + // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT // ^ - // [cfe 77] A value of type 'int?' can't be assigned to a variable of type 'int' because 'int?' is nullable and 'int' isn't. + // [cfe] A value of type 'int?' can't be assigned to a variable of type 'int'. } class C23 { int? bad; - // ^^^ - // [context 29] 'bad' refers to a public property so it couldn't be promoted. See http://dart.dev/go/non-promo-public-field - // [context 78] 'bad' refers to a public property so it couldn't be promoted. final int x; final int y; C23.constructorInitializer(C23 c) : x = c.bad!, y = c.bad; // ^^^^^ - // [analyzer 29] COMPILE_TIME_ERROR.FIELD_INITIALIZER_NOT_ASSIGNABLE + // [analyzer] COMPILE_TIME_ERROR.FIELD_INITIALIZER_NOT_ASSIGNABLE // ^ - // [cfe 78] A value of type 'int?' can't be assigned to a variable of type 'int' because 'int?' is nullable and 'int' isn't. + // [cfe] A value of type 'int?' can't be assigned to a variable of type 'int'. } class C24 { int? bad; - // ^^^ - // [context 30] 'bad' refers to a public property so it couldn't be promoted. See http://dart.dev/go/non-promo-public-field - // [context 31] 'bad' refers to a public property so it couldn't be promoted. See http://dart.dev/go/non-promo-public-field - // [context 32] 'bad' refers to a public property so it couldn't be promoted. See http://dart.dev/go/non-promo-public-field - // [context 33] 'bad' refers to a public property so it couldn't be promoted. See http://dart.dev/go/non-promo-public-field - // [context 79] 'bad' refers to a public property so it couldn't be promoted. - // [context 80] 'bad' refers to a public property so it couldn't be promoted. - // [context 81] 'bad' refers to a public property so it couldn't be promoted. - // [context 82] 'bad' refers to a public property so it couldn't be promoted. } forVariableInitializer(C24 c) { if (c.bad == null) return; for (int i = c.bad; false;) {} // ^^^^^ - // [analyzer 30] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT + // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT // ^ - // [cfe 79] A value of type 'int?' can't be assigned to a variable of type 'int' because 'int?' is nullable and 'int' isn't. + // [cfe] A value of type 'int?' can't be assigned to a variable of type 'int'. [for (int i = c.bad; false;) null]; // ^^^^^ - // [analyzer 31] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT + // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT // ^ - // [cfe 80] A value of type 'int?' can't be assigned to a variable of type 'int' because 'int?' is nullable and 'int' isn't. + // [cfe] A value of type 'int?' can't be assigned to a variable of type 'int'. ({for (int i = c.bad; false;) null}); // ^^^^^ - // [analyzer 32] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT + // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT // ^ - // [cfe 81] A value of type 'int?' can't be assigned to a variable of type 'int' because 'int?' is nullable and 'int' isn't. + // [cfe] A value of type 'int?' can't be assigned to a variable of type 'int'. ({for (int i = c.bad; false;) null: null}); // ^^^^^ - // [analyzer 33] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT + // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT // ^ - // [cfe 82] A value of type 'int?' can't be assigned to a variable of type 'int' because 'int?' is nullable and 'int' isn't. + // [cfe] A value of type 'int?' can't be assigned to a variable of type 'int'. } class C25 { int? bad; - // ^^^ - // [context 34] 'bad' refers to a public property so it couldn't be promoted. See http://dart.dev/go/non-promo-public-field - // [context 35] 'bad' refers to a public property so it couldn't be promoted. See http://dart.dev/go/non-promo-public-field - // [context 36] 'bad' refers to a public property so it couldn't be promoted. See http://dart.dev/go/non-promo-public-field - // [context 37] 'bad' refers to a public property so it couldn't be promoted. See http://dart.dev/go/non-promo-public-field - // [context 83] 'bad' refers to a public property so it couldn't be promoted. - // [context 84] 'bad' refers to a public property so it couldn't be promoted. - // [context 85] 'bad' refers to a public property so it couldn't be promoted. - // [context 86] 'bad' refers to a public property so it couldn't be promoted. } forAssignmentInitializer(C25 c, int i) { if (c.bad == null) return; for (i = c.bad; false;) {} // ^^^^^ - // [analyzer 34] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT + // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT // ^ - // [cfe 83] A value of type 'int?' can't be assigned to a variable of type 'int' because 'int?' is nullable and 'int' isn't. + // [cfe] A value of type 'int?' can't be assigned to a variable of type 'int'. [for (i = c.bad; false;) null]; // ^^^^^ - // [analyzer 35] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT + // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT // ^ - // [cfe 84] A value of type 'int?' can't be assigned to a variable of type 'int' because 'int?' is nullable and 'int' isn't. + // [cfe] A value of type 'int?' can't be assigned to a variable of type 'int'. ({for (i = c.bad; false;) null}); // ^^^^^ - // [analyzer 36] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT + // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT // ^ - // [cfe 85] A value of type 'int?' can't be assigned to a variable of type 'int' because 'int?' is nullable and 'int' isn't. + // [cfe] A value of type 'int?' can't be assigned to a variable of type 'int'. ({for (i = c.bad; false;) null: null}); // ^^^^^ - // [analyzer 37] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT + // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT // ^ - // [cfe 86] A value of type 'int?' can't be assigned to a variable of type 'int' because 'int?' is nullable and 'int' isn't. + // [cfe] A value of type 'int?' can't be assigned to a variable of type 'int'. } class C26 { int? bad; - // ^^^ - // [context 38] 'bad' refers to a public property so it couldn't be promoted. See http://dart.dev/go/non-promo-public-field - // [context 87] 'bad' refers to a public property so it couldn't be promoted. } compoundAssignmentRhs(C26 c) { @@ -525,119 +425,97 @@ compoundAssignmentRhs(C26 c) { if (c.bad == null) return; n += c.bad; // ^^^^^ - // [analyzer 38] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE + // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE // ^ - // [cfe 87] A value of type 'int?' can't be assigned to a variable of type 'num' because 'int?' is nullable and 'num' isn't. + // [cfe] A value of type 'int?' can't be assigned to a variable of type 'num'. } class C27 { int? bad; - // ^^^ - // [context 39] 'bad' refers to a public property so it couldn't be promoted. See http://dart.dev/go/non-promo-public-field - // [context 88] 'bad' refers to a public property so it couldn't be promoted. } indexGet(C27 c, List values) { if (c.bad == null) return; values[c.bad]; // ^^^^^ - // [analyzer 39] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE + // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE // ^ - // [cfe 88] A value of type 'int?' can't be assigned to a variable of type 'int' because 'int?' is nullable and 'int' isn't. + // [cfe] A value of type 'int?' can't be assigned to a variable of type 'int'. } class C28 { int? bad; - // ^^^ - // [context 40] 'bad' refers to a public property so it couldn't be promoted. See http://dart.dev/go/non-promo-public-field - // [context 89] 'bad' refers to a public property so it couldn't be promoted. } indexSet(C28 c, List values) { if (c.bad == null) return; values[c.bad] = 0; // ^^^^^ - // [analyzer 40] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE + // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE // ^ - // [cfe 89] A value of type 'int?' can't be assigned to a variable of type 'int' because 'int?' is nullable and 'int' isn't. + // [cfe] A value of type 'int?' can't be assigned to a variable of type 'int'. } class C29 { int? bad; - // ^^^ - // [context 41] 'bad' refers to a public property so it couldn't be promoted. See http://dart.dev/go/non-promo-public-field - // [context 90] 'bad' refers to a public property so it couldn't be promoted. } indexSetCompound(C29 c, List values) { if (c.bad == null) return; values[c.bad] += 1; // ^^^^^ - // [analyzer 41] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE + // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE // ^ - // [cfe 90] A value of type 'int?' can't be assigned to a variable of type 'int' because 'int?' is nullable and 'int' isn't. + // [cfe] A value of type 'int?' can't be assigned to a variable of type 'int'. } class C30 { int? bad; - // ^^^ - // [context 42] 'bad' refers to a public property so it couldn't be promoted. See http://dart.dev/go/non-promo-public-field - // [context 91] 'bad' refers to a public property so it couldn't be promoted. } indexSetIfNull(C30 c, List values) { if (c.bad == null) return; values[c.bad] ??= 1; // ^^^^^ - // [analyzer 42] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE + // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE // ^ - // [cfe 91] A value of type 'int?' can't be assigned to a variable of type 'int' because 'int?' is nullable and 'int' isn't. + // [cfe] A value of type 'int?' can't be assigned to a variable of type 'int'. } class C31 { int? bad; - // ^^^ - // [context 43] 'bad' refers to a public property so it couldn't be promoted. See http://dart.dev/go/non-promo-public-field - // [context 44] 'bad' refers to a public property so it couldn't be promoted. See http://dart.dev/go/non-promo-public-field - // [context 92] 'bad' refers to a public property so it couldn't be promoted. - // [context 93] 'bad' refers to a public property so it couldn't be promoted. } indexSetPreIncDec(C31 c, List values) { if (c.bad == null) return; ++values[c.bad]; // ^^^^^ - // [analyzer 43] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE + // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE // ^ - // [cfe 92] A value of type 'int?' can't be assigned to a variable of type 'int' because 'int?' is nullable and 'int' isn't. + // [cfe] A value of type 'int?' can't be assigned to a variable of type 'int'. --values[c.bad]; // ^^^^^ - // [analyzer 44] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE + // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE // ^ - // [cfe 93] A value of type 'int?' can't be assigned to a variable of type 'int' because 'int?' is nullable and 'int' isn't. + // [cfe] A value of type 'int?' can't be assigned to a variable of type 'int'. } class C32 { int? bad; - // ^^^ - // [context 45] 'bad' refers to a public property so it couldn't be promoted. See http://dart.dev/go/non-promo-public-field - // [context 46] 'bad' refers to a public property so it couldn't be promoted. See http://dart.dev/go/non-promo-public-field - // [context 94] 'bad' refers to a public property so it couldn't be promoted. - // [context 95] 'bad' refers to a public property so it couldn't be promoted. } indexSetPostIncDec(C32 c, List values) { if (c.bad == null) return; values[c.bad]++; // ^^^^^ - // [analyzer 45] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE + // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE // ^ - // [cfe 94] A value of type 'int?' can't be assigned to a variable of type 'int' because 'int?' is nullable and 'int' isn't. + // [cfe] A value of type 'int?' can't be assigned to a variable of type 'int'. values[c.bad]--; // ^^^^^ - // [analyzer 46] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE + // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE // ^ - // [cfe 95] A value of type 'int?' can't be assigned to a variable of type 'int' because 'int?' is nullable and 'int' isn't. + // [cfe] A value of type 'int?' can't be assigned to a variable of type 'int'. } extension E33 on int { @@ -646,25 +524,19 @@ extension E33 on int { class C33 { int? bad; - // ^^^ - // [context 47] 'bad' refers to a public property so it couldn't be promoted. See http://dart.dev/go/non-promo-public-field - // [context 96] 'bad' refers to a public property so it couldn't be promoted. } explicitExtensionInvocation(C33 c) { if (c.bad == null) return; E33(c.bad).f(); // ^^^^^ - // [analyzer 47] COMPILE_TIME_ERROR.EXTENSION_OVERRIDE_ARGUMENT_NOT_ASSIGNABLE + // [analyzer] COMPILE_TIME_ERROR.EXTENSION_OVERRIDE_ARGUMENT_NOT_ASSIGNABLE // ^ - // [cfe 96] The argument type 'int?' can't be assigned to the parameter type 'int' because 'int?' is nullable and 'int' isn't. + // [cfe] The argument type 'int?' can't be assigned to the parameter type 'int'. } class C34 { int? bad; - // ^^^ - // [context 48] 'bad' refers to a public property so it couldn't be promoted. See http://dart.dev/go/non-promo-public-field - // [context 97] 'bad' refers to a public property so it couldn't be promoted. C34(int value); } @@ -672,23 +544,20 @@ class D34 extends C34 { int other; D34(C34 c) : other = c.bad!, super(c.bad); // ^^^^^ - // [analyzer 48] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE + // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE // ^ - // [cfe 97] The argument type 'int?' can't be assigned to the parameter type 'int' because 'int?' is nullable and 'int' isn't. + // [cfe] The argument type 'int?' can't be assigned to the parameter type 'int'. } class C35 { int? bad; - // ^^^ - // [context 49] 'bad' refers to a public property so it couldn't be promoted. See http://dart.dev/go/non-promo-public-field - // [context 98] 'bad' refers to a public property so it couldn't be promoted. } indexSetRhs(C35 c, List x) { if (c.bad == null) return; x[0] = c.bad; // ^^^^^ - // [analyzer 49] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT + // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT // ^ - // [cfe 98] A value of type 'int?' can't be assigned to a variable of type 'int' because 'int?' is nullable and 'int' isn't. + // [cfe] A value of type 'int?' can't be assigned to a variable of type 'int'. } diff --git a/tests/language/why_not_promoted/for_in_loop_type_not_iterable_nullability_error_test.dart b/tests/language/why_not_promoted/for_in_loop_type_not_iterable_nullability_error_test.dart index 5d024ade838..98e8080de67 100644 --- a/tests/language/why_not_promoted/for_in_loop_type_not_iterable_nullability_error_test.dart +++ b/tests/language/why_not_promoted/for_in_loop_type_not_iterable_nullability_error_test.dart @@ -9,93 +9,76 @@ class C1 { List? bad; - // ^^^ - // [context 1] 'bad' refers to a public property so it couldn't be promoted. See http://dart.dev/go/non-promo-public-field - // [context 2] 'bad' refers to a public property so it couldn't be promoted. See http://dart.dev/go/non-promo-public-field - // [context 3] 'bad' refers to a public property so it couldn't be promoted. See http://dart.dev/go/non-promo-public-field - // [context 4] 'bad' refers to a public property so it couldn't be promoted. See http://dart.dev/go/non-promo-public-field - // [context 5] 'bad' refers to a public property so it couldn't be promoted. See http://dart.dev/go/non-promo-public-field - // [context 6] 'bad' refers to a public property so it couldn't be promoted. See http://dart.dev/go/non-promo-public-field - // [context 7] 'bad' refers to a public property so it couldn't be promoted. See http://dart.dev/go/non-promo-public-field - // [context 8] 'bad' refers to a public property so it couldn't be promoted. See http://dart.dev/go/non-promo-public-field - // [context 9] 'bad' refers to a public property so it couldn't be promoted. - // [context 10] 'bad' refers to a public property so it couldn't be promoted. - // [context 11] 'bad' refers to a public property so it couldn't be promoted. - // [context 12] 'bad' refers to a public property so it couldn't be promoted. - // [context 13] 'bad' refers to a public property so it couldn't be promoted. - // [context 14] 'bad' refers to a public property so it couldn't be promoted. - // [context 15] 'bad' refers to a public property so it couldn't be promoted. - // [context 16] 'bad' refers to a public property so it couldn't be promoted. } forStatement(C1 c) { if (c.bad == null) return; for (var x in c.bad) {} // ^^^^^ - // [analyzer 1] COMPILE_TIME_ERROR.UNCHECKED_USE_OF_NULLABLE_VALUE + // [analyzer] COMPILE_TIME_ERROR.UNCHECKED_USE_OF_NULLABLE_VALUE // ^ - // [cfe 9] The type 'List?' used in the 'for' loop must implement 'Iterable' because 'List?' is nullable and 'Iterable' isn't. + // [cfe] The type 'List?' used in the 'for' loop must implement 'Iterable'. } forElementInList(C1 c) { if (c.bad == null) return; [for (var x in c.bad) null]; // ^^^^^ - // [analyzer 2] COMPILE_TIME_ERROR.UNCHECKED_USE_OF_NULLABLE_VALUE + // [analyzer] COMPILE_TIME_ERROR.UNCHECKED_USE_OF_NULLABLE_VALUE // ^ - // [cfe 10] The type 'List?' used in the 'for' loop must implement 'Iterable' because 'List?' is nullable and 'Iterable' isn't. + // [cfe] The type 'List?' used in the 'for' loop must implement 'Iterable'. } forElementInSet(C1 c) { if (c.bad == null) return; {for (var x in c.bad) null}; // ^^^^^ - // [analyzer 3] COMPILE_TIME_ERROR.UNCHECKED_USE_OF_NULLABLE_VALUE + // [analyzer] COMPILE_TIME_ERROR.UNCHECKED_USE_OF_NULLABLE_VALUE // ^ - // [cfe 11] The type 'List?' used in the 'for' loop must implement 'Iterable' because 'List?' is nullable and 'Iterable' isn't. + // [cfe] The type 'List?' used in the 'for' loop must implement 'Iterable'. } forElementInMap(C1 c) { if (c.bad == null) return; {for (var x in c.bad) null: null}; // ^^^^^ - // [analyzer 4] COMPILE_TIME_ERROR.UNCHECKED_USE_OF_NULLABLE_VALUE + // [analyzer] COMPILE_TIME_ERROR.UNCHECKED_USE_OF_NULLABLE_VALUE // ^ - // [cfe 12] The type 'List?' used in the 'for' loop must implement 'Iterable' because 'List?' is nullable and 'Iterable' isn't. + // [cfe] The type 'List?' used in the 'for' loop must implement 'Iterable'. } forElementInAmbiguousSet_resolvableDuringParsing(C1 c) { if (c.bad == null) return; ({for (var x in c.bad) null}); // ^^^^^ - // [analyzer 5] COMPILE_TIME_ERROR.UNCHECKED_USE_OF_NULLABLE_VALUE + // [analyzer] COMPILE_TIME_ERROR.UNCHECKED_USE_OF_NULLABLE_VALUE // ^ - // [cfe 13] The type 'List?' used in the 'for' loop must implement 'Iterable' because 'List?' is nullable and 'Iterable' isn't. + // [cfe] The type 'List?' used in the 'for' loop must implement 'Iterable'. } forElementInAmbiguousMap_resolvableDuringParsing(C1 c) { if (c.bad == null) return; ({for (var x in c.bad) null: null}); // ^^^^^ - // [analyzer 6] COMPILE_TIME_ERROR.UNCHECKED_USE_OF_NULLABLE_VALUE + // [analyzer] COMPILE_TIME_ERROR.UNCHECKED_USE_OF_NULLABLE_VALUE // ^ - // [cfe 14] The type 'List?' used in the 'for' loop must implement 'Iterable' because 'List?' is nullable and 'Iterable' isn't. + // [cfe] The type 'List?' used in the 'for' loop must implement 'Iterable'. } forElementInAmbiguousSet_notResolvableDuringParsing(C1 c, List list) { if (c.bad == null) return; ({for (var x in c.bad) ...list}); // ^^^^^ - // [analyzer 7] COMPILE_TIME_ERROR.UNCHECKED_USE_OF_NULLABLE_VALUE + // [analyzer] COMPILE_TIME_ERROR.UNCHECKED_USE_OF_NULLABLE_VALUE // ^ - // [cfe 15] The type 'List?' used in the 'for' loop must implement 'Iterable' because 'List?' is nullable and 'Iterable' isn't. + // [cfe] The type 'List?' used in the 'for' loop must implement 'Iterable'. } forElementInAmbiguousMap_notResolvableDuringParsing(C1 c, Map map) { if (c.bad == null) return; ({for (var x in c.bad) ...map}); // ^^^^^ - // [analyzer 8] COMPILE_TIME_ERROR.UNCHECKED_USE_OF_NULLABLE_VALUE + // [analyzer] COMPILE_TIME_ERROR.UNCHECKED_USE_OF_NULLABLE_VALUE // ^ - // [cfe 16] The type 'List?' used in the 'for' loop must implement 'Iterable' because 'List?' is nullable and 'Iterable' isn't. + // [cfe] The type 'List?' used in the 'for' loop must implement 'Iterable'. } diff --git a/tests/language/why_not_promoted/invalid_assignment_error_nullability_error_test.dart b/tests/language/why_not_promoted/invalid_assignment_error_nullability_error_test.dart index c9e65c4c9e3..2d21711a830 100644 --- a/tests/language/why_not_promoted/invalid_assignment_error_nullability_error_test.dart +++ b/tests/language/why_not_promoted/invalid_assignment_error_nullability_error_test.dart @@ -9,17 +9,14 @@ class C1 { List? bad; - // ^^^ - // [context 1] 'bad' refers to a public property so it couldn't be promoted. See http://dart.dev/go/non-promo-public-field - // [context 2] 'bad' refers to a public property so it couldn't be promoted. } test(C1 c) sync* { if (c.bad == null) return; yield* c.bad; // ^^^^^ - // [analyzer 1] COMPILE_TIME_ERROR.UNCHECKED_USE_OF_NULLABLE_VALUE + // [analyzer] COMPILE_TIME_ERROR.UNCHECKED_USE_OF_NULLABLE_VALUE // [analyzer] COMPILE_TIME_ERROR.YIELD_OF_INVALID_TYPE // ^ - // [cfe 2] A value of type 'List?' can't be assigned to a variable of type 'Iterable' because 'List?' is nullable and 'Iterable' isn't. + // [cfe] A value of type 'List?' can't be assigned to a variable of type 'Iterable'. }