Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/fsharp/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
F# “你做什么?”;mustinline值。。。未推断出具有已知值;及;在优化环境中标记为“内联但未绑定”;什么意思?_F#_Compilation_Compiler Errors_Inline - Fatal编程技术网

F# “你做什么?”;mustinline值。。。未推断出具有已知值;及;在优化环境中标记为“内联但未绑定”;什么意思?

F# “你做什么?”;mustinline值。。。未推断出具有已知值;及;在优化环境中标记为“内联但未绑定”;什么意思?,f#,compilation,compiler-errors,inline,F#,Compilation,Compiler Errors,Inline,在Visual Studio 2012中使用F#时,我遇到了一个编译时错误,我不理解 我可以在这里找到一个小片段: 以下错误消息是什么意思 /home/iU0RLi/prog.fs(3,22): error FS0073: internal error: the mustinline value 'Bar' was not inferred to have a known value /home/iU0RLi/prog.fs(5,1): error FS1114: The value 'Pro

在Visual Studio 2012中使用F#时,我遇到了一个编译时错误,我不理解

我可以在这里找到一个小片段:

以下错误消息是什么意思

/home/iU0RLi/prog.fs(3,22): error FS0073: internal error: the mustinline value 'Bar' was not inferred to have a known value

/home/iU0RLi/prog.fs(5,1): error FS1114: The value 'Prog.Foo.Bar' was marked inline but was not bound in the optimization environment

/home/iU0RLi/prog.fs(3,22): error FS1113: The value 'Bar' was marked inline but its implementation makes use of an internal or private function which is not sufficiently accessible

/home/iU0RLi/prog.fs(5,1): warning FS1116: A value marked as 'inline' has an unexpected value

/home/iU0RLi/prog.fs(5,1): error FS1118: Failed to inline the value 'Bar' marked 'inline', perhaps because a recursive value was marked 'inline'

我倾向于认为这是一个bug,因为它在没有继承System.Exception()的情况下运行良好。你试过发电子邮件吗fsbugs@microsoft.com?还没有,但我想大约500天前在ideone上发布这个简短示例的那个人已经发布了。不过,在XParsec()中内联4个导航函数时,我也遇到了类似的问题-在任何地方都看不到
inherit System.Exception
。在这个示例中,我猜您可能正在创建递归内联。我会去掉很多内联,因为它会让调试变得更加困难,因为你会丢失堆栈帧。github上的示例对我来说很好(如果我重命名以
开头的操作符,这是不允许作为操作符名称的第一个字符的话)。@CetinSert这很奇怪-我在F#2.0中遇到了
的错误(我认为这是为了避免与动态查找发生冲突)也许这在F#3.0中不再是问题了。
/home/iU0RLi/prog.fs(3,22): error FS0073: internal error: the mustinline value 'Bar' was not inferred to have a known value

/home/iU0RLi/prog.fs(5,1): error FS1114: The value 'Prog.Foo.Bar' was marked inline but was not bound in the optimization environment

/home/iU0RLi/prog.fs(3,22): error FS1113: The value 'Bar' was marked inline but its implementation makes use of an internal or private function which is not sufficiently accessible

/home/iU0RLi/prog.fs(5,1): warning FS1116: A value marked as 'inline' has an unexpected value

/home/iU0RLi/prog.fs(5,1): error FS1118: Failed to inline the value 'Bar' marked 'inline', perhaps because a recursive value was marked 'inline'