eric-milles commented on a change in pull request #1660:
URL: https://github.com/apache/groovy/pull/1660#discussion_r762571001
##########
File path:
subprojects/groovy-macro-library/src/main/groovy/org/apache/groovy/macrolib/MacroLibGroovyMethods.java
##########
@@ -29,29 +32,41 @@
import java.util.stream.Collectors;
import java.util.stream.IntStream;
+import static org.codehaus.groovy.ast.tools.GeneralUtils.args;
import static org.codehaus.groovy.ast.tools.GeneralUtils.callX;
import static org.codehaus.groovy.ast.tools.GeneralUtils.constX;
+import static org.codehaus.groovy.ast.tools.GeneralUtils.ctorX;
+import static org.codehaus.groovy.ast.tools.GeneralUtils.listX;
public class MacroLibGroovyMethods {
+ private static final ClassNode NAMED_VALUE =
ClassHelper.make(NamedValue.class);
- public static <T> T NV(Object self, Object... args) {
- throw new IllegalStateException("MacroLibGroovyMethods.NV(Object...)
should never be called at runtime. Are you sure you are using it correctly?");
+ public static <T> T SV(Object self, Object... args) {
Review comment:
Why does this return `T`?
##########
File path: src/main/java/groovy/lang/NamedValue.java
##########
@@ -0,0 +1,24 @@
+package groovy.lang;
+
+public class NamedValue<T> {
Review comment:
Is this just a `Tuple2<String,T>`? Is this really a valuable addition
to `grovy.lang` package?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]