variant Test { | Node { p :int; } public CustomPattern (p: int) : Test { Node(p) } pattern CustomPattern (p : int) = CustomPattern (p); }