Skip to content
This repository has been archived by the owner on Oct 12, 2022. It is now read-only.

Commit

Permalink
Fix #22702 - make compilant with getLinkage returning System or Objec…
Browse files Browse the repository at this point in the history
…tive-C
  • Loading branch information
adamdruppe committed Jan 24, 2022
1 parent e390ba7 commit 74baf8f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/core/demangle.d
Original file line number Diff line number Diff line change
Expand Up @@ -2471,7 +2471,7 @@ private template hasPlainMangling(FT) if (is(FT == function))
{
enum lnk = __traits(getLinkage, FT);
// C || Windows
enum hasPlainMangling = lnk == "C" || lnk == "Windows";
enum hasPlainMangling = lnk == "C" || lnk == "Windows" || lnk == "System";
}

@safe pure nothrow unittest
Expand Down
2 changes: 1 addition & 1 deletion src/core/lifetime.d
Original file line number Diff line number Diff line change
Expand Up @@ -2642,7 +2642,7 @@ if (!Init.length ||
*/
T _d_newThrowable(T, Args...)(auto ref Args args) @trusted
if (is(T : Throwable) && is(typeof(T.__ctor(forward!args))) &&
__traits(getLinkage, T) != "Windows" && __traits(getLinkage, T) != "C++")
__traits(getLinkage, T) == "D")
{
debug(PRINTF) printf("_d_newThrowable(%s)\n", cast(char*) T.stringof);

Expand Down

0 comments on commit 74baf8f

Please sign in to comment.