Quantcast
Channel: YouTrackReSharper (RSRP) - Bug and Issue Tracker
Viewing all articles
Browse latest Browse all 106942

RSRP-288200: array type infer problems for named arguments

$
0
0
Reporter Julius Kunze (Blink) Julius Kunze (Blink)
Created Feb 7, 2012 8:19:40 PM
Updated Feb 7, 2012 8:19:40 PM
Priority Normal
Type Cosmetics
Fix versions No Fix versions
State Submitted
Assignee Unassigned
Subsystem Language - VB.NET
Affected versions 6.1
Fixed in build No Fixed in build
Consider the following peace of code (Option Strict On, Option Infer On):

    Class Test
        Public Sub Test()
            Test({New A(Of String), New A(Of Double)}) 'line 1
            Test(a:={New A(Of String), New A(Of Double)}) 'line 2
        End Sub

        Public Sub Test(a As IEnumerable(Of A))
        End Sub
    End Class

    Class A(Of T)
        Inherits A
    End Class

    Class A
    End Class


Resharper does nothing with line 1 but in line 2 he underlines
{New A(Of String), New A(Of Double)}
and reports: "Cannot infer an anonymous array, and Option Strict On does not allow 'Object' to be assumed." This error is not correct, it should be not relevant whether the argument is named or not.

Viewing all articles
Browse latest Browse all 106942

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>