是什么让第一次实施KO?
type IToto =
abstract Toto : unit -> unit
{ new IToto with
member this.Toto =
fun () -> () }
{ new IToto with
member this.Toto () = () }
在编译表示中,函数类型的属性之间存在差异,编译为FSharpFunc<unit, unit> Toto { get; }
,以及一个获取单元和返回单元的方法,编译为unit Toto()
.
第一个对象表达式实现不同的接口:
type IToto =
abstract Toto : (unit -> unit) // Note: Parentheses around the function type!
{ new IToto with
member this.Toto =
fun () -> () }
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)