Browse Source

Correctly compare array element types.
Fixes #67.

woollybah 10 năm trước cách đây
mục cha
commit
77b6b8e7de
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      type.bmx

+ 1 - 1
type.bmx

@@ -604,7 +604,7 @@ Type TArrayType Extends TType
 	
 	Method ExtendsType:Int( ty:TType )
 		Local arrayType:TArrayType=TArrayType( ty )
-		Return (arrayType And ( TVoidType( elemType ) Or elemType.EqualsType( arrayType.elemType ) )) Or IsPointerType(ty, 0, TType.T_POINTER) <> Null Or (TObjectType( ty ) And TObjectType( ty ).classDecl.ident="Object")
+		Return (arrayType And ( TVoidType( elemType ) Or elemType.EqualsType( arrayType.elemType ) Or elemType.ExtendsType( arrayType.elemType ) )) Or IsPointerType(ty, 0, TType.T_POINTER) <> Null Or (TObjectType( ty ) And TObjectType( ty ).classDecl.ident="Object")
 	End Method
 	
 	Method Semant:TType(option:Int = False)