Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[master] [generator] Do not generate PlatformNotSupportedException in…
… chaining .ctor (#7092) Types that are new in 64bits only OS are generated differently on 32bits bindings. They mainly throw a `PlatformNotSupportedException` so it's easier to diagnose (than a crash) what's happening at runtime. This works well in all cases except one. When a new type, let's say `UIMenuElement` is added **and** serves as a new base type for existing types. `UIKeyCommand` (iOS 7) -> `UICommand` (iOS 13)-> `UIMenuElement` (iOS 13) This is _correct_ as new base types can be added (in ObjC and C#). However the generated code for the constructors of `UICommand` and `UIMenuElement` would be throwing a `PlatformNotSupportedException` which breaks the `UIKeyCommand` on 32 bits devices. We fixed this in a few places by tweaking the availability attribute but that requires spotting the new base type while doing bindings and that is error prone [1][2]. This PR simply does let the `protected` constructor, using when chaining, be generated normally. It's simpler and will cover all the cases (without requiring hacks in the availability of those types) [1] #7083 [2] #7084
- Loading branch information
abfa32c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✅ Device tests passed on iOS on Azure DevOps(iOS): Html Report ✅
🎉 All 113 tests passed 🎉
abfa32c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❌ Build was (probably) aborted
🔥 Jenkins job (on internal Jenkins) failed in stage(s) 'Test run, Test run' 🔥
✅ Build succeeded
✅ Packages:
✅ API Diff (from stable)
✅ API Diff (from PR only) (no change)
ℹ️ Generator Diff (please review changes)
🔥 Test run failed 🔥
Test results
2 tests failed, 161 tests passed.
Failed tests
abfa32c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔥 Device tests completed (Failed) on TvOS on Azure DevOps(TvOS): Html Report 🔥
Test results
1 tests failed, 112 tests passed.
Failed tests