Aleksey Shipilev fca18168e4 8148483: JEP 280: Indify String Concatenation
Co-authored-by: Remi Forax <forax@univ-mlv.fr>
Co-authored-by: Peter Levart <peter.levart@gmail.com>
Reviewed-by: psandoz, mcimadamore, igerasim, forax, plevart, vlivanov, ihse
2016-01-28 19:42:46 +03:00

15 lines
422 B
Java

/*
* @test /nodynamiccopyright/
* @bug 5024091
* @summary AssertionError shouldn't be thrown
* @author Wei Tao
* @compile/fail/ref=T5024091.out -XDfailcomplete=java.lang.StringBuilder -XDdev -XDrawDiagnostics -XDstringConcat=inline T5024091.java
*/
public class T5024091 {
private final String[] stringArray = {"s", "t", "r"};
public void foo() {
String str = "S = " + stringArray[0];
}
}