Just add a type annotation:

1
2
3
4
5
6
 

let func : 'a * 'b -> 'c = ...

let func : int -> string = ...

However, since your overloads don't have the same number of parameters, you can just wildcard all of the types and F# will sort it out:

1
2
3
4
5
6
7
type SomeClass()  =
    member this.Morf (a,b) = a - b
    member this.Morf a = a * a
    member this.Test =
      let func1 : _*_ -> _ = this.Morf
      let func2 : _ -> _ = this.Morf
      func1 (1,2) + func2 10
By on 7/10/2009 1:56 PM ()
IntelliFactory Offices Copyright (c) 2011-2012 IntelliFactory. All rights reserved.
Home | Products | Consulting | Trainings | Blogs | Jobs | Contact Us | Terms of Use | Privacy Policy | Cookie Policy
Built with WebSharper