aboutsummaryrefslogtreecommitdiff
path: root/test/behavior/bugs/3384.zig
blob: c45aae51800cdc6d59761d36e96a54844bd5c30f (plain)
1
2
3
4
5
6
7
8
9
10
11
const std = @import("std");
const expect = std.testing.expect;

test "resolve array slice using builtin" {
    try expect(@hasDecl(@This(), "std") == true);
    try expect(@hasDecl(@This(), "std"[0..0]) == false);
    try expect(@hasDecl(@This(), "std"[0..1]) == false);
    try expect(@hasDecl(@This(), "std"[0..2]) == false);
    try expect(@hasDecl(@This(), "std"[0..3]) == true);
    try expect(@hasDecl(@This(), "std"[0..]) == true);
}