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

Oh that's cool, and makes sense. Is it possible to perform type widening on enums? Or must they match precisely? For example, what happens if I attempt the below?

``` enum Option<T> {Some(T), Nothing};

let opt1 = enum {Some(Int)} of Some(5);

let opt2: Option<Int> = opt1; ```



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

Search: