-
Notifications
You must be signed in to change notification settings - Fork 294
Open
Labels
bugSomething isn't workingSomething isn't workingcompiler:coreIssues for @typespec/compilerIssues for @typespec/compilerneeds-areatriaged:core
Milestone
Description
Follow up to #7899 which fixed most cases.
This similiar to what is blocking #7956 needs a redesign of how we check for circular refernce in alias so we detect that when hitting a model property we break the cycle.
What happens here is that in checkAlias
we wrongfully find a cycle but because its a template DefaultBaseParameters<T>
the error is not reported(so it wouldn't report duplicate errors) but the alias type is set to errorType
resulting in the spread being a noop.
Repro
model DefaultBaseParameters<T> {
...Alias;
}
model B {
prop: C;
}
model C {
...DefaultBaseParameters<{}>;
}
alias Alias = B;
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingcompiler:coreIssues for @typespec/compilerIssues for @typespec/compilerneeds-areatriaged:core