scala / bug

Scala 2 bug reports only. Please, no questions — proper bug reports only.
https://scala-lang.org
232 stars 21 forks source link

ScalaDoc 2.12.3 fails on simple Java class with static Enum/Class in constructor #10509

Closed bantonsson closed 1 year ago

bantonsson commented 7 years ago

This simple file Broken.java

public class Broken {
    public enum Should {
        Foo
    }

    public static class Work {
    }

    public Broken(Should should, Work work) {
    }
}

Will fail like this

> scaladoc Broken.java
Broken.java:9: error: not found: type Should
    public Broken(Should should, Work work) {
                  ^
Broken.java:9: error: not found: type Work
    public Broken(Should should, Work work) {
                                 ^
model contains 2 documentable templates
two errors found

Works with ScalaDoc 2.11.11

SethTisue commented 7 years ago

workaround:

-    public Broken(Should should, Work work) {
+    public Broken(Broken.Should should, Broken.Work work) {

related: #1211, #1409, #8993

som-snytt commented 1 year ago

Duplicates https://github.com/scala/bug/issues/8993 et al