Skip to content

Example for compiler error BC32051 does not generate BC32051 #14765

Closed

Description

@rpetrusha

Example for compiler error BC32051 does not generate BC32051

The example for BC32051 generates BC36645 rather than BC32051.

The source code is:

Public Sub DoSomething(Of T)(arg1 As T(), arg2 As T)
End Sub

Public Sub Main()
    DoSomething(6, 42)
End Sub

The compiler output is:

c:\Visual Studio Projects\bc32051\bc32051ex.vb(7) : error BC36645: Data type(s) of the type parameter(s) in method 'Public Sub DoSomething(Of T)(arg1 As T(), arg2 As T)' cannot be inferred from these arguments. Specifying the data type(s) explicitly might correct this error.

DoSomething(6, 42)

Activity

  1. added this to the Backlog milestone on Sep 27, 2019
  2. Youssef1313 commented on Sep 29, 2019

    @Youssef1313
    Member

    The error 32051 doesn't even exist in Roslyn repo. https://github.com/dotnet/roslyn/blob/master/src/Compilers/VisualBasic/Portable/Errors/Errors.vb (If I'm looking at the correct file). It could be a compile error related to the old compiler before Roslyn.

    The thing I'm wondering is, unused compile errors in Roslyn are commented out in the Errors.vb file. But this one doesn't exist at all.

  3. added
    won't fixIssues that were closed as part of automated backlog grooming
    on Jan 25, 2021
  4. dotnet-bot commented on Jan 25, 2021

    @dotnet-bot
    Contributor

    This issue has been closed as part of the issue backlog grooming process outlined in #22351.

    That automated process may have closed some issues that should be addressed. If you think this is one of them, reopen it with a comment explaining why. Tag the @dotnet/docs team for visibility.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions