Skip to content

Add missing VB breaking change doc#46900

Closed
Youssef1313 wants to merge 1 commit intodotnet:masterfrom
Youssef1313:patch-10
Closed

Add missing VB breaking change doc#46900
Youssef1313 wants to merge 1 commit intodotnet:masterfrom
Youssef1313:patch-10

Conversation

@Youssef1313
Copy link
Copy Markdown
Member

@Youssef1313 Youssef1313 commented Aug 18, 2020

Related to #45158

@@ -0,0 +1,25 @@
# Single-line if with `End` keyword as statement

As reported in [#45158](https://github.com/dotnet/roslyn/issues/45158), it was possible to use something like the following until Visual Studio version (TODO: UNKNOWN):
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.

I've only tried the snippet on Visual Studio 2015 and Visual Studio 2019. So, I don't know if this breaking change was introduced in 2017 or 2019.

@Youssef1313
Copy link
Copy Markdown
Member Author

@RikkiGibson A test fails here while not editing any code files. Is this issue known?

@CyrusNajmabadi
Copy link
Copy Markdown
Contributor

Was this an international breaking change? Or the introduction of a bug? If the latter, we should just fix the bug.

@Youssef1313
Copy link
Copy Markdown
Member Author

@CyrusNajmabadi I certainly don't know if it's intentional or not. But I believe if this was intentional it would have been documented. So, it looks like a bug. But even it's a bug, it still needs to be documented IMO, and the documentation should state the version that this gets fixed in.

@CyrusNajmabadi
Copy link
Copy Markdown
Contributor

I don't think we generally doc bugs. We usually have hundreds to thousands of them. The issue/pr itself is the docs for them.

@Youssef1313
Copy link
Copy Markdown
Member Author

I see a bug that was considered as a breaking change is doc'ed here:

https://github.com/dotnet/roslyn/blob/b4c6fe0bea95772be7e48a2c943de700b78e78b1/docs/compilers/CSharp/Compiler%20Breaking%20Changes%20-%20post%20VS2017.md

  • Visual Studio 2017 15.0-15.5 shipped with a bug around definite assignment of local functions that did not produce definite assignment errors when an uncalled local function contains a nested lambda which captures a variable. For example:

    void Method()
    {
        void Local()
        {
            Action a = () =>
            {
                int x;
                x++; // No error in 15.0 - 15.5
            };
        }
    }
    

    This is changed in 15.6 to now produce an error that the variable is not definitely assigned.

@333fred
Copy link
Copy Markdown
Member

333fred commented Aug 25, 2020

I would agree with Cyrus. This wasn't an intentional breaking change. This was a bug.

@333fred 333fred added Area-Compilers Community The pull request was submitted by a contributor who is not a Microsoft employee. labels Aug 25, 2020
@Youssef1313
Copy link
Copy Markdown
Member Author

Ok I'm closing this

@Youssef1313 Youssef1313 deleted the patch-10 branch August 25, 2020 07:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area-Compilers Community The pull request was submitted by a contributor who is not a Microsoft employee.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants