-
Notifications
You must be signed in to change notification settings - Fork 21
ScalaDoc fails to recognize inherited inner enum #8993
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Imported From: https://issues.scala-lang.org/browse/SI-8993?orig=1
|
Alessandro Vermeulen (Spockz) said: Any ideas on whether, and if yes, when, this will be fixed? |
Nathan Blomquist (nblomquist) said: Example: import java.util.Set;
import java.util.function.BiConsumer;
import java.util.function.BinaryOperator;
import java.util.function.Function;
import java.util.function.Supplier;
import java.util.stream.Collector;
public class MyCollector implements Collector<Object, Object, Object> {
@Override
public Supplier<Object> supplier() {
return null;
}
@Override
public BiConsumer<Object, Object> accumulator() {
return null;
}
@Override
public BinaryOperator<Object> combiner() {
return null;
}
@Override
public Function<Object, Object> finisher() {
return null;
}
/***
* This breaks, because of Characteristics isn't directly imported.
*
*/
@Override
public Set<Characteristics> characteristics() {
return null;
}
} |
@SethTisue said: |
Scaladoc runs to completion, but doesn't emit a companion object for the enclosing Java class, though hover over Since that would be a (possibly dubious) enhancement, closing this ticket. |
The ScalaDoc tool is breaking on a mixed Java/Scala project because it seems unable to properly parse Java code with an inherited inner enum. I have recreated the problem with a very small test project.
Consider the two classes:
The above java code is valid, yet the ScalaDoc tool will complain processing
Triangle.java
saying:{quote}error: not found: type Color{quote}
I have attached a sample project that recreates the issue. Simply do the following to reproduce:
mvn clean install site
Note that a workaround is to explicitly import the enum. So, for
Triangle.java
, ScalaDoc will work if the following is added:(Unfortunately, then this creates a style issue in the Java code since that import is not necessary.)
The text was updated successfully, but these errors were encountered: