Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test plan for "First-class Span Types" #73445

Closed
52 of 64 tasks
jjonescz opened this issue May 13, 2024 · 0 comments
Closed
52 of 64 tasks

Test plan for "First-class Span Types" #73445

jjonescz opened this issue May 13, 2024 · 0 comments

Comments

@jjonescz
Copy link
Member

jjonescz commented May 13, 2024

Proposal issue: dotnet/csharplang#7905
Speclet: https://github.com/dotnet/csharplang/blob/main/proposals/first-class-span-types.md
Label: New Feature - First-class Span Types
Feature branch: https://github.com/dotnet/roslyn/tree/features/FirstClassSpan

  • conversions
    • based on language version
    • conversions:
      • from T[] to Span<U>
      • from T[] to ReadOnlySpan<U>
      • from Span<T> to ReadOnlySpan<U>
      • from ReadOnlySpan<T> to ReadOnlySpan<U>
      • from string to ReadOnlySpan<U>
    • implicit conversions between the above where the conversion from T to U is:
      • no conversion
      • identity conversion
      • reference conversion
      • non-reference conversion
      • user-defined conversion
    • explicit conversions between the above where the conversion from T to U is:
      • see implicit conversions
    • implicit and explicit conversions from the reverse of the above are disallowed (see FirstClassSpanTests.*_Opposite*)
    • span conversions are standard implicit conversions (see FirstClassSpanTests.*_ThroughUserImplicit)
    • implicit conversions for extension method receiver
      • not considered for extension receiver in method group
    • limited co-variance from ReadOnlySpan<T> to ReadOnlySpan<U>
    • conversions to params {ReadOnly}Span<T> (see FirstClassSpanTests.*_Params*)
    • no span conversion with ref, ref readonly, in modifiers
    • no span conversion from multi-dimensional arrays
    • method group parameter and return type conversions (disallowed) (see FirstClassSpanTests.*_MethodGroup*)
  • pattern matching ignores span conversions
  • nullable analysis of element types
  • ref safety of implicit and explicit conversions (see FirstClassSpanTests.*_RefSafety)
  • null coalesce expressions (see FirstClassSpanTests.*_Coalesce)
  • conversions in expression trees (see FirstClassSpanTests.*_ExpressionTree*)
  • Span<T> and ReadOnlySpan<T> recognized by fully-qualified name
    • must be ref struct
    • multiple definitions
    • retargeted span types
  • code generation:
    • uses well-known runtime helpers
    • missing well-known runtime helpers
  • overload resolution: based on language version
  • overload resolution: better conversion from expression (see FirstClassSpanTests.OverloadResolution_*)
    • implicit span conversion and identity conversion
    • implicit span conversion for both:
      • Span<T> and ReadOnlySpan<U>
      • ReadOnlySpan<T> and ReadOnlySpan<U>
    • implicit span conversion and array variance: {ReadOnly}Span<T> and U[]
    • implicit span conversion and implicit reference conversion: {ReadOnly}Span<T> and IEnumerable<U>
    • implicit span conversion and user-defined conversion
    • extension method receiver (see FirstClassSpanTests.OverloadResolution_*_ExtensionMethodReceiver*)
    • params (see FirstClassSpanTests.OverloadResolution_*_Params*)
  • type inference: (see FirstClassSpanTests.TypeInference_*)
    • lower-bound inference from T[] arg to {ReadOnly}Span<U>
    • lower-bound inference from Span<T> arg to ReadOnlySpan<U>
    • exact inference from T[] arg to {ReadOnly}Span<U>
    • exact inference from Span<T> arg to ReadOnlySpan<U>
  • semantic model:
    • implicit conversion
    • explicit conversion
    • Conversion.IsSpan { get; }
  • public API review: API: Conversion.IsSpan #74738
  • document breaking changes
  • IDE:
    • simplify cast
  • build dotnet/runtime
  • build Visual Studio
  • update test plan
@jjonescz jjonescz added this to the .NET 9 milestone May 13, 2024
@jjonescz jjonescz self-assigned this May 13, 2024
@dotnet-issue-labeler dotnet-issue-labeler bot added the untriaged Issues and PRs which have not yet been triaged by a lead label May 13, 2024
@jjonescz jjonescz removed the untriaged Issues and PRs which have not yet been triaged by a lead label May 13, 2024
@jaredpar jaredpar modified the milestones: .NET 9, 17.12 Jul 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants