docs/compilers/Visual Basic/Compiler Breaking Changes - VS2015.md
This document lists known breaking changes in Roslyn (VS2015 and later) from the native VB compiler (VS2013 and previous).
<!-- *Breaks are formatted with a monotonically increasing numbered list to allow them to referenced via shorthand (i.e., "known break #1"). Each entry should include a short description of the break, followed by either a link to the issue describing the full details of the break or the full details of the break inline.* -->This list tracks known cases where the Roslyn compiler intentionally deviates from the language specification or previous versions. It includes both breaking changes and changes which enable things which would not be permitted by either the language specification or the native compiler. The bug numbers refer to Microsoft-internal bug databases. The checklist marks our progress moving the necessary documentation into this repository.
According to @AlekseyTs , "Dev10 considers some expressions as invalid in context of a constant expression, even if those expressions are not going to be evaluated. Lambdas, Query Expressions, and probably Object Initializers fall into that category."
These rules are being relaxed in Roslyn. A constant expression will be allowed of the form expr.ID where ID is a constant member of the type of the expression. The expression will not be evaluated and a warning will be issued. There are no restrictions on the form of expr, other than that it must be syntactically and semantically valid.