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
[K2/JS] Use declaration session for looking up containing declaration
There was a couple of helper functions,
in particular hasAnnotationOrInsideAnnotatedClass,
with looked up containing class or file of declaration,
using call-site session.
This is incorrect because it can find a file of actual declaration,
instead of expect one, with unpredictable result.
^KT-67978 Fixed
Copy file name to clipboardExpand all lines: compiler/fir/checkers/checkers.js/src/org/jetbrains/kotlin/fir/analysis/js/checkers/FirJsModuleCheckUtils.kt
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -37,7 +37,7 @@ internal fun checkJsModuleUsage(
37
37
38
38
val calleeSession = callee.moduleData.session
39
39
val calleeRoot = getRootClassLikeSymbolOrSelf(callee, calleeSession)
40
-
val calleeContainingFile = calleeRoot.getContainingFile(calleeSession)
40
+
val calleeContainingFile = calleeRoot.getContainingFile()
41
41
42
42
val callToModule = calleeRoot.getAnnotationStringParameter(JsStandardClassIds.Annotations.JsModule, calleeSession) !=null||
0 commit comments