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

I think you (and @twic in discussion below) misunderstand what's going on here.

`class Bar<String> : Foo<String>` is exactly the same as `class Bar<T> : Foo<T>`. The identifier `String` in declaration of `Bar` does not refer to built-in type String, it is a tag for any type.

In other words, you CAN have `Bar<Int>`, `Bar<Float>` and `Bar<everything else>` after using that declaration of `Bar`.



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

Search: