We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using this VB assembly as a reference
Public Class C1 Public Shared Property P1(x As Integer) Get Return Nothing End Get Set End Set End Property End Class
compile this C# code
using static C1; public class C2 { public static void Main() { P1[0] = null; } }
Observed:
// (2,1): hidden CS8019: Unnecessary using directive. // using static C1; Diagnostic(ErrorCode.HDN_UnusedUsingDirective, "using static C1;").WithLocation(2, 1), // (8,9): error CS1545: Property, indexer, or event 'C1.P1[int]' is not supported by the language; try directly calling accessor methods 'C1.get_P1(int)' or 'C1.set_P1(int, object)' // P1[0] = null; Diagnostic(ErrorCode.ERR_BindToBogusProp2, "P1").WithArguments("C1.P1[int]", "C1.get_P1(int)", "C1.set_P1(int, object)").WithLocation(8, 9)
Expected: No CS8019 diagnostics, if there were no that using directive, P1 wouldn't be found.
P1
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Using this VB assembly as a reference
compile this C# code
Observed:
Expected: No CS8019 diagnostics, if there were no that using directive,
P1
wouldn't be found.The text was updated successfully, but these errors were encountered: