dotnet/roslyn
VB parsing string-interpolation in erroneous code has poor error recovery
開放
#3,617 建立於 2015年6月22日
Area-CompilersBugConcept-Diagnostic Clarityhelp wanted
倉庫指標
- 星標
- (20,414 顆星)
- PR 合併指標
- (平均合併 6天 17小時) (30 天內合併 256 個 PR)
描述
Watch this video:

I get into this situation often when I'm copying+pasting code around, or breaking a method up into smaller methods by deleting "sub" and then re-adding a bunch of "sub" and "end sub" statements where appropriate.
WHAT I OBSERVE: When there's a valid statement, regular strings and interpolated string parse fine.
When there's an invalid statement, regular strings parse fine, but interpolated strings don't recognize their terminating quote, so the remainder of the entire file gets "stringed out".
WHAT I EXPECT: interpolated strings should believe themselves terminated at the terminating quote, just like regular strings do.