langtools/test/tools/javac/diags/examples/MrefStat1.java.rej
author mcimadamore
Mon, 10 Jun 2013 15:57:32 +0100
changeset 18386 174879d5b5d0
permissions -rw-r--r--
8013576: Add stat support to LambdaToMethod Summary: LambdaToMethod should emit info to help diagnose/test lambda metafactory problems Reviewed-by: jjg, vromero
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
18386
174879d5b5d0 8013576: Add stat support to LambdaToMethod
mcimadamore
parents:
diff changeset
     1
--- MrefStat1.java
174879d5b5d0 8013576: Add stat support to LambdaToMethod
mcimadamore
parents:
diff changeset
     2
+++ MrefStat1.java
174879d5b5d0 8013576: Add stat support to LambdaToMethod
mcimadamore
parents:
diff changeset
     3
@@ -0,0 +1,34 @@
174879d5b5d0 8013576: Add stat support to LambdaToMethod
mcimadamore
parents:
diff changeset
     4
+/*
174879d5b5d0 8013576: Add stat support to LambdaToMethod
mcimadamore
parents:
diff changeset
     5
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
174879d5b5d0 8013576: Add stat support to LambdaToMethod
mcimadamore
parents:
diff changeset
     6
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
174879d5b5d0 8013576: Add stat support to LambdaToMethod
mcimadamore
parents:
diff changeset
     7
+ *
174879d5b5d0 8013576: Add stat support to LambdaToMethod
mcimadamore
parents:
diff changeset
     8
+ * This code is free software; you can redistribute it and/or modify it
174879d5b5d0 8013576: Add stat support to LambdaToMethod
mcimadamore
parents:
diff changeset
     9
+ * under the terms of the GNU General Public License version 2 only, as
174879d5b5d0 8013576: Add stat support to LambdaToMethod
mcimadamore
parents:
diff changeset
    10
+ * published by the Free Software Foundation.
174879d5b5d0 8013576: Add stat support to LambdaToMethod
mcimadamore
parents:
diff changeset
    11
+ *
174879d5b5d0 8013576: Add stat support to LambdaToMethod
mcimadamore
parents:
diff changeset
    12
+ * This code is distributed in the hope that it will be useful, but WITHOUT
174879d5b5d0 8013576: Add stat support to LambdaToMethod
mcimadamore
parents:
diff changeset
    13
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
174879d5b5d0 8013576: Add stat support to LambdaToMethod
mcimadamore
parents:
diff changeset
    14
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
174879d5b5d0 8013576: Add stat support to LambdaToMethod
mcimadamore
parents:
diff changeset
    15
+ * version 2 for more details (a copy is included in the LICENSE file that
174879d5b5d0 8013576: Add stat support to LambdaToMethod
mcimadamore
parents:
diff changeset
    16
+ * accompanied this code).
174879d5b5d0 8013576: Add stat support to LambdaToMethod
mcimadamore
parents:
diff changeset
    17
+ *
174879d5b5d0 8013576: Add stat support to LambdaToMethod
mcimadamore
parents:
diff changeset
    18
+ * You should have received a copy of the GNU General Public License version
174879d5b5d0 8013576: Add stat support to LambdaToMethod
mcimadamore
parents:
diff changeset
    19
+ * 2 along with this work; if not, write to the Free Software Foundation,
174879d5b5d0 8013576: Add stat support to LambdaToMethod
mcimadamore
parents:
diff changeset
    20
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
174879d5b5d0 8013576: Add stat support to LambdaToMethod
mcimadamore
parents:
diff changeset
    21
+ *
174879d5b5d0 8013576: Add stat support to LambdaToMethod
mcimadamore
parents:
diff changeset
    22
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
174879d5b5d0 8013576: Add stat support to LambdaToMethod
mcimadamore
parents:
diff changeset
    23
+ * or visit www.oracle.com if you need additional information or have any
174879d5b5d0 8013576: Add stat support to LambdaToMethod
mcimadamore
parents:
diff changeset
    24
+ * questions.
174879d5b5d0 8013576: Add stat support to LambdaToMethod
mcimadamore
parents:
diff changeset
    25
+ */
174879d5b5d0 8013576: Add stat support to LambdaToMethod
mcimadamore
parents:
diff changeset
    26
+
174879d5b5d0 8013576: Add stat support to LambdaToMethod
mcimadamore
parents:
diff changeset
    27
+// key: compiler.note.mref.stat.1
174879d5b5d0 8013576: Add stat support to LambdaToMethod
mcimadamore
parents:
diff changeset
    28
+// options: -XDdumpLambdaToMethodStats
174879d5b5d0 8013576: Add stat support to LambdaToMethod
mcimadamore
parents:
diff changeset
    29
+
174879d5b5d0 8013576: Add stat support to LambdaToMethod
mcimadamore
parents:
diff changeset
    30
+class MrefStat1 {    
174879d5b5d0 8013576: Add stat support to LambdaToMethod
mcimadamore
parents:
diff changeset
    31
+    
174879d5b5d0 8013576: Add stat support to LambdaToMethod
mcimadamore
parents:
diff changeset
    32
+    void m() { }
174879d5b5d0 8013576: Add stat support to LambdaToMethod
mcimadamore
parents:
diff changeset
    33
+    
174879d5b5d0 8013576: Add stat support to LambdaToMethod
mcimadamore
parents:
diff changeset
    34
+    static class Sub extends MrefStat1 {
174879d5b5d0 8013576: Add stat support to LambdaToMethod
mcimadamore
parents:
diff changeset
    35
+        Runnable r = super::m;
174879d5b5d0 8013576: Add stat support to LambdaToMethod
mcimadamore
parents:
diff changeset
    36
+    }
174879d5b5d0 8013576: Add stat support to LambdaToMethod
mcimadamore
parents:
diff changeset
    37
+}