Shevek (shevek) wrote,
Shevek
shevek

Today I learned of the existence of the little used syntax for a conjunctive type bound <T extends Foo & Bar>. It seems that if one is a class and one an interface, the class must be specified first; also as documented, the erasure is the first specified type. This means that you cannot erase to an interface if you need a class in the conjunction.

I have also decided that other than in cases where one is updating a backwards compatible library where strict control of the erasure of an interface is required, this syntax should not be used because there is always a better solution.
Subscribe

  • (no subject)

    I have yet to read a Java vs python comparison which was written by anyone with any serious enterprise development experience. If enterprises were…

  • (no subject)

    Today I was browsing my screenshots, and I found that I had failed the UK citizenship test. I took it again, just for fun, and failed with flying…

  • (no subject)

    Nobody in the USA has heard of Flanders and Swann. If the country had an editor, I would write to him to express my unmitigated disgust.

  • Post a new comment

    Error

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

    When you submit the form an invisible reCAPTCHA check will be performed.
    You must follow the Privacy Policy and Google Terms of use.
  • 0 comments