Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/Java/Openjdk/test/langtools/tools/javac/lambda/   (Sun/Oracle ©)  Datei vom 13.11.2022 mit Größe 691 B image not shown  

Quelle  LambdaScope05.java   Sprache: JAVA

 
/*
 * @test /nodynamiccopyright/
 * @bug 8015648
 * @summary Duplicate variable in lambda causes javac crash
 * @compile/fail/ref=LambdaScope05.out -XDrawDiagnostics LambdaScope05.java
 */


class LambdaScope05 {
    interface VoidFun1 {
        void m(int i);
    }

    static Runnable r1 = () -> { VoidFun1 p = p -> { }; };
    Runnable r2 = () -> { VoidFun1 p = p -> { }; };

    static {
        Runnable r = () -> { VoidFun1 p = p -> { }; };
    }

    {
        Runnable r = () -> { VoidFun1 p = p -> { }; };
    }

    static void m_static() {
        Runnable r = () -> { VoidFun1 p = p -> { }; };
    }

    void m() {
        Runnable r = () -> { VoidFun1 p = p -> { }; };
    }
}

97%


¤ Dauer der Verarbeitung: 0.12 Sekunden  (vorverarbeitet)  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

Beweissystem der NASA

Beweissystem Isabelle

NIST Cobol Testsuite

Cephes Mathematical Library

Wiener Entwicklungsmethode

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung ist noch experimentell.