// tree of types used for figuring out natural types in tuple literal.
// tree of types used for figuring out natural types in tuple literal.
returnTupleTypeSymbol.Create(
returnTupleTypeSymbol.Create(
locationOpt:null,
locationOpt:null,
elementTypes:typesBuilder.ToImmutableAndFree().SelectAsArray(TypeMap.AsTypeSymbolWithAnnotations),// PROTOTYPE(NullableTypeReferences): Not including nullability.
// PROTOTYPE(NullableReferenceTypes): Should not report HDN_ExpressionIsProbablyNeverNull for `y`.
var comp = CreateCompilation(new[] { source, NonNullTypesTrue, NonNullTypesAttributesDefinition });
var comp = CreateCompilation(new[] { source, NonNullTypesTrue, NonNullTypesAttributesDefinition });
comp.VerifyDiagnostics(
comp.VerifyDiagnostics(
// (5,13): error CS0815: Cannot assign lambda expression to an implicitly-typed variable
// (5,13): error CS0815: Cannot assign lambda expression to an implicitly-typed variable
// var z = y => y ?? x.ToString();
// var z = y => y ?? x.ToString();
Diagnostic(ErrorCode.ERR_ImplicitlyTypedVariableAssignedBadValue, "z = y => y ?? x.ToString()").WithArguments("lambda expression").WithLocation(5, 13),
Diagnostic(ErrorCode.ERR_ImplicitlyTypedVariableAssignedBadValue, "z = y => y ?? x.ToString()").WithArguments("lambda expression").WithLocation(5, 13),
// (5,22): hidden CS8607: Expression is probably never null.
varpointerType=newPointerTypeSymbol(TypeSymbolWithAnnotations.Create(typeParamType,customModifiers));// NOTE: We're constructing this manually, since it's illegal.
varpointerType=newPointerTypeSymbol(TypeSymbolWithAnnotations.Create(typeParamType,customModifiers:customModifiers));// NOTE: We're constructing this manually, since it's illegal.
vararrayType=ArrayTypeSymbol.CreateCSharpArray(comp.Assembly,TypeSymbolWithAnnotations.Create(typeParamType,customModifiers));// This is legal, but we're already manually constructing types.
vararrayType=ArrayTypeSymbol.CreateCSharpArray(comp.Assembly,TypeSymbolWithAnnotations.Create(typeParamType,customModifiers:customModifiers));// This is legal, but we're already manually constructing types.