Jelajahi Sumber

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

Mark Sibly 8 tahun lalu
induk
melakukan
42867aafe7
1 mengubah file dengan 1 tambahan dan 2 penghapusan
  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
 				hasDefaultCtor=True
 			Next
-		Else
+		Else If Not cdecl.IsExtension
 			If superType And Not superType.hasDefaultCtor
 				Try
 					Throw New SemantEx( "Super class '"+superType.Name+"' has no default constructor" )
 				Catch ex:SemantEx
 				End
 			Endif
-			
 			hasDefaultCtor=True
 		Endif