Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -943,7 +943,7 @@ Namespace Microsoft.CodeAnalysis.VisualBasic

For Each tree As SyntaxTree In trees
If tree Is Nothing Then
Throw New ArgumentNullException(String.Format(VBResources.Trees0, i))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can this resource be removed? or is still needed for seomthing else? does teh C# side do teh same thing?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@CyrusNajmabadi Yes it should be removed. I have the removal already in #80098 so I didn't redo it here, but if you prefer to do in this PR I'm fine with it.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

C# side doesn't localize:

if (tree == null)
{
throw new ArgumentNullException($"{nameof(trees)}[{i}]");
}

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks. i'm fine either way. if it's coming in anotehr pr, that works for me.

Throw New ArgumentNullException($"trees({i})")
End If

If Not tree.HasCompilationUnitRoot Then
Expand All @@ -955,7 +955,7 @@ Namespace Microsoft.CodeAnalysis.VisualBasic
End If

If declMap.ContainsKey(tree) Then
Throw New ArgumentException(VBResources.SyntaxTreeAlreadyPresent, String.Format(VBResources.Trees0, i))
Throw New ArgumentException(VBResources.SyntaxTreeAlreadyPresent, $"trees({i})")
End If

AddSyntaxTreeToDeclarationMapAndTable(tree, _options, Me.IsSubmission, declMap, declTable, referenceDirectivesChanged) ' declMap and declTable passed ByRef
Expand Down