소스 검색

Take hierarchy into consideration. Fixes #489.

Brucey 5 년 전
부모
커밋
bba06cccab
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      stmt.bmx

+ 1 - 1
stmt.bmx

@@ -141,7 +141,7 @@ Type TAssignStmt Extends TStmt
 					If TFieldDecl(decl) Then
 						' check scope for ctor
 						Local scope:TFuncDecl = _env.FuncScope()
-						If Not scope Or Not scope.IsCtor() Or (decl.ClassScope() <> scope.ClassScope()) Then
+						If Not scope Or Not scope.IsCtor() Or (Not scope.ClassScope().ExtendsClass(decl.ClassScope())) Then
 							Err "Cannot modify ReadOnly field " + decl.ident
 						End If
 					Else