Skip to content

Commit ed51c80

Browse files
committed
Fix importing/exporting redeclaration in symbols
Signed-off-by: Dimitar Dobrev <[email protected]>
1 parent a9616bd commit ed51c80

File tree

2 files changed

+40
-42
lines changed

2 files changed

+40
-42
lines changed

tests/CSharp/CSharp.cpp

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -310,6 +310,8 @@ ForceCreationOfInterface::~ForceCreationOfInterface()
310310
{
311311
}
312312

313+
Baz::Baz() : P(5) {}
314+
313315
Baz::Baz(Bar::Items item)
314316
{
315317
}
@@ -369,6 +371,8 @@ AbstractProprietor::AbstractProprietor(int i)
369371
{
370372
}
371373

374+
Proprietor::Proprietor() : _items(Bar::Items::Item1), _itemsByValue(Bar::Items::Item1) {}
375+
372376
Proprietor::Proprietor(int i) : AbstractProprietor(i)
373377
{
374378
}
@@ -501,6 +505,9 @@ void TestDestructors::InitMarker()
501505
Marker = 0;
502506
}
503507

508+
TestDestructors::TestDestructors() { Marker = 0xf00d; }
509+
TestDestructors::~TestDestructors() { Marker = 0xcafe; }
510+
504511
int TestDestructors::Marker = 0;
505512

506513
TestCopyConstructorVal::TestCopyConstructorVal()
@@ -905,6 +912,20 @@ void PropertyWithIgnoredType::setIgnoredType(const IgnoredType& value)
905912
_ignoredType = value;
906913
}
907914

915+
MI_A0::MI_A0() : F(50) {}
916+
int MI_A0::get() { return F; };
917+
918+
MI_A::MI_A() {}
919+
void MI_A::v(int i) {}
920+
921+
MI_B::MI_B() {}
922+
923+
MI_C::MI_C() {}
924+
925+
MI_A1::MI_A1() {}
926+
927+
MI_D::MI_D() {}
928+
908929
StructWithPrivateFields::StructWithPrivateFields(int simplePrivateField, Foo complexPrivateField)
909930
{
910931
this->simplePrivateField = simplePrivateField;
@@ -921,6 +942,14 @@ Foo StructWithPrivateFields::getComplexPrivateField()
921942
return complexPrivateField;
922943
}
923944

945+
void TestPointers::TestDoubleCharPointers(const char** names)
946+
{
947+
}
948+
949+
void TestPointers::TestTripleCharPointers(const char*** names)
950+
{
951+
}
952+
924953
HasVirtualDtor1::HasVirtualDtor1()
925954
{
926955
testField = 5;
@@ -1613,6 +1642,17 @@ TestIndexedProperties::TestIndexedProperties() : field(0)
16131642
{
16141643
}
16151644

1645+
int TestIndexedProperties::operator[](const int& key)
1646+
{
1647+
return key;
1648+
}
1649+
1650+
void* TestIndexedProperties::operator[](size_t n) const
1651+
{
1652+
field = n;
1653+
return &field;
1654+
}
1655+
16161656
void useStdStringJustAsParameter(std::string s)
16171657
{
16181658
}

tests/CSharp/CSharp.h

Lines changed: 0 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -178,8 +178,6 @@ class DLL_API Baz : public Foo, public Bar
178178
FunctionTypedef functionTypedef;
179179
};
180180

181-
Baz::Baz() : P(5) {}
182-
183181
struct QArrayData
184182
{
185183
};
@@ -234,8 +232,6 @@ class DLL_API Proprietor : public AbstractProprietor
234232
Bar::Items _itemsByValue;
235233
};
236234

237-
Proprietor::Proprietor() : _items(Bar::Items::Item1), _itemsByValue(Bar::Items::Item1) {}
238-
239235
class DLL_API ComplexType
240236
{
241237
public:
@@ -285,9 +281,6 @@ struct DLL_API TestDestructors
285281
~TestDestructors();
286282
};
287283

288-
TestDestructors::TestDestructors() { Marker = 0xf00d; }
289-
TestDestructors::~TestDestructors() { Marker = 0xcafe; }
290-
291284
class DLL_API TestCopyConstructorVal
292285
{
293286
public:
@@ -582,46 +575,32 @@ struct DLL_API MI_A0
582575
int F;
583576
};
584577

585-
MI_A0::MI_A0() : F(50) {}
586-
int MI_A0::get() { return F; };
587-
588578
struct DLL_API MI_A
589579
{
590580
MI_A();
591581
virtual void v(int i = 5);
592582
};
593583

594-
MI_A::MI_A() {}
595-
void MI_A::v(int i) {}
596-
597584
struct DLL_API MI_B : public MI_A
598585
{
599586
MI_B();
600587
};
601588

602-
MI_B::MI_B() {}
603-
604589
struct DLL_API MI_C : public MI_A0, public MI_B
605590
{
606591
MI_C();
607592
};
608593

609-
MI_C::MI_C() {}
610-
611594
struct DLL_API MI_A1
612595
{
613596
MI_A1();
614597
};
615598

616-
MI_A1::MI_A1() {}
617-
618599
struct DLL_API MI_D : public MI_A1, public MI_C
619600
{
620601
MI_D();
621602
};
622603

623-
MI_D::MI_D() {}
624-
625604
class DLL_API StructWithPrivateFields
626605
{
627606
public:
@@ -686,16 +665,6 @@ struct DLL_API TestPointers
686665
const char** Names;
687666
};
688667

689-
void TestPointers::TestDoubleCharPointers(const char** names)
690-
{
691-
692-
}
693-
694-
void TestPointers::TestTripleCharPointers(const char*** names)
695-
{
696-
697-
}
698-
699668
class DLL_API HasVirtualDtor1
700669
{
701670
public:
@@ -1344,17 +1313,6 @@ class DLL_API TestIndexedProperties
13441313
void* operator[](size_t n) const;
13451314
};
13461315

1347-
int TestIndexedProperties::operator[](const int& key)
1348-
{
1349-
return key;
1350-
}
1351-
1352-
void* TestIndexedProperties::operator[](size_t n) const
1353-
{
1354-
field = n;
1355-
return &field;
1356-
}
1357-
13581316
extern const ComplexArrayElement ArrayOfVariableSize[];
13591317

13601318
void useStdStringJustAsParameter(std::string s);

0 commit comments

Comments
 (0)