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
();
375
CreateErrorType
(),
413
result = BindCollectionExpressionForErrorRecovery(expr,
CreateErrorType
(), inConversion: false, diagnostics);
439
delegateType =
CreateErrorType
();
872
CreateErrorType
("ref"));
879
return new BoundTypeExpression(node, null,
CreateErrorType
("ref"));
886
return new BoundTypeExpression(node, null,
CreateErrorType
("scoped"));
958
declTypeWithAnnotations = declTypeWithAnnotations.HasType ? declTypeWithAnnotations : TypeWithAnnotations.Create(
CreateErrorType
("var"));
1059
ImmutableArray.Create<BoundExpression>(boundArgument),
CreateErrorType
("void"));
2542
return new BoundThisReference(node, thisTypeOpt ??
CreateErrorType
(), hasErrors) { WasCompilerGenerated = wasCompilerGenerated };
4160
bestType =
CreateErrorType
();
4187
bestType =
CreateErrorType
();
5283
return new BoundBadExpression(syntax, LookupResultKind.Empty, ImmutableArray<Symbol?>.Empty, ImmutableArray<BoundExpression>.Empty,
CreateErrorType
());
5616
var result = MakeBadExpressionForObjectCreation(node.Syntax,
CreateErrorType
(), arguments, node.InitializerOpt, typeSyntax: node.Syntax, diagnostics);
7867
return new BoundBadExpression(node, LookupResultKind.Ambiguous, lookupResult.Symbols.AsImmutable(), ImmutableArray.Create(boundLeft),
CreateErrorType
(rightName), hasErrors: true);
7904
return new BoundBadExpression(node, lookupResult.Kind, symbols.AsImmutable(), ImmutableArray.Create(boundLeft),
CreateErrorType
(rightName), hasErrors: true);
8089
return new BoundBadExpression(syntax, LookupResultKind.Viable, errorTypeSymbol.CandidateSymbols!, [receiver],
CreateErrorType
());
8374
return resultType ??
CreateErrorType
();
9674
return new BoundBadExpression(node, LookupResultKind.Empty, ImmutableArray<Symbol>.Empty, childBoundNodes,
CreateErrorType
(), hasErrors: true);
10626
TypeSymbol propertyType = GetCommonTypeOrReturnType(propertyGroup) ??
CreateErrorType
();
11404
return new BoundConditionalAccess(node, receiver, access,
CreateErrorType
(), hasErrors: true);
11503
return new BoundConditionalAccess(node, receiver, access,
CreateErrorType
(), hasErrors: true);
11558
receiver = new BoundConditionalReceiver(receiver.Syntax, 0, receiverType ??
CreateErrorType
(), hasErrors: receiver.HasErrors) { WasCompilerGenerated = true };
Binder\Binder_Operators.cs (20)
62
leftPlaceholder: null, leftConversion: null, finalPlaceholder: null, finalConversion: null, LookupResultKind.Empty,
CreateErrorType
(), hasErrors: true);
107
leftPlaceholder: null, leftConversion: null, finalPlaceholder: null, finalConversion: null, LookupResultKind.Empty,
CreateErrorType
(), hasErrors: true);
121
leftPlaceholder: null, leftConversion: null, finalPlaceholder: null, finalConversion: null, LookupResultKind.NotAVariable,
CreateErrorType
(), hasErrors: true);
339
leftPlaceholder: null, leftConversion: null, finalPlaceholder: null, finalConversion: null, resultKind, originalUserDefinedOperators,
CreateErrorType
(), hasErrors: true);
1147
resultSignature = new BinaryOperatorSignature(kind, leftType: null, rightType: null,
CreateErrorType
());
1181
resultSignature = new BinaryOperatorSignature(kind, leftType: null, rightType: null,
CreateErrorType
());
1595
return new BoundBinaryOperator(node, kind, left, right, ConstantValue.NotAvailable, methodOpt: null, constrainedToTypeOpt: null, lookupResult, originalUserDefinedOperators,
CreateErrorType
(), true);
2035
return
CreateErrorType
();
3279
CreateErrorType
(),
3379
CreateErrorType
(),
4071
return new BoundPointerIndirectionOperator(node, operand, refersToLocation: false, pointedAtType ??
CreateErrorType
(), hasErrors);
4124
return new BoundAddressOfOperator(node, operand,
CreateErrorType
(), hasErrors: true);
4343
type:
CreateErrorType
(),
4386
CreateErrorType
(),
5582
leftPlaceholder: null, leftConversion: null, BoundNullCoalescingOperatorResultKind.NoCommonType, @checked: CheckOverflowAtRuntime,
CreateErrorType
(), hasErrors: true);
5597
leftPlaceholder: null, leftConversion: null, BoundNullCoalescingOperatorResultKind.NoCommonType, @checked: CheckOverflowAtRuntime,
CreateErrorType
(), hasErrors: true);
5606
leftPlaceholder: null, leftConversion: null, BoundNullCoalescingOperatorResultKind.NoCommonType, @checked: CheckOverflowAtRuntime,
CreateErrorType
(), hasErrors: true);
5785
return new BoundNullCoalescingAssignmentOperator(node, leftOperand, rightOperand,
CreateErrorType
(), hasErrors: true);
5838
return new BoundNullCoalescingAssignmentOperator(node, leftOperand, rightOperand,
CreateErrorType
(), hasErrors: true);
5958
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)
1035
declTypeOpt = TypeWithAnnotations.Create(
CreateErrorType
("var"));
1050
declTypeOpt = TypeWithAnnotations.Create(
CreateErrorType
("var"));
Binder\Binder_Symbols.cs (1)
616
return TypeWithAnnotations.Create(
CreateErrorType
());
Binder\Binder_TupleOperators.cs (1)
198
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)
1272
: 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"));