PotentialLambdaFound.java revision 2758:3c1b5fcf6fad
18153Sphk/*
28153Sphk * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
38153Sphk * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
48153Sphk *
58153Sphk * This code is free software; you can redistribute it and/or modify it
68153Sphk * under the terms of the GNU General Public License version 2 only, as
78153Sphk * published by the Free Software Foundation.
88153Sphk *
98153Sphk * This code is distributed in the hope that it will be useful, but WITHOUT
1084200Sdillon * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
1184200Sdillon * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
1284200Sdillon * version 2 for more details (a copy is included in the LICENSE file that
138153Sphk * accompanied this code).
148153Sphk *
158153Sphk * You should have received a copy of the GNU General Public License version
168153Sphk * 2 along with this work; if not, write to the Free Software Foundation,
178477Sphk * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
1812661Speter *
1912661Speter * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
2086260Smatusita * or visit www.oracle.com if you need additional information or have any
218160Sphk * questions.
228160Sphk */
2386260Smatusita
248477Sphk// key: compiler.warn.potential.lambda.found
2584748Sjkh// options: -XDfind=lambda
2654627Sjkh
2762223Sjhbclass PotentialLambdaFound {
2854627Sjkh
298153Sphk    interface SAM {
308153Sphk        void m();
3181975Skris    }
3281975Skris
3312661Speter    SAM s = new SAM() { public void m() { } };
3412661Speter}
3512661Speter