Skip to content

Commit

Permalink
Merge pull request #66534 from dotnet/merges/release/dev17.5-to-relea…
Browse files Browse the repository at this point in the history
…se/dev17.5-vs-deps

Merge release/dev17.5 to release/dev17.5-vs-deps
  • Loading branch information
dotnet-bot authored Jan 25, 2023
2 parents 5964d1a + 9bfeb62 commit 5ca760e
Show file tree
Hide file tree
Showing 3 changed files with 460 additions and 58 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,17 @@ internal CompilationContext(
// added (anonymous types, for instance).
Debug.Assert(Compilation != compilation);

// Binder.IsInScopeOfAssociatedSyntaxTree() expects a non-null AssociatedFileIdentifier when
// looking up file-local types. If there is no document name, use an invalid FilePathChecksumOpt.
FileIdentifier fileIdentifier = methodDebugInfo.ContainingDocumentName is { } documentName
? FileIdentifier.Create(documentName)
: new FileIdentifier { EncoderFallbackErrorMessage = null, FilePathChecksumOpt = ImmutableArray<byte>.Empty, DisplayFilePath = string.Empty };

NamespaceBinder = CreateBinderChain(
Compilation,
currentFrame.ContainingNamespace,
methodDebugInfo.ImportRecordGroups,
methodDebugInfo.ContainingDocumentName is { } documentName ? FileIdentifier.Create(documentName) : null);
fileIdentifier: fileIdentifier);

if (_methodNotType)
{
Expand Down
Loading

0 comments on commit 5ca760e

Please sign in to comment.