Skip to content

Processor fails with 'Unexpected type mirror: ?' on wildcard type arguments #435

Closed

Description

@igel-devin-ai

The processor fails on any setter or constructor parameter whose type has a wildcard argument, e.g. setCodeArguments(List<MethodCodePlaceholder<?>> codeArguments):

warning: simple-builders: Failed to generate target - Unexpected type mirror: ?

The whole target is dropped. JavaLangMapper.extractType() has no WildcardType case, so defaultAction() throws. The codegen model has no wildcard type either, so Roaster cannot render one.

Found while generating the codegen DTO builders (#415 / #429): CodeTemplateDto, MethodCodeDto and JavadocCodeBlockDto could not get builders once they had collection setters.

Expected: ?, ? extends X and ? super X are mapped, and the exact type shows in the generated setter/supplier/consumer signatures (e.g. List<Foo<?>>, List<? extends Number>).

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

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