Skip to content

Add breaking change item for forbidding default in pattern.#25800

Merged
gafter merged 3 commits into
dotnet:masterfrom
gafter:breaking25450
Mar 30, 2018
Merged

Add breaking change item for forbidding default in pattern.#25800
gafter merged 3 commits into
dotnet:masterfrom
gafter:breaking25450

Conversation

@gafter
Copy link
Copy Markdown
Member

@gafter gafter commented Mar 28, 2018

@jcouv Please review
/cc @dotnet/roslyn-compiler

}
```

- https://github.com/dotnet/roslyn/issues/25450 In C# 7.3 we add new restrictions on the use of the `default` expression in preparation for the planned addition of further pattern-matching features in C# 8.0:
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was the change made in 15.7? I think it would be good to specify that version.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just a thought: I think saying "In C# 7.3 we add new restrictions" is a little misleading because it makes it sound like this change is only going to affect you if you're using language version 7.3 or newer, but that's not the case as far as I know. It affects 7.1 as well, doesn't it?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this might give someone a false sense of security thinking their code will still work with the new compiler until they switch to a newer language version

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gafter I made an edit directly to you branch to remove the mention of language version 7.3. I hope that's ok. Thanks

Copy link
Copy Markdown
Member

@jcouv jcouv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM modulo a VS version

Copy link
Copy Markdown
Member

@jcouv jcouv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

@gafter
Copy link
Copy Markdown
Member Author

gafter commented Mar 29, 2018

test windows_debug_unit32_prtest please

@jcouv
Copy link
Copy Markdown
Member

jcouv commented Mar 30, 2018

windows_release_unit64_prtest failed (details)
error Undefined: An invalid cache entry was found for URL 'https://dotnetmyget.blob.core.windows.net/artifacts/dotnet-buildtools/nuget/v3/flatcontainer/microsoft.tpl.dataflow/index.json' and will be replaced.

FYI @dotnet/roslyn-infrastructure I'll re-run.

@jcouv
Copy link
Copy Markdown
Member

jcouv commented Mar 30, 2018

test windows_release_unit64_prtest please

@jcouv
Copy link
Copy Markdown
Member

jcouv commented Mar 30, 2018

test windows_debug_unit64_prtest please

@gafter gafter closed this Mar 30, 2018
@gafter gafter reopened this Mar 30, 2018
@gafter
Copy link
Copy Markdown
Member Author

gafter commented Mar 30, 2018

test windows_release_unit32_prtest please

@gafter gafter merged commit 2ac411c into dotnet:master Mar 30, 2018
@jcouv
Copy link
Copy Markdown
Member

jcouv commented Mar 30, 2018

@gafter Should we call how this change in the 15.7 release notes since it seems a few people hit it already?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants