eclipse-archived / ceylon

The Ceylon compiler, language module, and command line tools
http://ceylon-lang.org
Apache License 2.0
398 stars 62 forks source link

ceylon doc false positively warns about missing throws annotation for generic Exceptions #7378

Open aedeph opened 6 years ago

aedeph commented 6 years ago

If Exception is a generic typed, then there is no way to satisfy ceylon doc about missing throws annotation:

class MyException() extends Exception() {}

"doc"
shared class Cls() {

    "doc"
    throws(`class MyException`)
    shared void thr() {
        throw MyException();
    }
}

$ ceylon doc $ # no warnings

class MyException<Element>() extends Exception() {}

"doc"
shared class Cls() {

    "doc"
    throws(`class MyException`)
    shared void thr() {
        throw MyException<Integer>();
    }
}

$ ceylon doc Warning: Missing throws annotation for MyException in documentation of method repl::Cls.thr(run.ceylon:14) $