You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@groovy.apache.org by em...@apache.org on 2021/11/13 21:04:13 UTC
[groovy] branch master updated: fix error message
This is an automated email from the ASF dual-hosted git repository.
emilles pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/groovy.git
The following commit(s) were added to refs/heads/master by this push:
new af93682 fix error message
af93682 is described below
commit af936822ce883e4c28f13bf96f576c30eef06ae4
Author: Eric Milles <er...@thomsonreuters.com>
AuthorDate: Sat Nov 13 15:01:26 2021 -0600
fix error message
---
src/main/java/org/codehaus/groovy/ast/tools/WideningCategories.java | 2 +-
src/spec/test/typing/TypeCheckingTest.groovy | 3 ++-
src/test/groovy/transform/stc/ClosuresSTCTest.groovy | 3 ++-
3 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/src/main/java/org/codehaus/groovy/ast/tools/WideningCategories.java b/src/main/java/org/codehaus/groovy/ast/tools/WideningCategories.java
index c413668..b50596a 100644
--- a/src/main/java/org/codehaus/groovy/ast/tools/WideningCategories.java
+++ b/src/main/java/org/codehaus/groovy/ast/tools/WideningCategories.java
@@ -569,7 +569,7 @@ public class WideningCategories {
});
compileTimeClassNode = isObjectType(upper) && interfaces.length > 0 ? interfaces[0] : upper;
- StringJoiner sj = new StringJoiner(" or "/*, "(", ")"*/);
+ StringJoiner sj = new StringJoiner(" or ", "(", ")");
if (!isObjectType(upper)) sj.add(upper.getText());
for (ClassNode i: interfaces) sj.add(i.getText());
this.text = sj.toString();
diff --git a/src/spec/test/typing/TypeCheckingTest.groovy b/src/spec/test/typing/TypeCheckingTest.groovy
index f77773a..6927def 100644
--- a/src/spec/test/typing/TypeCheckingTest.groovy
+++ b/src/spec/test/typing/TypeCheckingTest.groovy
@@ -624,7 +624,8 @@ import static org.codehaus.groovy.ast.tools.WideningCategories.lowestUpperBound
it.exit() // <9>
}
// end::least_upper_bound_collection_inference[]
- ''', '[Static type checking] - Cannot find matching method Greeter or Salute#exit()'
+ ''',
+ 'Cannot find matching method (Greeter or Salute)#exit()'
}
void testInstanceOfInference() {
diff --git a/src/test/groovy/transform/stc/ClosuresSTCTest.groovy b/src/test/groovy/transform/stc/ClosuresSTCTest.groovy
index 5730d84..442491d 100644
--- a/src/test/groovy/transform/stc/ClosuresSTCTest.groovy
+++ b/src/test/groovy/transform/stc/ClosuresSTCTest.groovy
@@ -353,7 +353,8 @@ class ClosuresSTCTest extends StaticTypeCheckingTestCase {
def x = '123';
{ -> x = 123 }
x.charAt(0) // available in String but not available in Integer
- ''', 'Cannot find matching method java.io.Serializable or java.lang.Comparable'
+ ''',
+ 'Cannot find matching method (java.io.Serializable or java.lang.Comparable)#charAt(int)'
}
// GROOVY-9516