consulo / consulo-csharp

Languages: C#
Apache License 2.0
50 stars 6 forks source link

Implicit cast bug with float and generic parameter #504

Open VISTALL opened 6 years ago

VISTALL commented 6 years ago

namespace implicitCast {

    public class BBParameter<T> {
        public static implicit operator BBParameter<T>(T value) {
            return new BBParameter<T>();
        }
    }
}

using implicitCast;

namespace implCast {

    public class TestMe {
        private BBParameter<float> test = 1;  // error here - int can't cast to float

    }
}