diff options
Diffstat (limited to '')
| -rw-r--r-- | vtab.zig | 22 |
1 files changed, 11 insertions, 11 deletions
| @@ -322,7 +322,7 @@ fn validateCursorType(comptime Table: type) void { | |||
| 322 | @compileError("the Cursor type must have an init function, " ++ error_message); | 322 | @compileError("the Cursor type must have an init function, " ++ error_message); |
| 323 | } | 323 | } |
| 324 | 324 | ||
| 325 | const info = @typeInfo(@TypeOf(Cursor.init)).Fn; | 325 | const info = @typeInfo(@TypeOf(Cursor.init)).@"fn"; |
| 326 | 326 | ||
| 327 | if (info.params.len != 2) @compileError(error_message); | 327 | if (info.params.len != 2) @compileError(error_message); |
| 328 | if (info.params[0].type.? != mem.Allocator) @compileError(error_message); | 328 | if (info.params[0].type.? != mem.Allocator) @compileError(error_message); |
| @@ -340,7 +340,7 @@ fn validateCursorType(comptime Table: type) void { | |||
| 340 | @compileError("the Cursor type must have a deinit function, " ++ error_message); | 340 | @compileError("the Cursor type must have a deinit function, " ++ error_message); |
| 341 | } | 341 | } |
| 342 | 342 | ||
| 343 | const info = @typeInfo(@TypeOf(Cursor.deinit)).Fn; | 343 | const info = @typeInfo(@TypeOf(Cursor.deinit)).@"fn"; |
| 344 | 344 | ||
| 345 | if (info.params.len != 1) @compileError(error_message); | 345 | if (info.params.len != 1) @compileError(error_message); |
| 346 | if (info.params[0].type.? != *Cursor) @compileError(error_message); | 346 | if (info.params[0].type.? != *Cursor) @compileError(error_message); |
| @@ -361,7 +361,7 @@ fn validateCursorType(comptime Table: type) void { | |||
| 361 | @compileError("the Cursor type must have a next function, " ++ error_message); | 361 | @compileError("the Cursor type must have a next function, " ++ error_message); |
| 362 | } | 362 | } |
| 363 | 363 | ||
| 364 | const info = @typeInfo(@TypeOf(Cursor.next)).Fn; | 364 | const info = @typeInfo(@TypeOf(Cursor.next)).@"fn"; |
| 365 | 365 | ||
| 366 | if (info.params.len != 2) @compileError(error_message); | 366 | if (info.params.len != 2) @compileError(error_message); |
| 367 | if (info.params[0].type.? != *Cursor) @compileError(error_message); | 367 | if (info.params[0].type.? != *Cursor) @compileError(error_message); |
| @@ -383,7 +383,7 @@ fn validateCursorType(comptime Table: type) void { | |||
| 383 | @compileError("the Cursor type must have a hasNext function, " ++ error_message); | 383 | @compileError("the Cursor type must have a hasNext function, " ++ error_message); |
| 384 | } | 384 | } |
| 385 | 385 | ||
| 386 | const info = @typeInfo(@TypeOf(Cursor.hasNext)).Fn; | 386 | const info = @typeInfo(@TypeOf(Cursor.hasNext)).@"fn"; |
| 387 | 387 | ||
| 388 | if (info.params.len != 2) @compileError(error_message); | 388 | if (info.params.len != 2) @compileError(error_message); |
| 389 | if (info.params[0].type.? != *Cursor) @compileError(error_message); | 389 | if (info.params[0].type.? != *Cursor) @compileError(error_message); |
| @@ -405,7 +405,7 @@ fn validateCursorType(comptime Table: type) void { | |||
| 405 | @compileError("the Cursor type must have a filter function, " ++ error_message); | 405 | @compileError("the Cursor type must have a filter function, " ++ error_message); |
| 406 | } | 406 | } |
| 407 | 407 | ||
| 408 | const info = @typeInfo(@TypeOf(Cursor.filter)).Fn; | 408 | const info = @typeInfo(@TypeOf(Cursor.filter)).@"fn"; |
| 409 | 409 | ||
| 410 | if (info.params.len != 4) @compileError(error_message); | 410 | if (info.params.len != 4) @compileError(error_message); |
| 411 | if (info.params[0].type.? != *Cursor) @compileError(error_message); | 411 | if (info.params[0].type.? != *Cursor) @compileError(error_message); |
| @@ -432,7 +432,7 @@ fn validateCursorType(comptime Table: type) void { | |||
| 432 | @compileError("the Cursor type must have a column function, " ++ error_message); | 432 | @compileError("the Cursor type must have a column function, " ++ error_message); |
| 433 | } | 433 | } |
| 434 | 434 | ||
| 435 | const info = @typeInfo(@TypeOf(Cursor.column)).Fn; | 435 | const info = @typeInfo(@TypeOf(Cursor.column)).@"fn"; |
| 436 | 436 | ||
| 437 | if (info.params.len != 3) @compileError(error_message); | 437 | if (info.params.len != 3) @compileError(error_message); |
| 438 | if (info.params[0].type.? != *Cursor) @compileError(error_message); | 438 | if (info.params[0].type.? != *Cursor) @compileError(error_message); |
| @@ -455,7 +455,7 @@ fn validateCursorType(comptime Table: type) void { | |||
| 455 | @compileError("the Cursor type must have a rowId function, " ++ error_message); | 455 | @compileError("the Cursor type must have a rowId function, " ++ error_message); |
| 456 | } | 456 | } |
| 457 | 457 | ||
| 458 | const info = @typeInfo(@TypeOf(Cursor.rowId)).Fn; | 458 | const info = @typeInfo(@TypeOf(Cursor.rowId)).@"fn"; |
| 459 | 459 | ||
| 460 | if (info.params.len != 2) @compileError(error_message); | 460 | if (info.params.len != 2) @compileError(error_message); |
| 461 | if (info.params[0].type.? != *Cursor) @compileError(error_message); | 461 | if (info.params[0].type.? != *Cursor) @compileError(error_message); |
| @@ -480,7 +480,7 @@ fn validateTableType(comptime Table: type) void { | |||
| 480 | @compileError("the Table type must have a init function, " ++ error_message); | 480 | @compileError("the Table type must have a init function, " ++ error_message); |
| 481 | } | 481 | } |
| 482 | 482 | ||
| 483 | const info = @typeInfo(@TypeOf(Table.init)).Fn; | 483 | const info = @typeInfo(@TypeOf(Table.init)).@"fn"; |
| 484 | 484 | ||
| 485 | if (info.params.len != 3) @compileError(error_message); | 485 | if (info.params.len != 3) @compileError(error_message); |
| 486 | if (info.params[0].type.? != mem.Allocator) @compileError(error_message); | 486 | if (info.params[0].type.? != mem.Allocator) @compileError(error_message); |
| @@ -500,7 +500,7 @@ fn validateTableType(comptime Table: type) void { | |||
| 500 | @compileError("the Table type must have a deinit function, " ++ error_message); | 500 | @compileError("the Table type must have a deinit function, " ++ error_message); |
| 501 | } | 501 | } |
| 502 | 502 | ||
| 503 | const info = @typeInfo(@TypeOf(Table.deinit)).Fn; | 503 | const info = @typeInfo(@TypeOf(Table.deinit)).@"fn"; |
| 504 | 504 | ||
| 505 | if (info.params.len != 2) @compileError(error_message); | 505 | if (info.params.len != 2) @compileError(error_message); |
| 506 | if (info.params[0].type.? != *Table) @compileError(error_message); | 506 | if (info.params[0].type.? != *Table) @compileError(error_message); |
| @@ -522,7 +522,7 @@ fn validateTableType(comptime Table: type) void { | |||
| 522 | @compileError("the Table type must have a buildBestIndex function, " ++ error_message); | 522 | @compileError("the Table type must have a buildBestIndex function, " ++ error_message); |
| 523 | } | 523 | } |
| 524 | 524 | ||
| 525 | const info = @typeInfo(@TypeOf(Table.buildBestIndex)).Fn; | 525 | const info = @typeInfo(@TypeOf(Table.buildBestIndex)).@"fn"; |
| 526 | 526 | ||
| 527 | if (info.params.len != 3) @compileError(error_message); | 527 | if (info.params.len != 3) @compileError(error_message); |
| 528 | if (info.params[0].type.? != *Table) @compileError(error_message); | 528 | if (info.params[0].type.? != *Table) @compileError(error_message); |
| @@ -929,7 +929,7 @@ pub fn VirtualTable( | |||
| 929 | // TODO(vincent): does it make sense to put this in setResult ? Functions could also return a union. | 929 | // TODO(vincent): does it make sense to put this in setResult ? Functions could also return a union. |
| 930 | const ColumnType = @TypeOf(column); | 930 | const ColumnType = @TypeOf(column); |
| 931 | switch (@typeInfo(ColumnType)) { | 931 | switch (@typeInfo(ColumnType)) { |
| 932 | .Union => |info| { | 932 | .@"union" => |info| { |
| 933 | if (info.tag_type) |UnionTagType| { | 933 | if (info.tag_type) |UnionTagType| { |
| 934 | inline for (info.fields) |u_field| { | 934 | inline for (info.fields) |u_field| { |
| 935 | 935 | ||