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

Error for upcoming deprecation -> error for contracts that may throw #603

Closed
thewilsonator opened this issue Aug 21, 2024 · 0 comments · Fixed by #604
Closed

Error for upcoming deprecation -> error for contracts that may throw #603

thewilsonator opened this issue Aug 21, 2024 · 0 comments · Fixed by #604

Comments

@thewilsonator
Copy link
Contributor

See dlang/dmd#16801

src/dfmt/globmatch_editorconfig.d(14,6): Error: `dfmt.globmatch_editorconfig.globMatchEditorConfig!(CaseSensitive.yes, wchar, ByCodeUnitImpl).globMatchEditorConfig`: `in` contract may throw but function is marked as `nothrow`
src/dfmt/globmatch_editorconfig.d(40,40): Error: template instance `dfmt.globmatch_editorconfig.globMatchEditorConfig!(CaseSensitive.yes, wchar, ByCodeUnitImpl)` error instantiating
src/dfmt/globmatch_editorconfig.d(187,33):        instantiated from here: `globMatchEditorConfig!(CaseSensitive.yes, wchar, wstring)`
src/dfmt/globmatch_editorconfig.d(14,6): Error: `dfmt.globmatch_editorconfig.globMatchEditorConfig!(CaseSensitive.yes, wchar, wstring).globMatchEditorConfig`: `in` contract may throw but function is marked as `nothrow`

code :

bool globMatchEditorConfig(CaseSensitive cs = CaseSensitive.osDefault, C, Range)(
        Range path, const(C)[] pattern) @safe pure nothrow
        if (isForwardRange!Range && isSomeChar!(ElementEncodingType!Range)
            && isSomeChar!C && is(Unqual!C == Unqual!(ElementEncodingType!Range)))
in
{
    // Verify that pattern[] is valid
    import std.algorithm : balancedParens;

    assert(balancedParens(pattern, '[', ']', 0));
    assert(balancedParens(pattern, '{', '}', 0));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant