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