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

Using / in a case/when #3965

Closed
manveru opened this issue Jan 31, 2017 · 1 comment
Closed

Using / in a case/when #3965

manveru opened this issue Jan 31, 2017 · 1 comment

Comments

@manveru
Copy link
Contributor

manveru commented Jan 31, 2017

This simple example fails to compile with Syntax error in :3: unexpected token: DELIMITER_START CLOSE.

case a
  when b
    1 / 1
end

Version: Crystal 0.20.5 (2017-01-27)
OS: NixOS

@dylandrop
Copy link
Contributor

https://github.com/crystal-lang/crystal/blob/master/src/compiler/crystal/syntax/parser.cr#L2314 and the related slash_is_regex! calls appear to be the offender. Seems like this might require somewhat of a larger change to the parse_case method.

@asterite asterite added this to the Next milestone Feb 1, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants