mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-10 04:22:20 +02:00
Fixed CPP mangling for static fields
This commit is contained in:
parent
e1a74ce81a
commit
ca3308d959
4 changed files with 99 additions and 95 deletions
|
@ -2,12 +2,13 @@
|
|||
#include <stdio.h>
|
||||
|
||||
namespace Tests
|
||||
{
|
||||
{
|
||||
struct Interop
|
||||
{
|
||||
struct StructA
|
||||
{
|
||||
int mA;
|
||||
static int sVal;
|
||||
|
||||
int MethodA0(int arg0)
|
||||
{
|
||||
|
@ -287,6 +288,8 @@ namespace Tests
|
|||
float mX;
|
||||
};
|
||||
};
|
||||
|
||||
int Interop::StructA::sVal = 1234;
|
||||
}
|
||||
|
||||
using namespace Tests;
|
||||
|
|
|
@ -9,6 +9,9 @@ namespace Tests
|
|||
{
|
||||
public int32 mA;
|
||||
|
||||
[LinkName(.CPP)]
|
||||
public static extern int32 sVal;
|
||||
|
||||
[LinkName(.CPP)]
|
||||
public extern int32 MethodA0(int32 arg0) mut;
|
||||
[LinkName(.CPP)]
|
||||
|
@ -387,6 +390,8 @@ namespace Tests
|
|||
//Console.WriteLine(str);
|
||||
}
|
||||
|
||||
Test.Assert(StructA.sVal == 1234);
|
||||
|
||||
StartTest("Func0");
|
||||
Test.Assert(Func0(12, 34) == 3412);
|
||||
StartTest("Func0K");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue