- 
                Notifications
    You must be signed in to change notification settings 
- Fork 3.5k
Assert scope is not match/guard when using escaped regexes #14780
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
Changes from 1 commit
2ac95e9
              c1dee89
              4012cd0
              0e671f4
              File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | 
|---|---|---|
|  | @@ -1018,6 +1018,7 @@ defmodule Regex do | |
| {:ok, exported} = :re.compile(regex.source, [:export] ++ regex.opts) | ||
|  | ||
| quote do | ||
| __assert_assert_no_match_or_guard_scope__("an escaped Regex") | ||
| :re.import(unquote(Macro.escape(exported))) | ||
|          | ||
| end | ||
|  | ||
|  | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think in this case some code duplication is fine. Let's just reimplement the error message directly in the Regex module, since that's what we would expect library authors to do too.