8210674: Need to add examples for use of javac properties introduced by Raw String Literals

Reviewed-by: vromero, jjg
This commit is contained in:
Jim Laskey 2018-09-13 14:15:27 -03:00
parent b5fb6b3566
commit 734a258afb
2 changed files with 35 additions and 2 deletions

View File

@ -42,7 +42,6 @@ compiler.err.stack.sim.error
compiler.err.type.var.more.than.once # UNUSED
compiler.err.type.var.more.than.once.in.result # UNUSED
compiler.err.unexpected.type
compiler.err.unicode.backtick # Need to address
compiler.err.unsupported.cross.fp.lit # Scanner: host system dependent
compiler.misc.bad.class.signature # bad class file
compiler.misc.bad.const.pool.tag # bad class file
@ -64,7 +63,6 @@ compiler.misc.fatal.err.cant.locate.field # Resolve, from Lower
compiler.misc.fatal.err.cant.locate.meth # Resolve, from Lower
compiler.misc.fatal.err.cant.close # JavaCompiler
compiler.misc.feature.not.supported.in.source.plural # cannot happen (for now)
compiler.misc.feature.raw.string.literals # Need to address
compiler.misc.file.does.not.contain.package
compiler.misc.illegal.start.of.class.file
compiler.misc.inferred.do.not.conform.to.lower.bounds # cannot happen?

View File

@ -0,0 +1,35 @@
/*
* Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
// key: compiler.err.unicode.backtick
// key: compiler.misc.feature.raw.string.literals
// key: compiler.warn.preview.feature.use.plural
// options: --enable-preview -source 12 -Xlint:preview
class RawStringLiteral {
String m() {
return `abc` + \u0060`def`;
}
}