Allow for implicit int conversion to larger type

This commit is contained in:
nub31
2025-09-08 22:09:25 +02:00
parent f332856dd7
commit 9c9578f526
4 changed files with 86 additions and 39 deletions

View File

@@ -1,37 +1,13 @@
// c
extern func puts(text: cstring)
interface Printable
{
func print()
func test()
}
struct Human : Printable
{
name: cstring
age: u32
func print()
{
puts(this.name)
}
func test()
{
puts("test")
}
}
func main(args: []cstring): i64
{
let x = struct Human {
name = "Oliver"
age = 23
}
x.print()
x.test()
let x: i32 = 23
test(x)
return 0
}
func test(test: u8)
{
}