FSharp.Quotations.Compiler icon indicating copy to clipboard operation
FSharp.Quotations.Compiler copied to clipboard

ReflectedDefinition属性のついた再帰関数を解析しようとすると無限ループになってしまう

Open nenono opened this issue 8 years ago • 0 comments

[<ReflectedDefinition>]
let rec f () =
  let rec g x = g x // これに未対応なのは制約事項
  f () // これができない(無限ループになる)のはバグ

解決方法としては、解析済みの関数群を持っておいて、関数呼び出しの先を解析する前にすでにその関数が解析済みかどうかのチェックを入れればいいだけなのでそんなに難しくはないはず

だそうです。(by @bleis-tift )

nenono avatar Nov 10 '16 08:11 nenono