Related to #38560
Version Used:
version 3.8.0-dev (<developer build>)
(Built from master a few minutes ago)
Steps to Reproduce:
Compile the following code:
class Base<T> { }
#nullable enable
partial class Derived : Base<object> { }
#nullable disable
partial class Derived : Base<object> { }
Expected Behavior:
The build should probably succeed. I've ran into this issue in a WPF project with nullable enabled (although the above code shows that this isn't a WPF issue). Code generated from xaml files is marked as auto-generated and is therefore has nullable disabled, which means that you can't use xaml for classes with a generic base class (which unfortunately is quite common with ReactiveUI, e.g. ReactiveWindow<ViewModel>).
Actual Behavior:
<file>(4,15): error CS0263: Partial declarations of 'Derived' must not specify different base classes
I've also tried changing the base declaration to Base<object?> in the nullable enable block, but that still gives the same error.
Related to #38560
Version Used:
version 3.8.0-dev (<developer build>)
(Built from master a few minutes ago)
Steps to Reproduce:
Compile the following code:
Expected Behavior:
The build should probably succeed. I've ran into this issue in a WPF project with nullable enabled (although the above code shows that this isn't a WPF issue). Code generated from xaml files is marked as
auto-generatedand is therefore has nullable disabled, which means that you can't use xaml for classes with a generic base class (which unfortunately is quite common withReactiveUI, e.g.ReactiveWindow<ViewModel>).Actual Behavior:
<file>(4,15): error CS0263: Partial declarations of 'Derived' must not specify different base classesI've also tried changing the base declaration to
Base<object?>in the nullable enable block, but that still gives the same error.