Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
@ -211,6 +211,7 @@ namespace CppSharp.Generators.CLI
return true;
case PrimitiveType.Bool:
case PrimitiveType.Char:
case PrimitiveType.Char16:
case PrimitiveType.WideChar:
case PrimitiveType.SChar:
case PrimitiveType.UChar:
@ -244,8 +244,6 @@ namespace CppSharp.Generators.CSharp
}
goto default;
return false;
if (Context.MarshalKind == MarshalKind.NativeField)
{
@ -728,8 +726,6 @@ namespace CppSharp.Generators.CSharp
@ -826,4 +826,13 @@ This is a very long string. This is a very long string. This is a very long stri
Assert.That(testProperties.RefToPrimitiveInSetter, Is.EqualTo(value));
[Test]
public void TestReturnChar16()
using (var foo = new Foo())
Assert.That(foo.ReturnChar16(), Is.EqualTo('a'));
@ -74,6 +74,11 @@ int Foo::fooPtr()
return 1;
char16_t Foo::returnChar16()
return 'a';
Foo2::Foo2() {}
Foo2 Foo2::operator<<(signed int i)
@ -108,6 +108,7 @@ public:
bool operator ==(const Foo& other) const;
int fooPtr();
char16_t returnChar16();
};
// HACK: do not move these to the cpp - C++/CLI is buggy and cannot link static fields initialised in the cpp