pub impl[U:ToAny] ToAny for (U) with to_any(self : (U)) → Any {
let (first) = self
Any::Array([first.to_any()])
}
///|
pub impl[U : ToAny, V : ToAny] ToAny for (U, V) with to_any(self : (U, V)) → Any {
let (first, second) = self
Any::Array([first.to_any(), second.to_any()])
}
2元可以编译通过, 一元的报错 Invalid type for “self”: must be a type constructor
https://docs.moonbitlang.com/en/latest/language/error_codes/E4053.html
按照这个文档, 应该一元tuple 也是 type constructor