jonsequitur / jonsequitur/dotnet-repl

[EXTERNAL] Creating variable of Span<> type results in CS8345 error

Open
#29 2 comments 0 reactions 0 assignees View on GitHub
external
Dominant language
C#
Stars
844
Forks
42
PR merge metrics
No merged PRs in 30d

Description

Steps to duplicate:

```
var bytes = new byte[10];
Span span = bytes;
```

result:

```
(1,1): error CS8345: Field or auto-implemented property cannot be of type 'Span' unless it is an instance member of a ref struct.
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.