@@ -21,6 +21,7 @@ import nextflow.script.ast.FeatureFlagNode
2121import nextflow.script.control.ScriptParser
2222import nextflow.script.control.ScriptResolveVisitor
2323import nextflow.script.control.TypeCheckingVisitorEx
24+ import nextflow.script.dsl.Types
2425import org.codehaus.groovy.ast.ASTNode
2526import org.codehaus.groovy.ast.ClassHelper
2627import org.codehaus.groovy.ast.expr.ConstantExpression
@@ -53,7 +54,7 @@ class TypeCheckingTest extends Specification {
5354
5455 SourceUnit parse (String contents ) {
5556 def source = scriptParser. parse(' main.nf' , contents. stripIndent())
56- source. getAST()?. addFeatureFlag(new FeatureFlagNode (" nextflow.preview .types" , new ConstantExpression (true )))
57+ source. getAST()?. addFeatureFlag(new FeatureFlagNode (" nextflow.enable .types" , new ConstantExpression (true )))
5758 new ScriptResolveVisitor (source, scriptParser. compiler(). compilationUnit(), Types . DEFAULT_SCRIPT_IMPORTS , Collections . emptyList()). visit()
5859 new TypeCheckingVisitorEx (source). visit()
5960 return source
@@ -145,7 +146,7 @@ class TypeCheckingTest extends Specification {
145146 when :
146147 def errors = getErrors(
147148 ''' \
148- nextflow.preview .types = true
149+ nextflow.enable .types = true
149150
150151 workflow hello {
151152 emit:
@@ -162,7 +163,7 @@ class TypeCheckingTest extends Specification {
162163 when :
163164 errors = getErrors(
164165 ''' \
165- nextflow.preview .types = true
166+ nextflow.enable .types = true
166167
167168 workflow hello {
168169 emit:
@@ -178,7 +179,7 @@ class TypeCheckingTest extends Specification {
178179 when :
179180 def errors = getErrors(
180181 ''' \
181- nextflow.preview .types = true
182+ nextflow.enable .types = true
182183
183184 workflow {
184185 main:
@@ -218,7 +219,7 @@ class TypeCheckingTest extends Specification {
218219 when :
219220 errors = getErrors(
220221 ''' \
221- nextflow.preview .types = true
222+ nextflow.enable .types = true
222223
223224 workflow {
224225 main:
@@ -651,7 +652,7 @@ class TypeCheckingTest extends Specification {
651652 expect :
652653 check(
653654 '''
654- nextflow.preview .types = true
655+ nextflow.enable .types = true
655656
656657 workflow hello {
657658 take:
@@ -673,7 +674,7 @@ class TypeCheckingTest extends Specification {
673674 when :
674675 def exp = parseExpression(
675676 ''' \
676- nextflow.preview .types = true
677+ nextflow.enable .types = true
677678
678679 workflow hello {
679680 emit:
@@ -692,7 +693,7 @@ class TypeCheckingTest extends Specification {
692693 when :
693694 exp = parseExpression(
694695 ''' \
695- nextflow.preview .types = true
696+ nextflow.enable .types = true
696697
697698 workflow hello {
698699 emit:
@@ -711,7 +712,7 @@ class TypeCheckingTest extends Specification {
711712 when :
712713 exp = parseExpression(
713714 ''' \
714- nextflow.preview .types = true
715+ nextflow.enable .types = true
715716
716717 workflow hello {
717718 emit:
@@ -733,7 +734,7 @@ class TypeCheckingTest extends Specification {
733734 expect :
734735 check(
735736 '''
736- nextflow.preview .types = true
737+ nextflow.enable .types = true
737738
738739 process hello {
739740 input:
@@ -756,7 +757,7 @@ class TypeCheckingTest extends Specification {
756757 and :
757758 check(
758759 '''
759- nextflow.preview .types = true
760+ nextflow.enable .types = true
760761
761762 process hello {
762763 input:
@@ -775,7 +776,7 @@ class TypeCheckingTest extends Specification {
775776 and :
776777 check(
777778 '''
778- nextflow.preview .types = true
779+ nextflow.enable .types = true
779780
780781 process hello {
781782 input:
@@ -798,7 +799,7 @@ class TypeCheckingTest extends Specification {
798799 and :
799800 check(
800801 '''
801- nextflow.preview .types = true
802+ nextflow.enable .types = true
802803
803804 process hello {
804805 input:
@@ -826,7 +827,7 @@ class TypeCheckingTest extends Specification {
826827 expect :
827828 check(
828829 ''' \
829- nextflow.preview .types = true
830+ nextflow.enable .types = true
830831
831832 process hello {
832833 input:
@@ -845,7 +846,7 @@ class TypeCheckingTest extends Specification {
845846 and :
846847 check(
847848 ''' \
848- nextflow.preview .types = true
849+ nextflow.enable .types = true
849850
850851 process hello {
851852 input:
@@ -867,7 +868,7 @@ class TypeCheckingTest extends Specification {
867868 when :
868869 def exp = parseExpression(
869870 ''' \
870- nextflow.preview .types = true
871+ nextflow.enable .types = true
871872
872873 process hello {
873874 input:
@@ -892,7 +893,7 @@ class TypeCheckingTest extends Specification {
892893 when :
893894 exp = parseExpression(
894895 ''' \
895- nextflow.preview .types = true
896+ nextflow.enable .types = true
896897
897898 process hello {
898899 input:
@@ -917,7 +918,7 @@ class TypeCheckingTest extends Specification {
917918 when :
918919 exp = parseExpression(
919920 ''' \
920- nextflow.preview .types = true
921+ nextflow.enable .types = true
921922
922923 process hello {
923924 input:
@@ -942,7 +943,7 @@ class TypeCheckingTest extends Specification {
942943 when :
943944 exp = parseExpression(
944945 ''' \
945- nextflow.preview .types = true
946+ nextflow.enable .types = true
946947
947948 process hello {
948949 input:
@@ -969,7 +970,7 @@ class TypeCheckingTest extends Specification {
969970 expect :
970971 check(
971972 '''
972- nextflow.preview .types = true
973+ nextflow.enable .types = true
973974
974975 process hello {
975976 output:
0 commit comments