File tree Expand file tree Collapse file tree
src/org/rascalmpl/library/util Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3838 "mainClass" : " org.rascalmpl.shell.RascalShell" ,
3939 "projectName" : " rascal" ,
4040 "vmArgs" : " -Xss80m -Xmx2g -ea" ,
41- "console" : " integratedTerminal" ,
42- "args" : " --project |cwd:///|"
41+ "console" : " integratedTerminal"
4342 },
4443 {
4544 "type" : " java" ,
Original file line number Diff line number Diff line change @@ -100,6 +100,10 @@ with a parameterized workload and the same label as the job name.
100100* additional work with ((jobTodo)) is still possible, but you have to repeat the right job label.
101101}
102102&T job (str label , &T (void (int worked ) step ) block , int totalWork =1 ) {
103+ if (void (void (int _) _) _ := block ) {
104+ throw IllegalArgument (block , "`block` argument can not be used by job because it returns `void` and `job` must return something." );
105+ }
106+
103107 try {
104108 jobStart (label , totalWork =totalWork );
105109 return block (void (int worked ) {
@@ -114,11 +118,6 @@ with a parameterized workload and the same label as the job name.
114118 }
115119}
116120
117- @synopsis {Captures accidental void closures to throw a better exception than `CallFailed`}
118- (&T <:void ) job (str label , (&T <:void ) (void (int worked ) step ) block , int totalWork =1 ) {
119- throw IllegalArgument (block , "`block` argument can not be used by job because it returns `void` and `job` must return something." );
120- }
121-
122121@synopsis {A job block guarantees a start and end, and provides easy access to the stepper interface.}
123122@description {
124123The convenience function that is passed to the block can be used inside the block to register steps
You can’t perform that action at this time.
0 commit comments