Skip to content

Commit

Permalink
Unit test compile fix
Browse files Browse the repository at this point in the history
  • Loading branch information
s-ludwig committed Feb 14, 2024
1 parent fc67aa7 commit aeb0fcb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions web/vibe/web/common.d
Original file line number Diff line number Diff line change
Expand Up @@ -1256,11 +1256,11 @@ package void setVoid(T, U)(ref T dst, U value)
}

unittest {
static assert(!__traits(compiles, { bool[] barr; ParamError err;readFormParamRec(null, barr, "f", true, NestedNameStyle.d, err); }));
static assert(__traits(compiles, { bool[2] barr; ParamError err;readFormParamRec(null, barr, "f", true, NestedNameStyle.d, err); }));
static assert(!__traits(compiles, { bool[] barr; ParamError err;readFormParamRec(HTTPServerRequest.init, barr, "f", true, NestedNameStyle.d, err); }));
static assert(__traits(compiles, { bool[2] barr; ParamError err;readFormParamRec(HTTPServerRequest.init, barr, "f", true, NestedNameStyle.d, err); }));

enum Test: string { a = "AAA", b="BBB" }
static assert(__traits(compiles, { Test barr; ParamError err;readFormParamRec(null, barr, "f", true, NestedNameStyle.d, err); }));
static assert(__traits(compiles, { Test barr; ParamError err;readFormParamRec(HTTPServerRequest.init, barr, "f", true, NestedNameStyle.d, err); }));
}

private string getArrayFieldName(T)(NestedNameStyle style, string prefix, T index)
Expand Down

0 comments on commit aeb0fcb

Please sign in to comment.