FrameworkFork\Microsoft.Xml\Xml\Core\XmlTextReaderImpl.cs (168)
323Debug.Assert(nt != null);
343Debug.Assert(_index == 0);
387Debug.Assert(_nameTableFromSettings == false);
408Debug.Assert(_index == 0);
457Debug.Assert(false);
621Debug.Assert(baseUri == null);
714Debug.Assert(baseUri == null);
822Debug.Assert(xmlFragment != null);
848default: Debug.Assert(false); goto case XmlNodeType.None;
1242Debug.Assert(_nextParsingFunction == ParsingFunction.DocumentContent);
1245Debug.Assert(!_ps.appendMode);
1273Debug.Assert(_parsingFunction == ParsingFunction.ElementContent ||
1278Debug.Assert(_curNode.type == XmlNodeType.Element);
1342Debug.Assert(false);
1370Debug.Assert(false);
1402Debug.Assert(_curNode.type == XmlNodeType.EndElement);
1403Debug.Assert(_parsingFunction != ParsingFunction.Eof);
1505Debug.Assert(_parsingMode == ParsingMode.Full);
1524Debug.Assert(false);
1550Debug.Assert(false);
1566Debug.Assert(value is XmlTextReader);
1585Debug.Assert(_outerReader is XmlTextReaderImpl);
2228Debug.Assert(_stringBuilder.Length == 0);
2269Debug.Assert(_outerReader is XmlTextReader);
2311Debug.Assert(_outerReader is XmlTextReader);
2348Debug.Assert(_outerReader is XmlTextReader);
2479Debug.Assert(value >= 0 && value <= _ps.charsUsed);
2566Debug.Assert(_parsingMode == ParsingMode.Full);
2655Debug.Assert(_parsingStatesStackTop == -1);
2656Debug.Assert((systemId != null && systemId.Length > 0) || (publicId != null && publicId.Length > 0));
2671Debug.Assert(_ps.appendMode);
2687Debug.Assert(_parsingStatesStackTop == -1);
2688Debug.Assert(internalDtd != null);
2845Debug.Assert(InAttributeValueIterator);
2881Debug.Assert(baseUriStr != null);
2887Debug.Assert(baseUri != null);
2898Debug.Assert(_ps.charPos == 0 && _ps.charsUsed == 0 && _ps.textReader == null);
2899Debug.Assert(baseUriStr != null);
2900Debug.Assert(baseUri == null || (baseUri.ToString().Equals(baseUriStr)));
2991Debug.Assert(_ps.charPos == 0 && _ps.charsUsed == 0 && _ps.stream == null);
2992Debug.Assert(baseUriStr != null);
3022Debug.Assert(_ps.stream == null && _ps.textReader == null);
3023Debug.Assert(_ps.charPos == 0 && _ps.charsUsed == 0);
3024Debug.Assert(baseUriStr != null);
3025Debug.Assert(str != null);
3080Debug.Assert(_parsingFunction == ParsingFunction.SwitchToInteractiveXmlDecl);
3084Debug.Assert(_parsingFunction == ParsingFunction.SwitchToInteractiveXmlDecl);
3085Debug.Assert(_nextParsingFunction == ParsingFunction.DocumentContent);
3109Debug.Assert(context != null && context.HasDtdInfo);
3133Debug.Assert(_url != null && _url.Length > 0);
3140Debug.Assert(_xmlResolver != null || !Microsoft.Xml.XmlReaderSettings.EnableLegacyXmlSettings());
3166Debug.Assert(_ps.bytes != null);
3167Debug.Assert(_ps.bytePos == 0);
3251Debug.Assert(_ps.charPos == 0);
3279Debug.Assert(_ps.stream != null);
3337Debug.Assert(newEncoding.EncodingName != "UTF-8");
3351Debug.Assert(_ps.stream != null && _ps.decoder != null && _ps.bytes != null);
3533Debug.Assert(_ps.charsUsed < _ps.chars.Length);
3543Debug.Assert(_ps.stream != null && _ps.decoder != null && _ps.bytes != null);
3544Debug.Assert(maxCharsCount <= _ps.chars.Length - _ps.charsUsed - 1);
3568Debug.Assert(maxCharsCount >= charsCount);
3660Debug.Assert(_stringBuilder.Length == 0 || isTextDecl);
3881Debug.Assert(!isTextDecl);
3891Debug.Assert(false);
4147Debug.Assert(pos == _ps.charsUsed && !_ps.isEof);
4171Debug.Assert(_index == 0);
4545Debug.Assert(_curNode.type == XmlNodeType.Element);
4733Debug.Assert(_index > 0);
4738Debug.Assert(_curNode == startTagNode);
4765Debug.Assert(startTag.type == XmlNodeType.EntityReference);
4777Debug.Assert(_attrCount == 0);
4837Debug.Assert(_curNode.type == XmlNodeType.Element);
4845Debug.Assert(_curNode.type == XmlNodeType.Element);
4966Debug.Assert(attrNameLineNo == _ps.LineNo);
5090Debug.Assert(_curNode.type == XmlNodeType.Element);
5227Debug.Assert(_stringBuilder.Length == 0);
5441Debug.Assert(_ps.isEof);
5459Debug.Assert(false);
5499Debug.Assert(attr.nextAttrValueChunk == null);
5528Debug.Assert(_stringBuilder.Length == 0);
5542Debug.Assert(endPos - startPos > 0);
5565Debug.Assert(_stringBuilder.Length > 0);
5586Debug.Assert(endPos - startPos > 0);
5853Debug.Assert(_ps.isEof);
5895Debug.Assert(_stringBuilder.Length == 0);
5896Debug.Assert(_parsingFunction == ParsingFunction.PartialTextValue ||
5910Debug.Assert(_stringBuilder.Length > 0);
5964Debug.Assert(_parsingFunction == ParsingFunction.PartialTextValue || _parsingFunction == ParsingFunction.InReadValueChunk ||
5976Debug.Assert(_parsingFunction == ParsingFunction.InReadValueChunk);
5981Debug.Assert((_index > 0) ? _nextParsingFunction == ParsingFunction.ElementContent : _nextParsingFunction == ParsingFunction.DocumentContent);
5993Debug.Assert(_parsingFunction == ParsingFunction.InReadContentAsBinary || _parsingFunction == ParsingFunction.InReadElementContentAsBinary);
5998Debug.Assert((_index > 0) ? _nextParsingFunction == ParsingFunction.ElementContent : _nextParsingFunction == ParsingFunction.DocumentContent);
6026Debug.Assert(_stringBuilder.Length == 0);
6067Debug.Assert(_ps.chars[_ps.charPos] == '&');
6076Debug.Assert(_ps.chars[_ps.charPos] == '&');
6091Debug.Assert(entityType == EntityType.CharacterDec || entityType == EntityType.CharacterHex);
6243Debug.Assert(false);
6284Debug.Assert(_lastEntity != null);
6290Debug.Assert(_curNode.depth == _index);
6303Debug.Assert(_curNode.type == XmlNodeType.EntityReference);
6304Debug.Assert(Ref.Equal(_lastEntity.Name, _curNode.localName));
6323Debug.Assert(_stringBuilder.Length == 0);
6349Debug.Assert(_ps.charPos < _ps.charsUsed);
6393Debug.Assert(_stringBuilder.Length == 0);
6451Debug.Assert(!_ps.eolNormalized);
6598Debug.Assert(_stringBuilder.Length == 0);
6659Debug.Assert(!_ps.eolNormalized);
6838Debug.Assert(_dtdProcessing == DtdProcessing.Ignore);
7169Debug.Assert(_ps.isEof);
7275Debug.Assert(_ps.isEof);
7284Debug.Assert(_ps.chars[startPos] == '&');
7316Debug.Assert(_ps.chars[_ps.charPos] == '&');
7336Debug.Assert(_ps.chars[startPos] == '&' && _ps.chars[startPos + 1] == '#');
7449Debug.Assert(pos > 0);
7485Debug.Assert(_ps.chars[_ps.charPos] == '&');
7505Debug.Assert(startPos < _ps.charsUsed);
7506Debug.Assert(_ps.chars[startPos] == '&');
7507Debug.Assert(_ps.chars[startPos + 1] != '#');
7615Debug.Assert(pos > 0);
7771Debug.Assert(nodeIndex < _nodes.Length);
7772Debug.Assert(_nodes[_nodes.Length - 1] == null);
7785Debug.Assert(nodeIndex < _nodes.Length);
7792Debug.Assert(nodeIndex < _nodes.Length);
7865Debug.Assert(attr.type == XmlNodeType.Attribute);
7899Debug.Assert(_ps.isEof);
7960Debug.Assert(_xmlContext.defaultNamespace == uri);
7996Debug.Assert(_curNode.xmlContextPushed);
8093Debug.Assert(_xmlResolver != null);
8131Debug.Assert(entity.IsExternal);
8144Debug.Assert(_ps.appendMode);
8173Debug.Assert(!entity.IsExternal);
8243Debug.Assert(_parsingStatesStackTop == -1);
8259Debug.Assert(_parsingStatesStackTop >= 0);
8360Debug.Assert(XmlConvert.StrEqual(_ps.chars, _ps.charPos - 2, 2, "?>"));
8368Debug.Assert(XmlConvert.StrEqual(_ps.chars, _ps.charPos - 3, 3, "-->"));
8376Debug.Assert(XmlConvert.StrEqual(_ps.chars, _ps.charPos - 3, 3, "]]>"));
8400Debug.Assert(false);
8403Debug.Assert(_incReadState == IncrementalReadState.Text ||
8515Debug.Assert(_ps.charPos - pos == 0);
8516Debug.Assert(_ps.charPos - startPos == 0);
8555Debug.Assert(_ps.charPos - pos == 0);
8556Debug.Assert(_ps.charPos - startPos == 0);
8676Debug.Assert(_fragmentType == XmlNodeType.Attribute);
8693Debug.Assert(_parsingFunction == ParsingFunction.InReadAttributeValue);
8720Debug.Assert(_stringBuilder.Length == 0);
8931Debug.Assert(_ps.charPos < _ps.charsUsed);
9000Debug.Assert(_dtdInfo == null && _fragmentParserContext != null && _fragmentParserContext.HasDtdInfo);
9016Debug.Assert(_parsingFunction != ParsingFunction.InReadContentAsBinary);
9042Debug.Assert(_parsingFunction != ParsingFunction.InReadElementContentAsBinary);
9043Debug.Assert(_curNode.type == XmlNodeType.Element);
9121Debug.Assert(context != null);
9142Debug.Assert(nt != null);
9159Debug.Assert(_nameTableFromSettings == false);
9187Debug.Assert(_dtdInfo == null);
9348Debug.Assert(attr != null);
9373Debug.Assert(prefix != null);
9394Debug.Assert(attr != null);
9426Debug.Assert(_nodes[_index].type == XmlNodeType.Element);
9444Debug.Assert(_nodes[_index].type == XmlNodeType.Element);
9478Debug.Assert(_incReadDecoder != null);
9587Debug.Assert(_parsingFunction != ParsingFunction.InReadElementContentAsBinary);
9646Debug.Assert(characters >= 0);
9688Debug.Assert(startPos >= 0);
9689Debug.Assert(endPos < chars.Length);
9690Debug.Assert(startPos <= endPos);
9700Debug.Assert(startPos >= 0);
9701Debug.Assert(endPos < str.Length);
9702Debug.Assert(startPos <= endPos);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Context\FormattingContext.InitialContextFinder.cs (1)
56Debug.Assert(
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\SymbolEquivalenceComparer.GetHashCodeVisitor.cs (1)
266Debug.Assert(
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Context\FormattingContext.InitialContextFinder.cs (1)
56Debug.Assert(
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\SymbolEquivalenceComparer.GetHashCodeVisitor.cs (1)
266Debug.Assert(
DiagnosticAnalyzer\AnalyzerDriver.cs (58)
73Debug.Assert(_lazyAnalyzerExecutor != null);
83Debug.Assert(_lazyCurrentCompilationData != null);
101Debug.Assert(_lazyUnsuppressedAnalyzers != null);
118Debug.Assert(_lazyPerSymbolAnalyzerActionsCache != null);
137Debug.Assert(_lazyCompilationEndAnalyzers != null);
159Debug.Assert(_lazyAnalyzerGateMap != null);
173Debug.Assert(!_lazyGeneratedCodeAnalysisFlagsMap.IsDefault);
193Debug.Assert(_lazyNonConfigurableAndCustomConfigurableAnalyzers != null);
207Debug.Assert(_lazySymbolStartAnalyzers != null);
221Debug.Assert(_lazyTreatAllCodeAsNonGeneratedCode.HasValue);
240Debug.Assert(_lazyGeneratedCodeFilesMap != null);
254Debug.Assert(_lazyGeneratedCodeSymbolsForTreeMap != null);
268Debug.Assert(_lazySuppressedAnalyzersForTreeMap != null);
284Debug.Assert(_lazySuppressedDiagnosticIdsForUnsuppressedAnalyzers != null);
298Debug.Assert(_lazyIsGeneratedCodeSymbolMap != null);
343Debug.Assert(_lazyCompilationEventQueue != null);
357Debug.Assert(_lazyDiagnosticQueue != null);
371Debug.Assert(!severityFilter.Contains(ReportDiagnostic.Suppress));
372Debug.Assert(!severityFilter.Contains(ReportDiagnostic.Default));
399Debug.Assert(_lazyInitializeTask == null);
468Debug.Assert(_lazyInitializeTask == null);
469Debug.Assert(compilation.SemanticModelProvider != null);
694Debug.Assert(analysisScope != null);
716Debug.Assert(faultedTask.IsFaulted);
981Debug.Assert(severity != ReportDiagnostic.Default);
1005Debug.Assert(compilation.ContainsSyntaxTree(tree));
1012Debug.Assert(!reportedDiagnostics.IsEmptyWithoutResolution);
1036Debug.Assert(HasDiagnosticSuppressors);
1037Debug.Assert(!reportedDiagnostics.IsEmpty);
1038Debug.Assert(_programmaticSuppressions != null);
1039Debug.Assert(_diagnosticsProcessedForProgrammaticSuppressions != null);
1069Debug.Assert(suppressableDiagnostics.Contains(diagnostic));
1070Debug.Assert(!diagnostic.IsSuppressed);
1072Debug.Assert(suppressedDiagnostic.IsSuppressed);
1250Debug.Assert(location.SourceTree != null);
1270Debug.Assert(declaredSymbols != null);
1287Debug.Assert(GeneratedCodeSymbolsForTreeMap != null);
1288Debug.Assert(_lazyGeneratedCodeAttribute != null);
1310Debug.Assert(existingGeneratedCodeSymbols.SetEquals(generatedCodeSymbols));
1431Debug.Assert(_lazyInitializeTask != null);
1443Debug.Assert(_lazyPrimaryTask != null);
1777Debug.Assert(!subsetProcessedAnalyzers.IsDefault);
1815Debug.Assert(AnalyzerActions.SymbolStartActionsCount > 0);
1866Debug.Assert(completedAnalyzers.Count < analysisScope.Analyzers.Length);
1942Debug.Assert(compilationEvent is CompilationStartedEvent || compilationEvent is CompilationCompletedEvent);
2142Debug.Assert(AnalyzerActions.SymbolStartActionsCount > 0);
2143Debug.Assert(SymbolStartAnalyzers.Contains(analyzer));
2233Debug.Assert(!IsDiagnosticAnalyzerSuppressed(analyzer, analyzerExecutor.Compilation.Options, analyzerManager, analyzerExecutor, analysisScope, severityFilter, cancellationToken));
2258Debug.Assert(!IsDiagnosticAnalyzerSuppressed(analyzer, analyzerExecutor.Compilation.Options, analyzerManager, analyzerExecutor, analysisScope, severityFilter, cancellationToken));
2323Debug.Assert(_lazyDoNotAnalyzeGeneratedCode.HasValue);
2578Debug.Assert(shouldExecuteSyntaxNodeActions || shouldExecuteOperationActions || shouldExecuteCodeBlockActions || shouldExecuteOperationBlockActions);
2579Debug.Assert(!isInGeneratedCode || !DoNotAnalyzeGeneratedCode);
2973Debug.Assert(!operationBlock.Parent.IsImplicit);
2980Debug.Assert(operationBlock.Kind is OperationKind.Invocation or OperationKind.Invalid);
2981Debug.Assert(operationBlock.Parent.IsImplicit);
2982Debug.Assert(operationBlock.Parent.Parent is IConstructorBodyOperation ctorBody &&
2984Debug.Assert(!operationBlock.Parent.Parent.IsImplicit);
3002Debug.Assert(operationsToAnalyze.ToImmutableHashSet().Count == operationsToAnalyze.Count);
DiagnosticAnalyzer\AnalyzerExecutor.cs (40)
119Debug.Assert((addNonCategorizedDiagnostic != null) ^ (addCategorizedLocalDiagnostic != null));
120Debug.Assert((addCategorizedLocalDiagnostic != null) == (addCategorizedNonLocalDiagnostic != null));
184Debug.Assert(_analyzerExecutionTimeMap != null);
268Debug.Assert(startAction.Analyzer == symbolScope.Analyzer);
287Debug.Assert(_addSuppression != null);
327Debug.Assert(compilationEvent is CompilationStartedEvent || compilationEvent is CompilationCompletedEvent);
373Debug.Assert(getTopMostNodeForAnalysis != null);
374Debug.Assert(!filterSpan.HasValue || filterTree != null);
487Debug.Assert(getTopMostNodeForAnalysis != null);
488Debug.Assert(!isGeneratedCode || !_shouldSkipAnalysisOnGeneratedCode(analyzer));
489Debug.Assert(!IsAnalyzerSuppressedForSymbol(analyzer, symbolDeclaredEvent.Symbol, cancellationToken));
490Debug.Assert(!filterSpan.HasValue || filterTree != null);
586Debug.Assert(file.SourceTree != null);
637Debug.Assert(file.AdditionalFile != null);
676Debug.Assert(!executionData.IsGeneratedCode || !_shouldSkipAnalysisOnGeneratedCode(syntaxNodeAction.Analyzer));
677Debug.Assert(!IsAnalyzerSuppressedForTree(syntaxNodeAction.Analyzer, node.SyntaxTree, cancellationToken));
699Debug.Assert(!executionData.IsGeneratedCode || !_shouldSkipAnalysisOnGeneratedCode(operationAction.Analyzer));
700Debug.Assert(!IsAnalyzerSuppressedForTree(operationAction.Analyzer, executionData.SemanticModel.SyntaxTree, cancellationToken));
747Debug.Assert(!executableCodeBlocks.IsEmpty);
849Debug.Assert(!operationBlocks.IsEmpty);
928Debug.Assert(declaredNode != null);
929Debug.Assert(executionData.DeclaredSymbol != null);
930Debug.Assert(CanHaveExecutableCodeBlock(executionData.DeclaredSymbol));
931Debug.Assert(startActions.Any() || endActions.Any() || actions.Any());
1041Debug.Assert(nodeActionsByKind.Any());
1042Debug.Assert(!executionData.IsGeneratedCode || !_shouldSkipAnalysisOnGeneratedCode(executionData.Analyzer));
1043Debug.Assert(!IsAnalyzerSuppressedForTree(executionData.Analyzer, executionData.SemanticModel.SyntaxTree, cancellationToken));
1138Debug.Assert(operationActionsByKind != null);
1139Debug.Assert(operationActionsByKind.Any());
1140Debug.Assert(!executionData.IsGeneratedCode || !_shouldSkipAnalysisOnGeneratedCode(executionData.Analyzer));
1141Debug.Assert(!IsAnalyzerSuppressedForTree(executionData.Analyzer, executionData.SemanticModel.SyntaxTree, cancellationToken));
1181Debug.Assert(((IFieldSymbol)symbol).AssociatedSymbol == null);
1240Debug.Assert(false);
1392Debug.Assert(IsAnalyzerExceptionDiagnostic(exceptionDiagnostic));
1442Debug.Assert(addNonCategorizedDiagnostic != null);
1447Debug.Assert(addNonCategorizedDiagnostic == null);
1448Debug.Assert(addCategorizedNonLocalDiagnostic != null);
1481Debug.Assert(_addNonCategorizedDiagnostic != null);
1537Debug.Assert(_analyzerExecutionTimeMap != null);
1548Debug.Assert(operation.Parent == null);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Context\FormattingContext.InitialContextFinder.cs (1)
56Debug.Assert(
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\SymbolEquivalenceComparer.GetHashCodeVisitor.cs (1)
266Debug.Assert(
src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Analysis\PropertySetAnalysis\PropertySetAbstractValue.cs (1)
154Debug.Assert(index >= 0);
src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Analysis\PropertySetAnalysis\PropertySetAnalysis.cs (1)
203Debug.Assert(success);
src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Framework\DataFlow\AnalysisEntityMapAbstractDomain.cs (16)
99Debug.Assert(!map2.ContainsKey(key1));
100Debug.Assert(ValueDomain.Compare(value1, mergedValue) <= 0);
164Debug.Assert(ValueDomain.Compare(value1, mergedValue) <= 0);
165Debug.Assert(ValueDomain.Compare(value2, mergedValue) <= 0);
185Debug.Assert(ValueDomain.Compare(value1, mergedValue) <= 0);
186Debug.Assert(ValueDomain.Compare(value2, mergedValue) <= 0);
194Debug.Assert(ValueDomain.Compare(value1, mergedValue) <= 0);
206Debug.Assert(ValueDomain.Compare(value2, mergedValue) <= 0);
213Debug.Assert(!map1.ContainsKey(newKey));
214Debug.Assert(!map2.ContainsKey(newKey));
226Debug.Assert(Compare(map1, resultMap) <= 0);
227Debug.Assert(Compare(map2, resultMap) <= 0);
247Debug.Assert(values.Count > 0);
259Debug.Assert(ValueDomain.Compare(value1, mergedValue) <= 0);
260Debug.Assert(ValueDomain.Compare(value2, mergedValue) <= 0);
267Debug.Assert(isNewKey == (!map1.ContainsKey(key) && !map2.ContainsKey(key)));
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Context\FormattingContext.InitialContextFinder.cs (1)
56Debug.Assert(
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\SymbolEquivalenceComparer.GetHashCodeVisitor.cs (1)
266Debug.Assert(
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Context\FormattingContext.InitialContextFinder.cs (1)
56Debug.Assert(
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\SymbolEquivalenceComparer.GetHashCodeVisitor.cs (1)
266Debug.Assert(
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Context\FormattingContext.InitialContextFinder.cs (1)
56Debug.Assert(
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\SymbolEquivalenceComparer.GetHashCodeVisitor.cs (1)
266Debug.Assert(
Binder\Binder.ValueChecks.cs (77)
146Debug.Assert(parameter.RefKind.IsWritableReference() && parameter.Type.IsRefLikeOrAllowsRefLikeType());
147Debug.Assert(GetParameterValEscapeLevel(parameter).HasValue);
188Debug.Assert(!isArgList || parameter is null);
446Debug.Assert(parameters.Length == indexerAccess.Indexer.Parameters.Length);
526Debug.Assert(expr.Syntax.Kind() != SyntaxKind.Argument || valueKind == BindValueKind.RefOrOut);
531Debug.Assert(valueKind == BindValueKind.RefOrOut);
619Debug.Assert(!resolution.IsNonMethodExtensionMember(out _));
638Debug.Assert(methodGroup.ResultKind != LookupResultKind.Viable);
702Debug.Assert(!checkingReceiver || expr.Type.IsValueType || expr.Type.IsTypeParameter());
873Debug.Assert(!RequiresRefAssignableVariable(valueKind));
1137Debug.Assert(!RequiresAssignableVariable(BindValueKind.AddressOf));
1156Debug.Assert(parameterSymbol.RefKind != RefKind.None || !RequiresRefAssignableVariable(valueKind));
1164Debug.Assert(backingField.RefKind == RefKind.None);
1165Debug.Assert(!RequiresRefAssignableVariable(valueKind));
1169Debug.Assert(backingField.RefKind == RefKind.None);
1202Debug.Assert(valueKind != BindValueKind.AddressOf); // If this assert fails, we probably should report ErrorCode.ERR_InvalidAddrOp
1306Debug.Assert(parameterSymbol.RefKind == RefKind.None || isRefScoped || refSafeToEscape.IsReturnOnly);
1388Debug.Assert(valueKind == BindValueKind.RefAssignable);
1399Debug.Assert(fieldAccess.ReceiverOpt is null or BoundTypeExpression);
1404Debug.Assert(fieldAccess.ReceiverOpt is not null);
1538Debug.Assert(fieldAccess.ReceiverOpt is { });
1594Debug.Assert(!RequiresVariableReceiver(receiver, eventSymbol));
1641Debug.Assert(receiver != null);
1721Debug.Assert((object)propertySymbol != null);
1722Debug.Assert(propertySyntax != null);
1734Debug.Assert(propertySymbol.TypeWithAnnotations.HasType);
1936Debug.Assert(member.Kind != SymbolKind.Property);
1937Debug.Assert(member.Kind != SymbolKind.Event);
2004Debug.Assert(AllParametersConsideredInEscapeAnalysisHaveArguments(argsOpt, parameters, argsToParamsOpt));
2160Debug.Assert(extensionParameter is not null);
2163Debug.Assert(receiver is not null);
2212Debug.Assert(AllParametersConsideredInEscapeAnalysisHaveArguments(argsOpt, parameters, argsToParamsOpt));
2387Debug.Assert(receiver.Type is { });
2388Debug.Assert(receiverIsSubjectToCloning != ThreeState.Unknown);
2392Debug.Assert(receiver is not BoundValuePlaceholderBase && method is not null && receiver.Type?.IsReferenceType == false);
2416Debug.Assert(argIndex == argsOpt.Length - 1);
2492Debug.Assert(!getArgument.RefKind.IsWritableReference());
2854Debug.Assert(symbol is null or SourceLocalSymbol or GlobalExpressionVariable);
3098Debug.Assert(underlyingParameter.IsThis);
3099Debug.Assert(underlyingParameter.RefKind != RefKind.Out); // Shouldn't get here for a constructor
3100Debug.Assert(underlyingParameter.ContainingSymbol is MethodSymbol);
3173Debug.Assert((object)local != null);
3174Debug.Assert(kind != BindValueKind.RValue);
3332Debug.Assert((object)field != null);
3333Debug.Assert(field.RefKind == RefKind.None ? RequiresAssignableVariable(kind) : RequiresRefAssignableVariable(kind));
3334Debug.Assert(field.Type != (object)null);
3338Debug.Assert(kind != BindValueKind.AddressOf); // If this assert fails, we probably should report ErrorCode.ERR_InvalidAddrOp
3368Debug.Assert((object)symbol != null);
3369Debug.Assert(RequiresAssignableVariable(kind));
3405Debug.Assert(expr.Type is not null);
3487Debug.Assert(thisParam.Type.Equals(((BoundThisReference)expr).Type, TypeCompareKind.ConsiderEverything));
3640Debug.Assert(GetInlineArrayAccessEquivalentSignatureMethod(elementAccess, out _, out _).RefKind == RefKind.None);
3648Debug.Assert(equivalentSignatureMethod.RefKind != RefKind.None);
3689Debug.Assert(expr is BoundConversion conversion &&
3696Debug.Assert(expr is BoundUnaryOperator unaryOperator &&
3703Debug.Assert(expr is BoundBinaryOperator binaryOperator &&
3710Debug.Assert(expr is BoundUserDefinedConditionalLogicalOperator logicalOperator &&
3716Debug.Assert(expr is BoundCompoundAssignmentOperator compoundAssignmentOperator &&
3738Debug.Assert(!checkingReceiver || expr.Type.IsValueType || expr.Type.IsTypeParameter());
3813Debug.Assert(thisParam.Type.Equals(((BoundThisReference)expr).Type, TypeCompareKind.ConsiderEverything));
3961Debug.Assert(GetInlineArrayAccessEquivalentSignatureMethod(elementAccess, out _, out _).RefKind == RefKind.None);
3969Debug.Assert(equivalentSignatureMethod.RefKind != RefKind.None);
4060Debug.Assert(!conversion.Conversion.IsUserDefined ||
4066Debug.Assert(expr is BoundUnaryOperator unaryOperator &&
4073Debug.Assert(expr is BoundBinaryOperator binaryOperator &&
4080Debug.Assert(expr is BoundUserDefinedConditionalLogicalOperator logicalOperator &&
4086Debug.Assert(expr is BoundCompoundAssignmentOperator compoundAssignmentOperator &&
4157Debug.Assert(thisParam.Type.Equals(((BoundThisReference)expr).Type, TypeCompareKind.ConsiderEverything));
4464Debug.Assert(operatorMethod is not null);
4645Debug.Assert(elementType.Type is { });
4660Debug.Assert(constructMethod.ReturnType.Equals(expr.Type, TypeCompareKind.AllIgnoreOptions));
4661Debug.Assert(parameter.Type.OriginalDefinition.Equals(_compilation.GetWellKnownType(WellKnownType.System_ReadOnlySpan_T), TypeCompareKind.AllIgnoreOptions));
4744Debug.Assert(expr.AccessorKind != AccessorKind.Unknown);
4831Debug.Assert(!checkingReceiver || expr.Type.IsValueType || expr.Type.IsTypeParameter());
4863Debug.Assert(thisParam.Type.Equals(((BoundThisReference)expr).Type, TypeCompareKind.ConsiderEverything));
5257Debug.Assert(operatorMethod is not null);
5626Debug.Assert(conversion.Conversion.IsInlineArray);
Binder\Binder_Conversions.cs (104)
67Debug.Assert(result is BoundConversion || (conversion.IsIdentity && ((object)result == source) || source.NeedsToBeConverted()) || hasErrors);
72Debug.Assert(filterConversion(conversion));
73Debug.Assert(BoundNode.GetConversion(result, placeholder1) == conversion);
79Debug.Assert(BoundNode.GetConversion(result2, placeholder2) == conversion);
191Debug.Assert(destination.SpecialType != SpecialType.System_String);
214Debug.Assert(!conversion.Exists);
233Debug.Assert(conversion.IsCollectionExpression
255Debug.Assert(source.Type is null);
256Debug.Assert(!conversion.Exists);
303Debug.Assert(!conversion.IsMethodGroup);
318Debug.Assert(conversion.UnderlyingConversions.Length == 1);
378Debug.Assert(elementConversions.Length == sourceTypes.Length);
400Debug.Assert(conversion.UnderlyingConversions.IsDefault);
409Debug.Assert(syntax.SyntaxTree is object);
417Debug.Assert(conversion.ConstrainedToTypeOpt is TypeParameterSymbol);
446Debug.Assert(source.Type is { });
449Debug.Assert(elementField is { });
468Debug.Assert(destination.OriginalDefinition.Equals(Compilation.GetWellKnownType(WellKnownType.System_Span_T), TypeCompareKind.AllIgnoreOptions));
485Debug.Assert(source.Type is not null);
486Debug.Assert(destination.IsSpan() || destination.IsReadOnlySpan());
507Debug.Assert(destination.IsReadOnlySpan());
519Debug.Assert(destination.IsReadOnlySpan());
576Debug.Assert(type.IsSpan() || type.IsReadOnlySpan());
577Debug.Assert(type.IsDefinition);
586Debug.Assert(spanType.IsSpan() && readonlySpanType.IsReadOnlySpan());
587Debug.Assert(spanType.IsDefinition && readonlySpanType.IsDefinition);
609Debug.Assert(source.IsSpan() || source.IsReadOnlySpan());
610Debug.Assert(destination.IsReadOnlySpan());
611Debug.Assert(!source.IsDefinition && !destination.IsDefinition);
618Debug.Assert(!source.IsReadOnlySpan() || !sameElementTypes);
626Debug.Assert(source.IsReadOnlySpan() && destination.IsReadOnlySpan());
627Debug.Assert(source.IsDefinition && destination.IsDefinition);
654Debug.Assert(readOnlySpanType.IsReadOnlySpan());
655Debug.Assert(!readOnlySpanType.IsDefinition);
656Debug.Assert(((NamedTypeSymbol)readOnlySpanType).TypeArgumentsWithAnnotationsNoUseSiteDiagnostics[0].SpecialType is SpecialType.System_Char);
709Debug.Assert(destination.Equals(Compilation.GetWellKnownType(WellKnownType.System_IFormattable), TypeCompareKind.ConsiderEverything) ||
749Debug.Assert(expr is BoundObjectCreationExpressionBase { WasTargetTyped: true } or
754Debug.Assert(expr is not BoundBadExpression { ChildBoundNodes: var children } || !children.Any((child, node) => child.Syntax == node.Syntax, node));
824Debug.Assert(conversion.Kind is ConversionKind.NoConversion);
853Debug.Assert(elementType is { });
888Debug.Assert(inProgressConstructor is not null);
895Debug.Assert((collectionCreation is BoundNewT && !isExpanded && constructor is null) ||
945Debug.Assert(elementType is { });
946Debug.Assert(elements.Length == elementConversions.Length);
947Debug.Assert(elementConversions.All(c => c.Exists));
989Debug.Assert(enumeratorInfo is { });
990Debug.Assert(enumeratorInfo.ElementType is { }); // ElementType is set always, even for IEnumerable.
1040Debug.Assert(result);
1044Debug.Assert(result);
1057Debug.Assert(collectionBuilderReturnTypeConversion.Exists);
1062Debug.Assert(parameterType.OriginalDefinition.Equals(Compilation.GetWellKnownType(WellKnownType.System_ReadOnlySpan_T), TypeCompareKind.AllIgnoreOptions));
1072Debug.Assert(!collectionBuilderMethod.GetIsNewExtensionMember());
1109Debug.Assert(!isParamsModifierValidation || syntax is ParameterSyntax);
1241Debug.Assert(!targetType.IsDynamic());
1317Debug.Assert(boundExpression.HasErrors);
1357Debug.Assert(methodGroup.ReceiverOpt is not null);
1358Debug.Assert(methodGroup.ReceiverOpt.Type is not null);
1374Debug.Assert(false); // Should not get here given the 'acceptOnlyMethods' argument value used in 'ResolveMethodGroup' call above
1398Debug.Assert(resolution.AnalyzedArguments.HasDynamicArgument);
1414Debug.Assert(finalApplicableCandidates.Length != 1 || finalApplicableCandidates[0].IsApplicable);
1434Debug.Assert(!IsDisallowedExtensionInOlderLangVer(addMethods[0]));
1440Debug.Assert(!resolution.OverloadResolutionResult.Succeeded);
1463Debug.Assert(methodGroup.ReceiverOpt is not null);
1479Debug.Assert(receiverType is not null);
1540Debug.Assert(constructed is not null);
1573Debug.Assert(node != null);
1574Debug.Assert(methodGroup != null);
1575Debug.Assert(methodGroup.Error == null);
1634Debug.Assert(!method.IsRuntimeFinalizer());
1669Debug.Assert(call.HasErrors);
1670Debug.Assert(call.Method.Name == "Add");
1673Debug.Assert(false); // Add test if we hit this assert.
1701Debug.Assert(false);
1769Debug.Assert(elementTypeWithAnnotations.Type is null); // GetCollectionExpressionTypeKind() does not set elementType for these cases.
1781Debug.Assert(elementTypeWithAnnotations.HasType);
1791Debug.Assert(elementType is { });
1838Debug.Assert(reportedErrors);
1948Debug.Assert(targetTyped || destination.IsErrorType() || destination.Equals(source.Type, TypeCompareKind.ConsiderEverything));
1987Debug.Assert(targetTyped || destination.IsErrorType() || destination.Equals(source.Type, TypeCompareKind.ConsiderEverything));
2020Debug.Assert(conversionGroup != null);
2021Debug.Assert(conversion.IsUserDefined);
2069Debug.Assert(conversion.BestUserDefinedConversionAnalysis is object); // All valid user-defined conversions have this populated
2129Debug.Assert(toConversion.Exists);
2183Debug.Assert(conversion.Kind == ConversionKind.FunctionType);
2184Debug.Assert(source.Kind is BoundKind.MethodGroup or BoundKind.UnboundLambda);
2185Debug.Assert(syntax.IsFeatureEnabled(MessageID.IDS_FeatureInferredDelegateType));
2189Debug.Assert(delegateType is { });
2272Debug.Assert(conversion.UnderlyingConversions.IsDefault);
2329Debug.Assert(delegateType is not null);
2333Debug.Assert(lambdaSymbol.ParameterCount == delegateParameters.Length);
2416Debug.Assert(conversion.IsStackAlloc);
2446Debug.Assert(conversion.IsNullable == destination.IsNullableType());
2458Debug.Assert(conversionWithoutNullable.IsTupleLiteralConversion);
2674Debug.Assert(memberSymbol is not MethodSymbol { MethodKind: not MethodKind.Constructor } ||
2685Debug.Assert(!invokedAsExtensionMethod);
2689Debug.Assert(!invokedAsExtensionMethod || (receiverOpt != null));
2839Debug.Assert(!isExtensionMethod || (receiverOpt != null));
2846Debug.Assert(methodParameters.Length == numParams + (isExtensionMethod ? 1 : 0));
2995Debug.Assert(method.GetIsNewExtensionMember());
3019Debug.Assert(Conversions.IsAssignableFromMulticastDelegate(delegateOrFuncPtrType, ref discardedUseSiteInfo) || delegateOrFuncPtrType.TypeKind == TypeKind.Delegate || delegateOrFuncPtrType.TypeKind == TypeKind.FunctionPointer);
3020Debug.Assert(conversion.Method is object);
3101Debug.Assert(conversion.IsValid); // i.e. if it exists, then it is valid.
3216Debug.Assert(!sourceValue.IsBad);
3223Debug.Assert(underlyingType.SpecialType != SpecialType.None);
Binder\Binder_Expressions.cs (242)
201Debug.Assert(expr != null);
202Debug.Assert(resultKind != LookupResultKind.Viable);
315Debug.Assert(op.NoCommonTypeError != 0);
416Debug.Assert(expr.Kind is BoundKind.UnboundLambda or BoundKind.MethodGroup);
446Debug.Assert((object)this.ContainingMemberOrLambda == field);
454Debug.Assert(initializerBinder != null);
504Debug.Assert(this.InParameterDefaultValue);
505Debug.Assert(this.ContainingMemberOrLambda.Kind == SymbolKind.Method
511Debug.Assert(defaultValueBinder != null);
529Debug.Assert(initializerBinder != null);
597Debug.Assert(node != null);
1447Debug.Assert(ContainingType is { });
1465Debug.Assert((this.Flags & BinderFlags.InContextualAttributeBinder) != 0);
1509Debug.Assert(symbol is null or LocalSymbol or LocalFunctionSymbol or RangeVariableSymbol or TypeParameterSymbol);
1587Debug.Assert(node != null);
1625Debug.Assert(node.Arity == typeArgumentList.Count);
1676Debug.Assert(isError); // Should have been reported by GetSymbolOrMethodOrPropertyGroup.
1750Debug.Assert(SyntaxFacts.IsInvoked(id) == invoked);
1813Debug.Assert(!isError);
1814Debug.Assert(!primaryConstructor.GetCapturedParameters().ContainsKey(shadowedParameter)); // How could we capture a shadowed parameter?
1841Debug.Assert((options & LookupOptions.NamespacesOrTypesOnly) == 0);
1870Debug.Assert(node.Identifier.IsUnderscoreToken());
1978Debug.Assert(!symbol.ContainingSymbol.Equals(containingMethod));
2135Debug.Assert(primaryCtor is null ||
2154Debug.Assert(parameter.Type.IsRefLikeOrAllowsRefLikeType());
2177Debug.Assert(parameter.Type.IsRefLikeOrAllowsRefLikeType());
2500Debug.Assert(node != null);
2528Debug.Assert(location is not null);
2538Debug.Assert(this.ContainingMemberOrLambda is not null);
2602Debug.Assert(node.OperatorToken.IsKind(SyntaxKind.CaretToken));
2801Debug.Assert(conversion.IsUserDefined);
2886Debug.Assert((object)operand.Type != null);
2927Debug.Assert(targetTypeWithAnnotations.HasType && targetTypeWithAnnotations.IsNullableType());
2928Debug.Assert((object)operand.Type != null && !operand.Type.IsNullableType());
3177Debug.Assert(isVar != declType.HasType);
3193Debug.Assert(declarationExpression.IsOutVarDeclaration());
3217Debug.Assert(localSymbol.DeclarationKind == LocalDeclarationKind.OutVariable);
3335Debug.Assert(argumentSyntax is ArgumentSyntax || argumentSyntax is AttributeArgumentSyntax);
3447Debug.Assert(result.ConversionForArg(arg).IsIdentity);
3448Debug.Assert(!argument.NeedsToBeConverted());
3449Debug.Assert(!expanded || result.ParameterFromArgument(arg) != parameters.Length - 1);
3458Debug.Assert(paramsArgsBuilder is null);
3498Debug.Assert(argument is BoundUnconvertedInterpolatedString or BoundBinaryOperator { IsUnconvertedInterpolatedStringAddition: true });
3519Debug.Assert(parameterTypeWithAnnotations.HasType);
3524Debug.Assert(kind.IsIdentity);
3552Debug.Assert(arguments[arg].Kind is not
3581Debug.Assert(methodResult.Result.ParamsElementTypeOpt.HasType);
3582Debug.Assert(methodResult.Result.ParamsElementTypeOpt.Type != (object)ErrorTypeSymbol.EmptyParamsCollectionElementTypeSentinel);
3604Debug.Assert(collectionArgs.Length != 0);
3609Debug.Assert(firstParamsArgument != -1);
3623Debug.Assert(argsToParamsBuilder is not null || argsToParamsOpt.IsDefault);
3673Debug.Assert(unconvertedString is BoundUnconvertedInterpolatedString or BoundBinaryOperator { IsUnconvertedInterpolatedStringAddition: true });
3675Debug.Assert(interpolatedStringConversion.IsInterpolatedStringHandler);
3676Debug.Assert(handlerType is NamedTypeSymbol { IsInterpolatedStringHandlerType: true });
3683Debug.Assert(handlerParameterIndexes.IsEmpty);
3696Debug.Assert(arguments is not null);
3727Debug.Assert(handlerParameterIndexes.All((index, paramLength) => index >= BoundInterpolatedStringArgumentPlaceholder.InstanceParameter && index < paramLength,
3746Debug.Assert(handlerArgumentIndexesBuilder[handlerParameterIndex] is BoundInterpolatedStringArgumentPlaceholder.UnspecifiedParameter);
3779Debug.Assert(argumentIndex != interpolatedStringArgNum);
3786Debug.Assert(receiver!.Type is not null);
3839Debug.Assert(receiver != null);
3903Debug.Assert(!available);
3916Debug.Assert(argNumber > 0);
3928Debug.Assert(argNumber >= 0); // can be 0 for receiver of extension method
3937Debug.Assert(argNumber > 0);
4197Debug.Assert(rank > 0);
4198Debug.Assert(dimension > 0 && dimension <= rank);
4199Debug.Assert(exprBuilder != null);
4270Debug.Assert(!boundInitExpr.IsDefault);
4280Debug.Assert(boundInitExprIndex >= 0 && boundInitExprIndex < boundInitExpr.Length);
4305Debug.Assert(boundInitExprIndex >= 0 && boundInitExprIndex < boundInitExpr.Length);
4308Debug.Assert(init.HasAnyErrors);
4309Debug.Assert(init.Type.IsErrorType());
4418Debug.Assert(creationSyntax == null ||
4421Debug.Assert(initSyntax != null);
4422Debug.Assert((object)type != null);
4423Debug.Assert(boundInitExprOpt.IsDefault || creationSyntax.Kind() == SyntaxKind.ImplicitArrayCreationExpression);
4575Debug.Assert(node is StackAllocArrayCreationExpressionSyntax || node is ImplicitStackAllocArrayCreationExpressionSyntax);
4626Debug.Assert(node != null);
4665Debug.Assert(node.IsKind(SyntaxKind.ImplicitStackAllocArrayCreationExpression) || node.IsKind(SyntaxKind.StackAllocArrayCreationExpression));
4711Debug.Assert(expression != null);
4729Debug.Assert(expression != null);
4755Debug.Assert(type == SpecialType.System_UInt32 || type == SpecialType.System_UInt64);
4790Debug.Assert(argumentListBinder.IsSemanticModelBinder);
4822Debug.Assert((object)constructor != null);
4823Debug.Assert(constructor.MethodKind == MethodKind.Constructor ||
4825Debug.Assert(diagnostics != null);
4839Debug.Assert(constructorReturnType.IsVoidType()); //true of all constructors
4858Debug.Assert((object)initializerType != null ||
4894Debug.Assert(initializerArgumentListOpt.Parent.Kind() == SyntaxKind.ThisConstructorInitializer);
5000Debug.Assert(initializerType.IsErrorType() ||
5187Debug.Assert(result is not BoundBadExpression { ChildBoundNodes: var children } || !children.Any((child, node) => child.Syntax == node, node));
5294Debug.Assert(expression.Type is { });
5301Debug.Assert(conversion.IsValid);
5310Debug.Assert(length > 0);
5396Debug.Assert(!type.IsGenericOrNonGenericExpressionType(out _));
5483Debug.Assert(!conv.IsExtensionMethod);
5484Debug.Assert(conv.IsValid); // i.e. if it exists, then it is valid.
5551Debug.Assert(type.TypeKind is TypeKind.Class or TypeKind.Struct);
5595Debug.Assert(typeSyntax is not null);
5614Debug.Assert(syntax != null);
5615Debug.Assert((object)type != null);
5646Debug.Assert(syntax != null);
5647Debug.Assert((object)type != null);
5653Debug.Assert(syntax.Parent.Parent.Kind() != SyntaxKind.WithInitializerExpression);
5654Debug.Assert(rhsValueKind == BindValueKind.RValue);
5674Debug.Assert(initializerSyntax.Kind() == SyntaxKind.ObjectInitializerExpression ||
5676Debug.Assert((object)initializerType != null);
5732Debug.Assert(objectInitializerMemberBinder != null);
5738Debug.Assert((object)boundLeft.Type != null);
5766Debug.Assert(objectInitializerMemberBinder != null);
6070Debug.Assert(!boundMember.NeedsToBeConverted());
6092Debug.Assert(boundMember.HasAnyErrors);
6106Debug.Assert(memberNameMap != null);
6116Debug.Assert(memberInitializerSyntax.Kind() == SyntaxKind.SimpleAssignmentExpression);
6250Debug.Assert(initializerSyntax.Kind() == SyntaxKind.CollectionInitializerExpression);
6251Debug.Assert(initializerSyntax.Expressions.Any());
6252Debug.Assert((object)initializerType != null);
6405Debug.Assert(node.Kind() == SyntaxKind.ComplexElementInitializerExpression);
6436Debug.Assert(!boundElementInitializerExpressions.IsEmpty);
6455Debug.Assert(collectionInitializerAddMethodBinder.HasCollectionExpressionApplicableAddMethod(elementInitializer, implicitReceiver.Type, addMethods: out _, d));
6469Debug.Assert(collectionInitializerAddMethodBinder != null);
6470Debug.Assert(collectionInitializerAddMethodBinder.Flags.Includes(BinderFlags.CollectionInitializerAddMethod));
6471Debug.Assert(implicitReceiver != null);
6472Debug.Assert((object)implicitReceiver.Type != null);
6538Debug.Assert(addMethodInvocation.Kind == BoundKind.BadExpression);
6584Debug.Assert(enumeratorInfo.ElementType is { }); // ElementType is set always, even for IEnumerable.
6631Debug.Assert((object)constructor != null);
6632Debug.Assert(constructor.MethodKind == MethodKind.Constructor || constructor.MethodKind == MethodKind.StaticConstructor);
6659Debug.Assert((object)this.Compilation.Assembly != null);
6709Debug.Assert(finalApplicableCandidates[0].IsApplicable);
6930Debug.Assert((object)type != null);
6956Debug.Assert((object)interfaceType != null);
6957Debug.Assert(interfaceType.IsInterfaceType());
6958Debug.Assert((object)coClassType != null);
6959Debug.Assert(TypeSymbol.Equals(interfaceType.ComImportCoClass, coClassType, TypeCompareKind.ConsiderEverything2));
6960Debug.Assert(coClassType.TypeKind == TypeKind.Class || coClassType.TypeKind == TypeKind.Error);
7370Debug.Assert(
7391Debug.Assert(node.Kind() == SyntaxKind.Utf8StringLiteralExpression);
7392Debug.Assert(node.Token.Kind() is SyntaxKind.Utf8StringLiteralToken or SyntaxKind.Utf8SingleLineRawStringLiteralToken or SyntaxKind.Utf8MultiLineRawStringLiteralToken);
7422Debug.Assert(node != null);
7423Debug.Assert(invoked == SyntaxFacts.IsInvoked(node));
7435Debug.Assert(node.Kind() == SyntaxKind.PointerMemberAccessExpression);
7484Debug.Assert((left.Parent is MemberAccessExpressionSyntax { RawKind: (int)SyntaxKind.SimpleMemberAccessExpression } memberAccess && memberAccess.Expression == left) ||
7521Debug.Assert((object)leftType != null);
7530Debug.Assert(!leftType.IsDynamic());
7531Debug.Assert(IsPotentialColorColorReceiver(left, leftType));
7542Debug.Assert(!IsPotentialColorColorReceiver(left, leftType));
7659Debug.Assert(node != null);
7660Debug.Assert(boundLeft != null);
7694Debug.Assert((object)leftType == null);
7836Debug.Assert(sym.Kind == SymbolKind.NamedType);
7852Debug.Assert(symbols[0].Kind == SymbolKind.NamedType);
7862Debug.Assert(lookupResult.Error == null);
7887Debug.Assert(boundLeft is BoundTypeExpression);
7888Debug.Assert((object)leftType != null);
7963Debug.Assert(!resolution.IsNonMethodExtensionMember(out _));
7971Debug.Assert(!resolution.IsEmpty);
8016Debug.Assert(typeArgumentsOpt.IsDefault);
8039Debug.Assert(propertySymbol.ContainingType.ExtensionParameter is not null);
8071Debug.Assert(rightArity == (typeArgumentsWithAnnotations.IsDefault ? 0 : typeArgumentsWithAnnotations.Length));
8350Debug.Assert(receiver != null);
8380Debug.Assert(receiver != null);
8405Debug.Assert(node != null);
8406Debug.Assert(left != null);
8407Debug.Assert(lookupResult.IsMultiViable);
8408Debug.Assert(lookupResult.Symbols.Any());
8443Debug.Assert(symbol.Kind != SymbolKind.Method);
8525Debug.Assert(left.Type is not null);
8526Debug.Assert(!left.Type.IsDynamic());
8527Debug.Assert((options & ~(OverloadResolution.Options.IsMethodGroupConversion |
8618Debug.Assert(left.Type is not null);
8639Debug.Assert(arity == 0 || lookupResult.Symbols.All(s => s.Kind != SymbolKind.Property));
8686Debug.Assert(propertyResult?.HasAnyApplicableMember == true);
8728Debug.Assert(receiverType is not null);
8870Debug.Assert(lookupResult.Symbols.Any());
8874Debug.Assert((object)symbol == null);
9035Debug.Assert((object)underlyingType != null);
9085Debug.Assert(symbol is not TypeSymbol);
9237Debug.Assert(!methodOrPropertyGroup.Any());
9242Debug.Assert(result.Kind != LookupResultKind.Empty);
9243Debug.Assert(!result.Symbols.Any(s => s.IsIndexer()));
9289Debug.Assert(methodOrPropertyGroup.Any() || ((object)other != null));
9324Debug.Assert(members.All(m => m.Kind == member.Kind));
9332Debug.Assert(members.All(m => !m.IsIndexer()));
9370Debug.Assert(propertyGroup.ReceiverOpt is not null);
9420Debug.Assert(expr.Type.TryGetInlineArrayElementField() is not null);
9436Debug.Assert(tryInlineArrayAccess);
9437Debug.Assert(diagnosticsForBindElementAccessCore.DiagnosticBag is { });
9664Debug.Assert(node != null);
9665Debug.Assert(expr != null);
9666Debug.Assert((object)expr.Type != null);
9667Debug.Assert(arguments != null);
9695Debug.Assert(node != null);
9696Debug.Assert(expr != null);
9697Debug.Assert(arguments != null);
9756Debug.Assert(convertedArguments.Length == 1);
9778Debug.Assert(index != null);
9883Debug.Assert(expr != null);
9884Debug.Assert((object)targetType != null);
9900Debug.Assert(result != null); // If this ever fails (it shouldn't), then put a null-check around the diagnostics update.
9907Debug.Assert(node != null);
9908Debug.Assert(expr != null);
9909Debug.Assert(analyzedArguments != null);
9923Debug.Assert(expr.Type.IsPointerType());
9968Debug.Assert(node != null);
9969Debug.Assert(expr != null);
9970Debug.Assert((object)expr.Type != null);
9971Debug.Assert(analyzedArguments != null);
10003Debug.Assert(symbol.IsIndexer());
10022Debug.Assert(property.ParameterCount > 0);
10040Debug.Assert(receiver is not null);
10068Debug.Assert(receiver is not null);
10130Debug.Assert(receiver is not null);
10152Debug.Assert(finalApplicableCandidates[0].IsApplicable);
10277Debug.Assert(receiver is not null);
10297Debug.Assert(receiver.Type is not null);
10311Debug.Assert(lengthOrCountAccess is BoundPropertyAccess);
10312Debug.Assert(indexerOrSliceAccess is BoundIndexerAccess or BoundCall);
10313Debug.Assert(indexerOrSliceAccess.Type is not null);
10396Debug.Assert(receiver.Type is not null);
10444Debug.Assert(!argIsIndex);
10456Debug.Assert(!argIsIndex);
10536Debug.Assert(receiverPlaceholder.Type is not null);
10560Debug.Assert(lookupResult.IsClear);
10635Debug.Assert((options & ~(OverloadResolution.Options.IsMethodGroupConversion |
10727Debug.Assert(!methodResolution.HasAnyApplicableMethod);
10728Debug.Assert(!extensionMethodResolution.HasAnyApplicableMethod);
10729Debug.Assert(!methodResolution.IsEmpty);
10730Debug.Assert(!extensionMethodResolution.IsEmpty);
10744Debug.Assert(!extensionMethodResolution.IsEmpty);
10762Debug.Assert((options & ~(OverloadResolution.Options.IsMethodGroupConversion |
11066Debug.Assert(node.ReceiverOpt!.Type is not null); // extensions are only considered on member access
11202Debug.Assert(ContainingMemberOrLambda is { });
11203Debug.Assert(parameterRefKinds.IsDefault || parameterRefKinds.Length == parameterTypes.Length);
11205Debug.Assert(returnType.Type is { }); // Expecting System.Void rather than null return type.
11206Debug.Assert(!hasParams || parameterTypes.Length != 0);
11295Debug.Assert((location == null) ^ (node == null));
11349Debug.Assert((object)receiverType != null);
11465Debug.Assert(node != null);
11466Debug.Assert(node.Expression != null);
11472Debug.Assert(receiver != null);
FlowAnalysis\NullableWalker.cs (302)
63Debug.Assert(variables.Id == variableNullableStates.Id);
130Debug.Assert(TypeSymbol.Equals(RValueType.Type, LValueType.Type, TypeCompareKind.ConsiderEverything));
147Debug.Assert(!StateForLambda.HasValue);
350Debug.Assert(TypeAllowsConditionalState(visitResult.RValueType.Type)
448Debug.Assert(_targetTypedAnalysisCompletionOpt is null or { Count: 0 });
472Debug.Assert(!TrackingRegions);
473Debug.Assert(!useDelegateInvokeParameterTypes || delegateInvokeMethodOpt is object);
474Debug.Assert(baseOrThisInitializer is null or { MethodKind: MethodKind.Constructor });
547Debug.Assert(AreCloseEnough(placeholder.Type, result.RValueType.Type));
548Debug.Assert(expression != null || placeholder.Kind == BoundKind.InterpolatedStringArgumentPlaceholder);
557Debug.Assert(_resultForPlaceholdersOpt is { });
559Debug.Assert(removed);
565Debug.Assert(placeholder is { });
648Debug.Assert(_useConstructorExitWarnings);
653Debug.Assert(thisParameter is object);
993Debug.Assert(requiredMember.IsRequired());
1465Debug.Assert(node.SyntaxTree is object);
1511Debug.Assert(method.IsConstructor());
1831Debug.Assert(diagnostics != null);
1832Debug.Assert(getterNullResilienceData is null || symbol is SourcePropertyAccessorSymbol { MethodKind: MethodKind.PropertyGet });
1833Debug.Assert(getterNullResilienceData is null || !useConstructorExitWarnings);
1857Debug.Assert(!walker.IsConditionalState);
1875Debug.Assert(snapshotBuilderOpt is null || symbol is object);
1882Debug.Assert(walker._variables.Id == initialState.Value.Id);
1888Debug.Assert(!badRegion);
1909Debug.Assert(result.RequiredAnalysis == requiredAnalysis);
1925Debug.Assert(!IsConditionalState);
1948Debug.Assert(node is object);
1998Debug.Assert(slot > 0);
2087Debug.Assert(member?.RequiresInstanceReceiver() ?? true);
2106Debug.Assert(node.HasErrors ||
2226Debug.Assert(containingSlot == 0);
2623Debug.Assert(!IsConditionalState);
2677Debug.Assert(ErrorFacts.NullableWarnings.Contains(MessageProvider.Instance.GetIdForErrorCode((int)errorCode)));
2686Debug.Assert(targetSlot > 0);
2687Debug.Assert(EmptyStructTypeCache.IsTrackableStructType(targetType));
2721Debug.Assert(targetContainerSlot > 0);
2722Debug.Assert(skipSlot > 0);
2806Debug.Assert(slot > 0);
2827Debug.Assert(targetSlot > 0);
2831Debug.Assert(actualType is { });
2839Debug.Assert(conversion.Kind is ConversionKind.Identity or ConversionKind.ImplicitReference);
2872Debug.Assert(false);
2900Debug.Assert(targetSlot > 0);
2901Debug.Assert(valueSlot > 0);
2983Debug.Assert(!IsConditionalState);
3037Debug.Assert(!IsConditionalState);
3143Debug.Assert((object)returnType != LambdaSymbol.ReturnTypeIsBeingInferred);
3193Debug.Assert(node.Type.IsErrorType() || type.Type.IsErrorType());
3225Debug.Assert(!TrackingRegions);
3292Debug.Assert(newBodiesVisited);
3382Debug.Assert((object?)variables.Container == container);
3394Debug.Assert(!useDelegateInvokeParameterTypes || delegateInvokeMethod is object);
3395Debug.Assert(!useDelegateInvokeReturnType || delegateInvokeMethod is object);
3517Debug.Assert(!IsConditionalState);
3543Debug.Assert(!IsConditionalState);
3632Debug.Assert(!IsConditionalState);
3667Debug.Assert(type.Type.IsErrorType());
3686Debug.Assert(node is BoundExpression or BoundPattern);
3687Debug.Assert(!IsConditionalState);
3704Debug.Assert((object?)resultType.Type != _invalidType.Type);
3705Debug.Assert(AreCloseEnough(resultType.Type, node.Type));
3803Debug.Assert(!_completingTargetTypedExpression);
3890Debug.Assert(node.Placeholder is { });
3894Debug.Assert(initializer.ArgsToParamsOpt.IsDefault);
3966Debug.Assert(completion is not null);
3976Debug.Assert(TypeSymbol.Equals(strippedTargetCollectionType, node.Type, TypeCompareKind.IgnoreNullableModifiersForReferenceTypes));
4024Debug.Assert(foundIterationType);
4029Debug.Assert(!targetElementType.HasType);
4043Debug.Assert(node.ExpressionPlaceholder is { });
4044Debug.Assert(node.EnumeratorInfoOpt is { });
4057Debug.Assert(node.HasErrors);
4058Debug.Assert(node.Conversion is null);
4059Debug.Assert(node.EnumeratorInfoOpt is null);
4067Debug.Assert(!IsConditionalState);
4077Debug.Assert(isTargetTyped == argumentsCompletion is not null);
4108Debug.Assert(argumentsCompletion is not null);
4109Debug.Assert(initialStateInferenceCompletion is not null);
4114Debug.Assert(argumentsCompletion is null);
4115Debug.Assert(initialStateInferenceCompletion is null);
4116Debug.Assert(initializerCompletion is null);
4132Debug.Assert(resultState == NullableFlowState.NotNull);
4137Debug.Assert(TypeSymbol.Equals(resultTypeWithAnnotations.Type, node.Type, TypeCompareKind.IgnoreNullableModifiersForReferenceTypes));
4175Debug.Assert(node.Kind is BoundKind.ObjectCreationExpression or BoundKind.DynamicObjectCreationExpression or BoundKind.NewT or BoundKind.NoPiaObjectCreationExpression);
4244Debug.Assert(completion is null);
4245Debug.Assert(resultState == NullableFlowState.NotNull);
4257Debug.Assert(!delayCompletionForType || containingSlot == -1);
4307Debug.Assert(!delayCompletionForType || containingSlot == -1);
4375Debug.Assert(argumentsCompletion is null);
4376Debug.Assert(initializationCompletion is null);
4395Debug.Assert(initializationCompletion is null || symbol is not null);
4401Debug.Assert(result is null);
4411Debug.Assert(TypeSymbol.Equals(objectInitializer.Type, GetTypeOrReturnType(symbol), TypeCompareKind.IgnoreNullableModifiersForReferenceTypes));
4426Debug.Assert(!delayCompletionForType || slot == -1);
4442Debug.Assert(nestedCompletion is null);
4467Debug.Assert(!delayCompletionForType || conversionCompletion is null);
4474Debug.Assert(GetTypeOrReturnTypeWithAnnotations(symbol).HasType);
4486Debug.Assert(conversionCompletion is not null);
4490Debug.Assert(conversionCompletion is null);
4503Debug.Assert(result is null);
4542Debug.Assert(TypeSymbol.Equals(containingType, receiverResult.RValueType.Type, TypeCompareKind.IgnoreNullableModifiersForReferenceTypes));
4543Debug.Assert(TypeSymbol.Equals(containingType, receiverResult.LValueType.Type, TypeCompareKind.IgnoreNullableModifiersForReferenceTypes));
4559Debug.Assert(visitArgumentsCompletion is not null);
4563Debug.Assert(visitArgumentsCompletion is null);
4564Debug.Assert(reinferredMethod is object);
4600Debug.Assert(TypeSymbol.Equals(containingType, receiverResult.RValueType.Type, TypeCompareKind.IgnoreNullableModifiersForReferenceTypes));
4601Debug.Assert(TypeSymbol.Equals(containingType, receiverResult.LValueType.Type, TypeCompareKind.IgnoreNullableModifiersForReferenceTypes));
4678Debug.Assert(node.Type is object);
4696Debug.Assert((object)placeholder != null);
4702Debug.Assert(!IsConditionalState);
4703Debug.Assert(node.Type.IsAnonymousType);
4880Debug.Assert(namedType.Name == "Span");
4881Debug.Assert(namedType.OriginalDefinition.Arity == 1);
4887Debug.Assert(namedType.Name == "Span");
4888Debug.Assert(namedType.OriginalDefinition.Arity == 1);
4997Debug.Assert(!IsConditionalState);
5001Debug.Assert(!IsConditionalState);
5002Debug.Assert(!node.Expression.Type!.IsValueType);
5031Debug.Assert(!IsConditionalState);
5035Debug.Assert(!IsConditionalState);
5036Debug.Assert(expressionType is not null);
5037Debug.Assert(expressionType.IsValueType);
5111Debug.Assert(!IsConditionalState);
5269Debug.Assert(binary.Type.SpecialType == SpecialType.System_Boolean);
5302Debug.Assert(!IsConditionalState);
5337Debug.Assert(operand == expr);
5355Debug.Assert(!IsConditionalState);
5359Debug.Assert(binary.Type!.SpecialType == SpecialType.System_Boolean);
5485Debug.Assert(!IsConditionalState);
5586Debug.Assert(operand != null);
5834Debug.Assert(targetType.Type.ContainsErrorType() ||
5846Debug.Assert(TypeSymbol.Equals(targetType.Type, rightResult.Type, TypeCompareKind.AllIgnoreOptions));
5857Debug.Assert(!IsConditionalState);
5908Debug.Assert(rightType is object);
5915Debug.Assert(!conversion.IsUserDefined);
5920Debug.Assert(!conversion.IsUserDefined);
5943Debug.Assert(conversionResult.Type is not null);
5972Debug.Assert(targetType.HasType);
5984Debug.Assert(!IsConditionalState);
6022Debug.Assert(!IsConditionalState);
6068Debug.Assert(innerCondAccess.Receiver is not (BoundConditionalAccess or BoundConversion));
6080Debug.Assert(expr is BoundExpression);
6090Debug.Assert(expr is BoundExpression);
6251Debug.Assert(!wasTargetTyped);
6258Debug.Assert(node is BoundUnconvertedConditionalOperator);
6259Debug.Assert(_returnTypesOpt is not null || _disableDiagnostics);
6351Debug.Assert(!isRef);
6363Debug.Assert(isRef);
6497Debug.Assert(node.InvokedAsExtensionMethod || isNewExtensionMethod);
6504Debug.Assert(node.Method.ContainingType.ExtensionParameter is not null);
6543Debug.Assert(node.ReceiverOpt is null);
6633Debug.Assert(newMethod is not null);
6657Debug.Assert(extensionParameter is not null);
6691Debug.Assert(extensionParameter is not null);
6742Debug.Assert(arguments.Length == 2);
6753Debug.Assert(arguments.Length == 1);
6842Debug.Assert(baseType is object);
6914Debug.Assert(!compareExchangeInfo.IsDefault);
6936Debug.Assert(argsToParamsOpt is { IsDefault: true } or { Length: 3 });
7179Debug.Assert(result.completion is null);
7201Debug.Assert(!arguments.IsDefault);
7202Debug.Assert(!expanded || !parametersOpt.IsDefault);
7203Debug.Assert(refKindsOpt.IsDefaultOrEmpty || refKindsOpt.Length == arguments.Length);
7204Debug.Assert(argsToParamsOpt.IsDefault || argsToParamsOpt.Length == arguments.Length);
7212Debug.Assert(!arguments.Any(a => a.IsParamsArrayOrCollection));
7310Debug.Assert(method is ErrorMethodSymbol);
7433Debug.Assert(result.completion is null);
7445Debug.Assert(arguments.Count(a => a.IsParamsArrayOrCollection) <= 1);
7452Debug.Assert(parametersOpt.IsDefault || arguments.Length == parametersOpt.Length);
7480Debug.Assert(defaultArguments.IsNull || elements.Length == 1);
7481Debug.Assert(elements.Length == 1 || a == arguments.Length - 1);
7590Debug.Assert(receiverSlot >= 0);
7679Debug.Assert(!IsConditionalState);
7743Debug.Assert(!IsConditionalState);
7791Debug.Assert(!IsConditionalState);
7810Debug.Assert(!this.IsConditionalState);
7827Debug.Assert(argumentResultType is not null);
7883Debug.Assert(!this.IsConditionalState);
8068Debug.Assert(!IsConditionalState);
8073Debug.Assert(!IsConditionalState);
8233Debug.Assert(variables.Id == localState.Id);
8252Debug.Assert(!expanded);
8262Debug.Assert(paramsIterationType.HasType);
8279Debug.Assert(member.GetMemberArityIncludingExtension() != 0);
8369Debug.Assert(false); // unexpected value
8408Debug.Assert(lambdaState.HasValue);
8421Debug.Assert(collectionExpressionVisitResults is not null);
8422Debug.Assert(collectionExpressionVisitResults.Length == collection.Elements.Length);
8551Debug.Assert(group != null || !conversion.ExplicitCastInCode); // Explicit conversions should include a group.
8664Debug.Assert((object)symbol != null);
8698Debug.Assert(symbol.ContainingType.IsDefinition);
8735Debug.Assert(false);
8765Debug.Assert(targetType.HasType);
8810Debug.Assert(completion is null);
8841Debug.Assert(targetTypeOpt.HasType);
8870Debug.Assert(result.completion is null);
8900Debug.Assert(!IsConditionalState);
8936Debug.Assert(diagnostics.DiagnosticBag is { });
8962Debug.Assert(tupleType.IsTupleType);
8963Debug.Assert(values.Length == types.Length);
8964Debug.Assert(values.Length == (useRestField ? Math.Min(tupleType.TupleElements.Length, NamedTypeSymbol.ValueTupleRestPosition) : tupleType.TupleElements.Length));
8997Debug.Assert(index != -1);
9004Debug.Assert(containingType.OriginalDefinition.SpecialType == SpecialType.System_Nullable_T);
9005Debug.Assert(containingSlot > 0);
9006Debug.Assert(valueSlot > 0);
9027Debug.Assert(conversion.Kind == ConversionKind.ImplicitTuple || conversion.Kind == ConversionKind.ExplicitTuple);
9028Debug.Assert(slot > 0);
9029Debug.Assert(valueSlot > 0);
9131Debug.Assert(diagnostics.DiagnosticBag is { });
9187Debug.Assert(diagnostics.DiagnosticBag is { });
9242Debug.Assert(conversionOpt is null
9289Debug.Assert(!trackMembers || !IsConditionalState);
9290Debug.Assert(conversionOperand != null);
9316Debug.Assert(conversionOpt is null);
9484Debug.Assert(conversionOperand != null);
9492Debug.Assert(containingSlot > 0);
9531Debug.Assert(conversionOperand != null);
9587Debug.Assert(targetType.IsValueType || targetType.IsErrorType());
9690Debug.Assert(dependsOn); // If this case fails, add a corresponding test.
9763Debug.Assert(handlerData.ArgumentPlaceholders.IsEmpty
9836Debug.Assert(conversionOperand != null);
9837Debug.Assert(targetTypeWithNullability.HasType);
9838Debug.Assert(diagnosticLocation != null);
9839Debug.Assert(conversion.Kind == ConversionKind.ExplicitUserDefined || conversion.Kind == ConversionKind.ImplicitUserDefined);
9871Debug.Assert(method is object);
9872Debug.Assert(method.ParameterCount == 1);
9873Debug.Assert(operandType.Type is object);
9980Debug.Assert(conversionOpt.ConversionGroupOpt == conversionGroup);
9992Debug.Assert(conversionOpt.ConversionGroupOpt == conversionGroup);
10053Debug.Assert(operandType.Type is object);
10054Debug.Assert(diagnosticLocation != null);
10087Debug.Assert(node.Type.IsDelegateType());
10134Debug.Assert(analysisCompletion is null);
10146Debug.Assert(TypeSymbol.Equals(resultTypeWithAnnotations.Type, node.Type, TypeCompareKind.IgnoreNullableModifiersForReferenceTypes));
10223Debug.Assert(arg.Type is not null);
10242Debug.Assert(arg.Type is not null);
10263Debug.Assert(!IsConditionalState);
10329Debug.Assert(_binder is object);
10338Debug.Assert(receiverParameter is not null);
10372Debug.Assert(delegateTypeOpt?.IsDelegateType() != false);
10440Debug.Assert(!IsConditionalState);
10545Debug.Assert(expr is not BoundObjectInitializerMember);
10654Debug.Assert(conversion.Kind == ConversionKind.Deconstruction);
10682Debug.Assert(invocation is object);
10683Debug.Assert(rightResult.Type is object);
10720Debug.Assert(parameters.Length - offset == n);
10727Debug.Assert(receiverParameter is not null);
10771Debug.Assert(rightParts.Length == n);
10938Debug.Assert(!IsConditionalState);
11116Debug.Assert(!IsConditionalState);
11240Debug.Assert(MakeSlot(node) == -1);
11332Debug.Assert(node.ReceiverOpt is not null);
11336Debug.Assert(extensionParameter is not null);
11346Debug.Assert(updatedProperty is not null);
11448Debug.Assert(!IsConditionalState);
11449Debug.Assert(!member.GetIsNewExtensionMember());
11480Debug.Assert(!IsConditionalState);
11517Debug.Assert(containingType.IsNullableType());
11518Debug.Assert(TypeSymbol.Equals(NominalSlotType(containingSlot), containingType, TypeCompareKind.IgnoreNullableModifiersForReferenceTypes));
11530Debug.Assert(node.HasErrors);
11582Debug.Assert(resultType is object);
11629Debug.Assert(!foundMultiple);
11630Debug.Assert(targetTypeWithAnnotations.HasType);
11691Debug.Assert(wellKnownSpan is WellKnownType.System_Span_T or WellKnownType.System_ReadOnlySpan_T);
11737Debug.Assert(disposalPlaceholder is not null);
11915Debug.Assert(!IsConditionalState);
12093Debug.Assert(leftOperand is not null);
12118Debug.Assert(isAnd || op == BinaryOperatorKind.Or);
12123Debug.Assert(IsConditionalState);
12149Debug.Assert(!isBool);
12222Debug.Assert(placeholder is object);
12279Debug.Assert(!this.IsConditionalState);
12299Debug.Assert(!this.IsConditionalState);
12318Debug.Assert(node.Type.SpecialType == SpecialType.System_Boolean);
12370Debug.Assert(node.Type.SpecialType == SpecialType.System_RuntimeArgumentHandle);
12378Debug.Assert(node.Type is null);
12385Debug.Assert(!IsConditionalState);
12393Debug.Assert(!IsConditionalState);
12402Debug.Assert(node.WasCompilerGenerated);
12410Debug.Assert(node.WasCompilerGenerated);
12449Debug.Assert(node.Type.IsDynamic());
12468Debug.Assert(node.Type.IsDynamic());
12469Debug.Assert(node.Type.IsReferenceType);
12479Debug.Assert(!IsConditionalState);
12575Debug.Assert(node.Type.IsDynamic());
12588Debug.Assert(!this.IsConditionalState);
12598Debug.Assert(receiverOpt.Type is null || AreCloseEnough(receiverOpt.Type, resultTypeSymbol));
12719Debug.Assert(node.Type is null || node.Type.IsErrorType() || node.Type.IsRefLikeType);
12739Debug.Assert(node.Type is not null);
12898Debug.Assert(ResultType is TypeWithState { Type: FunctionPointerTypeSymbol { }, State: NullableFlowState.NotNull });
12969Debug.Assert(!otherIsConditional);
13106Debug.Assert(Id == variables.Container!.Id);
13165Debug.Assert(state.Id > id);
13179Debug.Assert(Id < variables.Id);
13225Debug.Assert(Id > id);
13238Debug.Assert(index < Capacity);
13240Debug.Assert((_state[index], _state[index + 1]) != (false, false));
13257Debug.Assert(Id > id);
13312Debug.Assert(Id == other.Id);
13319Debug.Assert(_state.Capacity == other._state.Capacity);
13341Debug.Assert(Id == other.Id);
13348Debug.Assert(_state.Capacity == other._state.Capacity);
Lowering\LocalRewriter\LocalRewriter_CollectionExpression.cs (72)
32Debug.Assert(conversion.Kind == ConversionKind.CollectionExpression);
33Debug.Assert(!_inExpressionLambda);
34Debug.Assert(_additionalLocals is { });
35Debug.Assert(node.Type is { });
61Debug.Assert(elementType is { });
118Debug.Assert(spreadElement.IteratorBody is { });
136Debug.Assert(spreadElement.IteratorBody is { });
138Debug.Assert(iteratorBody is { });
151Debug.Assert(result is { });
175Debug.Assert(singleSpread.Expression.Type is not null);
192Debug.Assert(targetEnumerableType.OriginalDefinition == (object)_compilation.GetSpecialType(SpecialType.System_Collections_Generic_IEnumerable_T));
247Debug.Assert(!_inExpressionLambda);
248Debug.Assert(_additionalLocals is { });
249Debug.Assert(node.CollectionCreation is null); // shouldn't have generated a constructor call
250Debug.Assert(node.Placeholder is null);
262Debug.Assert(collectionTypeKind is CollectionExpressionTypeKind.Span or CollectionExpressionTypeKind.ReadOnlySpan);
263Debug.Assert(spanType.OriginalDefinition.Equals(_compilation.GetWellKnownType(
265Debug.Assert(elementType.Equals(spanType.TypeArgumentsWithAnnotationsNoUseSiteDiagnostics[0], TypeCompareKind.AllIgnoreOptions));
277Debug.Assert(!IsAllocatingRefStructCollectionExpression(node, collectionTypeKind, elementType.Type, _compilation));
286Debug.Assert(!IsAllocatingRefStructCollectionExpression(node, collectionTypeKind, elementType.Type, _compilation));
294Debug.Assert(IsAllocatingRefStructCollectionExpression(node, collectionTypeKind, elementType.Type, _compilation));
315Debug.Assert(list.Type is { });
316Debug.Assert(list.Type.OriginalDefinition.Equals(_compilation.GetWellKnownType(WellKnownType.System_Collections_Generic_List_T), TypeCompareKind.AllIgnoreOptions));
327Debug.Assert(TypeSymbol.Equals(array.Type, spanConstructor.Parameters[0].Type, TypeCompareKind.AllIgnoreOptions));
333Debug.Assert(!_inExpressionLambda);
338Debug.Assert(rewrittenReceiver is { });
347Debug.Assert(placeholder is { });
395Debug.Assert(!_inExpressionLambda);
396Debug.Assert(_factory.ModuleBuilderOpt is { });
397Debug.Assert(_diagnostics.DiagnosticBag is { });
398Debug.Assert(node.Type is NamedTypeSymbol);
399Debug.Assert(node.CollectionCreation is null);
400Debug.Assert(node.Placeholder is null);
418Debug.Assert(numberIncludingLastSpread == 0);
469Debug.Assert(!_inExpressionLambda);
470Debug.Assert(node.Type is { });
471Debug.Assert(node.CollectionCreation is null);
472Debug.Assert(node.Placeholder is null);
473Debug.Assert(node.CollectionBuilderMethod is { });
474Debug.Assert(node.CollectionBuilderInvocationPlaceholder is { });
475Debug.Assert(node.CollectionBuilderInvocationConversion is { });
480Debug.Assert(spanType.OriginalDefinition.Equals(_compilation.GetWellKnownType(WellKnownType.System_ReadOnlySpan_T), TypeCompareKind.AllIgnoreOptions));
545Debug.Assert(elements.Length > 0);
546Debug.Assert(elements.All(e => e is BoundExpression));
547Debug.Assert(_factory.ModuleBuilderOpt is { });
548Debug.Assert(_diagnostics.DiagnosticBag is { });
549Debug.Assert(_compilation.Assembly.RuntimeSupportsInlineArrayTypes);
550Debug.Assert(_additionalLocals is { });
571Debug.Assert(inlineArrayType.HasInlineArrayAttribute(out int inlineArrayLength) && inlineArrayLength == arrayLength);
612Debug.Assert(span.Type is { });
731Debug.Assert(TryOptimizeSingleSpreadToArray(node, arrayType) is null);
788Debug.Assert(arrayTemp.Type is ArrayTypeSymbol);
789Debug.Assert(indexTemp.Type is { SpecialType: SpecialType.System_Int32 });
903Debug.Assert(type is not null);
999Debug.Assert((object)spreadOperandAsSpan != rewrittenSpreadOperand || spreadOperandAsSpan is BoundLocal { LocalSymbol.SynthesizedKind: SynthesizedLocalKind.LoweringTemp });
1022Debug.Assert(!_inExpressionLambda);
1093Debug.Assert(useKnownLength);
1094Debug.Assert(setCount is { });
1095Debug.Assert(asSpan is { });
1096Debug.Assert(knownLengthTemp is { });
1124Debug.Assert(spanTemp.Type is NamedTypeSymbol);
1125Debug.Assert(indexTemp.Type is { SpecialType: SpecialType.System_Int32 });
1177Debug.Assert(rewrittenSpreadOperand.Type is not null);
1258Debug.Assert(statements.Length > 0);
1286Debug.Assert(collectionPlaceholder is { });
1291Debug.Assert(lengthAccess is { });
1310Debug.Assert(sum is { });
1332Debug.Assert(enumeratorInfo is { });
1333Debug.Assert(convertedExpression is { });
1334Debug.Assert(expressionPlaceholder is { });
1335Debug.Assert(elementPlaceholder is { });
1336Debug.Assert(iteratorBody is { });
Lowering\LocalRewriter\LocalRewriter_Conversion.cs (90)
25Debug.Assert(node.Type is NamedTypeSymbol { IsInterpolatedStringHandlerType: true });
39Debug.Assert(node.Operand is BoundConvertedSwitchExpression { WasTargetTyped: true });
43Debug.Assert(node.Operand is BoundConditionalOperator { WasTargetTyped: true });
47Debug.Assert(node.Operand is not null);
52Debug.Assert(node.Operand is BoundObjectCreationExpressionBase { WasTargetTyped: true });
56Debug.Assert(node.Operand is BoundObjectCreationExpressionBase { WasTargetTyped: true } or
82Debug.Assert(result.Type!.Equals(toType, TypeCompareKind.IgnoreDynamicAndTupleNames | TypeCompareKind.IgnoreNullableModifiersForReferenceTypes));
94Debug.Assert(node.Type is not null);
95Debug.Assert(_compilation.IsReadOnlySpanType(node.Type));
97Debug.Assert(byteType.SpecialType == SpecialType.System_Byte);
142Debug.Assert(byteArray.IsSZArray);
143Debug.Assert(byteArray.ElementType.SpecialType == SpecialType.System_Byte);
166Debug.Assert(node.OperatorKind is BinaryOperatorKind.Utf8Addition);
194Debug.Assert(utf8Addition.OperatorKind is BinaryOperatorKind.Utf8Addition);
224Debug.Assert(rewrittenNode.Type is { });
271Debug.Assert(result.Type is { } rt && rt.Equals(rewrittenType, TypeCompareKind.AllIgnoreOptions));
305Debug.Assert(oldNodeOpt == null || oldNodeOpt.Syntax == syntax);
306Debug.Assert(rewrittenType is { });
307Debug.Assert(_factory.ModuleBuilderOpt is { });
308Debug.Assert(_diagnostics.DiagnosticBag is { });
318Debug.Assert(rewrittenOperand.Type is { });
426Debug.Assert(rewrittenOperand.Type is { });
441Debug.Assert(rewrittenOperand.Type is { });
444Debug.Assert(rewrittenOperand.Type.Equals(rewrittenType, TypeCompareKind.IgnoreDynamicAndTupleNames | TypeCompareKind.IgnoreNullableModifiersForReferenceTypes));
487Debug.Assert(rewrittenOperand.Type is { });
497Debug.Assert(rewrittenOperand.Type.IsEnumType());
508Debug.Assert(rewrittenType.IsEnumType());
533Debug.Assert(conversion.Method is null);
534Debug.Assert(!conversion.IsExtensionMethod);
552Debug.Assert(symbolOpt is { });
562Debug.Assert(oldNodeOpt is { });
565Debug.Assert(method is { });
569Debug.Assert(receiver is { });
576Debug.Assert(_factory.TopLevelMethod is { });
594Debug.Assert(rewrittenOperand.Type is not null);
605Debug.Assert(spanType.OriginalDefinition.Equals(_compilation.GetWellKnownType(WellKnownType.System_Span_T), TypeCompareKind.AllIgnoreOptions));
621Debug.Assert(sourceType is not null);
646Debug.Assert(destinationType.IsReadOnlySpan());
647Debug.Assert(conversion.Kind is ConversionKind.ImplicitSpan);
678Debug.Assert(destinationType.IsReadOnlySpan());
679Debug.Assert(conversion.Kind is ConversionKind.ImplicitSpan);
680Debug.Assert(Binder.NeedsSpanCastUp(sourceType, destinationType));
697Debug.Assert(destinationType.IsReadOnlySpan());
698Debug.Assert(conversion.Kind is ConversionKind.ImplicitSpan);
740Debug.Assert(_factory.ModuleBuilderOpt is { });
753Debug.Assert((object)target != null);
815Debug.Assert(rewrittenOperand.Type is { });
847Debug.Assert(conversion.IsValid);
872Debug.Assert(conversion.Method is { });
873Debug.Assert(conversion.BestUserDefinedConversionAnalysis is { });
899Debug.Assert(rewrittenOperand.Type is { });
956Debug.Assert(rewrittenOperand.Type is { });
997Debug.Assert(expression.Type is { });
1043Debug.Assert((object)rewrittenType != null);
1051Debug.Assert(rewrittenOperandType is { });
1052Debug.Assert(rewrittenType.IsNullableType() || rewrittenOperandType.IsNullableType());
1099Debug.Assert((object)rewrittenType != null);
1100Debug.Assert(rewrittenOperand.Type is { });
1102Debug.Assert(rewrittenType.IsNullableType() || rewrittenOperandType.IsNullableType());
1224Debug.Assert(conversion.Method is { });
1244Debug.Assert(operand != null);
1245Debug.Assert((object)type != null);
1313Debug.Assert(TypeSymbol.Equals(seq.Type, conditional.Type, TypeCompareKind.ConsiderEverything2));
1314Debug.Assert(TypeSymbol.Equals(conditional.Type, conditional.Consequence.Type, TypeCompareKind.ConsiderEverything2));
1315Debug.Assert(TypeSymbol.Equals(conditional.Type, conditional.Alternative.Type, TypeCompareKind.ConsiderEverything2));
1346Debug.Assert(conversion.Method is { } && !conversion.Method.ReturnsVoid && conversion.Method.ParameterCount == 1);
1347Debug.Assert(rewrittenOperand.Type is { });
1377Debug.Assert(TypeSymbol.Equals(result.Type, rewrittenType, TypeCompareKind.ConsiderEverything2));
1385Debug.Assert(resultType.IsNullableType() && TypeSymbol.Equals(resultType.GetNullableUnderlyingType(), call.Method.ReturnType, TypeCompareKind.ConsiderEverything2));
1400Debug.Assert(rewrittenOperand.Type is { });
1414Debug.Assert((object)rewrittenType != null);
1415Debug.Assert(rewrittenOperand.Type.IsNullableType());
1446Debug.Assert(conversion.Method is { });
1490Debug.Assert(rewrittenOperand != null);
1491Debug.Assert((object)rewrittenType != null);
1492Debug.Assert(rewrittenOperand.Type is { });
1493Debug.Assert(!_compilation.Assembly.RuntimeSupportsNumericIntPtr);
1506Debug.Assert(!method.ReturnsVoid);
1507Debug.Assert(method.ParameterCount == 1);
1513Debug.Assert(target.IsNullableType());
1539Debug.Assert((object)source != null);
1540Debug.Assert((object)target != null);
1699Debug.Assert(fromType.SpecialType == SpecialType.System_Decimal || toType.SpecialType == SpecialType.System_Decimal);
1718Debug.Assert(operand.Type is { });
1746Debug.Assert(TypeSymbol.Equals(method.ReturnType, toType, TypeCompareKind.ConsiderEverything2));
1763Debug.Assert(meth is { });
1792Debug.Assert(!_compilation.Assembly.RuntimeSupportsNumericIntPtr);
1823Debug.Assert(underlying is { });
1836Debug.Assert(underlying is { });
1868Debug.Assert(!meth.ContainingType.IsInterface);
Lowering\LocalRewriter\LocalRewriter_ObjectOrCollectionInitializerExpression.cs (41)
38Debug.Assert(!_inExpressionLambda);
39Debug.Assert(rewrittenReceiver != null);
68Debug.Assert(_inExpressionLambda);
100Debug.Assert(!elementInitializer.AddMethod.CallsAreOmitted(initializer.SyntaxTree));
102Debug.Assert(!elementInitializer.InvokedAsExtensionMethod);
103Debug.Assert(!elementInitializer.AddMethod.IsExtensionMethod);
104Debug.Assert(!elementInitializer.AddMethod.GetIsNewExtensionMember());
105Debug.Assert(elementInitializer.Arguments.Length == elementInitializer.AddMethod.ParameterCount);
106Debug.Assert(elementInitializer.ImplicitReceiverOpt is BoundObjectOrCollectionValuePlaceholder);
129Debug.Assert(rewrittenReceiver is { } || _inExpressionLambda);
143Debug.Assert(!_inExpressionLambda);
144Debug.Assert(initializer.Kind == BoundKind.DynamicCollectionElementInitializer);
183Debug.Assert(addMethod.Name == "Add");
184Debug.Assert(addMethod.Parameters
187Debug.Assert(initializer.Arguments.Any());
188Debug.Assert(!_inExpressionLambda);
231Debug.Assert(addMethod.IsStatic);
232Debug.Assert(addMethod.IsExtensionMethod);
233Debug.Assert(rewrittenReceiver is null);
289Debug.Assert(!_inExpressionLambda);
309Debug.Assert(rewrittenReceiver != null);
310Debug.Assert(!_inExpressionLambda);
332Debug.Assert(memberInit is { });
336Debug.Assert(memberInit.Arguments.Count(a => a.IsParamsArrayOrCollection) <= (memberInit.Expanded ? 1 : 0));
360Debug.Assert(!memberInit.Expanded);
377Debug.Assert(setMember.SiteInitialization is { });
389Debug.Assert(getMember.SiteInitialization is { });
400Debug.Assert(assignment.Type.IsDynamic() || TypeSymbol.Equals(rewrittenAccess.Type, assignment.Type, TypeCompareKind.AllIgnoreOptions));
411Debug.Assert(initializerMember is { });
421Debug.Assert(setMember.SiteInitialization is { });
428Debug.Assert(getMember.SiteInitialization is { });
437Debug.Assert(rewrittenArrayAccess is { });
441Debug.Assert(!arrayAccess.Indices.Any(a => a.IsParamsArrayOrCollection));
452Debug.Assert(getSubArrayCall.Arguments.Length == 2);
454Debug.Assert(TypeSymbol.Equals(rangeArgument.Type, _compilation.GetWellKnownType(WellKnownType.System_Range), TypeCompareKind.ConsiderEverything));
472Debug.Assert(TypeSymbol.Equals(rewrittenAccess.Type, assignment.Type, TypeCompareKind.AllIgnoreOptions));
505Debug.Assert(TypeSymbol.Equals(rewrittenAccess.Type, assignment.Type, TypeCompareKind.AllIgnoreOptions));
539Debug.Assert(TypeSymbol.Equals(rewrittenAccess.Type, assignment.Type, TypeCompareKind.AllIgnoreOptions));
578Debug.Assert(initializers is not null);
696Debug.Assert(memberSymbol is object);
700Debug.Assert(_compilation.Conversions.ClassifyConversionFromType(rewrittenReceiver.Type, memberSymbol.ContainingType, isChecked: false, ref discardedUseSiteInfo).IsImplicit ||
Lowering\LocalRewriter\LocalRewriter_UnaryOperator.cs (41)
38Debug.Assert(false); // these should have been represented as a BoundIncrementOperator
85Debug.Assert((kind == UnaryOperatorKind.DynamicTrue || kind == UnaryOperatorKind.DynamicFalse) && type.SpecialType == SpecialType.System_Boolean
87Debug.Assert(method is null);
113Debug.Assert(method is { });
114Debug.Assert(TypeSymbol.Equals(type, method.ReturnType, TypeCompareKind.ConsiderEverything2));
134Debug.Assert(underlyingType is { });
277Debug.Assert(result.Type is { });
328Debug.Assert(TypeSymbol.Equals(seq.Type, conditional.Type, TypeCompareKind.ConsiderEverything2));
329Debug.Assert(TypeSymbol.Equals(conditional.Type, conditional.Consequence.Type, TypeCompareKind.ConsiderEverything2));
330Debug.Assert(TypeSymbol.Equals(conditional.Type, conditional.Alternative.Type, TypeCompareKind.ConsiderEverything2));
407Debug.Assert(node.MethodOpt is { });
408Debug.Assert(node.OperandConversion is null || (node.Operand.Type!.IsReferenceType && node.MethodOpt.GetIsNewExtensionMember()));
414Debug.Assert(node.Type.IsVoidType());
422Debug.Assert(operandType is { });
423Debug.Assert(TypeSymbol.Equals(operandType, node.Type, TypeCompareKind.AllIgnoreOptions));
451Debug.Assert(node.OperandConversion is null);
459Debug.Assert(operandType is { });
467Debug.Assert(TypeSymbol.Equals(operandType, transformedLHS.Type, TypeCompareKind.AllIgnoreOptions));
587Debug.Assert(operandType is { });
588Debug.Assert(TypeSymbol.Equals(operandType, node.Type, TypeCompareKind.ConsiderEverything2));
639Debug.Assert(!IsCapturedPrimaryConstructorParameter(expression));
659Debug.Assert(boundTemp.Type is not null);
687Debug.Assert(boundTemp.Type is not null);
690Debug.Assert(tempValue.Type is { });
746Debug.Assert(placeholder is not null);
779Debug.Assert(node.MethodOpt is { });
780Debug.Assert(node.MethodOpt.ParameterCount == 1);
791Debug.Assert(TypeSymbol.Equals(node.MethodOpt.GetParameterType(0), node.MethodOpt.ReturnType, TypeCompareKind.ConsiderEverything2));
888Debug.Assert(constantOne != null);
889Debug.Assert(constantOne.SpecialType != SpecialType.None);
890Debug.Assert(binaryOperandType.SpecialType != SpecialType.None);
891Debug.Assert(binaryOperatorKind.OperandTypes() != 0);
918Debug.Assert(binaryOperatorKind.OperandTypes() == BinaryOperatorKind.PointerAndInt);
919Debug.Assert(binaryOperand.Type is { TypeKind: TypeKind.Pointer });
920Debug.Assert(boundOne.Type is { SpecialType: SpecialType.System_Int32 });
966Debug.Assert((object)method != null); // Should have been checked during Warnings pass
973Debug.Assert(operand.Type is { SpecialType: SpecialType.System_Decimal });
980Debug.Assert(operand.Type is { } && operand.Type.IsNullableType() && operand.Type.GetNullableUnderlyingType().SpecialType == SpecialType.System_Decimal);
1166Debug.Assert(underlyingType is { });
1171Debug.Assert(underlyingType.IsEnumType());
1173Debug.Assert(underlyingType is { });
Lowering\SyntheticBoundNodeFactory.cs (76)
116Debug.Assert(node != null);
117Debug.Assert(compilationState != null);
118Debug.Assert(diagnostics != null);
134Debug.Assert(TopLevelMethod is null || TypeSymbol.Equals(TopLevelMethod.ContainingType, CurrentType, TypeCompareKind.ConsiderEverything2));
140Debug.Assert(CurrentFunction is null ||
150Debug.Assert(ModuleBuilderOpt is { });
172Debug.Assert(CurrentType is { });
180Debug.Assert(CurrentType is { });
188Debug.Assert(CurrentType is { });
196Debug.Assert(CurrentType is { });
204Debug.Assert(CurrentType is { });
213Debug.Assert(ModuleBuilderOpt is { });
224Debug.Assert(CurrentFunction is { IsStatic: false });
235Debug.Assert(CurrentFunction is { IsStatic: false });
267Debug.Assert(receiverOpt is null || receiverOpt.Type is { } &&
275Debug.Assert((receiverOpt is null) == property.IsStatic);
284Debug.Assert(accessor is not null);
290Debug.Assert((receiverOpt is null) == property.IsStatic);
292Debug.Assert(accessor is not null);
361Debug.Assert(result is not null);
402Debug.Assert(result is not null);
439Debug.Assert(left.Type is { } && right.Type is { } &&
558Debug.Assert(CurrentFunction is { });
571Debug.Assert(conversion.Kind != ConversionKind.NoConversion);
574Debug.Assert(CurrentFunction.RefKind == RefKind.None);
584Debug.Assert(CurrentFunction is { });
663Debug.Assert(left.Type?.SpecialType == CodeAnalysis.SpecialType.System_Boolean);
664Debug.Assert(right.Type?.SpecialType == CodeAnalysis.SpecialType.System_Boolean);
670Debug.Assert(left.Type?.SpecialType == CodeAnalysis.SpecialType.System_Boolean);
671Debug.Assert(right.Type?.SpecialType == CodeAnalysis.SpecialType.System_Boolean);
815Debug.Assert(methodSymbol.IsStatic);
823Debug.Assert(methodSymbol.IsStatic);
824Debug.Assert(methodSymbol.IsGenericMethod);
825Debug.Assert(methodSymbol.Arity == typeArgs.Length);
833Debug.Assert(methodSymbol.IsStatic);
862Debug.Assert(method.ParameterCount == args.Length);
904Debug.Assert(method.ParameterCount == args.Length);
919Debug.Assert(valueTypeReceiver.Type is { });
920Debug.Assert(TypeSymbol.Equals(valueTypeReceiver.Type, referenceTypeReceiver.Type, TypeCompareKind.ConsiderEverything2));
926Debug.Assert(left.Type!.Equals(right.Type, TypeCompareKind.IgnoreCustomModifiersAndArraySizesAndLowerBounds | TypeCompareKind.IgnoreNullableModifiersForReferenceTypes) || left.Type.IsErrorType());
927Debug.Assert(left.Type.IsReferenceType);
955Debug.Assert(thenClause != null);
1037Debug.Assert(result.Type is { });
1044Debug.Assert(result.Type is { });
1053Debug.Assert(result.Type is { });
1083Debug.Assert(ex.Type is { SpecialType: CodeAnalysis.SpecialType.System_Int32 });
1110Debug.Assert(statements[0] is null);
1127Debug.Assert(!labels.Contains(v2));
1156Debug.Assert(stringConst.IsString || stringConst.IsNull);
1178Debug.Assert(array.Type is { TypeKind: TypeKind.Array });
1184Debug.Assert(array.Type is { TypeKind: TypeKind.Array });
1197Debug.Assert(array.Type is { TypeKind: TypeKind.Array });
1204Debug.Assert(CurrentFunction is { });
1249Debug.Assert(type.CanBeAssignedNull());
1268Debug.Assert(systemType.ExtendedSpecialType == InternalSpecialType.System_Type ||
1282Debug.Assert(TypeSymbol.Equals(systemType, getTypeFromHandle.ReturnType, TypeCompareKind.AllIgnoreOptions));
1304Debug.Assert(this.CompilationState is { DynamicOperationContextType: { } });
1326Debug.Assert(result.Type.IsErrorType() || result.Type!.IsDerivedFrom(result.GetMethodFromHandle!.ReturnType, TypeCompareKind.AllIgnoreOptions, ref discardedUseSiteInfo));
1433Debug.Assert(result.Type.IsErrorType() || result.Type!.IsDerivedFrom(result.GetMethodFromHandle!.ReturnType, TypeCompareKind.AllIgnoreOptions, ref discardedUseSiteInfo));
1450Debug.Assert(systemReflectionMethodOrConstructorInfo.ExtendedSpecialType == InternalSpecialType.System_Reflection_MethodInfo ||
1482Debug.Assert(!allowBoxingByRefLikeTypeParametersToObject || type.IsObjectType());
1503Debug.Assert(c.Exists);
1524Debug.Assert(arg.Type is { });
1640Debug.Assert(expression is { Type: { SpecialType: CodeAnalysis.SpecialType.System_Boolean } });
1661Debug.Assert(argument.Type is { });
1663Debug.Assert(containingMethod is { });
1664Debug.Assert(kind != SynthesizedLocalKind.UserDefined);
1681Debug.Assert(argument.GetRefKind() != RefKind.In);
1738Debug.Assert(node.Type is { });
1761Debug.Assert((operatorKind == BinaryOperatorKind.Equal) || (operatorKind == BinaryOperatorKind.NotEqual) ||
1767Debug.Assert(
1837Debug.Assert(loweredLeft != null);
1838Debug.Assert(loweredRight != null);
1839Debug.Assert((object)returnType != null);
1840Debug.Assert(returnType.SpecialType == CodeAnalysis.SpecialType.System_Boolean);
1841Debug.Assert(loweredLeft.IsLiteralNull() != loweredRight.IsLiteralNull());
Symbols\Metadata\PE\PEMethodSymbol.cs (30)
123Debug.Assert((int)value == ((int)value & MethodKindMask));
170Debug.Assert(BitsAreUnsetOrSame(_bits, bitsToSet));
177Debug.Assert(BitsAreUnsetOrSame(_bits, bitsToSet));
183Debug.Assert((int)methodKind == ((int)methodKind & MethodKindMask));
185Debug.Assert(BitsAreUnsetOrSame(_bits, bitsToSet));
195Debug.Assert(BitsAreUnsetOrSame(_bits, bitsToSet));
250Debug.Assert(BitsAreUnsetOrSame(_bits, bitsToSet));
406Debug.Assert((object)moduleSymbol != null);
407Debug.Assert((object)containingType != null);
408Debug.Assert(!methodDef.IsNil);
420Debug.Assert((uint)implFlags <= ushort.MaxValue);
433Debug.Assert((uint)localflags <= ushort.MaxValue);
455Debug.Assert(flag != 0 && ((ushort)flag & ((ushort)flag - 1)) == 0);
611Debug.Assert(_packedFlags.IsExplicitOverrideIsPopulated);
624Debug.Assert(_packedFlags.IsExplicitOverrideIsPopulated);
711Debug.Assert(!memberNotNull.IsDefault);
719Debug.Assert(!memberNotNullWhenTrue.IsDefault);
725Debug.Assert(!memberNotNullWhenFalse.IsDefault);
786Debug.Assert((methodKind == MethodKind.PropertyGet) || (methodKind == MethodKind.PropertySet));
796Debug.Assert((methodKind == MethodKind.EventAdd) || (methodKind == MethodKind.EventRemove));
804Debug.Assert(TypeSymbol.Equals(propertyOrEventSymbol.ContainingType, _containingType, TypeCompareKind.ConsiderEverything2));
812Debug.Assert(
1053Debug.Assert(!attributeData.IsDefault);
1498Debug.Assert(!ReferenceEquals(data, UnmanagedCallersOnlyAttributeData.Uninitialized));
1499Debug.Assert(!ReferenceEquals(data, UnmanagedCallersOnlyAttributeData.AttributePresentDataNotBound));
1588Debug.Assert(!result.IsDefault);
1616Debug.Assert(MethodKind == MethodKind.Constructor);
1672Debug.Assert(!ReferenceEquals(unmanagedCallersOnlyData, UnmanagedCallersOnlyAttributeData.Uninitialized)
1696Debug.Assert(result != null);
1778Debug.Assert(_uncommonFields is null or { _lazyOverloadResolutionPriority: 0 });
Symbols\Retargeting\RetargetingSymbolTranslator.cs (37)
44Debug.Assert(ReferenceEquals(symbol.ContainingModule, _underlyingModule));
50Debug.Assert(ReferenceEquals(symbol.ContainingModule, _underlyingModule));
56Debug.Assert(ReferenceEquals(symbol.ContainingModule, _underlyingModule));
62Debug.Assert(ReferenceEquals(symbol.ContainingModule, _underlyingModule));
66Debug.Assert(correspondingTupleField is TupleErrorFieldSymbol);
88Debug.Assert(ReferenceEquals(symbol.ContainingModule, _underlyingModule));
94Debug.Assert(ReferenceEquals(symbol.ContainingModule, _underlyingModule));
100Debug.Assert(ReferenceEquals(symbol.ContainingModule, _underlyingModule));
111Debug.Assert((object)retargetingModule != null);
164Debug.Assert(symbol.Kind != SymbolKind.NamedType || ((NamedTypeSymbol)symbol).PrimitiveTypeCode == Cci.PrimitiveTypeCode.NotPrimitive);
207Debug.Assert(type.IsDefinition);
241Debug.Assert(!retargetFrom.IsLinked);
283Debug.Assert(module.Ordinal == 0);
284Debug.Assert(!type.IsExplicitDefinitionOfNoPiaLocalType);
303Debug.Assert(module.Ordinal > 0);
305Debug.Assert(ReferenceEquals(((PEModuleSymbol)module).Module, addedModule.Module));
350Debug.Assert(signatureIndex == 0 || signatureIndex == 1);
364Debug.Assert((object)type.ContainingAssembly != (object)RetargetingAssembly.UnderlyingAssembly);
386Debug.Assert((object)result != null);
403Debug.Assert(!type.ContainingModule.Equals(addedModule) &&
435Debug.Assert(result is PENamedTypeSymbol peResult && peResult.Handle == type.Handle);
461Debug.Assert(result1?.IsErrorType() != true);
472Debug.Assert(result1.Arity == type.Arity);
475Debug.Assert(TypeSymbol.Equals(result1, result, TypeCompareKind.ConsiderEverything2));
499Debug.Assert(originalDefinition.Arity == 0 || !ReferenceEquals(type.ConstructedFrom, type));
510Debug.Assert((object)type.ContainingType == null || !type.ContainingType.IsUnboundGenericType());
842Debug.Assert(nts.TypeKind == TypeKind.Error || nts.PrimitiveTypeCode == Cci.PrimitiveTypeCode.NotPrimitive);
854Debug.Assert(ts.TypeKind == TypeKind.Error || ts.PrimitiveTypeCode == Cci.PrimitiveTypeCode.NotPrimitive);
876Debug.Assert(ReferenceEquals(method.ContainingModule, this.UnderlyingModule));
877Debug.Assert(ReferenceEquals(method, method.OriginalDefinition));
884Debug.Assert((object)method == method.ConstructedFrom);
901Debug.Assert(!retargetedType.IsDefinition);
913Debug.Assert(retargetedType.IsDefinition);
926Debug.Assert(ReferenceEquals(property.ContainingModule, this.UnderlyingModule));
927Debug.Assert(ReferenceEquals(property, property.OriginalDefinition));
1048Debug.Assert((object)typeParameter.ContainingSymbol == _toFind);
1320Debug.Assert(ReferenceEquals(symbol, _retargetingModule.UnderlyingModule));
Symbols\Source\SourceMemberContainerSymbol.cs (86)
146Debug.Assert(BitsAreUnsetOrSame(_flags, bitsToSet));
230Debug.Assert(containingSymbol is NamespaceSymbol { IsGlobalNamespace: true } || !declaration.Declarations.Any(static d => d.IsSimpleProgram));
259Debug.Assert(typeKind is TypeKind.Struct or TypeKind.Class || !HasPrimaryConstructor);
632Debug.Assert(thisThreadCompleted);
682Debug.Assert(thisThreadCompleted);
693Debug.Assert((incompletePart & CompletionPart.NamedTypeSymbolAll) == 0);
833Debug.Assert(!useSiteDiagnostics.IsDefault);
842Debug.Assert(!useSiteDependencies.IsDefault);
1072Debug.Assert(!nonTypeMembers.IsDefault);
1073Debug.Assert(!staticInitializers.IsDefault);
1074Debug.Assert(staticInitializers.All(g => !g.IsDefault));
1075Debug.Assert(!instanceInitializers.IsDefault);
1076Debug.Assert(instanceInitializers.All(g => !g.IsDefault));
1078Debug.Assert(!nonTypeMembers.Any(static s => s is TypeSymbol));
1079Debug.Assert(haveIndexers == nonTypeMembers.Any(static s => s.IsIndexer()));
1146Debug.Assert(ctorInitializerLength >= 0);
1169Debug.Assert(distanceFromCtorBody > 0);
1377Debug.Assert(s_emptyTypeMembers.Count == 0);
1434Debug.Assert(symbol is not null);
1439Debug.Assert(attr is SourceAttributeData);
1893Debug.Assert(IsFileLocal);
1901Debug.Assert(fileIdentifier.FilePathChecksumOpt.IsDefault);
2193Debug.Assert(method1.ParameterCount == method2.ParameterCount);
2325Debug.Assert(!membersByName[indexerName.AsMemory()].Any(SymbolExtensions.IsIndexer));
2417Debug.Assert(cloneMembersByName);
2421Debug.Assert(masterExtension is not null);
2457Debug.Assert(!newMembers.IsEmpty);
2461Debug.Assert(newMembers.All(static (m, membersUnordered) => membersUnordered.Contains(m), membersUnordered));
2528Debug.Assert(false); // Usage of this method is unexpected
2627Debug.Assert(value == _lazyKnownCircularStruct);
2638Debug.Assert(TypeKind == TypeKind.Struct);
2872Debug.Assert(!this.IsExtension);
2955Debug.Assert(IsSubmissionClass || IsScriptClass);
2981Debug.Assert(ReferenceEquals(this, this.OriginalDefinition));
3267Debug.Assert(!nonTypeMembersWithPartialImplementations.IsDefault);
3271Debug.Assert(!nonTypeMembersWithPartialImplementations.Any(static s => s is TypeSymbol));
3272Debug.Assert(declarationWithParameters is object == primaryConstructor is object);
3287Debug.Assert(!initializers.IsDefault);
3295Debug.Assert(!group.IsDefaultOrEmpty);
3302Debug.Assert(LexicalSortKey.Compare(new LexicalSortKey(initializers[i - 1].First().Syntax, compilation), new LexicalSortKey(initializers[i].Last().Syntax, compilation)) < 0);
3307Debug.Assert(LexicalSortKey.Compare(new LexicalSortKey(initializers[i].First().Syntax, compilation), new LexicalSortKey(initializers[i + 1].Last().Syntax, compilation)) < 0);
3312Debug.Assert(LexicalSortKey.Compare(new LexicalSortKey(initializers[i].First().Syntax, compilation), new LexicalSortKey(initializers[i].Last().Syntax, compilation)) < 0);
3337Debug.Assert(declaredMembersAndInitializers != DeclaredMembersAndInitializers.UninitializedSentinel);
3363Debug.Assert(declaredMembers.PrimaryConstructor is object);
3364Debug.Assert(declaredMembers.DeclarationWithParameters is object);
3365Debug.Assert(declaredMembers.DeclarationWithParameters.SyntaxTree == InstanceInitializersForPositionalMembers[0].Syntax.SyntaxTree);
3366Debug.Assert(declaredMembers.DeclarationWithParameters.Span.Contains(InstanceInitializersForPositionalMembers[0].Syntax.Span.Start));
3399Debug.Assert(insertedInitializers[insertedInitializers.Count - 1].Syntax.SyntaxTree == declaredInitializers[0].Syntax.SyntaxTree);
3400Debug.Assert(insertedInitializers[insertedInitializers.Count - 1].Syntax.Span.Start < declaredInitializers[0].Syntax.Span.Start);
3413Debug.Assert(!declaredMembers.InstanceInitializers.Any(g => declaredMembers.DeclarationWithParameters.SyntaxTree == g[0].Syntax.SyntaxTree &&
3644Debug.Assert(!_lazySimpleProgramEntryPoints.IsDefault);
3703Debug.Assert(result is object);
3726Debug.Assert(primaryConstructor is not null);
3727Debug.Assert(!this.IsDelegateType());
3761Debug.Assert(declared.PrimaryConstructor is not null);
3767Debug.Assert(membersAndInitializers.PrimaryConstructor is not null);
3796Debug.Assert(primaryConstructor is not null);
4010Debug.Assert(symbol.IsPartialMember());
4029Debug.Assert(pair.Key.Equals(WellKnownMemberNames.InstanceConstructorName.AsMemory()));
4044Debug.Assert(symbol is SourceOrdinaryMethodSymbol or SourcePropertySymbol or SourcePropertyAccessorSymbol or SourceEventAccessorSymbol);
4045Debug.Assert(prev is SourceOrdinaryMethodSymbol or SourcePropertySymbol or SourcePropertyAccessorSymbol or SourceEventAccessorSymbol);
4053Debug.Assert(symbol.IsPartialMember());
4130Debug.Assert(symbol.IsPartialMember());
4382Debug.Assert(!propertySymbol.IsExplicitInterfaceImplementation); // checked by caller
4433Debug.Assert(!eventSymbol.IsExplicitInterfaceImplementation); // checked by caller
4568Debug.Assert(node.SyntaxTree == initializers.Last().Syntax.SyntaxTree);
4569Debug.Assert(node.SpanStart > initializers.Last().Syntax.Span.Start);
4735Debug.Assert(TypeKind == TypeKind.Struct);
4739Debug.Assert(builder.DeclarationWithParameters is TypeDeclarationSyntax { ParameterList: not null } type
4784Debug.Assert(ctor is object);
4794Debug.Assert(declaredMembersAndInitializers.PrimaryConstructor?.GetBackingFields().Any() != true);
4830Debug.Assert(declaredMembersAndInitializers.DeclarationWithParameters is object);
4834Debug.Assert(ctor is object);
4887Debug.Assert(isRecordClass || !members.Any(m => m is PropertySymbol { GetMethod.IsEffectivelyReadOnly: false }));
4898Debug.Assert(positionalMembers.All(p => p is PropertySymbol or FieldSymbol));
4946Debug.Assert(isRecordClass);
4994Debug.Assert(isRecordClass);
5201Debug.Assert(property.GetMethod is object);
5202Debug.Assert(property.SetMethod is object);
5206Debug.Assert(backingField is object);
5268Debug.Assert(isRecordClass);
5390Debug.Assert(isRecordClass);
5729Debug.Assert(@event.IsPartial || @event.AddMethod is not null);
5730Debug.Assert(@event.IsPartial || @event.RemoveMethod is not null);
5754Debug.Assert(@event.AssociatedField is null);
5862Debug.Assert(
Symbols\Source\SourceNamespaceSymbol.AliasesAndUsings.cs (28)
33Debug.Assert((object)result == calculated);
37Debug.Assert(result.ExternAliases.SequenceEqual(calculated.ExternAliases));
39Debug.Assert(result.Usings.SequenceEqual(calculated.Usings));
51Debug.Assert(GetAliasesAndUsingsForAsserts(declarationSyntax).GetImports(this, declarationSyntax, basesBeingResolved) == Imports.Empty);
120Debug.Assert(GetAliasesAndUsingsForAsserts(declarationSyntax).GetExternAliases(this, declarationSyntax).IsEmpty);
130Debug.Assert(GetAliasesAndUsingsForAsserts(declarationSyntax).GetExternAliases(this, declarationSyntax).IsEmpty);
151Debug.Assert(GetAliasesAndUsingsForAsserts(declarationSyntax).GetUsingAliases(this, declarationSyntax, basesBeingResolved).IsEmpty);
161Debug.Assert(GetAliasesAndUsingsForAsserts(declarationSyntax).GetUsingAliases(this, declarationSyntax, basesBeingResolved).IsEmpty);
193Debug.Assert(GetAliasesAndUsingsForAsserts(declarationSyntax).GetUsingAliasesMap(this, declarationSyntax, basesBeingResolved).IsEmpty);
215Debug.Assert(result.SequenceEqual(GetAliasesAndUsingsForAsserts(declarationSyntax).GetUsingNamespacesOrTypes(this, declarationSyntax, basesBeingResolved)));
225Debug.Assert(GetAliasesAndUsingsForAsserts(declarationSyntax).GetUsingNamespacesOrTypes(this, declarationSyntax, basesBeingResolved).IsEmpty);
447Debug.Assert(result.IsEmpty);
448Debug.Assert(diagnostics.IsEmptyWithoutResolution);
564Debug.Assert(!onlyGlobal);
580Debug.Assert(calculated.UsingAliases.IsEmpty);
581Debug.Assert(calculated.UsingAliasesMap?.IsEmpty ?? true);
582Debug.Assert(calculated.UsingNamespacesOrTypes.IsEmpty);
598Debug.Assert(calculated.UsingAliases.SequenceEqual(result.UsingAliases));
600Debug.Assert(calculated.UsingNamespacesOrTypes.SequenceEqual(result.UsingNamespacesOrTypes));
762Debug.Assert(directiveDiagnostics.DiagnosticBag is object);
763Debug.Assert(directiveDiagnostics.DependenciesBag is object);
945Debug.Assert(_state.HasComplete(CompletionPart.StartValidatingImports));
969Debug.Assert(diagnostics.DiagnosticBag is object);
970Debug.Assert(diagnostics.DependenciesBag is object);
980Debug.Assert(declaringSymbol.IsGlobalNamespace);
1006Debug.Assert(declaringSymbol.IsGlobalNamespace);
1037Debug.Assert(target.IsGlobalNamespace);
1176Debug.Assert(_state.HasComplete(CompletionPart.StartValidatingImports));
Utilities\ValueSetFactory.NumericValueSet.cs (9)
33Debug.Assert(tc.Related(LessThanOrEqual, first, last));
39Debug.Assert(intervals.Length == 0 || tc.Related(GreaterThanOrEqual, intervals[0].first, tc.MinValue));
42Debug.Assert(tc.Related(LessThanOrEqual, intervals[i].first, intervals[i].last));
46Debug.Assert(tc.Related(LessThan, tc.Next(intervals[i - 1].last), intervals[i].first));
165Debug.Assert(this._tc.GetType() == other._tc.GetType());
211Debug.Assert(tc.Related(LessThanOrEqual, first, last));
212Debug.Assert(tc.Related(GreaterThanOrEqual, first, tc.MinValue));
213Debug.Assert(tc.Related(LessThanOrEqual, last, tc.MaxValue));
242Debug.Assert(this._tc.GetType() == other._tc.GetType());
EditAndContinue\AbstractEditAndContinueAnalyzer.cs (75)
587Debug.Assert(oldTree.Options.Equals(newTree.Options));
656Debug.Assert(newActiveStatements.All(a => a != null));
836Debug.Assert(!newActiveStatementSpans.IsDefault);
837Debug.Assert(oldActiveStatements.Length == newActiveStatements.Count);
838Debug.Assert(oldActiveStatements.Length == newExceptionRegions.Count);
1002Debug.Assert(!newActiveStatementSpans.IsDefault);
1003Debug.Assert(newActiveStatementSpans.IsEmpty || oldActiveStatements.Length == newActiveStatementSpans.Length);
1004Debug.Assert(oldActiveStatements.IsEmpty || oldActiveStatements.Length == newActiveStatements.Count);
1005Debug.Assert(newActiveStatements.Count == newExceptionRegions.Count);
1006Debug.Assert(oldMemberBody != null || newMemberBody != null);
1048Debug.Assert(oldDeclaration != null);
1054Debug.Assert(IsDeclarationWithSharedBody(oldDeclaration, oldMember));
1068Debug.Assert(oldMemberBody != null);
1195Debug.Assert(oldMemberBody != null);
1196Debug.Assert(oldDeclaration != null);
1218Debug.Assert(lazyActiveOrMatchedLambdas != null);
1278Debug.Assert(oldEnclosingLambdaBody != null);
1279Debug.Assert(lazyActiveOrMatchedLambdas != null);
1324Debug.Assert(newSpan != default);
1334Debug.Assert(IsDeclarationWithSharedBody(oldDeclaration, oldMember));
1445Debug.Assert(oldAncestors.Count == newAncestors.Count);
1636Debug.Assert(node != null);
1754Debug.Assert(hasAncestor && newAncestor != null);
1768Debug.Assert(hasAncestor && newAncestor != null);
2123Debug.Assert(editMap[newNode] is EditKind.Update or EditKind.Insert);
2185Debug.Assert(currentSegment.path != null);
2186Debug.Assert(lastOldStartLine >= 0);
2363Debug.Assert(previousOldEndLine >= 0);
2572Debug.Assert(inBreakState || newActiveStatementSpans.IsEmpty);
2598Debug.Assert(edit.OldNode is null || edit.NewNode is null || IsNamespaceDeclaration(edit.OldNode) == IsNamespaceDeclaration(edit.NewNode));
2610Debug.Assert(oldSymbol is INamedTypeSymbol);
2611Debug.Assert(newSymbol is INamedTypeSymbol);
2628Debug.Assert(newTypeDeclaration != null);
2805Debug.Assert(oldSymbol is INamedTypeSymbol);
3083Debug.Assert(newDeclaration != null);
3084Debug.Assert(oldProperty.ContainingType.IsRecord);
3085Debug.Assert(newProperty.ContainingType.IsRecord);
3089Debug.Assert(synthesizedProperty.IsSynthesizedAutoProperty());
3090Debug.Assert(synthesizedProperty.SetMethod != null);
3162Debug.Assert(newSymbol != null);
3389Debug.Assert(IsConstructorWithMemberInitializers(oldSymbol, cancellationToken) == IsConstructorWithMemberInitializers(newSymbol, cancellationToken));
3390Debug.Assert(IsDeclarationWithInitializer(oldDeclaration) == IsDeclarationWithInitializer(newDeclaration));
3560Debug.Assert(oldSymbol != null);
3561Debug.Assert(newSymbol != null);
3584Debug.Assert(member is IPropertySymbol or IMethodSymbol);
4054Debug.Assert(oldBody == null || oldDeclaration != null && oldMemberBody != null);
4055Debug.Assert(newBody == null || newDeclaration != null && newMemberBody != null);
4232Debug.Assert(ReturnTypesEquivalent(oldField, newField, exact: false));
4254Debug.Assert(oldImportData.BestFitMapping == newImportData.BestFitMapping ||
4309Debug.Assert(ReturnTypesEquivalent(oldMethod, newMethod, exact: false));
4333Debug.Assert(ReturnTypesEquivalent(oldType.DelegateInvokeMethod, newType.DelegateInvokeMethod, exact: false));
4343Debug.Assert(ReturnTypesEquivalent(oldProperty, newProperty, exact: false));
4357Debug.Assert(ReturnTypesEquivalent(oldEvent, newEvent, exact: false));
4458Debug.Assert(ParameterTypesEquivalent(oldMember.GetParameters(), newMember.GetParameters(), exact: true));
4857Debug.Assert(recordType.IsRecord);
4871Debug.Assert(record.IsRecord);
4958Debug.Assert(oldSymbol != null);
5105Debug.Assert(newSymbol != null);
5290Debug.Assert(oldBody != null);
5291Debug.Assert(newBody != null);
5425Debug.Assert(oldCtor == null || MemberOrDelegateSignaturesEquivalent(oldCtor, newCtor, exact: false));
5432Debug.Assert(newCtor.Parameters.IsEmpty);
5630Debug.Assert(IsNestedFunction(newLambda) == IsNestedFunction(oldLambda));
6204Debug.Assert(!parameter.IsThis);
6248Debug.Assert(parameterKey.Syntax != null);
6369Debug.Assert(oldCapture.Kind == newCapture.Kind);
6443Debug.Assert(IsNestedFunction(newLambda));
6444Debug.Assert(IsNestedFunction(oldLambda));
6500Debug.Assert(local.Kind is not SymbolKind.RangeVariable);
6512Debug.Assert(node != null);
6600Debug.Assert(otherNode.SyntaxTree == otherRoot.SyntaxTree);
6601Debug.Assert(otherRoot.FullSpan.Contains(otherNode.SpanStart));
6604Debug.Assert(otherNode.FullSpan.Length > 0);
6613Debug.Assert(otherNode.RawKind == rightNode.RawKind);
6617Debug.Assert(!leftChild.IsToken);
src\Analyzers\Core\CodeFixes\ConflictMarkerResolution\AbstractConflictMarkerCodeFixProvider.cs (1)
396Debug.Assert(
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Context\FormattingContext.InitialContextFinder.cs (1)
56Debug.Assert(
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\SymbolEquivalenceComparer.GetHashCodeVisitor.cs (1)
266Debug.Assert(
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Context\FormattingContext.InitialContextFinder.cs (1)
56Debug.Assert(
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\SymbolEquivalenceComparer.GetHashCodeVisitor.cs (1)
266Debug.Assert(
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Context\FormattingContext.InitialContextFinder.cs (1)
56Debug.Assert(
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\SymbolEquivalenceComparer.GetHashCodeVisitor.cs (1)
266Debug.Assert(
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Context\FormattingContext.InitialContextFinder.cs (1)
56Debug.Assert(
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\SymbolEquivalenceComparer.GetHashCodeVisitor.cs (1)
266Debug.Assert(
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Context\FormattingContext.InitialContextFinder.cs (1)
56Debug.Assert(
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\SymbolEquivalenceComparer.GetHashCodeVisitor.cs (1)
266Debug.Assert(
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Context\FormattingContext.InitialContextFinder.cs (1)
56Debug.Assert(
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\SymbolEquivalenceComparer.GetHashCodeVisitor.cs (1)
266Debug.Assert(