浏览代码

Fixed 'superclass has not default ctor' class extension issue..

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

+ 1 - 2
src/mx2cc/class.monkey2

@@ -273,14 +273,13 @@ Class ClassType Extends Type
 				If func.ftype.argTypes Continue
 				If func.ftype.argTypes Continue
 				hasDefaultCtor=True
 				hasDefaultCtor=True
 			Next
 			Next
-		Else
+		Else If Not cdecl.IsExtension
 			If superType And Not superType.hasDefaultCtor
 			If superType And Not superType.hasDefaultCtor
 				Try
 				Try
 					Throw New SemantEx( "Super class '"+superType.Name+"' has no default constructor" )
 					Throw New SemantEx( "Super class '"+superType.Name+"' has no default constructor" )
 				Catch ex:SemantEx
 				Catch ex:SemantEx
 				End
 				End
 			Endif
 			Endif
-			
 			hasDefaultCtor=True
 			hasDefaultCtor=True
 		Endif
 		Endif