test/langtools/tools/javac/analyzer/AnalyzerMandatoryWarnings.java
author jlahoda
Fri, 30 Aug 2019 12:24:16 +0200
changeset 57963 ed7eb20871c5
permissions -rw-r--r--
8230105: -XDfind=diamond crashes Summary: Avoiding side-effects in Analyzer's speculative attribution. Reviewed-by: mcimadamore, vromero
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
57963
ed7eb20871c5 8230105: -XDfind=diamond crashes
jlahoda
parents:
diff changeset
     1
/**
ed7eb20871c5 8230105: -XDfind=diamond crashes
jlahoda
parents:
diff changeset
     2
 * @test
ed7eb20871c5 8230105: -XDfind=diamond crashes
jlahoda
parents:
diff changeset
     3
 * @bug 8230105
ed7eb20871c5 8230105: -XDfind=diamond crashes
jlahoda
parents:
diff changeset
     4
 * @summary Verify analyzers work reasonably in combination with mandatory warnings
ed7eb20871c5 8230105: -XDfind=diamond crashes
jlahoda
parents:
diff changeset
     5
 * @compile/ref=AnalyzerMandatoryWarnings.out -Xlint:deprecation -XDrawDiagnostics -Xmaxwarns 1 -XDfind=lambda AnalyzerMandatoryWarnings.java
ed7eb20871c5 8230105: -XDfind=diamond crashes
jlahoda
parents:
diff changeset
     6
 */
ed7eb20871c5 8230105: -XDfind=diamond crashes
jlahoda
parents:
diff changeset
     7
public class AnalyzerMandatoryWarnings {
ed7eb20871c5 8230105: -XDfind=diamond crashes
jlahoda
parents:
diff changeset
     8
    private void test() {
ed7eb20871c5 8230105: -XDfind=diamond crashes
jlahoda
parents:
diff changeset
     9
        Runnable r = new Runnable() {
ed7eb20871c5 8230105: -XDfind=diamond crashes
jlahoda
parents:
diff changeset
    10
            public void run() {
ed7eb20871c5 8230105: -XDfind=diamond crashes
jlahoda
parents:
diff changeset
    11
                Depr r;
ed7eb20871c5 8230105: -XDfind=diamond crashes
jlahoda
parents:
diff changeset
    12
            }
ed7eb20871c5 8230105: -XDfind=diamond crashes
jlahoda
parents:
diff changeset
    13
        };
ed7eb20871c5 8230105: -XDfind=diamond crashes
jlahoda
parents:
diff changeset
    14
    }
ed7eb20871c5 8230105: -XDfind=diamond crashes
jlahoda
parents:
diff changeset
    15
}
ed7eb20871c5 8230105: -XDfind=diamond crashes
jlahoda
parents:
diff changeset
    16
@Deprecated class Depr {}