使用生成类型提供程序创建多个根类型

3
生成类型提供程序似乎在具有多个根类型方面存在问题。 完整的复现代码可以在此处找到:https://gist.github.com/dsevastianov/46d1a8495c4af46a9875。以下是一个示例:
#r @"SampleProvider.dll"
type Birch = Sample.Sample<"birch">
type Elm = Sample.Sample<"elm">

let birch = Birch.birch()
let elm = Elm.elm()
elm.Branches <- ([|Elm.elm()|])

在编译时失败(而不是设计时):

FSC: error FS2014: A problem occurred writing the binary 'obj\Debug\Tests.dll': 
Error in pass3 for type Schema, error: Error in GetMethodRefAsMethodDefIdx for 
mref = (".ctor", "ZipLookup"), error: Exception of type Microsoft.FSharp.Compiler.AbstractIL.ILBinaryWriter+MethodDefNotFound' was thrown.
1个回答

3

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接