Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
小 白蛋
Intellij Community
Commits
5a728bba
Commit
5a728bba
authored
1 year ago
by
Jinseong Jeon
Browse files
Options
Download
Email Patches
Plain Diff
FIR UAST: use fully expanded type when computing nullability
^KT-62757
parent
16db5dfd
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
plugins/kotlin/uast/uast-kotlin-base/tests/test/org/jetbrains/uast/test/common/kotlin/UastApiFixtureTestBase.kt
+4
-0
...tbrains/uast/test/common/kotlin/UastApiFixtureTestBase.kt
plugins/kotlin/uast/uast-kotlin-fir/src/org/jetbrains/uast/kotlin/internal/firKotlinInternalUastUtils.kt
+1
-1
...brains/uast/kotlin/internal/firKotlinInternalUastUtils.kt
with
5 additions
and
1 deletion
+5
-1
plugins/kotlin/uast/uast-kotlin-base/tests/test/org/jetbrains/uast/test/common/kotlin/UastApiFixtureTestBase.kt
+
4
-
0
View file @
5a728bba
...
...
@@ -142,11 +142,14 @@ interface UastApiFixtureTestBase : UastPluginSelection {
interface State<out T> {
val value: T
}
typealias NullableString = String?
@Deprecated(level = DeprecationLevel.HIDDEN, message="no longer supported")
fun before(
i : Int?,
s : String?,
ns : NullableString,
vararg vs : Any,
): State<String> {
return object : State<String> {
...
...
@@ -157,6 +160,7 @@ interface UastApiFixtureTestBase : UastPluginSelection {
fun after(
i : Int?,
s : String?,
ns : NullableString,
vararg vs : Any,
): State<String> {
return object : State<String> {
...
...
This diff is collapsed.
Click to expand it.
plugins/kotlin/uast/uast-kotlin-fir/src/org/jetbrains/uast/kotlin/internal/firKotlinInternalUastUtils.kt
+
1
-
1
View file @
5a728bba
...
...
@@ -273,7 +273,7 @@ context(KtAnalysisSession)
internal
fun
nullability
(
ktType
:
KtType
?):
KtTypeNullability
?
{
if
(
ktType
==
null
)
return
null
if
(
ktType
is
KtErrorType
)
return
null
return
if
(
ktType
.
canBeNull
)
return
if
(
ktType
.
fullyExpandedType
.
canBeNull
)
KtTypeNullability
.
NULLABLE
else
KtTypeNullability
.
NON_NULLABLE
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment