16 references to Assert
Microsoft.CodeAnalysis (5)
CodeGen\PrivateImplementationDetails.cs (2)
300
RoslynDebug.
Assert
(alignment is 1 or 2 or 4 or 8, $"Unexpected alignment: {alignment}");
626
RoslynDebug.
Assert
(alignment is 1 or 2 or 4 or 8, $"Unexpected alignment: {alignment}");
Emit\CommonPEModuleBuilder.cs (1)
1106
RoslynDebug.
Assert
(alignment is 1 or 2 or 4 or 8, $"Unexpected alignment: {alignment}");
Operations\OperationMapBuilder.cs (1)
112
RoslynDebug.
Assert
(
WellKnownTypes.cs (1)
811
RoslynDebug.
Assert
(name == typeIdName, $"Enum name ({typeIdName}) and type name ({name}) must match at {i}");
Microsoft.CodeAnalysis.CSharp (11)
Binder\Binder.ValueChecks.cs (3)
1212
RoslynDebug.
Assert
(expr is not BoundValuePlaceholderBase, $"Placeholder kind {expr.Kind} should be explicitly handled");
4766
RoslynDebug.
Assert
(false, $"{expr.Kind} expression of {expr.Type} type");
5571
RoslynDebug.
Assert
(false, $"{expr.Kind} expression of {expr.Type} type");
Binder\Semantics\Conversions\Conversion.cs (1)
284
RoslynDebug.
Assert
(isTrivial, $"this conversion needs additional data: {kind}");
BoundTree\Formatting.cs (1)
21
RoslynDebug.
Assert
(this.Type is { }, $"Unexpected null type in {this.GetType().Name}");
Compiler\DocumentationCommentCompiler.cs (1)
1383
RoslynDebug.
Assert
(_indentDepth == t.InitialIndentDepth, $"Temporary strings should be indent-neutral (was {t.InitialIndentDepth}, is {_indentDepth})");
Errors\ErrorFacts.cs (2)
138
RoslynDebug.
Assert
(!string.IsNullOrEmpty(message), $"{code}");
146
RoslynDebug.
Assert
(!string.IsNullOrEmpty(message), $"{code}");
FlowAnalysis\AbstractFlowPass.cs (1)
897
RoslynDebug.
Assert
(false, $"Should Visit{node.Kind} be overridden in {this.GetType().Name}?");
Lowering\LocalRewriter\LocalRewriter.cs (1)
1132
RoslynDebug.
Assert
(expr is not BoundValuePlaceholderBase, $"Placeholder kind {expr.Kind} must be handled explicitly");
Lowering\StateMachineRewriter\MethodToStateMachineRewriter.cs (1)
230
RoslynDebug.
Assert
(SyntaxBindingUtilities.BindsToResumableStateMachineState(node) || SyntaxBindingUtilities.BindsToTryStatement(node), $"Unexpected syntax: {node.Kind()}");