Skip to content
This repository was archived by the owner on Feb 26, 2023. It is now read-only.
This repository was archived by the owner on Feb 26, 2023. It is now read-only.

Fails To Run With Generics #19

@craigmiller160

Description

@craigmiller160

Love the concept here, but I need it to work for a class with a generic type argument:

import com.thinkinglogic.builder.annotation.Builder

@Builder
data class CoreSearchResponse<T>(
        val results: List<T>,
        val totalAvailableRecords: Long
)

When I compile this, I get the following error:

[ERROR] [kapt] An exception occurred: java.lang.ClassCastException: com.sun.tools.javac.code.Symbol$TypeVariableSymbol cannot be cast to javax.lang.model.element.TypeElement

When I don't use a generic type, it works perfectly. This one compiles without issue:

import com.thinkinglogic.builder.annotation.Builder

@Builder
data class CoreSearchResponse(
        val results: List<String>,
        val totalAvailableRecords: Long
)

Not sure what can be done about this. Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions