-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Description
Tested with master
There is no tooltip, link and highlighting for both Func<>(the inside int works well) and Method1 in the cast
int Method1()
{
return new Func<int>(Method1)();//new Func<int>(Method1).Invoke();
}Maybe for Func<> and dynamic, the special logic for ObjectCreateExpression should fallback to normal logic if the parent don't have an symbol?
But not sure what happen for Method1.
ILSpy/ILSpy/Languages/CSharpHighlightingTokenWriter.cs
Lines 437 to 439 in 62ce7a7
| if (symbol != null && node.Parent is ObjectCreateExpression) { | |
| symbol = node.Parent.GetSymbol(); | |
| } |
ILSpy/ICSharpCode.Decompiler/Output/TextTokenWriter.cs
Lines 110 to 112 in 174d14d
| if (symbol != null && node.Role == Roles.Type && node.Parent is ObjectCreateExpression) { | |
| symbol = node.Parent.GetSymbol(); | |
| } |
ILSpy/ICSharpCode.Decompiler/Output/TextTokenWriter.cs
Lines 352 to 358 in 174d14d
| var node = nodeStack.Peek(); | |
| ISymbol symbol; | |
| if (node.Role == Roles.Type && node.Parent is ObjectCreateExpression) { | |
| symbol = node.Parent.GetSymbol(); | |
| } else { | |
| symbol = nodeStack.Peek().GetSymbol(); | |
| } |
And also for some other ugly code(use dynamic to hit the others code path).(check decimal and List<>)
_ = new decimal((dynamic)1);
_ = new List<int>((dynamic)110);