Dimitar Dobrev
e637b18b98
Export some neglected classes in the tests
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
5 years ago
josetr
be2bc1be5b
Fix C4251 warnings ( #1487 )
5 years ago
Dimitar Dobrev
b5ca0635be
Check symbols in tests
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
5 years ago
Dimitar Dobrev
0e39ab705a
Import native DLL-s (tests and parser) with MSVC
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
5 years ago
Dimitar Dobrev
7396c95f7c
Implement and export all methods in tests
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
5 years ago
Dimitar Dobrev
7b6fb6e340
Implement abstract templates to call virtuals
...
This allows for, just as with regular classes, the calling of virtual methods of abstract templates returned by functions.
Fixes https://github.com/mono/CppSharp/issues/1270 .
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
5 years ago
Dimitar Dobrev
d31cab7315
Avoid invalid template specializations in tests
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
5 years ago
Dimitar Dobrev
c0510730f0
Prefer non-mapped types when resolving ambiguous overloads
...
This fixes a missing specialized method when it has a parameter with type a mapped template which is ignored when dependent.
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
6 years ago
Dimitar Dobrev
991c6ffb25
Generate valid C# for typedef-ed type parameters
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
6 years ago
Dimitar Dobrev
64773a5f6f
Generate valid C# for template parameters with a default value
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
6 years ago
Dimitar Dobrev
380d064ca0
Generate valid C# for overloads with types nested in templates
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
6 years ago
Dimitar Dobrev
9bc39c44ab
Generate valid C# for template indexers taking const char*
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
6 years ago
Dimitar Dobrev
c75e9f6c5e
Fix a crash when a function pointer is a template arg
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
6 years ago
Dimitar Dobrev
6e78b4df15
Fix the generated C# when type arguments are mapped the same
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
6 years ago
Dimitar Dobrev
4dcbff3d62
Fix the generated C# for a case with 2 template args
...
When a template with 2 args and a method with a dependent pointer was specialized with const char*, there were methods with identical signatures generated for different specializations.
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
6 years ago
Dimitar Dobrev
831cea92ce
Fix the generated C# when a dependent param has a default value
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
6 years ago
Dimitar Dobrev
d97016fe3c
Fixed the generated C# for indexers in templates specialized with void*.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
6 years ago
Dimitar Dobrev
cd32a449c8
Fixed the generated C# for template specializations of pointers.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
6 years ago
Dimitar Dobrev
c51b3cba71
Fixed the generated C# when a template is specialized with T and const T.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
6 years ago
Dimitar Dobrev
01b4fa4c2e
Fixed the warnings in the test C++ for C# only.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
6 years ago
Dimitar Dobrev
5e0e19ea18
Fixed the generation of dependent virtual methods.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
6 years ago
Dimitar Dobrev
88f118ec4e
Fixed the parsing of functions with integral template args.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
6 years ago
Dimitar Dobrev
eec05041a3
Fixed the generated C# for templates with > 1 ctor taking a pointer to a class.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
7 years ago
Dimitar Dobrev
8feac37ae1
Fixed ambiguity when the type of a parameter is mapped to a type in an overload.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
7 years ago
Dimitar Dobrev
10c8211a7c
Fixed the generated C# when a template interface specialised with another specialisation returns a template parameter.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
8 years ago
Dimitar Dobrev
ae9eede6f1
Fixed a crash when a constructor takes a template or specialisation.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
8 years ago
Dimitar Dobrev
6dec97fd99
Fixed the generated C# for public fields with type a dependent pointer.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
8 years ago
Dimitar Dobrev
a119bdb3f0
Fixed the generated C# for subclasses of specialisations used as secondary bases.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
8 years ago
Dimitar Dobrev
cb6d2aee23
Fixed the generated C# when a template specialization with extensions is used for a secondary base.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
8 years ago
Dimitar Dobrev
52c754c4de
Extended the multiple inheritance to work for templates.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
8 years ago
Dimitar Dobrev
1e6c881bdc
Fixed a regression causing public fields of type specialization to be ignored.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
8 years ago
Dimitar Dobrev
51c0f37aa3
Fixed the generated C# for templates with optional arguments.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
8 years ago
Dimitar Dobrev
db3e04cca0
Represented "void" with "object" for template arguments in the generated C#.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
8 years ago
Dimitar Dobrev
1a1308ad8a
Fixed the generated C# for public fields with type a dependent function pointer.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
8 years ago
Dimitar Dobrev
a1327b4402
Fixed the generated C# for indexers with dependent keys.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
8 years ago
Dimitar Dobrev
0ea147b1e3
Fixed the generated C# for templated indexers specialised with enums.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
8 years ago
Dimitar Dobrev
10607164ed
Fixed the generated C# when a template returns a specialisation with itself as a type arg.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
8 years ago
Dimitar Dobrev
e75e96bf72
Removed a duplicate explicit instantiation from the tests.
...
This fixes our CI on Unix.
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
8 years ago
Dimitar Dobrev
caacaa841f
Worked around duplication of types nested in templates and forwarded.
...
Since all template specialisations are incomplete by default, so are classes nested in them. When such classes are also forwarded, there are two incomplete declarations with the same name and in the same scope. Our parser searches by name and completion and it can therefore not make a difference between the two. Consequently, it always returns the first type it finds even if it isn't the right one. When clang::Sema later completes the specialisations, it completes the nested types too which leads to two identical complete types in the same scope.
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
8 years ago
Dimitar Dobrev
4eb8ee83da
Fixed the generated C# for templates with fields other templates not used anywhere else.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
8 years ago
Dimitar Dobrev
a913a74138
Fixed the generated C# when using std::map.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
8 years ago
Dimitar Dobrev
4bfece6ab9
Fixed the generated C# for specialisations with an ignored specialisation as an arg.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
8 years ago
Dimitar Dobrev
853e82f095
Fixed the generated C# for specialisations only used as type arguments.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
8 years ago
Dimitar Dobrev
d996d8a4d0
Removed extensions for internal template specialisations.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
8 years ago
Dimitar Dobrev
35902635ff
Fixed the parsing of an undeclared template specialisation with an extension method.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
8 years ago
Dimitar Dobrev
faf0fbb656
Included template specialisations only used as returned types.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
8 years ago
Dimitar Dobrev
10748cba2e
Fixed the generated C# when a type nested in a template is forwarded.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
8 years ago
Marco Zille
d932a09cdf
Fixed incorrectly generated bindings for class with non-type template arguments
...
Fixes #979
8 years ago
Dimitar Dobrev
764806e759
Fixed the generated C# for templates derived from regular dynamic classes.
...
Fixes https://github.com/mono/CppSharp/issues/967 .
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
8 years ago
Dimitar Dobrev
cd5b57a786
Ensured all non-system template specialisations are complete.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
8 years ago