Skip to content

Commit 333f649

Browse files
committed
Tweak AOT checks
1 parent 164015e commit 333f649

File tree

2 files changed

+6
-10
lines changed

2 files changed

+6
-10
lines changed

src/WinRT.Runtime/Marshalers.cs

+5-8
Original file line numberDiff line numberDiff line change
@@ -1082,9 +1082,6 @@ private static Type GetAbiType()
10821082

10831083
public struct MarshalerArray
10841084
{
1085-
#if NET
1086-
[UnconditionalSuppressMessage("AOT", "IL3050", Justification = "'MarshalerArray' is only initialized from 'CreateMarshalerArray', which is not supported on AOT.")]
1087-
#endif
10881085
public void Dispose()
10891086
{
10901087
if (_marshalers != null)
@@ -1106,7 +1103,7 @@ public void Dispose()
11061103

11071104
public static new unsafe MarshalerArray CreateMarshalerArray(T[] array)
11081105
{
1109-
#if NET && !NET9_0_OR_GREATER
1106+
#if NET
11101107
if (!RuntimeFeature.IsDynamicCodeCompiled)
11111108
{
11121109
throw new NotSupportedException($"Cannot handle array marshalling for non blittable type '{typeof(T)}'.");
@@ -1159,7 +1156,7 @@ public void Dispose()
11591156

11601157
public static new unsafe T[] FromAbiArray(object box)
11611158
{
1162-
#if NET && !NET9_0_OR_GREATER
1159+
#if NET
11631160
if (!RuntimeFeature.IsDynamicCodeCompiled)
11641161
{
11651162
throw new NotSupportedException($"Cannot handle array marshalling for non blittable type '{typeof(T)}'.");
@@ -1200,7 +1197,7 @@ public void Dispose()
12001197

12011198
public static unsafe void CopyAbiArray(T[] array, object box)
12021199
{
1203-
#if NET && !NET9_0_OR_GREATER
1200+
#if NET
12041201
if (!RuntimeFeature.IsDynamicCodeCompiled)
12051202
{
12061203
throw new NotSupportedException($"Cannot handle array marshalling for non blittable type '{typeof(T)}'.");
@@ -1235,7 +1232,7 @@ public static unsafe void CopyAbiArray(T[] array, object box)
12351232

12361233
public static new unsafe (int length, IntPtr data) FromManagedArray(T[] array)
12371234
{
1238-
#if NET && !NET9_0_OR_GREATER
1235+
#if NET
12391236
if (!RuntimeFeature.IsDynamicCodeCompiled)
12401237
{
12411238
throw new NotSupportedException($"Cannot handle array marshalling for non blittable type '{typeof(T)}'.");
@@ -1281,7 +1278,7 @@ public static unsafe void CopyAbiArray(T[] array, object box)
12811278

12821279
public static unsafe void CopyManagedArray(T[] array, IntPtr data)
12831280
{
1284-
#if NET && !NET9_0_OR_GREATER
1281+
#if NET
12851282
if (!RuntimeFeature.IsDynamicCodeCompiled)
12861283
{
12871284
throw new NotSupportedException($"Cannot handle array marshalling for non blittable type '{typeof(T)}'.");

src/WinRT.Runtime/MatchingRefApiCompatBaseline.net8.0.txt

+1-2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,5 @@ CannotRemoveAttribute : Attribute 'System.Runtime.CompilerServices.NullableConte
88
CannotRemoveAttribute : Attribute 'System.Runtime.CompilerServices.NullableAttribute' exists on 'WinRT.ActivationFactory.ActivationHandler' in the implementation but not the reference.
99
CannotRemoveAttribute : Attribute 'System.Runtime.CompilerServices.NullableContextAttribute' exists on 'WinRT.EventRegistrationTokenTable<T>.AddEventHandler(T)' in the implementation but not the reference.
1010
CannotRemoveAttribute : Attribute 'System.ComponentModel.EditorBrowsableAttribute' exists on 'WinRT.Marshaler<T>' in the implementation but not the reference.
11-
CannotRemoveAttribute : Attribute 'System.Diagnostics.CodeAnalysis.UnconditionalSuppressMessageAttribute' exists on 'WinRT.MarshalNonBlittable<T>.MarshalerArray.Dispose()' in the implementation but not the reference.
1211
TypesMustExist : Type 'WinRT.MarshalGenericHelper<T>' does not exist in the reference but it does exist in the implementation.
13-
Total Issues: 11
12+
Total Issues: 10

0 commit comments

Comments
 (0)