通过此代码
module ObjectRe =
type BM = A | N
type Object = {
Name: string
Pattern: BM array
}
let patterns = [|{Name = "Pro"; Pattern = [|A;N;N;A|]} |]
Run Code Online (Sandbox Code Playgroud)
我总是收到此错误消息
System.TypeLoadException: Could not load type 'FSI_0007+ObjectRe+Object[]' from assembly 'FSI-ASSEMBLY, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'.
at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&)
at System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00038] in <94fd79a3b7144c54b4cb162b50fc7761>:0
Stopped due to error
Run Code Online (Sandbox Code Playgroud)
有人有想法吗?我在Mac上使用Visual Studio Code.
谢谢