문제

When I use fram-c to write parser. I encountered a problem that Ast.get() returns the type Cil_types.file but I need Cil.file for future use. They are actually has the same fields, but the ocaml compiler just not let the direct assignment from Cil_types.file to Cil.file. Is there any type cast functions in Ocaml can help me do this.

Ps: I try to assign each field of Cil_types.file to Cil.file, but the same problem happens recursively (do not allow Cil.file.* = Cil_types.file.*). I really appreciate your help!

도움이 되었습니까?

해결책

In Frama-C, there is no Cil_types.file type. Maybe you are mixing Frama-C with the original Cil?

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top