Skip to content

Commit 99ce102

Browse files
committed
Fix bug with function definitions
Signed-off-by: Ben Sherman <bentshermann@gmail.com>
1 parent bc8499c commit 99ce102

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

modules/compiler/src/main/java/script/ast/FunctionNode.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
*/
1616
package nextflow.script.ast;
1717

18+
import java.lang.reflect.Modifier;
19+
1820
import org.codehaus.groovy.ast.ClassNode;
1921
import org.codehaus.groovy.ast.MethodNode;
2022
import org.codehaus.groovy.ast.Parameter;
@@ -29,12 +31,12 @@ public class FunctionNode extends MethodNode {
2931
public final String documentation;
3032

3133
public FunctionNode(String name, ClassNode returnType, Parameter[] parameters, Statement code) {
32-
super(name, 0, returnType, parameters, ClassNode.EMPTY_ARRAY, code);
34+
super(name, Modifier.PUBLIC, returnType, parameters, ClassNode.EMPTY_ARRAY, code);
3335
this.documentation = null;
3436
}
3537

3638
public FunctionNode(String name, String documentation) {
37-
super(name, 0, null, Parameter.EMPTY_ARRAY, ClassNode.EMPTY_ARRAY, EmptyStatement.INSTANCE);
39+
super(name, Modifier.PUBLIC, null, Parameter.EMPTY_ARRAY, ClassNode.EMPTY_ARRAY, EmptyStatement.INSTANCE);
3840
this.documentation = documentation;
3941
}
4042
}

0 commit comments

Comments
 (0)