checker: c2v fixes (#14161)
							parent
							
								
									b81f06e369
								
							
						
					
					
						commit
						cab53d0e75
					
				|  | @ -482,3 +482,6 @@ fn C.glTexImage2D() | |||
| 
 | ||||
| // used by ios for println
 | ||||
| fn C.WrappedNSLog(str &u8) | ||||
| 
 | ||||
| // absolute value
 | ||||
| fn C.abs(number int) int | ||||
|  |  | |||
|  | @ -19,6 +19,10 @@ pub fn (mut c Checker) check_types(got ast.Type, expected ast.Type) bool { | |||
| 		if expected == ast.voidptr_type { | ||||
| 			return true | ||||
| 		} | ||||
| 		if expected == ast.bool_type && (got.is_any_kind_of_pointer() || got.is_int()) { | ||||
| 			return true | ||||
| 		} | ||||
| 
 | ||||
| 		if expected.is_any_kind_of_pointer() { //&& !got.is_any_kind_of_pointer() {
 | ||||
| 			// Allow `int` as `&i8` etc in C code.
 | ||||
| 			deref := expected.deref() | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue