Skip to content

Commit 893d28e

Browse files
committed
Fix crash in scoped variable type checking
1 parent 4870ecf commit 893d28e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/kotlin/io/runescript/plugin/lang/psi/type/inference/RsTypeInferenceVisitor.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,7 @@ class RsTypeInferenceVisitor(private val myInferenceData: RsTypeInference) : RsV
315315

316316
override fun visitScopedVariableExpression(o: RsScopedVariableExpression) {
317317
val reference = o.reference?.resolve() as? RsSymSymbol
318-
if (reference == null) {
318+
if (reference == null || reference.fieldList.size < 3) {
319319
o.type = RsErrorType
320320
return
321321
}

0 commit comments

Comments
 (0)