From 9c831677ff1f6d00592d7bea91a3fdb6d65e0aea Mon Sep 17 00:00:00 2001 From: Jonas Maebe Date: Sat, 27 Feb 2021 21:44:53 +0000 Subject: [PATCH] * support Objective-C classes and protocols with -gw3 (mantis #36250) git-svn-id: trunk@48834 - --- .gitattributes | 1 + compiler/dbgdwarf.pas | 6 ++++++ tests/webtbs/tw36250.pp | 15 +++++++++++++++ 3 files changed, 22 insertions(+) create mode 100644 tests/webtbs/tw36250.pp diff --git a/.gitattributes b/.gitattributes index 31c18818b8..c52a7325d7 100644 --- a/.gitattributes +++ b/.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 diff --git a/compiler/dbgdwarf.pas b/compiler/dbgdwarf.pas index 74591e88a7..0e3ebae0a5 100644 --- a/compiler/dbgdwarf.pas +++ b/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 diff --git a/tests/webtbs/tw36250.pp b/tests/webtbs/tw36250.pp new file mode 100644 index 0000000000..569294da6f --- /dev/null +++ b/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.