eclipse-archived/ceylon

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

Opened this issue · 0 comments

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)
$