Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion global.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"sdk": {
"version": "11.0.100-rc.1.26425.128",
"version": "11.0.100-rc.3.26522.148",
"rollForward": "latestFeature",
"allowPrerelease": true
},
Expand Down
1 change: 1 addition & 0 deletions src/DotMaybe/DotMaybe.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<LangVersion>preview</LangVersion>
<AssemblyName>DotMaybe</AssemblyName>
<RootNamespace>DotMaybe</RootNamespace>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
Expand Down
6 changes: 3 additions & 3 deletions src/DotMaybe/packages.lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
},
"Microsoft.NET.ILLink.Tasks": {
"type": "Direct",
"requested": "[11.0.0-rc.1.26425.128, )",
"resolved": "11.0.0-rc.1.26425.128",
"contentHash": "oMgihfjNcxZpR9B/O5Ke8Qmr8CJcpdzG4PnVYtA6Ja4g41NELxLRuiqqh5ys7w+ourEBNng2IIZnrlMJXfncmQ=="
"requested": "[11.0.0-rc.3.26522.148, )",
"resolved": "11.0.0-rc.3.26522.148",
"contentHash": "SWnTMx96mhBr9LCOySJg1ETlEFFHVsPGdVT02JnYhtqk1+Vke1J7RU3VkKwEiErBr4FJ42Uu4k7GdOtkRuvs/Q=="
},
"MinVer": {
"type": "Direct",
Expand Down
15 changes: 0 additions & 15 deletions tests/DotMaybe.CompilerContractTests/PatternMatchingContracts.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,21 +48,6 @@ public static string Describe<T>(Maybe<T> maybe)
ContractAssert.CompilesCleanly(result);
}

[Fact]
public void A_type_parameter_pattern_cannot_declare_a_variable()
{
// Found in TP-01 on SDK RC1: in generic code T could itself be a union, so the compiler cannot tell whether
// `T value` applies to the maybe or to its content, and rejects the declaration (CS8780).
// Generic code reads the value through Match (TP-02) instead. If a later compiler lifts the restriction,
// this contract turns red and we can simplify generic code.
var result = Snippet.Compile(Consumer.File("""
public static string Describe<T>(Maybe<T> maybe)
where T : notnull => maybe is T value ? "some" : "none";
"""));

ContractAssert.FailsWith(result, "CS8780");
}

[Fact]
public void A_concrete_type_pattern_declares_a_variable()
{
Expand Down
Loading