src/jdk.compiler/share/classes/com/sun/tools/javac/resources/compiler.properties
changeset 55306 ea43db53de91
parent 55263 830ca7b43b95
child 55528 bad3754349aa
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/compiler.properties	Sun Jun 09 15:48:57 2019 -0700
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/compiler.properties	Mon Jun 10 05:09:52 2019 +0200
@@ -188,17 +188,14 @@
 compiler.err.break.outside.switch.loop=\
     break outside switch or loop
 
-compiler.err.break.missing.value=\
-    missing break value
-
 compiler.err.break.outside.switch.expression=\
-    break outside of enclosing switch expression
+    attempt to break out of a switch expression
 
 compiler.err.continue.outside.switch.expression=\
-    continue outside of enclosing switch expression
+    attempt to continue out of a switch expression
 
 compiler.err.return.outside.switch.expression=\
-    return outside of enclosing switch expression
+    attempt to return out of a switch expression
 
 compiler.err.rule.completes.normally=\
     switch rule completes without providing a value\n\
@@ -208,17 +205,20 @@
     switch expression completes without providing a value\n\
     (switch expressions must either provide a value or throw for all possible input values)
 
-# 0: name
-compiler.err.break.ambiguous.target=\
-    ambiguous reference to ''{0}''\n\
-    (''{0}'' is both a label and an expression)
-
-# 0: tree tag
-compiler.err.break.expr.not.immediate=\
-    value break not supported in ''{0}''
-
-compiler.err.break.complex.value.no.switch.expression=\
-    unexpected value break
+compiler.err.no.switch.expression =\
+    yield outside of switch expression
+
+compiler.err.no.switch.expression.qualify=\
+    yield outside of switch expression\n\
+    (to invoke a method called yield, qualify the yield with a receiver or type name)
+
+compiler.err.invalid.yield=\
+    invalid use of a restricted identifier ''yield''\n\
+    (to invoke a method called yield, qualify the yield with a receiver or type name)
+
+compiler.warn.invalid.yield=\
+    ''yield'' may become a restricted identifier in a future release\n\
+    (to invoke a method called yield, qualify the yield with a receiver or type name)
 
 compiler.err.switch.expression.empty=\
     switch expression does not have any case clauses
@@ -1267,29 +1267,43 @@
 compiler.err.undef.label=\
     undefined label: {0}
 
-compiler.err.illegal.ref.to.var.type=\
-    illegal reference to restricted type ''var''
-
-compiler.err.var.not.allowed=\
-    ''var'' not allowed here\n\
-    as of release 10, ''var'' is a restricted local variable type and cannot be used for type declarations
-
-compiler.warn.var.not.allowed=\
-    as of release 10, ''var'' is a restricted local variable type and cannot be used for type declarations or as the element type of an array
+# 0: name
+compiler.err.illegal.ref.to.restricted.type=\
+    illegal reference to restricted type ''{0}''
+
+# 0: name
+compiler.warn.illegal.ref.to.restricted.type=\
+    illegal reference to restricted type ''{0}''
+
+# 0: name, 1: source
+compiler.err.restricted.type.not.allowed=\
+    ''{0}'' not allowed here\n\
+    as of release {1}, ''{0}'' is a restricted type name and cannot be used for type declarations
+
+# 0: name, 1: source
+compiler.warn.restricted.type.not.allowed=\
+    as of release {1}, ''{0}'' is a restricted type name and cannot be used for type declarations or as the element type of an array
+
+# 0: name, 1: source
+compiler.warn.restricted.type.not.allowed.preview=\
+    ''{0}'' may become a restricted type name in a future release and may be unusable for type declarations or as the element type of an array
 
 # 0: name (variable), 1: message segment
 compiler.err.cant.infer.local.var.type=\
     cannot infer type for local variable {0}\n\
     ({1})
 
-compiler.err.var.not.allowed.here=\
-    ''var'' is not allowed here
-
-compiler.err.var.not.allowed.array=\
-    ''var'' is not allowed as an element type of an array
-
-compiler.err.var.not.allowed.compound=\
-    ''var'' is not allowed in a compound declaration
+# 0: name
+compiler.err.restricted.type.not.allowed.here=\
+    ''{0}'' is not allowed here
+
+# 0: name
+compiler.err.restricted.type.not.allowed.array=\
+    ''{0}'' is not allowed as an element type of an array
+
+# 0: name
+compiler.err.restricted.type.not.allowed.compound=\
+    ''{0}'' is not allowed in a compound declaration
 
 # 0: fragment
 compiler.err.invalid.lambda.parameter.declaration=\
@@ -2666,22 +2680,6 @@
 compiler.misc.kindname.instance.init=\
     instance initializer
 
-# the following are names of tree kinds:
-compiler.misc.tree.tag.forloop=\
-    for
-
-compiler.misc.tree.tag.foreachloop=\
-    for
-
-compiler.misc.tree.tag.whileloop=\
-    while
-
-compiler.misc.tree.tag.doloop=\
-    do
-
-compiler.misc.tree.tag.switch=\
-    switch
-
 #####
 
 compiler.misc.no.args=\