Skip to content

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

@PiotrArent96

Description

@PiotrArent96

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions