Document breaking change rule for stateless structs
authorjnm2 <me@jnm2.com>
Tue, 21 Aug 2018 00:49:36 +0000 (20:49 -0400)
committerjnm2 <me@jnm2.com>
Wed, 5 Sep 2018 20:40:41 +0000 (16:40 -0400)
Commit migrated from https://github.com/dotnet/corefx/commit/7444297ba077452d87bbbc5a4e5aab38069e2a54

docs/libraries/coding-guidelines/breaking-change-rules.md

index 7da5726..6dafc1a 100644 (file)
@@ -211,6 +211,10 @@ successfully bind to that overload, if simply passing an `int` value. However, i
 
 * Adding or removing `static` keyword from a member
 
+* Adding a field to a struct that previously had no state
+
+    Definite assignment rules allow use of uninitialized variables so long as the variable type is a stateless struct. If the struct is made stateful, code could now end up with uninitialized data. This is both potentially a source breaking and binary breaking change.
+
 ### Signatures
 &#10003; **Allowed**
 * Adding `params` to a parameter