// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
usingSystem.Collections.Immutable;
usingSystem.Linq;
usingSystem.Diagnostics;
usingMicrosoft.CodeAnalysis.CSharp.Symbols;
usingMicrosoft.CodeAnalysis.CSharp.Syntax;
...
...
@@ -17,12 +18,19 @@ internal class FlowAnalysisPass
/// <param name="method">the method to be analyzed</param>
/// <param name="block">the method's body</param>
/// <param name="diagnostics">the receiver of the reported diagnostics</param>
/// <param name="hasTrailingExpression">indicates whether this Script had a trailing expression</param>
/// <returns>the rewritten block for the method (with a return statement possibly inserted)</returns>
publicstaticBoundBlockRewrite(
MethodSymbolmethod,
BoundBlockblock,
DiagnosticBagdiagnostics)
DiagnosticBagdiagnostics,
boolhasTrailingExpression)
{
#if DEBUG
// We should only see a trailingExpression if we're in a Script initializer.
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
TestSubmissionResult(CreateSubmission("Dim i As Integer",parseOptions:=TestOptions.Script),expectedType:=SpecialType.System_Void,expectedHasValue:=False)
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
usingSystem;
usingSystem.Collections.Generic;
usingSystem.Collections.Immutable;
usingSystem.Linq;
usingSystem.Threading.Tasks;
usingRoslyn.Test.Utilities;
...
...
@@ -163,7 +165,7 @@ public void TestRunCreatedScriptWithUnexpectedGlobals()