drunkcod / Cone

8 stars 1 forks source link

struct implementing an interface raises "this operation might destabilize the runtime" #26

Closed drunkcod closed 11 years ago

drunkcod commented 11 years ago
        interface IHasValue<T>
        {
            T Value { get; }
        }

        struct MyValueType : IHasValue<string>
        {
            public string Value { get; set; }
        }

        public void struct_with_interface_member_access() {
            var thing = new MyValueType { Value = "Hello World" };
            Verify.That(() => thing.Value == thing.Value);
        }