Skip to content

the typeOf method be confused by Class generics  #1426

Open
@oooplz

Description

Describe the bug

typeOf method has totally different result when a class has generics

To Reproduce

annotation class Anno

@Anno
class Foo

@Anno
class Bar<T>

println(typeOf<Foo>().asTypeName().toString()) // Foo  ps. Expected
println(typeOf<Bar<*>>().asTypeName().toString()) // @Anno Bar<*>  ps. Unexpected

Expected behavior

annotation class Anno

@Anno
class Foo

@Anno
class Bar<T>

println(typeOf<Foo>().asTypeName().toString()) // Foo
println(typeOf<Bar<*>>().asTypeName().toString()) // Bar

Additional context
Add any other context about the problem here.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions