shithub: mc

ref: 94b6dcc7253e53f6a50396f11aa62b94d3e95d2b
dir: /test/compoundimpl.myr/

View raw version
use std

trait frobable @a =
	frob	: (val : @a -> void)
;;

impl frobable int# =
	frob = {val
		std.put("intptr,")
	}
;;

impl frobable char# =
	frob = {val
		std.put("charptr\n")
	}
;;

generic foo = {x : @a::frobable
	frob(x)
}

const main = {
	var a = 123
	var b = 'c'
	foo(&a)
	foo(&b)
}