if v.control_flow_ctx.unreash == false then
if variable.closure.signature.return_type != null then
- v.error(self, "Control error: Reached end of bloc (a 'continue' with a value was expected).")
+ v.error(self, "Control error: Reached end of block (a 'continue' with a value was expected).")
else if variable.closure.is_break then
- v.error(self, "Control error: Reached end of break bloc (an 'abort' was expected).")
+ v.error(self, "Control error: Reached end of break block (an 'abort' was expected).")
end
end
do
if v.control_flow_ctx.unreash == false then
if closure.signature.return_type != null then
- v.error(self, "Control error: Reached end of bloc (a 'continue' with a value was expected).")
+ v.error(self, "Control error: Reached end of block (a 'continue' with a value was expected).")
else if closure.is_break then
- v.error(self, "Control error: Reached end of break bloc (a 'break' was expected).")
+ v.error(self, "Control error: Reached end of break block (a 'break' was expected).")
end
end
end
sig = new MMSignature(new Array[MMType], null, v.local_class.get_type)
end
if sig.return_type != null and n_kwbreak != null then
- v.error(self, "Syntax Error: A break bloc cannot have a return value.")
+ v.error(self, "Syntax Error: A break block cannot have a return value.")
end
# Add the finalizer to the closure signature
# Current knowledge about variables names and types
readable writable attr _variable_ctx: VariableContext
- # Current knowledge about escapable blocs
+ # Current knowledge about escapable blocks
readable writable attr _escapable_ctx: EscapableContext = new EscapableContext(self)
# The current reciever
var t = esc.continue_stype
if n_expr == null and t != null then
- v.error(self, "Error: continue with a value required in this bloc.")
+ v.error(self, "Error: continue with a value required in this block.")
else if n_expr != null and t == null then
- v.error(self, "Error: continue without value required in this bloc.")
+ v.error(self, "Error: continue without value required in this block.")
else if n_expr != null and t != null then
v.check_conform_expr(n_expr, t)
end
var bl = esc.break_list
if n_expr == null and bl != null then
- v.error(self, "Error: break with a value required in this bloc.")
+ v.error(self, "Error: break with a value required in this block.")
else if n_expr != null and bl == null then
- v.error(self, "Error: break without value required in this bloc.")
+ v.error(self, "Error: break without value required in this block.")
else if n_expr != null and bl != null then
# Typing check can only be done later
bl.add(n_expr)
end
if cd != null then
if cs.length == 0 then
- v.error(self, "Error: {name} does not require blocs.")
+ v.error(self, "Error: {name} does not require blocks.")
else if cd.length > cs.length or cd.length < min_arity then
- v.error(self, "Error: {name} requires {cs.length} blocs, {cd.length} found.")
+ v.error(self, "Error: {name} requires {cs.length} blocks, {cd.length} found.")
else
# Initialize the break list if a value is required for breaks (ie. if the method is a function)
var break_list: Array[ABreakExpr] = null
end
end
else if min_arity != 0 then
- v.error(self, "Error: {name} requires {cs.length} blocs.")
+ v.error(self, "Error: {name} requires {cs.length} blocks.")
end
return t
end
-alt/base_closure1_alt10.nit:45,3--7: Error: foo requires 1 blocs.
+alt/base_closure1_alt10.nit:45,3--7: Error: foo requires 1 blocks.
-alt/base_closure1_alt5.nit:38,3--11: Error: break without value required in this bloc.
+alt/base_closure1_alt5.nit:38,3--11: Error: break without value required in this block.
-alt/base_closure1_alt7.nit:40,3--14: Error: continue without value required in this bloc.
+alt/base_closure1_alt7.nit:40,3--14: Error: continue without value required in this block.
-alt/base_closure2_alt10.nit:46,3--7: Error: foo requires 1 blocs.
+alt/base_closure2_alt10.nit:46,3--7: Error: foo requires 1 blocks.
-alt/base_closure2_alt5.nit:39,3--11: Error: break without value required in this bloc.
+alt/base_closure2_alt5.nit:39,3--11: Error: break without value required in this block.
-alt/base_closure2_alt7.nit:41,3--14: Error: continue without value required in this bloc.
+alt/base_closure2_alt7.nit:41,3--14: Error: continue without value required in this block.
-alt/base_closure3_alt5.nit:38,3--11: Error: break without value required in this bloc.
+alt/base_closure3_alt5.nit:38,3--11: Error: break without value required in this block.
-alt/base_closure3_alt7.nit:40,3--14: Error: continue without value required in this bloc.
+alt/base_closure3_alt7.nit:40,3--14: Error: continue without value required in this block.
-alt/base_closure4_alt10.nit:45,3--7: Error: foo requires 1 blocs.
+alt/base_closure4_alt10.nit:45,3--7: Error: foo requires 1 blocks.
-alt/base_closure4_alt5.nit:38,3--11: Error: break without value required in this bloc.
+alt/base_closure4_alt5.nit:38,3--11: Error: break without value required in this block.
-alt/base_closure4_alt6.nit:39,3--10: Error: continue with a value required in this bloc.
+alt/base_closure4_alt6.nit:39,3--10: Error: continue with a value required in this block.
-alt/base_closure5_alt1.nit:35,3--7: Error: break with a value required in this bloc.
+alt/base_closure5_alt1.nit:35,3--7: Error: break with a value required in this block.
-alt/base_closure5_alt7.nit:41,3--10: Error: continue with a value required in this bloc.
+alt/base_closure5_alt7.nit:41,3--10: Error: continue with a value required in this block.
-alt/base_closure5_alt9.nit:33,16--34:10: Control error: Reached end of bloc (a 'continue' with a value was expected).
+alt/base_closure5_alt9.nit:33,16--34:10: Control error: Reached end of block (a 'continue' with a value was expected).
-alt/base_closure_break_alt10.nit:47,3--7: Error: foo requires 1 blocs.
+alt/base_closure_break_alt10.nit:47,3--7: Error: foo requires 1 blocks.
-alt/base_closure_break_alt12.nit:21,3--21: Syntax Error: A break bloc cannot have a return value.
+alt/base_closure_break_alt12.nit:21,3--21: Syntax Error: A break block cannot have a return value.
-alt/base_closure_break_alt13.nit:35,8--44:10: Control error: Reached end of break bloc (a 'break' was expected).
+alt/base_closure_break_alt13.nit:35,8--44:10: Control error: Reached end of break block (a 'break' was expected).
-alt/base_closure_break_alt5.nit:39,3--11: Error: break without value required in this bloc.
+alt/base_closure_break_alt5.nit:39,3--11: Error: break without value required in this block.
-alt/base_closure_default1_alt5.nit:26,5--15: Error: continue without value required in this bloc.
+alt/base_closure_default1_alt5.nit:26,5--15: Error: continue without value required in this block.
-alt/base_closure_default2_alt5.nit:26,5--15: Error: continue without value required in this bloc.
+alt/base_closure_default2_alt5.nit:26,5--15: Error: continue without value required in this block.
-alt/base_closure_default3_alt4.nit:25,5--12: Error: continue with a value required in this bloc.
+alt/base_closure_default3_alt4.nit:25,5--12: Error: continue with a value required in this block.
-alt/base_closure_default3_alt5.nit:21,3--15: Control error: Reached end of bloc (a 'continue' with a value was expected).
+alt/base_closure_default3_alt5.nit:21,3--15: Control error: Reached end of block (a 'continue' with a value was expected).
-alt/base_closure_default4_alt4.nit:25,5--12: Error: continue with a value required in this bloc.
+alt/base_closure_default4_alt4.nit:25,5--12: Error: continue with a value required in this block.
-alt/base_closure_default4_alt5.nit:21,3--23: Control error: Reached end of bloc (a 'continue' with a value was expected).
+alt/base_closure_default4_alt5.nit:21,3--23: Control error: Reached end of block (a 'continue' with a value was expected).
-alt/base_closure_multi_alt1.nit:52,1--61:9: Error: a requires 1 blocs, 2 found.
+alt/base_closure_multi_alt1.nit:52,1--61:9: Error: a requires 1 blocks, 2 found.
-alt/base_closure_multi_alt2.nit:54,1--63:9: Error: a requires 3 blocs, 2 found.
+alt/base_closure_multi_alt2.nit:54,1--63:9: Error: a requires 3 blocks, 2 found.
-alt/base_closure_multi_alt3.nit:55,2--56:10: Error: b requires 2 blocs, 1 found.
+alt/base_closure_multi_alt3.nit:55,2--56:10: Error: b requires 2 blocks, 1 found.
-alt/base_closure_multi_alt4.nit:55,2--60:11: Error: b requires 2 blocs, 3 found.
+alt/base_closure_multi_alt4.nit:55,2--60:11: Error: b requires 2 blocks, 3 found.