diff --git a/global.json b/global.json index 62939fe..7903a71 100644 --- a/global.json +++ b/global.json @@ -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 }, diff --git a/src/DotMaybe/DotMaybe.csproj b/src/DotMaybe/DotMaybe.csproj index ec5318c..c860897 100644 --- a/src/DotMaybe/DotMaybe.csproj +++ b/src/DotMaybe/DotMaybe.csproj @@ -1,6 +1,7 @@ + preview DotMaybe DotMaybe true diff --git a/src/DotMaybe/packages.lock.json b/src/DotMaybe/packages.lock.json index c883262..43d8683 100644 --- a/src/DotMaybe/packages.lock.json +++ b/src/DotMaybe/packages.lock.json @@ -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", diff --git a/tests/DotMaybe.CompilerContractTests/PatternMatchingContracts.cs b/tests/DotMaybe.CompilerContractTests/PatternMatchingContracts.cs index d53a98c..45c6608 100644 --- a/tests/DotMaybe.CompilerContractTests/PatternMatchingContracts.cs +++ b/tests/DotMaybe.CompilerContractTests/PatternMatchingContracts.cs @@ -48,21 +48,6 @@ public static string Describe(Maybe 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(Maybe maybe) - where T : notnull => maybe is T value ? "some" : "none"; - """)); - - ContractAssert.FailsWith(result, "CS8780"); - } - [Fact] public void A_concrete_type_pattern_declares_a_variable() {