// tree of types used for figuring out natural types in tuple literal.
returnTupleTypeSymbol.Create(
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 });
comp.VerifyDiagnostics(
// (5,13): error CS0815: Cannot assign lambda expression to an implicitly-typed variable
// var z = y => y ?? x.ToString();
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.
vararrayType=ArrayTypeSymbol.CreateCSharpArray(comp.Assembly,TypeSymbolWithAnnotations.Create(typeParamType,customModifiers));// This is legal, but we're already manually constructing types.
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:customModifiers));// This is legal, but we're already manually constructing types.