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

Allow line break before where keyword #31378

Open
felipenoris opened this issue Mar 17, 2019 · 2 comments
Open

Allow line break before where keyword #31378

felipenoris opened this issue Mar 17, 2019 · 2 comments
Labels
parser Language parsing and surface syntax

Comments

@felipenoris
Copy link
Contributor

Valid syntax:

function myfunc(x::T) where {T}
    x
end

Invalid syntax:

function myfunc2(x::T)
    where {T}
    x
end

Error message for invalid syntax

ERROR: LoadError: syntax: space before "{" not allowed in "where {"
@yuyichao
Copy link
Contributor

Valid syntax

function myfunc2(x::T)
    where{T}
    x
end

@StefanKarpinski
Copy link
Member

That’s funny. Would be nice to allow the where on the next line if possible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
parser Language parsing and surface syntax
Projects
None yet
Development

No branches or pull requests

4 participants