Skip to content

Conversation

@CyrusNajmabadi
Copy link
Member

@CyrusNajmabadi CyrusNajmabadi commented Oct 16, 2025

Closes #36654

@CyrusNajmabadi
Copy link
Member Author

@dotnet/roslyn-compiler ptal.

var tree = compilation.SyntaxTrees[0];
var model = compilation.GetSemanticModel(tree);

var invocation = tree.GetRoot().DescendantNodes().OfType<InvocationExpressionSyntax>().Single();
Copy link
Member

Choose a reason for hiding this comment

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

nit: FYI, we have a helper I like to use that lets you do var invocation = GetSyntax<InvocationExpressionSyntax>(tree, "vvv.getlist()");
The advantage is that it is immediately apparent to reviewers what invocation syntax we're grabbing

Copy link
Member Author

Choose a reason for hiding this comment

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

@copilot please apply the above suggestion.

Copy link
Member

Choose a reason for hiding this comment

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

FWIW, I don't think it did it

Copy link
Member

@jcouv jcouv left a comment

Choose a reason for hiding this comment

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

LGTM Thanks (commit 1)

@jcouv jcouv added the Test Test failures in roslyn-CI label Oct 16, 2025
@jcouv jcouv self-assigned this Oct 16, 2025
@CyrusNajmabadi
Copy link
Member Author

@dotnet/roslyn-compiler for another pair of eye.s

Copy link
Member

@jjonescz jjonescz left a comment

Choose a reason for hiding this comment

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

LGTM, although only one compiler review should be enough for test-only changes

@CyrusNajmabadi CyrusNajmabadi merged commit 1b26500 into dotnet:main Oct 22, 2025
25 checks passed
@CyrusNajmabadi CyrusNajmabadi deleted the demonstrateBehaviour branch October 22, 2025 12:27
@CyrusNajmabadi
Copy link
Member Author

Thanks!

@dotnet-policy-service dotnet-policy-service bot added this to the Next milestone Oct 22, 2025
333fred added a commit to 333fred/roslyn that referenced this pull request Oct 22, 2025
* upstream/main: (123 commits)
  Fix SafeContext of Span-valued collection expressions to match specification (dotnet#80684)
  Improve detection of invalid references for implicitly typed expression variables declared within implicit object creation expressions. (dotnet#80546)
  Add test demonstrating behavior of ToMinimalDisplayString. (dotnet#80757)
  Only set DOTNET_HOST_PATH if something was installed (dotnet#80842)
  Clean up a Razor external access service (dotnet#80830)
  Remove unused statement (dotnet#80823)
  Allow foreach on typed null enumerables (dotnet#80783)
  Update documentation for DeclaringSyntaxReferences and Locations to clarify partial members behavior (dotnet#80704)
  Fix issue converting an auto prop to a full prop when 'field' and 'initializers' are involved
  Rename childIsSimple to innerExpressionHasPrimaryPrecedence and add more test cases
  Remove placeholder WorkItem attributes from new tests
  Fix RemoveUnnecessaryParentheses to detect simple expressions in bitwise operations
  [main] Update dependencies from dotnet/arcade (dotnet#80828)
  Fix ITypeSymbol.BaseType documentation for type parameters (dotnet#80770)
  soft-select select camelcase matched item if user might be typing an undefined type parameter (dotnet#80809)
  Allow semantic tokens in Razor to be better behaved (dotnet#80815)
  Rebase
  Remove using
  Update test
  Add fix all test
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area-Compilers Test Test failures in roslyn-CI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Incorrect output of ToMinimalDisplayString() with namespace hiding

3 participants