Browse Source

Fixed extensions fix.

Mark Sibly 7 years ago
parent
commit
cb1723920b
1 changed files with 5 additions and 3 deletions
  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