Skip to content

Commit 6932fb3

Browse files
Phase 1: record netstandard2.0 verification in the polyfill comment
The overload-priority shim was proven on the actual legacy target (not just net472): the ns2.0 compiler honors the source-defined internal attribute in-assembly, and a net10 consumer honors it cross-assembly from ns2.0 metadata, with a no-attribute negative control confirming causation. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent 7d43c59 commit 6932fb3

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

Source/Core/Compatibility/OverloadResolutionPriorityAttribute.cs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,12 @@
22
// Polyfill for System.Runtime.CompilerServices.OverloadResolutionPriorityAttribute.
33
// The attribute ships in-box on .NET 9+, but net10.0 is this library's modern target, so
44
// everything below it (the netstandard shims and net472) gets this internal definition.
5-
// The C# 13+ compiler recognizes it by full name and honors a source-defined copy — verified
6-
// on net472 (the polyfilled overload wins overload resolution exactly as the in-box one does),
7-
// which is what lets the modern span overloads added during API modernization win uniformly
8-
// across every target framework.
5+
// The C# 13+ compiler recognizes it by full metadata name and honors a source-defined copy,
6+
// decoding the priority from the attribute blob without requiring the type to be public or
7+
// from the runtime. Verified on netstandard2.0 both in-assembly (the ns2.0 compiler honors it)
8+
// and cross-assembly (a net10 consumer honors this internal attribute read from ns2.0 metadata),
9+
// with a no-attribute negative control confirming causation. This is what lets the modern span
10+
// overloads added during API modernization win overload resolution uniformly across every TFM.
911
namespace System.Runtime.CompilerServices;
1012

1113
[AttributeUsage(

0 commit comments

Comments
 (0)