2007-12-01 00:00:00 +00:00
|
|
|
/*
|
2014-07-07 20:39:31 +00:00
|
|
|
* @test /nodynamiccopyright/
|
2014-07-14 10:02:58 +00:00
|
|
|
* @bug 4707960 6183529 8046620
|
2007-12-01 00:00:00 +00:00
|
|
|
* @summary javac accepts unicode digits - sometimes crashing
|
|
|
|
* @author gafter
|
|
|
|
*
|
2014-07-07 20:39:31 +00:00
|
|
|
* @compile/fail/ref=NonasciiDigit.out -XDrawDiagnostics NonasciiDigit.java
|
2007-12-01 00:00:00 +00:00
|
|
|
*/
|
|
|
|
public class NonasciiDigit {
|
2023-01-17 04:43:40 +00:00
|
|
|
public static void meth() {
|
2014-07-14 10:02:58 +00:00
|
|
|
// error: only ASCII allowed in constants
|
|
|
|
int i1 = \uff11;
|
|
|
|
int i2 = 1\uff11;
|
|
|
|
int i3 = \ud835\udfff;
|
2007-12-01 00:00:00 +00:00
|
|
|
// error: floating literals use ascii only
|
2014-07-14 10:02:58 +00:00
|
|
|
double d1 = \uff11.0;
|
|
|
|
double d2 = 0.\uff11;
|
|
|
|
double d3 = 0x0P\uff11;
|
|
|
|
double d4 = 0E\uff11;
|
|
|
|
double d5 = .\uff11;
|
|
|
|
double d6 = \ud835\udfff.0;
|
2007-12-01 00:00:00 +00:00
|
|
|
}
|
|
|
|
}
|