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

You can't use interface as M : Diffable in intem module #49

Open
PiotrArent96 opened this issue Jul 26, 2023 · 1 comment
Open

You can't use interface as M : Diffable in intem module #49

PiotrArent96 opened this issue Jul 26, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@PiotrArent96
Copy link

PiotrArent96 commented Jul 26, 2023

Because of line 12 in com.idanatz.oneadapter.internal.utils in generic.kt you can't use ItemModule with interfaces as in

class MyModule() : ItemModule<SomeInterface>

SomeInterface being

interface SomeInterface { ... }

It causes crash.
It's because you are using
if (className.startWith("class ")) { }
And class name for interface starts with "interface "

You can use abstract class tho since its class name starts with "class " but it simply will do nothing since you can have object with class name of abstract class, and thats how library indentifies types

Also im certain that what you are implementing here is just
type.typeName

@idanatz idanatz added the bug Something isn't working label Aug 3, 2023
@idanatz
Copy link
Owner

idanatz commented Aug 3, 2023

Hey

Thanks for the report, il look into it and update.

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