Description:
A readonly field that is defined by C# class can't use at the function with ReflectedDefinition attribute.
Repro Steps:
public class Class1
{
public readonly string Value;
public Class1(string v) { this.Value = v; }
}
[<ReflectedDefinition>]
let f () = Class1("aaa").Value
Expected:
Compilation is successful.
Actual:
Compile error.
Quotations cannot contain inline assembly code or pattern matching on arrays
Version: Language, compiler, library, platform version
F# 3.1.2, .NET Framework 4.5, Visual Studio 2013
Workaround: List any known workarounds
- remove
readonly
- use property
- remove
ReflectedDefinition (but this is unacceptable)