Skip to content

Commit 0ee8043

Browse files
committed
修复了访问类伴随对象成员时候不应该的报错
1 parent b32da00 commit 0ee8043

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/kotlin/top/mcfpp/antlr/MCFPPExprVisitor.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,7 @@ class MCFPPExprVisitor(private var defaultGenericClassType : MCFPPGenericClassTy
317317
if (ctx.`var`() != null) {
318318
//变量
319319
val qwq = visit(ctx.`var`())
320-
if(qwq is UnknownVar){
320+
if(qwq is UnknownVar && ctx.parent !is mcfppParser.VarWithSelectorContext){
321321
LogProcessor.error(TextTranslator.VARIABLE_NOT_DEFINED.translate(qwq.identifier))
322322
}
323323
return qwq

0 commit comments

Comments
 (0)