cgen: fix tests
							parent
							
								
									e457bedaa7
								
							
						
					
					
						commit
						b2f05e56b8
					
				|  | @ -19,7 +19,7 @@ pub fn parse(s string) ?Time { | |||
| 	minute := hms[1] | ||||
| 	second := hms[2] | ||||
| 
 | ||||
| 	return new_time(Time{ | ||||
| 	res := new_time(Time{ | ||||
| 		year: ymd[0].int() | ||||
| 		month: ymd[1].int() | ||||
| 		day: ymd[2].int() | ||||
|  | @ -27,6 +27,7 @@ pub fn parse(s string) ?Time { | |||
| 		minute: minute.int() | ||||
| 		second: second.int() | ||||
| 	}) | ||||
| 	return res | ||||
| } | ||||
| 
 | ||||
| // parse_rfc2822 returns time from a date string in RFC 2822 datetime format.
 | ||||
|  |  | |||
|  | @ -102,7 +102,7 @@ i < 10; i++) { | |||
| 	bool b2 = (*(bool*)array_get(bools, 0)) || true; | ||||
| 	bool b3 = get_bool() || true; | ||||
| 	int f = array_first(nums); | ||||
| 	array_int c = array_clone(nums); | ||||
| 	array_int c = array_clone(&nums); | ||||
| 	string d = tos3("d"); | ||||
| 	println(string_add(s, d)); | ||||
| } | ||||
|  |  | |||
|  | @ -12,6 +12,17 @@ fn get_opt() ?int { | |||
| 	return 0 | ||||
| } | ||||
| 
 | ||||
| /* | ||||
| fn new_user() User { | ||||
| 	return User{} | ||||
| } | ||||
| 
 | ||||
| fn get_user_opt() ?User { | ||||
| 	return new_user() | ||||
| 	//return User{age:20, name:'Peter'}
 | ||||
| } | ||||
| */ | ||||
| 
 | ||||
| fn (u &User) foo() { | ||||
| 	age := u.age | ||||
| 	zzz := [''].repeat(u.age) | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue