dotnet/roslyn

Poor error message when calling a member of a newly constructed object in VB

Open

#38,308 opened on 2019年8月27日

GitHub で見る
 (1 comment) (0 reactions) (0 assignees)C# (20,414 stars) (4,257 forks)batch import
Area-CompilersBugConcept-Diagnostic ClarityLanguage-VBhelp wanted

説明

Version Used: master Steps to Reproduce:

compile the following code:

Public Module Program
    Public Sub Main()
        New string("").Clone()
    End Sub
End Module

Expected Behavior:

A useful error message, explaining that you need to use Call New string("").Clone()

Actual Behavior:

error BC30035: Syntax error.

コントリビューターガイド