Skip to content

Unreachable code exception is thrown for incomplete With statement #49904

@vsfeedback

Description

@vsfeedback

This issue has been moved from a ticket on Developer Community.


[regression] [worked-in:Community Preview 16.2.0 (untested)]
What steps will reproduce the problem?
1.Create a structure
Structure MyStruct
Dim A As Integer
Dim B As Integer
Dim C As Integer
End Structure
and create an array
Private MyArr(9, 3, 11) As MyStruct
2.
Trying to assign values
Dim n, p, r As Integer
For n = 0 To 9
For p = 0 To 3
For r = 0 To 11
With MyArr(n, error)
. A = n
. B = p
. C = r
End With
Next
Next
Next
3.
As soon as I try to write , p (after (n)) VS crashes
4.
The same problem apears in VS Community 16.2.4
Apparently this happens after upgrading both versions
Forcing the introdution (commenting the line, for example) and writing (n, p, r) and uncommenting the line, no error apears and the project is created


Original Comments

Feedback Bot on 9/9/2019, 03:51 AM:

We have directed your feedback to the appropriate engineering team for further evaluation. The team will review the feedback and notify you about the next steps.

Feedback Bot on 10/14/2019, 00:59 AM:

Thank you for sharing your feedback! Our teams prioritize action on product issues with broad customer impact. See details at: https://docs.microsoft.com/en-us/visualstudio/ide/report-a-problem?view=vs-2017#faq. In case you need answers to common questions or need assisted support, be sure to use https://visualstudio.microsoft.com/vs/support/. We’ll keep you posted on any updates to this feedback.

Feedback Bot on 10/31/2019, 07:13 PM:

I have detected that for the last 35 days, this issue didn't have any product team activity and a very small amount of new votes or comments. Based on this, its severity, and affected area, it’s my experience that this issue is very unlikely to be fixed.

Wenwen Fan [MSFT] on 12/1/2020, 00:57 AM:

Thank you for taking the time to log this issue! Verified on VS2019 build 16.8.2, we create a VB winform project with the code:

Public Class Form1
Structure MyStruct
Dim A As Integer

    Dim B As Integer
Dim C As Integer

End Structure

Private MyArr(9, 3, 11) As MyStruct

Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
Dim n, p, r As Integer
For n = 0 To 9
For p = 0 To 3
For r = 0 To 11
With MyArr(n, p, r)
.A = n
.B = p
.C = r
End With
Next
Next
Next
End Sub

End Class

When We write p after n, VS not crashed, and popup two errors bellow the menu bar:
“IntroduceVariableCodeRefactoringProvider” encountered an error has been disabled.
“VisualBasicAddAwaitCodeRefactoringProvider” encountered an error and has been disabled.
Could you please have a try with the latest build, thank you.

Feedback Bot on 12/8/2020, 07:33 PM:

We will close this report in 14 days because we don’t have enough information to investigate further. To keep the problem open, please provide the requested details.


Original Solutions

(no solutions)

Metadata

Metadata

Assignees

Labels

Area-CompilersTenet-ReliabilityCustomer telemetry indicates that the product is failing in a crash/hang/dataloss manner.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions