Browse Source

Don't generate ifc New() for interfaces.

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

+ 3 - 1
ctranslator.bmx

@@ -4891,7 +4891,9 @@ End Rem
 		' functions
 		If Not classDecl.IsExtern() Then
 
-			Emit "-New()=" + Enquote("_" + classDecl.munged + "_New")
+			If Not classDecl.attrs & CLASS_INTERFACE Then
+				Emit "-New()=" + Enquote("_" + classDecl.munged + "_New")
+			End If
 			If classHierarchyHasFunction(classDecl, "Delete") Then
 				Emit "-Delete()=" + Enquote("_" + classDecl.munged + "_Delete")
 			End If