summaryrefslogtreecommitdiff
path: root/test/genericrec.myr
blob: 19a12cd2249cb9a8b0651ef880aba803f32bd6ea (plain)
1
2
3
4
5
6
7
8
9
10
11
12
use std
/* test that generic types can be recursive, as long as they're not self
 * including. This just needs to compile and exit with 0. */
type list(@t) = struct
	val	: @t
	next	: list(@t)#
;;

const main = {
	var v : list(int)
	-> 0
}