Skip to content
This repository has been archived by the owner on Apr 13, 2023. It is now read-only.

syntax error with invocation of grouped expression of base expression #4562

Closed
CeylonMigrationBot opened this issue Oct 30, 2015 · 6 comments

Comments

@CeylonMigrationBot
Copy link

[@jvasileff] These are unusual, but should be allowed, right?

class A {
    shared new create() {}
    shared String foo() => "";

    Anything a1 = (create)(); // incorrect syntax: no viable alternative at token ';'
    Anything a2 = (foo)(); // incorrect syntax: no viable alternative at token ';'
}

[Migrated from ceylon/ceylon-spec#1456]
[Closed at 2015-10-31 02:29:54]

@CeylonMigrationBot
Copy link
Author

[@lucaswerkmeister] you’re missing a semicolon at the end of foo() => ""

@CeylonMigrationBot
Copy link
Author

[@jvasileff] Thanks @lucaswerkmeister , fixed.

@CeylonMigrationBot
Copy link
Author

[@lucaswerkmeister] oh, there’s still a syntax error… I thought that would fix it. Huh.

@CeylonMigrationBot
Copy link
Author

[@jvasileff] Hah, my example was full of errors. Just fixed s/bar/create.

@CeylonMigrationBot
Copy link
Author

[@gavinking] Is that better, @jvasileff?

@CeylonMigrationBot
Copy link
Author

[@jvasileff] @gavinking if it allows me to write (create)(), I'm sure my code will be much more legible going forward.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants