90 references to CreateErrorType
Microsoft.CodeAnalysis.CSharp (90)
Binder\Binder_AnonymousTypes.cs (2)
224
expressionType =
CreateErrorType
(SyntaxFacts.GetText(SyntaxKind.VoidKeyword));
244
expressionType =
CreateErrorType
("error");
Binder\Binder_Attributes.cs (2)
525
return new BoundAssignmentOperator(namedArgument, badLHS, rhs,
CreateErrorType
());
554
namedArgumentType =
CreateErrorType
(); // don't generate cascaded errors.
Binder\Binder_Await.cs (1)
41
TypeSymbol awaitExpressionType = (info.GetResult ?? info.RuntimeAsyncAwaitCall?.Method)?.ReturnType ?? (hasErrors ?
CreateErrorType
() : Compilation.DynamicType);
Binder\Binder_Conversions.cs (2)
215
type =
CreateErrorType
();
259
source = ConvertConditionalExpression((BoundUnconvertedConditionalOperator)source,
CreateErrorType
(), conversionIfTargetTyped: null, diagnostics, hasErrors);
Binder\Binder_Deconstruct.cs (1)
159
TypeSymbol returnType = hasErrors ?
CreateErrorType
() : lhsTuple.Type!;
Binder\Binder_Expressions.cs (28)
158
CreateErrorType
());
171
CreateErrorType
());
184
CreateErrorType
())
227
resultType ??
CreateErrorType
());
309
commonType =
CreateErrorType
();
322
type =
CreateErrorType
();
371
CreateErrorType
(),
409
result = BindCollectionExpressionForErrorRecovery(expr,
CreateErrorType
(), inConversion: false, diagnostics);
435
delegateType =
CreateErrorType
();
868
CreateErrorType
("ref"));
875
return new BoundTypeExpression(node, null,
CreateErrorType
("ref"));
882
return new BoundTypeExpression(node, null,
CreateErrorType
("scoped"));
954
declTypeWithAnnotations = declTypeWithAnnotations.HasType ? declTypeWithAnnotations : TypeWithAnnotations.Create(
CreateErrorType
("var"));
1055
ImmutableArray.Create<BoundExpression>(boundArgument),
CreateErrorType
("void"));
2533
return new BoundThisReference(node, thisTypeOpt ??
CreateErrorType
(), hasErrors) { WasCompilerGenerated = wasCompilerGenerated };
4151
bestType =
CreateErrorType
();
4178
bestType =
CreateErrorType
();
5274
return new BoundBadExpression(syntax, LookupResultKind.Empty, ImmutableArray<Symbol?>.Empty, ImmutableArray<BoundExpression>.Empty,
CreateErrorType
());
5607
var result = MakeBadExpressionForObjectCreation(node.Syntax,
CreateErrorType
(), arguments, node.InitializerOpt, typeSyntax: node.Syntax, diagnostics);
7858
return new BoundBadExpression(node, LookupResultKind.Ambiguous, lookupResult.Symbols.AsImmutable(), ImmutableArray.Create(boundLeft),
CreateErrorType
(rightName), hasErrors: true);
7895
return new BoundBadExpression(node, lookupResult.Kind, symbols.AsImmutable(), ImmutableArray.Create(boundLeft),
CreateErrorType
(rightName), hasErrors: true);
8080
return new BoundBadExpression(syntax, LookupResultKind.Viable, errorTypeSymbol.CandidateSymbols!, [receiver],
CreateErrorType
());
8365
return resultType ??
CreateErrorType
();
9665
return new BoundBadExpression(node, LookupResultKind.Empty, ImmutableArray<Symbol>.Empty, childBoundNodes,
CreateErrorType
(), hasErrors: true);
10617
TypeSymbol propertyType = GetCommonTypeOrReturnType(propertyGroup) ??
CreateErrorType
();
11395
return new BoundConditionalAccess(node, receiver, access,
CreateErrorType
(), hasErrors: true);
11494
return new BoundConditionalAccess(node, receiver, access,
CreateErrorType
(), hasErrors: true);
11549
receiver = new BoundConditionalReceiver(receiver.Syntax, 0, receiverType ??
CreateErrorType
(), hasErrors: receiver.HasErrors) { WasCompilerGenerated = true };
Binder\Binder_Operators.cs (20)
55
leftPlaceholder: null, leftConversion: null, finalPlaceholder: null, finalConversion: null, LookupResultKind.Empty,
CreateErrorType
(), hasErrors: true);
100
leftPlaceholder: null, leftConversion: null, finalPlaceholder: null, finalConversion: null, LookupResultKind.Empty,
CreateErrorType
(), hasErrors: true);
114
leftPlaceholder: null, leftConversion: null, finalPlaceholder: null, finalConversion: null, LookupResultKind.NotAVariable,
CreateErrorType
(), hasErrors: true);
328
leftPlaceholder: null, leftConversion: null, finalPlaceholder: null, finalConversion: null, resultKind, originalUserDefinedOperators,
CreateErrorType
(), hasErrors: true);
1114
resultSignature = new BinaryOperatorSignature(kind, leftType: null, rightType: null,
CreateErrorType
());
1147
resultSignature = new BinaryOperatorSignature(kind, leftType: null, rightType: null,
CreateErrorType
());
1544
return new BoundBinaryOperator(node, kind, left, right, ConstantValue.NotAvailable, methodOpt: null, constrainedToTypeOpt: null, lookupResult, originalUserDefinedOperators,
CreateErrorType
(), true);
1960
return
CreateErrorType
();
3161
CreateErrorType
(),
3258
CreateErrorType
(),
3930
return new BoundPointerIndirectionOperator(node, operand, refersToLocation: false, pointedAtType ??
CreateErrorType
(), hasErrors);
3983
return new BoundAddressOfOperator(node, operand,
CreateErrorType
(), hasErrors: true);
4202
type:
CreateErrorType
(),
4241
CreateErrorType
(),
5436
leftPlaceholder: null, leftConversion: null, BoundNullCoalescingOperatorResultKind.NoCommonType, @checked: CheckOverflowAtRuntime,
CreateErrorType
(), hasErrors: true);
5451
leftPlaceholder: null, leftConversion: null, BoundNullCoalescingOperatorResultKind.NoCommonType, @checked: CheckOverflowAtRuntime,
CreateErrorType
(), hasErrors: true);
5460
leftPlaceholder: null, leftConversion: null, BoundNullCoalescingOperatorResultKind.NoCommonType, @checked: CheckOverflowAtRuntime,
CreateErrorType
(), hasErrors: true);
5639
return new BoundNullCoalescingAssignmentOperator(node, leftOperand, rightOperand,
CreateErrorType
(), hasErrors: true);
5692
return new BoundNullCoalescingAssignmentOperator(node, leftOperand, rightOperand,
CreateErrorType
(), hasErrors: true);
5812
type =
CreateErrorType
();
Binder\Binder_Patterns.cs (9)
382
lengthAccess = new BoundBadExpression(node, LookupResultKind.Empty, ImmutableArray<Symbol?>.Empty, ImmutableArray<BoundExpression>.Empty,
CreateErrorType
(), hasErrors: true) { WasCompilerGenerated = true };
981
inputType =
CreateErrorType
();
1079
TypeSymbol elementType = isError ?
CreateErrorType
() : outPlaceholders[i].Type;
1184
TypeSymbol elementType = isError ?
CreateErrorType
() : elementTypesWithAnnotations[i].Type;
1340
inputType =
CreateErrorType
();
1434
TypeSymbol elementType = isError ?
CreateErrorType
() : outPlaceholders[i].Type;
1457
TypeSymbol elementType = isError ?
CreateErrorType
() : elementTypes[i].Type;
1493
memberType =
CreateErrorType
();
1545
_ =>
CreateErrorType
()
Binder\Binder_Query.cs (4)
747
yExpression = new BoundBadExpression(yExpression.Syntax, LookupResultKind.Empty, ImmutableArray<Symbol?>.Empty, ImmutableArray.Create(yExpression),
CreateErrorType
());
834
return e.Type ??
CreateErrorType
();
970
receiver = new BoundBadExpression(receiver.Syntax, LookupResultKind.NotAValue, ImmutableArray<Symbol?>.Empty, ImmutableArray.Create(receiver),
CreateErrorType
());
992
receiver = new BoundBadExpression(receiver.Syntax, LookupResultKind.NotAValue, ImmutableArray<Symbol?>.Empty, ImmutableArray.Create(receiver),
CreateErrorType
());
Binder\Binder_Statements.cs (2)
1030
declTypeOpt = TypeWithAnnotations.Create(
CreateErrorType
("var"));
1045
declTypeOpt = TypeWithAnnotations.Create(
CreateErrorType
("var"));
Binder\Binder_Symbols.cs (1)
616
return TypeWithAnnotations.Create(
CreateErrorType
());
Binder\Binder_TupleOperators.cs (1)
194
TypeSymbol dynamicType = hasError ?
CreateErrorType
() : Compilation.DynamicType;
Binder\Binder_WithExpression.cs (1)
26
receiverType =
CreateErrorType
();
Binder\ForEachLoopBinder.cs (4)
200
var valuePlaceholder = new BoundDeconstructValuePlaceholder(_syntax.Expression, variableSymbol: null, isDiscardExpression: false, inferredType.Type ??
CreateErrorType
("var"));
263
var placeholder = new BoundAwaitableValuePlaceholder(expr, builder.MoveNextInfo?.Method.ReturnType ??
CreateErrorType
());
311
declType = inferredType.HasType ? inferredType : TypeWithAnnotations.Create(
CreateErrorType
("var"));
380
iterationVariableType = inferredType.HasType ? inferredType : TypeWithAnnotations.Create(
CreateErrorType
("var"));
Binder\InMethodBinder.cs (1)
140
return !elementType.IsDefault ? elementType : TypeWithAnnotations.Create(
CreateErrorType
());
Binder\SwitchBinder.cs (2)
435
switchGoverningType =
CreateErrorType
(switchGoverningType.Name);
446
return new BoundBadExpression(node, LookupResultKind.Empty, ImmutableArray<Symbol>.Empty, ImmutableArray.Create(switchGoverningExpression), switchGoverningType ??
CreateErrorType
());
Binder\SwitchExpressionBinder.cs (1)
214
switchGoverningExpression = this.GenerateConversionForAssignment(
CreateErrorType
(), switchGoverningExpression, diagnostics);
Binder\WithLambdaParametersBinder.cs (1)
75
return TypeWithAnnotations.Create(
CreateErrorType
());
BoundTree\BoundDiscardExpression.cs (1)
25
return this.Update(NullableAnnotation.Oblivious, this.IsInferred, binder.
CreateErrorType
("var"));
BoundTree\OutDeconstructVarPendingInference.cs (1)
24
return SetInferredTypeWithAnnotations(TypeWithAnnotations.Create(binder.
CreateErrorType
()), success: false);
BoundTree\UnboundLambda.cs (1)
1243
: this.Binder.
CreateErrorType
();
Symbols\FunctionPointers\FunctionPointerMethodSymbol.cs (1)
33
returnType = TypeWithAnnotations.Create(typeBinder.
CreateErrorType
());
Symbols\Source\GlobalExpressionVariable.cs (1)
114
type = TypeWithAnnotations.Create(binder.
CreateErrorType
("var"));
Symbols\Source\SourceLocalSymbol.cs (1)
790
return TypeWithAnnotations.Create(_nodeBinder.
CreateErrorType
());
Symbols\Source\SourceMemberFieldSymbol.cs (1)
565
type = TypeWithAnnotations.Create(binder.
CreateErrorType
("var"));