【发布时间】:2020-06-27 07:17:46
【问题描述】:
我正在编写一个小的 F# 程序。
type type_a= | T of int | S of string;;
let aa=T 30;;
type type_b= | T of int | S of string;;
let bb =T 40;;
上面,为什么编译器如何区分aa和bb的类型? Visual Studio 的交互式控制台认为 bb 的类型为 type_b,aa 的类型为 type_a。
【问题讨论】:
标签: f# type-inference