do
if _opt_warn.value == 0 then return
_messages.add(new Message(l,s))
- if _opt_warn.value == 1 then
- _warning_count = _warning_count + 1
- else
- _error_count = _error_count + 1
- end
+ _warning_count = _warning_count + 1
if opt_stop_on_first_error.value then check_errors
end
# Option --warn
readable var _opt_warn: OptionCount = new OptionCount("Show warnings", "-W", "--warn")
+ # Option --quiet
+ readable var _opt_quiet: OptionBool = new OptionBool("Do not show warnings", "-q", "--quiet")
+
# Option --path
readable var _opt_path: OptionArray = new OptionArray("Set include path for loaders (may be used more than once)", "-I", "--path")
init
do
super
- option_context.add_option(opt_warn, opt_stop_on_first_error, opt_no_color, opt_path, opt_log, opt_log_dir, opt_only_parse, opt_only_metamodel, opt_help, opt_version, opt_verbose)
+ option_context.add_option(opt_warn, opt_quiet, opt_stop_on_first_error, opt_no_color, opt_path, opt_log, opt_log_dir, opt_only_parse, opt_only_metamodel, opt_help, opt_version, opt_verbose)
end
# Parse and process the options given on the command line
fun process_options
do
+ self.opt_warn.value = 1
+
# init options
option_context.parse(args)
# Set verbose level
_verbose_level = opt_verbose.value
+ if self.opt_quiet.value then self.opt_warn.value = 0
+
# Setup the paths value
paths.append(opt_path.value)
#alt6# break
#alt7# break 1
end
- continue (i * 10) #!alt5#
+ continue i * 10 #!alt5#
end
do
1.output
if not a isa B then
return false
end
- assert a isa B
+
return a.a is _a
end
if not a isa B then
#alt4#a.foo(-4)
a = new B
- assert a isa B
+
a.foo(3)
end
a.foo(4)
while not a isa B do
#alt7#a.foo(-7)
a = new B
- assert a isa B
+
a.foo(6)
end
#alt8#a.foo(7)
#alt1#a.foo(1)
a = new B
-assert a isa B
+
a.foo(2)
if maybe then
else
#alt2#a.foo(2)
a = new B
-assert a isa B
+
a.foo(3)
if maybe then
a = new A
#alt3#a.foo(3)
a = new B
-assert a isa B
+
a.foo(4)
if maybe then
else
a.foo(4)
a = new B
-assert a isa B
+
a.foo(5)
if maybe then
a = new A
#alt4#a.foo(5)
a = new B
-assert a isa B
+
a.foo(6)
if maybe then
end
a.foo(6)
a = new B
-assert a isa B
+
a.foo(7)
while not maybe do
#alt5#a = new A
a.foo(7)
a = new B
-assert a isa B
+
a.foo(8)
while not maybe do
end
# Add the sink `n' the the connected nodes
# Do nothing if `n' is already connected
do
- assert n != null
# Create the collection if needed
if _nexts == null then
_nexts = new ArraySet[NodeSink]
# Remove the sink `n' from the connected nodes
# Do nothing if `n' is not connected
do
- assert n != null
_nexts.remove(n)
end
fun run_for(time_limit: Int)
do
- while true do
+ loop
var node = next_event
if _time > time_limit then
print("Time limit.")
+base_as_cast.nit:42,1--12: Warning: Expression is already a Object.
+base_as_cast.nit:52,1--12: Warning: Expression is already a Object.
0
0
0
+alt/base_as_cast_alt1.nit:42,1--12: Warning: Expression is already a Object.
+alt/base_as_cast_alt1.nit:52,1--12: Warning: Expression is already a Object.
0
0
0
+alt/base_as_cast_alt2.nit:42,1--12: Warning: Expression is already a Object.
+alt/base_as_cast_alt2.nit:52,1--12: Warning: Expression is already a Object.
0
0
0
+alt/base_as_cast_alt3.nit:42,1--12: Warning: Expression is already a Object.
+alt/base_as_cast_alt3.nit:52,1--12: Warning: Expression is already a Object.
0
0
0
+alt/base_as_cast_alt4.nit:42,1--12: Warning: Expression is already a Object.
+alt/base_as_cast_alt4.nit:52,1--12: Warning: Expression is already a Object.
0
0
0
+alt/base_as_cast_alt5.nit:42,1--12: Warning: Expression is already a Object.
+alt/base_as_cast_alt5.nit:52,1--12: Warning: Expression is already a Object.
0
0
0
+alt/base_as_cast_alt6.nit:42,1--12: Warning: Expression is already a Object.
+alt/base_as_cast_alt6.nit:52,1--12: Warning: Expression is already a Object.
0
0
0
+base_as_notnull.nit:41,6: Warning: 'as(not null)' on non nullable type.
+base_as_notnull.nit:42,6--7: Warning: 'as(not null)' on non nullable type.
+base_as_notnull.nit:43,6: Warning: 'as(not null)' on non nullable type.
+base_as_notnull.nit:52,6: Warning: 'as(not null)' on non nullable type.
1
2
3
+alt/base_as_notnull_alt1.nit:41,6: Warning: 'as(not null)' on non nullable type.
+alt/base_as_notnull_alt1.nit:42,6--7: Warning: 'as(not null)' on non nullable type.
+alt/base_as_notnull_alt1.nit:43,6: Warning: 'as(not null)' on non nullable type.
+alt/base_as_notnull_alt1.nit:50,6: Warning: 'as(not null)' on non nullable type.
alt/base_as_notnull_alt1.nit:50,6--19: Type error: expected B, got A
+alt/base_as_notnull_alt1.nit:52,6: Warning: 'as(not null)' on non nullable type.
+alt/base_as_notnull_alt2.nit:41,6: Warning: 'as(not null)' on non nullable type.
+alt/base_as_notnull_alt2.nit:42,6--7: Warning: 'as(not null)' on non nullable type.
+alt/base_as_notnull_alt2.nit:43,6: Warning: 'as(not null)' on non nullable type.
+alt/base_as_notnull_alt2.nit:51,6--7: Warning: 'as(not null)' on non nullable type.
alt/base_as_notnull_alt2.nit:51,6--20: Type error: expected B, got A
+alt/base_as_notnull_alt2.nit:52,6: Warning: 'as(not null)' on non nullable type.
+alt/base_as_notnull_alt3.nit:41,6: Warning: 'as(not null)' on non nullable type.
+alt/base_as_notnull_alt3.nit:42,6--7: Warning: 'as(not null)' on non nullable type.
+alt/base_as_notnull_alt3.nit:43,6: Warning: 'as(not null)' on non nullable type.
+alt/base_as_notnull_alt3.nit:52,6: Warning: 'as(not null)' on non nullable type.
alt/base_as_notnull_alt3.nit:53,6--20: Type error: expected B, got A
+alt/base_as_notnull_alt4.nit:41,6: Warning: 'as(not null)' on non nullable type.
+alt/base_as_notnull_alt4.nit:42,6--7: Warning: 'as(not null)' on non nullable type.
+alt/base_as_notnull_alt4.nit:43,6: Warning: 'as(not null)' on non nullable type.
+alt/base_as_notnull_alt4.nit:52,6: Warning: 'as(not null)' on non nullable type.
alt/base_as_notnull_alt4.nit:54,6--21: Type error: expected B, got A
+alt/base_as_notnull_alt5.nit:41,6: Warning: 'as(not null)' on non nullable type.
+alt/base_as_notnull_alt5.nit:42,6--7: Warning: 'as(not null)' on non nullable type.
+alt/base_as_notnull_alt5.nit:43,6: Warning: 'as(not null)' on non nullable type.
+alt/base_as_notnull_alt5.nit:52,6: Warning: 'as(not null)' on non nullable type.
1
2
3
+alt/base_as_notnull_alt6.nit:41,6: Warning: 'as(not null)' on non nullable type.
+alt/base_as_notnull_alt6.nit:42,6--7: Warning: 'as(not null)' on non nullable type.
+alt/base_as_notnull_alt6.nit:43,6: Warning: 'as(not null)' on non nullable type.
+alt/base_as_notnull_alt6.nit:52,6: Warning: 'as(not null)' on non nullable type.
1
2
3
+alt/base_as_notnull_alt7.nit:41,6: Warning: 'as(not null)' on non nullable type.
+alt/base_as_notnull_alt7.nit:42,6--7: Warning: 'as(not null)' on non nullable type.
+alt/base_as_notnull_alt7.nit:43,6: Warning: 'as(not null)' on non nullable type.
+alt/base_as_notnull_alt7.nit:52,6: Warning: 'as(not null)' on non nullable type.
alt/base_as_notnull_alt7.nit:61,1--4: Type error: 'as(not null)' on 'null' value.
+base_classid.nit:47,2--8: Warning: Expression is already a A.
+base_classid.nit:48,2--9: Warning: Expression is already a A.
+base_classid.nit:49,2--8: Warning: Expression is already a A since it is a B.
+base_classid.nit:52,2--8: Warning: Expression is already a B.
true
true
true
+base_control_flow2.nit:21,1--25,3: Warning: use 'loop' instead of 'while true do'.
+base_control_flow2.nit:39,1--43,3: Warning: use 'loop' instead of 'while true do'.
+base_control_flow2.nit:47,2--51,4: Warning: use 'loop' instead of 'while true do'.
+base_control_flow2.nit:45,1--55,3: Warning: use 'loop' instead of 'while true do'.
alt/base_control_flow2_alt1.nit:24,2: Error: unreachable statement.
+alt/base_control_flow2_alt1.nit:21,1--25,3: Warning: use 'loop' instead of 'while true do'.
+alt/base_control_flow2_alt1.nit:39,1--43,3: Warning: use 'loop' instead of 'while true do'.
+alt/base_control_flow2_alt1.nit:47,2--51,4: Warning: use 'loop' instead of 'while true do'.
+alt/base_control_flow2_alt1.nit:45,1--55,3: Warning: use 'loop' instead of 'while true do'.
+alt/base_control_flow2_alt2.nit:21,1--25,3: Warning: use 'loop' instead of 'while true do'.
alt/base_control_flow2_alt2.nit:30,2: Error: unreachable statement.
+alt/base_control_flow2_alt2.nit:39,1--43,3: Warning: use 'loop' instead of 'while true do'.
+alt/base_control_flow2_alt2.nit:47,2--51,4: Warning: use 'loop' instead of 'while true do'.
+alt/base_control_flow2_alt2.nit:45,1--55,3: Warning: use 'loop' instead of 'while true do'.
+alt/base_control_flow2_alt3.nit:21,1--25,3: Warning: use 'loop' instead of 'while true do'.
alt/base_control_flow2_alt3.nit:42,2: Error: unreachable statement.
+alt/base_control_flow2_alt3.nit:39,1--43,3: Warning: use 'loop' instead of 'while true do'.
+alt/base_control_flow2_alt3.nit:47,2--51,4: Warning: use 'loop' instead of 'while true do'.
+alt/base_control_flow2_alt3.nit:45,1--55,3: Warning: use 'loop' instead of 'while true do'.
+alt/base_control_flow2_alt4.nit:21,1--25,3: Warning: use 'loop' instead of 'while true do'.
+alt/base_control_flow2_alt4.nit:39,1--43,3: Warning: use 'loop' instead of 'while true do'.
alt/base_control_flow2_alt4.nit:50,3: Error: unreachable statement.
+alt/base_control_flow2_alt4.nit:47,2--51,4: Warning: use 'loop' instead of 'while true do'.
+alt/base_control_flow2_alt4.nit:45,1--55,3: Warning: use 'loop' instead of 'while true do'.
+alt/base_control_flow2_alt5.nit:21,1--25,3: Warning: use 'loop' instead of 'while true do'.
+alt/base_control_flow2_alt5.nit:39,1--43,3: Warning: use 'loop' instead of 'while true do'.
+alt/base_control_flow2_alt5.nit:47,2--51,4: Warning: use 'loop' instead of 'while true do'.
alt/base_control_flow2_alt5.nit:54,2: Error: unreachable statement.
+alt/base_control_flow2_alt5.nit:45,1--55,3: Warning: use 'loop' instead of 'while true do'.
+alt/base_control_flow2_alt6.nit:21,1--25,3: Warning: use 'loop' instead of 'while true do'.
+alt/base_control_flow2_alt6.nit:39,1--43,3: Warning: use 'loop' instead of 'while true do'.
+alt/base_control_flow2_alt6.nit:47,2--51,4: Warning: use 'loop' instead of 'while true do'.
+alt/base_control_flow2_alt6.nit:45,1--55,3: Warning: use 'loop' instead of 'while true do'.
alt/base_control_flow2_alt6.nit:60,2: Error: unreachable statement.
+alt/base_control_flow2_alt7.nit:21,1--25,3: Warning: use 'loop' instead of 'while true do'.
+alt/base_control_flow2_alt7.nit:39,1--43,3: Warning: use 'loop' instead of 'while true do'.
+alt/base_control_flow2_alt7.nit:47,2--51,4: Warning: use 'loop' instead of 'while true do'.
+alt/base_control_flow2_alt7.nit:45,1--55,3: Warning: use 'loop' instead of 'while true do'.
alt/base_control_flow2_alt7.nit:67,2: Error: unreachable statement.
+base_eq_null_notnull.nit:36,6--14: Warning: comparaison between null and a non nullable value.
+base_eq_null_notnull.nit:43,2--10: Warning: comparaison between null and a non nullable value.
true
true
true
+base_isa.nit:39,2--13: Warning: Expression is already a Object.
+base_isa.nit:49,2--13: Warning: Expression is already a Object.
true
true
true
+base_isa_nil.nit:33,2--13: Warning: Expression is already a Object.
+base_isa_nil.nit:36,2--22: Warning: Expression is already a nullable Object since it is a Object.
+base_isa_nil.nit:40,2--13: Warning: Prefer '!= null'.
+base_isa_nil.nit:43,2--22: Warning: Expression is already a nullable Object.
true
true
true
+alt/base_upcast2_1alt1.nit:26,14--20: Warning: Expression is already a T since it is a C.
+alt/base_upcast2_1alt1_alt1.nit:26,14--20: Warning: Expression is already a T since it is a C.
+alt/base_upcast2_1alt1_alt10.nit:26,14--20: Warning: Expression is already a T since it is a C.
alt/base_upcast2_1alt1_alt10.nit:36,21: Type error: expected C, got T
+alt/base_upcast2_1alt1_alt2.nit:26,14--20: Warning: Expression is already a T since it is a C.
alt/base_upcast2_1alt1_alt2.nit:28,21--22: Type error: expected T, got A[Bool]
+alt/base_upcast2_1alt1_alt3.nit:26,14--20: Warning: Expression is already a T since it is a C.
+alt/base_upcast2_1alt1_alt4.nit:26,14--20: Warning: Expression is already a T since it is a C.
+alt/base_upcast2_1alt1_alt5.nit:26,14--20: Warning: Expression is already a T since it is a C.
+alt/base_upcast2_1alt1_alt6.nit:26,14--20: Warning: Expression is already a T since it is a C.
+alt/base_upcast2_1alt1_alt7.nit:26,14--20: Warning: Expression is already a T since it is a C.
alt/base_upcast2_1alt1_alt7.nit:33,22: Type error: expected A[Bool], got T
+alt/base_upcast2_1alt1_alt8.nit:26,14--20: Warning: Expression is already a T since it is a C.
alt/base_upcast2_1alt1_alt8.nit:34,22: Type error: expected B[Int], got T
+alt/base_upcast2_1alt1_alt9.nit:26,14--20: Warning: Expression is already a T since it is a C.
alt/base_upcast2_1alt1_alt9.nit:35,22: Type error: expected B[Bool], got T
+alt/base_upcast2_1alt4.nit:26,14--20: Warning: Expression is already a T since it is a C.
+alt/base_upcast2_1alt4_alt1.nit:26,14--20: Warning: Expression is already a T since it is a C.
alt/base_upcast2_1alt4_alt1.nit:27,21--22: Type error: expected T, got A[Int]
+alt/base_upcast2_1alt4_alt10.nit:26,14--20: Warning: Expression is already a T since it is a C.
alt/base_upcast2_1alt4_alt10.nit:36,21: Type error: expected C, got T
+alt/base_upcast2_1alt4_alt2.nit:26,14--20: Warning: Expression is already a T since it is a C.
alt/base_upcast2_1alt4_alt2.nit:28,21--22: Type error: expected T, got A[Bool]
+alt/base_upcast2_1alt4_alt3.nit:26,14--20: Warning: Expression is already a T since it is a C.
alt/base_upcast2_1alt4_alt3.nit:29,21--22: Type error: expected T, got B[Int]
+alt/base_upcast2_1alt4_alt4.nit:26,14--20: Warning: Expression is already a T since it is a C.
+alt/base_upcast2_1alt4_alt5.nit:26,14--20: Warning: Expression is already a T since it is a C.
+alt/base_upcast2_1alt4_alt6.nit:26,14--20: Warning: Expression is already a T since it is a C.
+alt/base_upcast2_1alt4_alt7.nit:26,14--20: Warning: Expression is already a T since it is a C.
alt/base_upcast2_1alt4_alt7.nit:33,22: Type error: expected A[Bool], got T
+alt/base_upcast2_1alt4_alt8.nit:26,14--20: Warning: Expression is already a T since it is a C.
alt/base_upcast2_1alt4_alt8.nit:34,22: Type error: expected B[Int], got T
+alt/base_upcast2_1alt4_alt9.nit:26,14--20: Warning: Expression is already a T since it is a C.
+alt/base_upcast2_1alt5.nit:26,14--20: Warning: Expression is already a T since it is a C.
+alt/base_upcast2_1alt5_alt1.nit:26,14--20: Warning: Expression is already a T since it is a C.
alt/base_upcast2_1alt5_alt1.nit:27,21--22: Type error: expected T, got A[Int]
+alt/base_upcast2_1alt5_alt10.nit:26,14--20: Warning: Expression is already a T since it is a C.
+alt/base_upcast2_1alt5_alt2.nit:26,14--20: Warning: Expression is already a T since it is a C.
alt/base_upcast2_1alt5_alt2.nit:28,21--22: Type error: expected T, got A[Bool]
+alt/base_upcast2_1alt5_alt3.nit:26,14--20: Warning: Expression is already a T since it is a C.
alt/base_upcast2_1alt5_alt3.nit:29,21--22: Type error: expected T, got B[Int]
+alt/base_upcast2_1alt5_alt4.nit:26,14--20: Warning: Expression is already a T since it is a C.
alt/base_upcast2_1alt5_alt4.nit:30,21--22: Type error: expected T, got B[Bool]
+alt/base_upcast2_1alt5_alt5.nit:26,14--20: Warning: Expression is already a T since it is a C.
+alt/base_upcast2_1alt5_alt6.nit:26,14--20: Warning: Expression is already a T since it is a C.
+alt/base_upcast2_1alt5_alt7.nit:26,14--20: Warning: Expression is already a T since it is a C.
alt/base_upcast2_1alt5_alt7.nit:33,22: Type error: expected A[Bool], got T
+alt/base_upcast2_1alt5_alt8.nit:26,14--20: Warning: Expression is already a T since it is a C.
alt/base_upcast2_1alt5_alt8.nit:34,22: Type error: expected B[Int], got T
+alt/base_upcast2_1alt5_alt9.nit:26,14--20: Warning: Expression is already a T since it is a C.
+base_var_type_evolution_null3.nit:52,5--13: Warning: comparaison between null and a non nullable value.
1
1
5
alt/base_var_type_evolution_null3_alt1.nit:44,9--10: Type error: expected A, got nullable A
+alt/base_var_type_evolution_null3_alt1.nit:52,5--13: Warning: comparaison between null and a non nullable value.
error_expr_not_ok.nit:66,7--10: Error: Method or variable 'fail' unknown in Sys.
error_expr_not_ok.nit:66,21: Type error: expected A, got Int
error_expr_not_ok.nit:67,15--18: Error: Method or variable 'fail' unknown in Sys.
+error_expr_not_ok.nit:67,1--18: Warning: use 'loop' instead of 'while true do'.
error_expr_not_ok.nit:69,10--13: Error: Method or variable 'fail' unknown in Sys.
error_expr_not_ok.nit:69,24: Type error: expected A, got Int
error_expr_not_ok.nit:70,20--23: Error: Method or variable 'fail' unknown in Sys.
alt/error_expr_not_ok_alt2.nit:64,7--33: Type error: expected A, got Int
alt/error_expr_not_ok_alt2.nit:66,7--10: Type error: expected Bool, got Int
alt/error_expr_not_ok_alt2.nit:66,21: Type error: expected A, got Int
+alt/error_expr_not_ok_alt2.nit:67,1--18: Warning: use 'loop' instead of 'while true do'.
alt/error_expr_not_ok_alt2.nit:69,10--13: Type error: Expected a type with an 'iterate' method. Found Int.
alt/error_expr_not_ok_alt2.nit:69,24: Type error: expected A, got Int
alt/error_expr_not_ok_alt2.nit:71,8--11: Type error: expected Bool, got Int
alt/error_expr_not_ok_alt2.nit:146,7--15: Type error: expected A, got Array[Int]
alt/error_expr_not_ok_alt2.nit:147,7--18: Type error: expected A, got Array[Int]
alt/error_expr_not_ok_alt2.nit:149,7--24: Type error: expected A, got String
+alt/error_expr_not_ok_alt2.nit:150,7--18: Warning: Expression is already a Int.
alt/error_expr_not_ok_alt2.nit:150,7--18: Type error: expected A, got Int
+alt/error_expr_not_ok_alt2.nit:151,7--10: Warning: 'as(not null)' on non nullable type.
alt/error_expr_not_ok_alt2.nit:151,7--23: Type error: expected A, got Int
+alt/error_expr_not_ok_alt2.nit:152,7--18: Warning: Expression is already a Int.
alt/error_expr_not_ok_alt2.nit:152,7--18: Type error: expected A, got Bool
alt/error_expr_not_ok_alt3.nit:64,7--33: Type error: expected A, got Int
alt/error_expr_not_ok_alt3.nit:66,7--10: Type error: expected Bool, got Int
alt/error_expr_not_ok_alt3.nit:66,21: Type error: expected A, got Int
+alt/error_expr_not_ok_alt3.nit:67,1--18: Warning: use 'loop' instead of 'while true do'.
alt/error_expr_not_ok_alt3.nit:69,10--13: Type error: Expected a type with an 'iterate' method. Found Int.
alt/error_expr_not_ok_alt3.nit:69,24: Type error: expected A, got Int
alt/error_expr_not_ok_alt3.nit:71,8--11: Type error: expected Bool, got Int
alt/error_expr_not_ok_alt3.nit:146,7--15: Type error: expected A, got Array[Int]
alt/error_expr_not_ok_alt3.nit:147,7--18: Type error: expected A, got Array[Int]
alt/error_expr_not_ok_alt3.nit:149,7--24: Type error: expected A, got String
+alt/error_expr_not_ok_alt3.nit:150,7--18: Warning: Expression is already a Int.
alt/error_expr_not_ok_alt3.nit:150,7--18: Type error: expected A, got Int
+alt/error_expr_not_ok_alt3.nit:151,7--10: Warning: 'as(not null)' on non nullable type.
alt/error_expr_not_ok_alt3.nit:151,7--23: Type error: expected A, got Int
+alt/error_expr_not_ok_alt3.nit:152,7--18: Warning: Expression is already a Int.
alt/error_expr_not_ok_alt3.nit:152,7--18: Type error: expected A, got Bool
alt/error_expr_not_ok_alt4.nit:64,7--33: Type error: expected A, got Int
alt/error_expr_not_ok_alt4.nit:66,7--10: Type error: expected Bool, got Int
alt/error_expr_not_ok_alt4.nit:66,21: Type error: expected A, got Int
+alt/error_expr_not_ok_alt4.nit:67,1--18: Warning: use 'loop' instead of 'while true do'.
alt/error_expr_not_ok_alt4.nit:69,10--13: Type error: Expected a type with an 'iterate' method. Found Int.
alt/error_expr_not_ok_alt4.nit:69,24: Type error: expected A, got Int
alt/error_expr_not_ok_alt4.nit:71,8--11: Type error: expected Bool, got Int
alt/error_expr_not_ok_alt4.nit:146,7--15: Type error: expected A, got Array[Int]
alt/error_expr_not_ok_alt4.nit:147,7--18: Type error: expected A, got Array[Int]
alt/error_expr_not_ok_alt4.nit:149,7--24: Type error: expected A, got String
+alt/error_expr_not_ok_alt4.nit:150,7--18: Warning: Expression is already a Int.
alt/error_expr_not_ok_alt4.nit:150,7--18: Type error: expected A, got Int
+alt/error_expr_not_ok_alt4.nit:151,7--10: Warning: 'as(not null)' on non nullable type.
alt/error_expr_not_ok_alt4.nit:151,7--23: Type error: expected A, got Int
+alt/error_expr_not_ok_alt4.nit:152,7--18: Warning: Expression is already a Int.
alt/error_expr_not_ok_alt4.nit:152,7--18: Type error: expected A, got Bool
alt/error_expr_not_ok_alt5.nit:64,7--33: Type error: expected A, got Int
alt/error_expr_not_ok_alt5.nit:66,7--10: Type error: expected Bool, got Int
alt/error_expr_not_ok_alt5.nit:66,21: Type error: expected A, got Int
+alt/error_expr_not_ok_alt5.nit:67,1--18: Warning: use 'loop' instead of 'while true do'.
alt/error_expr_not_ok_alt5.nit:69,10--13: Type error: Expected a type with an 'iterate' method. Found Int.
alt/error_expr_not_ok_alt5.nit:69,24: Type error: expected A, got Int
alt/error_expr_not_ok_alt5.nit:71,8--11: Type error: expected Bool, got Int
alt/error_expr_not_ok_alt5.nit:146,7--15: Type error: expected A, got Array[Int]
alt/error_expr_not_ok_alt5.nit:147,7--18: Type error: expected A, got Array[Int]
alt/error_expr_not_ok_alt5.nit:149,7--24: Type error: expected A, got String
+alt/error_expr_not_ok_alt5.nit:150,7--18: Warning: Expression is already a Int.
alt/error_expr_not_ok_alt5.nit:150,7--18: Type error: expected A, got Int
+alt/error_expr_not_ok_alt5.nit:151,7--10: Warning: 'as(not null)' on non nullable type.
alt/error_expr_not_ok_alt5.nit:151,7--23: Type error: expected A, got Int
+alt/error_expr_not_ok_alt5.nit:152,7--18: Warning: Expression is already a Int.
alt/error_expr_not_ok_alt5.nit:152,7--18: Type error: expected A, got Bool
alt/error_expr_not_ok_alt6.nit:64,7--33: Type error: expected A, got null
alt/error_expr_not_ok_alt6.nit:66,7--10: Type error: expected Bool, got null
alt/error_expr_not_ok_alt6.nit:66,21: Type error: expected A, got Int
+alt/error_expr_not_ok_alt6.nit:67,1--18: Warning: use 'loop' instead of 'while true do'.
alt/error_expr_not_ok_alt6.nit:69,10--13: Type error: 'for' on a nullable expression.
alt/error_expr_not_ok_alt6.nit:69,24: Type error: expected A, got Int
alt/error_expr_not_ok_alt6.nit:71,8--11: Type error: expected Bool, got null
alt/error_expr_not_ok_alt6.nit:79,7--14: Type error: expected A, got Bool
alt/error_expr_not_ok_alt6.nit:80,7--15: Type error: expected A, got Bool
alt/error_expr_not_ok_alt6.nit:81,7--15: Type error: expected A, got Bool
+alt/error_expr_not_ok_alt6.nit:81,7--15: Warning: comparaison between null and a non nullable value.
alt/error_expr_not_ok_alt6.nit:82,7--18: Type error: expected A, got Bool
+alt/error_expr_not_ok_alt6.nit:82,7--18: Warning: comparaison between two null values.
alt/error_expr_not_ok_alt6.nit:83,7--15: Type error: expected A, got Bool
alt/error_expr_not_ok_alt6.nit:84,7--15: Type error: expected A, got Bool
+alt/error_expr_not_ok_alt6.nit:84,7--15: Warning: comparaison between null and a non nullable value.
alt/error_expr_not_ok_alt6.nit:85,7--18: Type error: expected A, got Bool
+alt/error_expr_not_ok_alt6.nit:85,7--18: Warning: comparaison between two null values.
alt/error_expr_not_ok_alt6.nit:86,7--15: Type error: expected A, got Bool
alt/error_expr_not_ok_alt6.nit:87,7--15: Type error: expected A, got Bool
alt/error_expr_not_ok_alt6.nit:88,7--18: Type error: expected A, got Bool
alt/error_expr_not_ok_alt6.nit:147,7--18: Type error: expected A, got Array[null]
alt/error_expr_not_ok_alt6.nit:149,14--17: Type error: expected Object, got null
alt/error_expr_not_ok_alt6.nit:149,7--24: Type error: expected A, got String
+alt/error_expr_not_ok_alt6.nit:150,7--18: Warning: Expression is null therefore cannot be a Int.
alt/error_expr_not_ok_alt6.nit:150,7--18: Type error: expected A, got Int
alt/error_expr_not_ok_alt6.nit:151,7--10: Type error: 'as(not null)' on 'null' value.
+alt/error_expr_not_ok_alt6.nit:152,7--18: Warning: Expression is null therefore cannot be a Int.
alt/error_expr_not_ok_alt6.nit:152,7--18: Type error: expected A, got Bool
error_fun_ret4.nit:17,5--8: Control error: Reached end of function (a 'return' with a value was expected).
+error_fun_ret4.nit:19,2--22,4: Warning: use 'loop' instead of 'while true do'.
+error_var_args3.nit:18,2--3: Warning: superfluous parentheses.
error_var_args3.nit:18,1--3: Error: t is variable, not a function.
+error_var_args4.nit:18,2--3: Warning: superfluous parentheses.
error_var_args4.nit:18,1--8: Error: t is variable, not a function.
usage: nitc [options] file...
-W, --warn Show warnings
+ -q, --quiet Do not show warnings
--stop-on-first-error Stop on first error
--no-color Do not use color to display errors and warnings
-I, --path Set include path for loaders (may be used more than once)
usage: nitdoc [options] file...
-W, --warn Show warnings
+ -q, --quiet Do not show warnings
--stop-on-first-error Stop on first error
--no-color Do not use color to display errors and warnings
-I, --path Set include path for loaders (may be used more than once)
+test_isa.nit:25,7--19: Warning: Expression is already a Object.
+test_isa.nit:34,7--19: Warning: Expression is already a Object.
+test_isa.nit:43,7--28: Warning: Expression is already a nullable Object.
int:
true
true
+test_ni_cast_extra.nit:50,21--28: Warning: comparaison between null and a non nullable value.
a isa b false (expected: false)
c isa a true (expected: true)
d isa b true (expected: true)
+test_ni_operators.nit:77,7--25: Warning: comparaison between null and a non nullable value.
11
9
22
+test_ni_special_to_native.nit:37,1--7: Warning: Expression is already a A since it is a B.
+test_ni_special_to_native.nit:38,1--7: Warning: Expression is already a A since it is a B.
A
A from native
B
+test_return.nit:45,2--47,4: Warning: use 'loop' instead of 'while true do'.
1
1
1
+test_variance_attr.nit:28,15--18: Redef warning: Expected nullable Object, as in A::_foo.
+test_variance_attr.nit:29,15--18: Redef warning: Expected nullable A, as in A::_bar.
AB1
AB1
1
i = nb
while i >= 0 do
- if (h[i*31+13] != i * 2) then
+ if h[i*31+13] != i * 2 then
print("{i}: {i*31+13} != {h[i]}")
end
i = i - 1
i = nb * 2
while i >= 0 do
- if (i % 3 != 0) then
+ if i % 3 != 0 then
h.values.remove(i)
end
i = i - 1
if h.has_key(j) then
print("{i}: {j} should be removed")
end
- else if (h[j] != i * 2) then
+ else if h[j] != i * 2 then
print("{i}: {j} != {h[i]}")
end
i = i - 1
fun get_nstr_from_str( str : String ) : NativeString is extern import String::to_cstring
- fun get_something() : String is extern import String::from_cstring
+ fun get_something : String is extern import String::from_cstring
end
var a = new A
print new String.from_cstring( a.get_nstr_from_str( "hello world!" ) )
-var something = a.get_something() # expects "something"
+var something = a.get_something # expects "something"
print something
print something.length
cp "$ff.cmp.err" "$ff.res"
process_result $ff
elif [ -x "./$ff.bin" ]; then
+ cp "$ff.cmp.err" "$ff.res"
echo -n ". "
# Execute
args=""
echo "NIT_NO_STACK=1 ./$ff.bin" $args
fi
if [ -f "$f.inputs" ]; then
- NIT_NO_STACK=1 "./$ff.bin" $args < "$f.inputs" > "$ff.res" 2>"$ff.err"
+ NIT_NO_STACK=1 "./$ff.bin" $args < "$f.inputs" >> "$ff.res" 2>"$ff.err"
else
- NIT_NO_STACK=1 "./$ff.bin" $args > "$ff.res" 2>"$ff.err"
+ NIT_NO_STACK=1 "./$ff.bin" $args >> "$ff.res" 2>"$ff.err"
fi
if [ "x$verbose" = "xtrue" ]; then
cat "$ff.res"