CallGraph.VerifyAllCycles Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Given a call graph edges, finds all cycles and determines if each is valid.
Invalid cycles are those that cause type parameters to be mapped to
other type parameters of the same callable (constricting resolutions)
or to a type containing a nested reference to the same type parameter,
i.e Foo.A -> Foo.A[]. If a cycleSelector is given,
checks only the cycles for which it returns true.
Returns an enumerable of tuples for each edge of each invalid cycle found,
each tuple containing a diagnostic and the callable name where the diagnostic
should be placed.
public System.Collections.Generic.IEnumerable<(Microsoft.Quantum.QsCompiler.DataTypes.QsCompilerDiagnostic, Microsoft.Quantum.QsCompiler.SyntaxTree.QsQualifiedName)> VerifyAllCycles (Func<System.Collections.Immutable.ImmutableArray<Microsoft.Quantum.QsCompiler.DependencyAnalysis.CallGraphNode>,bool>? cycleSelector);
member this.VerifyAllCycles : Func<System.Collections.Immutable.ImmutableArray<Microsoft.Quantum.QsCompiler.DependencyAnalysis.CallGraphNode>, bool> -> seq<ValueTuple<Microsoft.Quantum.QsCompiler.DataTypes.QsCompilerDiagnostic, Microsoft.Quantum.QsCompiler.SyntaxTree.QsQualifiedName>>
Public Function VerifyAllCycles (cycleSelector As Func(Of ImmutableArray(Of CallGraphNode), Boolean)) As IEnumerable(Of ValueTuple(Of QsCompilerDiagnostic, QsQualifiedName))
Parameters
- cycleSelector
- Func<ImmutableArray<CallGraphNode>,Boolean>