Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Not quite closed. The compiler generated protected constructor can still be used.

    public record UhOh<A> : Maybe<A>
    {
        public UhOh() : base(new Maybe<A>.Nothing())
        {
        }
    }

    Maybe<int> m = new UhOh<int>();


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: