Skip to content

Improve dynamic reference tooltips - #4217

Merged
siegfriedpammer merged 2 commits into
masterfrom
fix/dynamic-constructor-token-references
Oct 6, 2026
Merged

siegfriedpammer merged 2 commits into
masterfrom
fix/dynamic-constructor-token-references

Conversation

@siegfriedpammer

Copy link
Copy Markdown
Member

Summary

  • prefer constructor metadata for object-creation type references, with dynamic constructor type fallback
  • keep dynamic member hover references on the member name instead of invocation punctuation
  • use the static target type for dynamic static member tooltips, e.g. System.Activator.CreateInstance

Tests

  • OPENSSL_ENABLE_SHA1_SIGNATURES=1 dotnet test ICSharpCode.Decompiler.Tests/ICSharpCode.Decompiler.Tests.csproj --report-trx --filter FullyQualifiedName~TextTokenWriterTests.DynamicStaticInvocationReferencesStaticTargetTypeOnMemberNameOnly
  • OPENSSL_ENABLE_SHA1_SIGNATURES=1 dotnet build ILSpy/ILSpy.csproj -c Debug --no-restore

Assisted-by: OpenAI:openai/gpt-5.5:OpenCode

Dynamic member tooltips should describe the visible static target, while punctuation should stay reserved for useful call targets such as constructors. This keeps dynamic object creation tooltips on the constructor parentheses but avoids noisy synthetic member references on dynamic invocation parentheses.

Assisted-by: OpenAI:openai/gpt-5.5:OpenCode
Dynamic and token-writer reference paths can receive method-group resolve results directly. Returning the first method keeps ResolveResult.GetSymbol aligned with the existing method-group handling used by AST annotations.

Assisted-by: OpenAI:openai/gpt-5.5:OpenCode
@siegfriedpammer
siegfriedpammer merged commit 7a56e5d into master Oct 6, 2026
15 checks passed
@siegfriedpammer
siegfriedpammer deleted the fix/dynamic-constructor-token-references branch October 6, 2026 20:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant