aoqi@0: /* aoqi@0: * @test /nodynamiccopyright/ aoqi@0: * @bug 8003280 aoqi@0: * @summary Add lambda tests aoqi@0: * check that javac recovers succesfully from bad cast conversion to primitive type aoqi@0: * @compile/fail/ref=TargetType17.out -XDrawDiagnostics TargetType17.java aoqi@0: */ aoqi@0: aoqi@0: class TargetType17 { aoqi@0: interface SAM { aoqi@0: boolean m(X x); aoqi@0: } aoqi@0: aoqi@0: byte b = (byte) ()-> true; aoqi@0: short s = (short) ()-> 1; aoqi@0: int i = (int) ()-> 1; aoqi@0: long l = (long) ()-> 1L; aoqi@0: float f = (float) ()-> 1.0F; aoqi@0: double d = (double) ()-> 1.0; aoqi@0: char c = (char) ()-> 'c'; aoqi@0: boolean z = (boolean) ()-> true; aoqi@0: }