meetings/2023/LDM-2023-03-13.md
https://github.com/dotnet/roslyn/issues/67281
We started today by looking at an existing hole in the enforcement of unsafe for pointer types, nested as the element type of an array in a type parameter
to a generic type (such as List<int*[]>). This hole has existed for as long as generics have, but now presents us with an inconsistency in the C# 12 using
enhancements feature, as it introduces using unsafe. In brainstorming, we came up with the following options:
unsafe types in using will require unsafe, except those types contained inside type parameters.unsafe. This will break older consumers that have aliases like this defined.unsafe to usings in general, and do not require them for unsafe types in usings.We framed these options of what they do for the future and past of the language:
using unsafe in the first place are still relevant. We don't want to adjust
the future of the language based on a bug.Based on this discussion, we think 3b is the best option that maximizes forward direction while letting past code continue existing.
We chose option 3b, producing an error on this code in C# 12 and up, and not giving warnings in lower language versions.
https://github.com/dotnet/csharplang/issues/7047
In our speedrun session for this issue, we briefly considered whether method in this location is obviously on the primary ctor: could it conceivably be confused
with the copy ctor or deconstructor. However, we already have documentation comments on the parameters, and those don't get applied in either of the aforementioned
locations. Attributes on the parameters are also only applied to the primary ctor, not to the deconstructor. Given those, we're ok with this proposal.
We then determined what bucket to put it in. For now, we'll bucket it with the primary constructor work we're doing in C# 12, which would put it in the working set. We'll rebucket to Any time if it doesn't end up fitting in that bucket.
Proposal is accepted, will be part of the primary ctor work in C# 12.