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

Issue with fun interface in kotlin 1.4 #781

Closed
Ezike opened this issue Jun 11, 2020 · 5 comments
Closed

Issue with fun interface in kotlin 1.4 #781

Ezike opened this issue Jun 11, 2020 · 5 comments

Comments

@Ezike
Copy link

Ezike commented Jun 11, 2020

@shashachu I'm getting this error because I'm using the functional interfaces from kotlin1.4-M2

29:8 Expecting function name or receiver type
com.pinterest.ktlint.core.ParseException: 29:8 Expecting function name or receiver type

This is the code

   fun interface OptionClickListener {
        fun onOptionSelected(item: PhoneTransferOpModel)
    }

Any chance support for kotlin 1.4 will come soon..
I'm using the spotless plugin with ktlint

@Tapchicoma
Copy link
Collaborator

Dup of #771

@JakeWharton
Copy link
Contributor

Dupe of #771

@Ezike
Copy link
Author

Ezike commented Jun 11, 2020

alright thanks @JakeWharton @Tapchicoma .. I'll just go back to good ol interfaces for now I guess. Any other suggestions?

@pravee1801
Copy link

I have a similiar fun interface Notifier {
fun notify(model: T?, action: Action)
} in my kotlin project and its completely fine, but I get mvn spotless error with this
Execution default-cli of goal com.diffplug.spotless:spotless-maven-plugin:2.4.1:apply failed: Expecting function name or receiver type
Does anybody have any solution for this?

@paul-dingemans
Copy link
Collaborator

What about updating yoyr spotless-maven-plugin? Current stable version is 2.43 (https://github.com/diffplug/spotless/releases/tag/maven%2F2.43.0). You are running almost 40 versions behind....

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