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

Pattern matching a namespaced type #95

Open
yurivish opened this issue Aug 27, 2018 · 1 comment
Open

Pattern matching a namespaced type #95

yurivish opened this issue Aug 27, 2018 · 1 comment

Comments

@yurivish
Copy link

It seems the pattern-matching syntax gets confused by the . in the type:

julia> using MacroTools, Markdown

julia> @capture(md"_hello_", x_Markdown.MD)
false

julia> using Markdown: MD

julia> @capture(md"_hello_", x_MD)
true
@MikeInnes
Copy link
Member

I can see why this is confusing, but it's unavoidable; the x_Markdown is actually parsed as all one symbol and @capture parses it further.

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

No branches or pull requests

2 participants