浏览代码

Fixed extensions fix.

Mark Sibly 7 年之前
父节点
当前提交
cb1723920b
共有 1 个文件被更改,包括 5 次插入3 次删除
  1. 5 3
      src/mx2cc/class.monkey2

+ 5 - 3
src/mx2cc/class.monkey2

@@ -277,9 +277,11 @@ Class ClassType Extends Type
 			
 			If cdecl.IsExtension
 				
-				For Local ctype:=Eachin transFile.extclasses
-					If ctype.cdecl.ident=cdecl.ident Throw New SemantEx( "Duplicate type extension '"+cdecl.ident+"'" )
-				Next
+				If Not IsGenInstance
+					For Local ctype:=Eachin transFile.extclasses
+						If ctype.cdecl.ident=cdecl.ident Throw New SemantEx( "Duplicate type extension '"+cdecl.ident+"'" )
+					Next
+				Endif
 				
 				transFile.extclasses.Add( Self )
 			Else