langtools/src/share/classes/com/sun/tools/javac/resources/compiler.properties
changeset 14062 b7439971a094
parent 14058 c7ec7facdd20
child 14267 6321fbe0cf50
--- a/langtools/src/share/classes/com/sun/tools/javac/resources/compiler.properties	Fri Oct 05 14:21:09 2012 -0700
+++ b/langtools/src/share/classes/com/sun/tools/javac/resources/compiler.properties	Sat Oct 06 10:35:38 2012 +0100
@@ -148,13 +148,8 @@
 compiler.err.call.must.be.first.stmt.in.ctor=\
     call to {0} must be first statement in constructor
 
+# 0: symbol kind, 1: name, 2: list of type or message segment, 3: list of type or message segment, 4: symbol kind, 5: type, 6: message segment
 compiler.err.cant.apply.symbol=\
-    {0} {1} in {4} {5} cannot be applied to given types\n\
-    required: {2}\n\
-    found: {3}
-
-# 0: symbol kind, 1: name, 2: list of type or message segment, 3: list of type or message segment, 4: symbol kind, 5: type, 6: message segment
-compiler.err.cant.apply.symbol.1=\
     {0} {1} in {4} {5} cannot be applied to given types;\n\
     required: {2}\n\
     found: {3}\n\
@@ -164,6 +159,18 @@
 compiler.err.cant.apply.symbols=\
     no suitable {0} found for {1}({2})
 
+# 0: symbol kind, 1: name, 2: list of type or message segment, 3: list of type or message segment, 4: symbol kind, 5: type, 6: message segment
+compiler.misc.cant.apply.symbol=\
+    {0} {1} in {4} {5} cannot be applied to given types\n\
+    required: {2}\n\
+    found: {3}\n\
+    reason: {6}
+
+# 0: symbol kind, 1: name, 2: list of type
+compiler.misc.cant.apply.symbols=\
+    no suitable {0} found for {1}({2})
+
+
 # 0: type
 compiler.err.cant.access.arg.type.in.functional.desc=\
     cannot access parameter type {0} in target functional descriptor
@@ -212,6 +219,14 @@
 compiler.misc.no.suitable.functional.intf.inst=\
     cannot infer functional interface descriptor for {0}
 
+# 0: symbol kind, 1: message segment
+compiler.err.invalid.mref=\
+    invalid {0} reference; {1}
+
+# 0: symbol kind, 1: message segment
+compiler.misc.invalid.mref=\
+    invalid {0} reference; {1}
+
 # 0: symbol
 compiler.err.cant.assign.val.to.final.var=\
     cannot assign a value to final variable {0}
@@ -698,10 +713,19 @@
     bad return type in lambda expression\n\
     {0}
 
+# 0: type
+compiler.misc.incompatible.ret.type.in.mref=\
+    bad return type in method reference\n\
+    {0}
+
 # 0: list of type
 compiler.err.incompatible.thrown.types.in.lambda=\
     incompatible thrown types {0} in lambda expression
 
+# 0: list of type
+compiler.err.incompatible.thrown.types.in.mref=\
+    incompatible thrown types {0} in method reference
+
 compiler.misc.incompatible.arg.types.in.lambda=\
     incompatible parameter types in lambda expression
 
@@ -728,6 +752,15 @@
     {0} in {1} is defined in an inaccessible class or interface
 
 # 0: symbol, 1: symbol
+compiler.misc.not.def.access.class.intf.cant.access=\
+    {0} in {1} is defined in an inaccessible class or interface
+
+# 0: symbol, 1: list of type, 2: type
+compiler.misc.cant.access.inner.cls.constr=\
+    cannot access constructor {0}({1})\n\
+    an enclosing instance of type {2} is not in scope
+
+# 0: symbol, 1: symbol
 compiler.err.not.def.public.cant.access=\
     {0} is not public in {1}; cannot be accessed from outside package
 
@@ -825,7 +858,13 @@
 
 # 0: name, 1: symbol kind, 2: symbol, 3: symbol, 4: symbol kind, 5: symbol, 6: symbol
 compiler.err.ref.ambiguous=\
-    reference to {0} is ambiguous, both {1} {2} in {3} and {4} {5} in {6} match
+    reference to {0} is ambiguous\n\
+    both {1} {2} in {3} and {4} {5} in {6} match
+
+# 0: name, 1: symbol kind, 2: symbol, 3: symbol, 4: symbol kind, 5: symbol, 6: symbol
+compiler.misc.ref.ambiguous=\
+    reference to {0} is ambiguous\n\
+    both {1} {2} in {3} and {4} {5} in {6} match
 
 compiler.err.repeated.annotation.target=\
     repeated annotation target
@@ -1818,6 +1857,10 @@
 compiler.err.non-static.cant.be.ref=\
     non-static {0} {1} cannot be referenced from a static context
 
+# 0: symbol kind, 1: symbol
+compiler.misc.non-static.cant.be.ref=\
+    non-static {0} {1} cannot be referenced from a static context
+
 ## Both arguments ({0}, {1}) are "kindname"s.  {0} is a comma-separated list
 ## of kindnames (the list should be identical to that provided in source.
 compiler.err.unexpected.type=\
@@ -1828,6 +1871,9 @@
 compiler.err.unexpected.lambda=\
    lambda expression not expected here
 
+compiler.err.unexpected.mref=\
+   method reference not expected here
+
 ## The first argument {0} is a "kindname" (e.g. 'constructor', 'field', etc.)
 ## The second argument {1} is the non-resolved symbol
 ## The third argument {2} is a list of type parameters (non-empty if {1} is a method)
@@ -1867,6 +1913,20 @@
     symbol:   {0} <{2}>{1}({3})\n\
     location: {4}
 
+### Following are replicated/used for method reference diagnostics
+
+# 0: symbol kind, 1: name, 2: unused, 3: list of type, 4: message segment
+compiler.misc.cant.resolve.location.args=\
+    cannot find symbol\n\
+    symbol:   {0} {1}({3})\n\
+    location: {4}
+
+# 0: symbol kind, 1: name, 2: list of type, 3: list, 4: message segment
+compiler.misc.cant.resolve.location.args.params=\
+    cannot find symbol\n\
+    symbol:   {0} <{2}>{1}({3})\n\
+    location: {4}
+
 ##a location subdiagnostic is composed as follows:
 ## The first argument {0} is the location "kindname" (e.g. 'constructor', 'field', etc.)
 ## The second argument {1} is the location name