Skip to content

Commit

Permalink
Fix "cast" of query type so it works at compile time.
Browse files Browse the repository at this point in the history
  • Loading branch information
schveiguy committed Sep 5, 2023
1 parent d5cd5e6 commit 5edcccc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion source/sqlbuilder/dialect/common.d
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ auto select(Q, Cols...)(Q query, Cols columns) if (isQuery!Q)
static if(!is(typeList == Q.RowTypes))
{
alias QType = Query!(Q.ItemType, typeList);
return (() @trusted => *cast(QType *)&query)();
return QType(query.tupleof);
}
else
return query;
Expand Down

0 comments on commit 5edcccc

Please sign in to comment.