Beispiel #1
0
        private static bool Analyze(
            CSharpCompilation compilation,
            MethodSymbol method,
            BoundBlock block,
            DiagnosticBag diagnostics)
        {
            var result = ControlFlowPass.Analyze(compilation, method, block, diagnostics);

            DefiniteAssignmentPass.Analyze(compilation, method, block, diagnostics);
            return(result);
        }
Beispiel #2
0
 private static bool Analyze(
     CSharpCompilation compilation,
     MethodSymbol method,
     BoundBlock block,
     DiagnosticBag diagnostics,
     out bool needsImplicitReturn,
     out ImmutableArray <FieldSymbol> implicitlyInitializedFieldsOpt)
 {
     needsImplicitReturn = ControlFlowPass.Analyze(compilation, method, block, diagnostics);
     DefiniteAssignmentPass.Analyze(compilation, method, block, diagnostics, out implicitlyInitializedFieldsOpt, requireOutParamsAssigned: true);
     return(needsImplicitReturn || !implicitlyInitializedFieldsOpt.IsDefault);
 }