Skip to content

[Bug]: Incompatible-versioned-reference false positive when using template #7678

Open
@AlitzelMendez

Description

@AlitzelMendez

Describe the bug

When a templated model contains a property where both the property and underlying type are @added in the same version , TypeSpec currently triggers the following error:

'Contoso.WidgetManager.Widget<T>.usage' is referencing versioned type 'Contoso.WidgetManager.UsageDetails' but is not versioned itself.

This only happens if the model is templated model Widget<T> if this is updated to model Widget the error doesn't happen

Reproduction

Plyaground repro

Checklist

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions