How to check F # code is CLS compatible

By noting the CLS compliance assembly [<assembly: CLSCompliant(true)>], I expect the compiler to issue a warning if the assembly does not meet the requirements. However, I can compile the following

type public Test() =
    member x.intA = 0;
    member x.INTA = 2;
    member x.MyMethod() = 8;
    member x.MYMETHOD() = 10;

without any warning. The target structure is 4.6 using F # 4.0. Am I missing something, or is it a compiler error? Is there any other way to verify that the assembly generated from F # is compatible?

+4
source share
2 answers

MSDN , , . - , .

Microsoft FSharp , CLSCompliant . , .

F #. , , . , . , VS. .

+2

. , , FxCop.

0

Source: https://habr.com/ru/post/1607414/


All Articles