| 1 | var self = "aoeu"; |
| 2 | |
| 3 | fn f(m: []const u8) void { |
| 4 | m.copy(u8, self[0..], m); |
| 5 | } |
| 6 | |
| 7 | export fn entry() usize { |
| 8 | return @sizeOf(@TypeOf(&f)); |
| 9 | } |
| 10 | |
| 11 | pub export fn entry1() void { |
| 12 | .{}.bar(); |
| 13 | } |
| 14 | |
| 15 | const S = struct { foo: i32 }; |
| 16 | pub export fn entry2() void { |
| 17 | const x = S{ .foo = 1 }; |
| 18 | x.bar(); |
| 19 | } |
| 20 | |
| 21 | // error |
| 22 | // |
| 23 | // :4:6: error: no field or member function named 'copy' in '[]const u8' |
| 24 | // :12:8: error: no field or member function named 'bar' in '@TypeOf(.{})' |
| 25 | // :18:6: error: no field or member function named 'bar' in 'tmp.S' |
| 26 | // :15:11: note: struct declared here |