21 lines
512 B
Plaintext
21 lines
512 B
Plaintext
// Phase 1 (xx-via-Into mechanism): proves the new syntax parses + lowers
|
|
// without error. The parameterised protocol Into(Target: Type) and the
|
|
// matching `impl Into(Block) for Closure() -> void` declarations are
|
|
// registered but unused. Resolution (Phase 3) is what makes the impl
|
|
// reachable from `xx`.
|
|
|
|
#import "modules/std.sx";
|
|
|
|
MyTag :: struct { value: s64 = 0; }
|
|
|
|
impl Into(MyTag) for s64 {
|
|
convert :: (self: s64) -> MyTag {
|
|
.{ value = self };
|
|
}
|
|
}
|
|
|
|
main :: () -> s32 {
|
|
print("ok\n");
|
|
0;
|
|
}
|