checker: check println arg
							parent
							
								
									180b9b971a
								
							
						
					
					
						commit
						f699dcac94
					
				|  | @ -217,6 +217,7 @@ pub fn (c mut Checker) call_expr(call_expr mut ast.CallExpr) table.Type { | |||
| 	} | ||||
| 	// println can print anything
 | ||||
| 	if fn_name == 'println' { | ||||
| 		c.expr(call_expr.args[0]) | ||||
| 		return f.return_type | ||||
| 	} | ||||
| 	for i, arg_expr in call_expr.args { | ||||
|  |  | |||
|  | @ -484,6 +484,7 @@ fn (g mut Gen) expr(node ast.Expr) { | |||
| 				g.expr(it.left) | ||||
| 				g.write(', ') | ||||
| 				g.expr(it.right) | ||||
| 				g.write(')') | ||||
| 			} | ||||
| 			else { | ||||
| 				// if it.op == .dot {
 | ||||
|  |  | |||
|  | @ -89,7 +89,7 @@ i < 10; i++) { | |||
| 	bool b3 = get_bool() || true; | ||||
| 	int f = array_int_first(nums); | ||||
| 	string d = tos3("d"); | ||||
| 	println(string_add(s + d)); | ||||
| 	println(string_add(s, d)); | ||||
| } | ||||
| 
 | ||||
| void User_inc_age(User u, int n) { | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue