You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
'Unknown instance kind: closure' when hovering over some functions #2518
changed the title [-]'Unknown instance kind: closure' when hovering over functions[/-][+]'Unknown instance kind: closure' when hovering over some functions[/+]on Jun 4, 2020
The reason for the printed warning is that we were trying to render this as a variable (but it has no fields, association, getters, etc.). I've fixed that by treating a Closure as a simple type.
The reason it shows "function [native code ]" is that we invoke toString() on values when displaying them. In the standard VM, this returns a slightly more useful string Closure: (Widget) => void from Function 'attachRootWidget':.
I think the best way to improve this would probably be by handling toString() in the proxy?
I'd probably prefer VS Code to fall back to the analysis server hover for things like this (since it has the dartdoc etc. in it), but that's not supported when in a debug session.
Activity
[-]'Unknown instance kind: closure' when hovering over functions[/-][+]'Unknown instance kind: closure' when hovering over some functions[/+]DanTup commentedon Jun 8, 2020
The reason for the printed warning is that we were trying to render this as a variable (but it has no fields, association, getters, etc.). I've fixed that by treating a Closure as a simple type.
The reason it shows "function [native code ]" is that we invoke
toString()on values when displaying them. In the standard VM, this returns a slightly more useful stringClosure: (Widget) => void from Function 'attachRootWidget':.I think the best way to improve this would probably be by handling
toString()in the proxy?I'd probably prefer VS Code to fall back to the analysis server hover for things like this (since it has the dartdoc etc. in it), but that's not supported when in a debug session.
annagrin commentedon Jun 8, 2020
@DanTup thanks for fixing this! I've created an issue on the debugger side to track better printing.