Răsfoiți Sursa

* support Objective-C classes and protocols with -gw3 (mantis #36250)

git-svn-id: trunk@48834 -
Jonas Maebe 4 ani în urmă
părinte
comite
9c831677ff
3 a modificat fișierele cu 22 adăugiri și 0 ștergeri
  1. 1 0
      .gitattributes
  2. 6 0
      compiler/dbgdwarf.pas
  3. 15 0
      tests/webtbs/tw36250.pp

+ 1 - 0
.gitattributes

@@ -18526,6 +18526,7 @@ tests/webtbs/tw36196.pp svneol=native#text/pascal
 tests/webtbs/tw3621.pp svneol=native#text/plain
 tests/webtbs/tw36212.pp svneol=native#text/pascal
 tests/webtbs/tw36215.pp svneol=native#text/pascal
+tests/webtbs/tw36250.pp svneol=native#text/plain
 tests/webtbs/tw3628.pp svneol=native#text/plain
 tests/webtbs/tw3634.pp svneol=native#text/plain
 tests/webtbs/tw36381.pp svneol=native#text/plain

+ 6 - 0
compiler/dbgdwarf.pas

@@ -4521,6 +4521,12 @@ implementation
 
       begin
         case def.objecttype of
+          odt_objcclass,
+          odt_objcprotocol:
+            begin
+              inherited;
+              exit
+            end;
           odt_cppclass,
           odt_object:
             begin

+ 15 - 0
tests/webtbs/tw36250.pp

@@ -0,0 +1,15 @@
+{ %norun }
+{ %target=darwin,ios,iphonesim}
+{ %opt=-gw3 }
+
+{$mode objfpc}{$h+}
+{$ModeSwitch objectivec2}
+
+function NSStringToString(ns: NSString): String;
+begin
+    Result := '';
+end;                 
+
+begin
+  WriteLn(NSStringToString(nil));
+end.