diff --git a/src/Compilers/CSharp/Portable/Binder/Binder_Invocation.cs b/src/Compilers/CSharp/Portable/Binder/Binder_Invocation.cs index 8e79a2fb8c11a..2744d68e9dbe4 100644 --- a/src/Compilers/CSharp/Portable/Binder/Binder_Invocation.cs +++ b/src/Compilers/CSharp/Portable/Binder/Binder_Invocation.cs @@ -1186,7 +1186,7 @@ internal BoundExpression BindDefaultArgument(SyntaxNode syntax, ParameterSymbol BoundExpression defaultValue; if (callerSourceLocation is object && parameter.IsCallerLineNumber) { - int line = GetCallerLocation(syntax).SourceTree.GetDisplayLineNumber(callerSourceLocation.SourceSpan); + int line = callerSourceLocation.SourceTree.GetDisplayLineNumber(callerSourceLocation.SourceSpan); defaultValue = new BoundLiteral(syntax, ConstantValue.Create(line), Compilation.GetSpecialType(SpecialType.System_Int32)) { WasCompilerGenerated = true }; } else if (callerSourceLocation is object && parameter.IsCallerFilePath) diff --git a/src/Compilers/CSharp/Portable/Symbols/Source/SourceComplexParameterSymbol.cs b/src/Compilers/CSharp/Portable/Symbols/Source/SourceComplexParameterSymbol.cs index e70d90695106a..fef13c0966383 100644 --- a/src/Compilers/CSharp/Portable/Symbols/Source/SourceComplexParameterSymbol.cs +++ b/src/Compilers/CSharp/Portable/Symbols/Source/SourceComplexParameterSymbol.cs @@ -224,17 +224,7 @@ private ConstantValue DefaultSyntaxValue Debug.Assert(completedOnThisThread); } -#if DEBUG - // If we accidentally access DefaultSyntaxValue in a reentrant manner, and we use a cancellation token - // that never expires, then the failure mode will be to spin wait forever. - // For debug purposes let's instead use a token which expires after a modest amount of time - // to wait for the default syntax value to be available. - var cts = new CancellationTokenSource(TimeSpan.FromSeconds(5)); - var token = cts.Token; -#else - var token = CancellationToken.None; -#endif - state.SpinWaitComplete(CompletionPart.EndDefaultSyntaxValue, token); + state.SpinWaitComplete(CompletionPart.EndDefaultSyntaxValue, default(CancellationToken)); return _lazyDefaultSyntaxValue; } }