Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

std.format: Fix compilation with no autodecode #7138

Merged
merged 3 commits into from
Aug 18, 2019

Conversation

CyberShadow
Copy link
Member

@CyberShadow CyberShadow commented Aug 15, 2019

The entire instantiated template hierarchy there actually can't compile or work with a narrow char type, because at some point it wants to decode an escape, which will fit only in a dchar anyway.

For #7130

@dlang-bot
Copy link
Contributor

Thanks for your pull request, @CyberShadow!

Bugzilla references

Your PR doesn't reference any Bugzilla issue.

If your PR contains non-trivial changes, please reference a Bugzilla issue or create a manual changelog.

Testing this PR locally

If you don't have a local development environment setup, you can use Digger to test this PR:

dub fetch digger
dub run digger -- build "master + phobos#7138"

@CyberShadow
Copy link
Member Author

There's more instances of these; need to look at how to fix this with the least changes.

Narrower char types cannot fit the result of parsing an escaped
character.
Parsing as the string element type (char, in non-autodecode mode) does
not allow fitting the result of parsing escapes. Those always need to
be parsed into a dchar.
@CyberShadow
Copy link
Member Author

There is a runtime unittest failure remaining in std.format, but the lead goes into std.uni, so I suspect it's the same problem as with std.regex / std.net.curl.

@WalterBright WalterBright added the no autodecode Make Phobos work without autodecoding label Aug 15, 2019
@WalterBright WalterBright merged commit 76c31ff into dlang:master Aug 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no autodecode Make Phobos work without autodecoding
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants