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

Metadata seems to be broken on arrow function arguments #7800

Closed
wartman opened this issue Feb 16, 2019 · 5 comments
Closed

Metadata seems to be broken on arrow function arguments #7800

wartman opened this issue Feb 16, 2019 · 5 comments
Assignees
Milestone

Comments

@wartman
Copy link

wartman commented Feb 16, 2019

Arrow functions seem to break if you use metadata on their first argument (in 4.0.0-rc.1).

// This works:
function foo(@bar bar:String) return bar;

// This also works:
var foo = (a:String, @bar b:String) -> a + b;

// This will result in an error along the lines of "Unexpected ;"
var foo = (@bar bar:String) -> bar; 
@ncannasse ncannasse added this to the Release 4.0 milestone Feb 16, 2019
@Simn
Copy link
Member

Simn commented Feb 17, 2019

The lambda parsing code gives me a headache. Can we remove short lambdas? :P

@RealyUniqueName
Copy link
Member

Submit a proposal )

@Simn Simn self-assigned this Feb 18, 2019
@Simn
Copy link
Member

Simn commented Mar 18, 2019

Honestly, can we simply document that metadata on short lambda function arguments isn't supported? This is a bit of a parsing nightmare and IMO also doesn't really suit the short notation to begin with.

@Gama11
Copy link
Member

Gama11 commented Mar 18, 2019

Shouldn't it at least not work consistently then? Right now it seems to work as long as it's not on the first argument.

@Simn
Copy link
Member

Simn commented Mar 18, 2019

Yes that's what I'm suggesting.

@Simn Simn closed this as completed in 97fbfe1 Apr 16, 2019
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

5 participants