Home Dashboard Directory Help
Search

Implementing generic methods: unit problems by vpozdyayev


Status: 

Active


1
0
Sign in
to vote
Type: Bug
ID: 808164
Opened: 11/9/2013 8:11:48 AM
Access Restriction: Public
0
Workaround(s)
view
0
User(s) can reproduce this bug

Description

This kind of F# code doesn't work when passing unit as a type argument. If this is an intentional design restriction, the error message should reflect this.

type EDF<'S> =
    abstract member Apply : int -> 'S
type SomeEDF1 () =
    interface EDF<int> with
        member this.Apply d = // OK
            123
type SomeEDF2 () =
    interface EDF<unit> with
        member this.Apply d = // [ERROR] The member 'Apply : int -> unit' does not have the correct type to override the corresponding abstract method.
            ()
Details
Sign in to post a comment.
Posted by Microsoft on 11/11/2013 at 1:18 AM
Thank you for submitting feedback on Visual Studio and .NET Framework. Your issue has been routed to the appropriate VS development team for investigation. We will contact you if we require any additional information.
Posted by Microsoft on 11/9/2013 at 8:52 AM
Thank you for your feedback, we are currently reviewing the issue you have submitted. If this issue is urgent, please contact support directly(http://support.microsoft.com)
Sign in to post a workaround.