Skip to content

Commit

Permalink
Fix for dip1000 (#69)
Browse files Browse the repository at this point in the history
* Add dip1000 build to workflow

* Fix for dip1000
  • Loading branch information
andrey-zherikov authored Aug 24, 2022
1 parent 9c96a14 commit 18c1598
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@ jobs:
- name: Run tests
run: dub test --build=unittest-cov

- name: Run tests (dip1000)
env:
DFLAGS: -dip1000
run: dub test --build=unittest-cov

- name: Build examples
run: dub --root examples build --parallel

Expand Down
2 changes: 1 addition & 1 deletion source/argparse/internal.d
Original file line number Diff line number Diff line change
Expand Up @@ -617,7 +617,7 @@ package alias ParsingArgument(alias symbol, alias uda, ArgumentInfo info, RECEIV
}
};

package auto ParsingSubCommandArgument(COMMAND_TYPE, CommandInfo info, RECEIVER, alias symbol, bool completionMode)(const CommandArguments!RECEIVER* parentArguments)
package auto ParsingSubCommandArgument(COMMAND_TYPE, CommandInfo info, RECEIVER, alias symbol, bool completionMode)(scope const CommandArguments!RECEIVER* parentArguments)
{
return delegate(Config* config, ref Parser parser, const ref Parser.Argument arg, bool isDefaultCmd, ref RECEIVER receiver)
{
Expand Down
2 changes: 1 addition & 1 deletion source/argparse/package.d
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,7 @@ auto PositionalArgument(uint pos, string name)

auto NamedArgument(string[] name...)
{
return ArgumentUDA!(ValueParseFunctions!(void, void, void, void, void, void))(ArgumentInfo(name)).Optional();
return ArgumentUDA!(ValueParseFunctions!(void, void, void, void, void, void))(ArgumentInfo(name.dup)).Optional();
}

auto NamedArgument(string name)
Expand Down

0 comments on commit 18c1598

Please sign in to comment.