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

[BUG] IllegalArgumentException when using custom refined type - 1.5.0-SNAPSHOT #825

Open
brezinajn opened this issue Jun 29, 2021 · 1 comment
Labels
bug Something isn't working

Comments

@brezinajn
Copy link

Describe the bug
When trying to define my own refined types I'm getting an Exception java.lang.IllegalArgumentException: object is not an instance of declaring class : PositiveInt2.Companion.invoke using 1.5.0-SNAPSHOT

To Reproduce
Steps to reproduce the behavior:
Minimal repro here
Should not be able to run.

Expected behavior
User defined refined types should work correctly

Screenshots
Not applicable

Environment (please complete the following information):

@brezinajn brezinajn added the bug Something isn't working label Jun 29, 2021
@ustitc
Copy link

ustitc commented Jul 2, 2021

Having another issue with the same sample during compile:

@JvmInline annotation is only applicable to value classes

What I have tried:

  • Launched same code in refined-types-compiler-plugin-demo module of arrow-meta-examples repository and got same error
  • Pasted it in refined-types-plugin tests and got same error
  • Disabled refined plugin and switched to a dependency and got successful compilation
  • Switched to data class and simple class and got successful compilation
  • Removed Refined from companion object and got successful compilation

Environment 

  • Kotlin version [eg. 1.5.0]: 1.5.0
  • Kotlin Intellij IDEA plugin version: 211-1.5.20-release-284-IJ7442.40
  • Intellij IDEA version: Build #IC-211.7442.40, built on June 1, 2021

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants