[BUG] Toolip Shows type none
for Functions With Return Type as text
#228
Labels
bug
Something isn't working
type none
for Functions With Return Type as text
#228
After experimenting more, I think
any
.Based on this thread #206 , I tried both settings. It did not appear to change anything.
Expected behavior
For some of these cases I think the return type is guaranteed to be
text
but display asnone
instead.I thought if the parser didn't know the return type of
Text.Combine
, the function assert forces it to be eithertext
orerrors
?1] If it can't resolve it my function, should it say
any
instead? Because the function is using a return type that's nottype none
, sotype none
would not be possible in this case?2] Is this correct? I thought a function with a return type declared, guaranteed the return value is compatible using a type assertion on the final value?
If I explicitly assert it twice, then it displays text
I think it's some interaction with the standard library definitions
One reason is because of this case. I tried asserting the return type as
any
But the parser was able to tell adding two string literals has must be type text
I was able to break the return type when the value was assert as any
Maybe the type resolution doesn't use function return types at all? It's resolving the type of the final value, instead?
Actual behavior
Is this a different repo ?
Nothing in the log stood out. Is it just the showing results from the
Language Server
?Everything is a
TRACE
There are zero matches if you search it with the regex:
info|warning|debug|error
So maybe this should be filed in a different repository ?
Long log: 2024-06-05-PowerQueryExtension-hoverTests.log
To Reproduce
I started a new vscode window -> new tab -> set language powerquery
Then pasted this script
The tooltip for
Text.Combine
has a return typeEnvironment
Settings.json
I don't think the SDK engine is involved. It logged 1 line total.
The text was updated successfully, but these errors were encountered: