fn main() {
	a := match 1 {
		1 { 'aa' }
		else { 22 }
	}
	println(a)
}

// for test the returns both interface or non-interface
interface IAny {}

fn returns_both_interface_and_non_interface() {
	any := IAny('abc')
	variable := ''

	_ = match any {
		string { &any }
		else { variable }
	}

	_ = match any {
		string { any }
		else { &variable }
	}

	mut res := ''
	res = match any {
		string { &any }
		else { &variable }
	}
	println(res)
}

// for test the returns both sumtype or non-sumtype
type SAny = int | string

fn returns_both_sumtype_and_non_sumtype() {
	any := SAny('abc')
	variable := ''

	_ = match any {
		string { &any }
		else { variable }
	}

	_ = match any {
		string { any }
		else { &variable }
	}
}
