Kotlin nullability information in PSI / UAST Follow
Given the following class definition in a project:
class Bar<T>(t: T) {}
What is the correct way to query whether the constructor parameter of Bar<Foo>
is nullable via the Psi and/or UAST API?
For instance:
class Foo {
fun foo(): Bar<String?> {...}
}
How would I be able to determine whether the constructor parameter of type Bar<String?>
is nullable?
I haven't been able to find a way to inspect the methods of a class while retaining the type argument nullability information from the initial type reference. Any help would be appreciated. Thanks!
Please sign in to leave a comment.