struct Struct {
	name string
	x    int
}

fn main() {
	unsafe {
		pb := &u8(0)
		ppb := &&u8(0)
		pppb := &&&u8(0)
		ppppb := &&&&u8(0)
		dump(voidptr(pb))
		dump(voidptr(ppb))
		dump(voidptr(pppb))
		dump(voidptr(ppppb))
		pc := &char(nil)
		ppc := &&char(nil)
		pppc := &&&char(nil)
		ppppc := &&&&char(nil)
		dump(voidptr(pc))
		dump(voidptr(ppc))
		dump(voidptr(pppc))
		dump(voidptr(ppppc))
		ps := &Struct(0)
		pps := &&Struct(0)
		ppps := &&&Struct(0)
		pppps := &&&&Struct(0)
		dump(voidptr(ps))
		dump(voidptr(pps))
		dump(voidptr(ppps))
		dump(voidptr(pppps))
	}
	ss := &Struct{
		name: 'abc'
		x:    123
	}
	dump(ss)
	pss := voidptr(ss)
	if &Struct(pss).name == 'abc' {
		println('ok')
	}
	if &Struct(pss).x == 123 {
		// &Struct cast and selecting .x
		println('ok')
	}
	if &&Struct(pss) != 0 {
		// &&Struct
		println('ok')
	}
}
