I'm trying to resolve the type of an variable decl...
# arrow-meta
m
I'm trying to resolve the type of an variable declaration where the type is implicit from the initializer
Copy code
var x = 0
. I'm using the quote template dsl to do some manipulations with the type information. Any direction?
r
What does the PSI Viewer say for that constant?
Constants can be evaluated with the compiler and it's possible it already knows that is an Int in PSI
You can also partially analyze with partial body resolution Wich will give you typed values portions of the tree given a parent scope such as the file or the class
That is a compiler API on resolution utils
m
It wont necessarily be a constant expression ( did some wonky constant resolution early on and realized how futile that was going to scale)