2
0
Эх сурвалжийг харах

Take hierarchy into consideration. Fixes #489.

Brucey 5 жил өмнө
parent
commit
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