Граф коммитов

9 Коммитов

Автор SHA1 Сообщение Дата
Rolf Bjarne Kvinge 2ddef0b306
[monotouch-test] Our P/Invokes here too needs MarshalAs attributes for boolean return types and parameters. (#10791) 2021-03-06 01:05:45 +01:00
Rolf Bjarne Kvinge 2b2f1d08dc
[tests] Remove Classic code from all tests. (#8702) 2020-05-28 16:35:09 +02:00
Rolf Bjarne Kvinge 303aa0a649 Merge remote-tracking branch 'origin/xcode11' into master-xcode11 2019-09-13 18:35:18 +02:00
Rolf Bjarne Kvinge 678a422604
[registrar] Ignore method encodings when processing copyback arguments in the dynamic registrar. Fixes #6883. (#6904)
Method encodings do not change anything for us, so skip them when processing
copyback arguments so that they don't confuse the rest of the code.

Fixes https://github.com/xamarin/xamarin-macios/issues/6883.
2019-09-04 07:02:33 -07:00
Rolf Bjarne Kvinge 73ce0f8882
[registrar] Fix verification of generic parameters to accept unrelated generic types. Fixes #6687. (#6850)
* [registrar] Fix verification of generic parameters to accept unrelated generic types. Fixes #6687.

When we export generic classes to Objective-C, we verify that any generic
parameters are constrained so that we know how to handle them.

Example:

    class MyObj<T> : NSObject where T: NSObject
    {
        [Export ("foo:")]
        public void Foo (T obj);
    }

in this case we verify that the parameter T is constrained to NSObject, so
that we can treat the argument like an NSObject.

The problem was when the function contained a generic type which was not
related to T:

    class MyObj<T> : NSObject where T: NSObject
    {
        [Export ("foo:")]
        public void Foo (Action<int> obj);
    }

in which case the same logic would kick in and reject the Action<int> type
since it's not related to NSObject (no generic arguments could be found, and
the default response was 'not valid').

So I've changed the default response for generic types that are unrelated to
the generic parameter we're verifying to accept such types.

Fixes https://github.com/xamarin/xamarin-macios/issues/6687.

* No need to use a UIViewController as the super class, NSObject works just fine for this test.

Fixes the test build on macOS.
2019-08-27 06:41:17 -07:00
Rolf Bjarne Kvinge e3bafafff0 [tests] Add tests for out/ref parameters. 2019-04-30 14:29:24 +00:00
Rolf Bjarne Kvinge b51aaf4b8b [tests] Add tests for out/ref parameters. 2019-04-26 11:20:15 +02:00
Rolf Bjarne Kvinge f2d0a80699 [runtime] Parameters passed on the stack use at least 8 bytes on x86-64. Fixes #58367. (#2393)
* [runtime] Make debug spew compile.

* [tests] Add test case for bug #58367.

https://bugzilla.xamarin.com/show_bug.cgi?id=58367

* [runtime] Parameters passed on the stack use at least 8 bytes on x86-64. Fixes #58367.

https://bugzilla.xamarin.com/show_bug.cgi?id=58367
2017-08-02 08:26:29 +02:00
Rolf Bjarne Kvinge ecfdea9508 [tests] Import 2016-05-26 15:06:52 +02:00