| 1 | pub const A = enum { |
| 2 | a1, |
| 3 | a2, |
| 4 | |
| 5 | pub fn x(comptime _: A) usize { |
| 6 | return 0; |
| 7 | } |
| 8 | |
| 9 | pub fn y(self: A) usize { |
| 10 | return self.x(); |
| 11 | } |
| 12 | }; |
| 13 | |
| 14 | pub fn main() void { |
| 15 | _ = A.y(.a1); |
| 16 | } |
| 17 | |
| 18 | // error |
| 19 | // |
| 20 | // :10:20: error: unable to resolve comptime value |
| 21 | // :10:20: note: argument to comptime parameter must be comptime-known |
| 22 | // :5:14: note: parameter declared comptime here |