Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
//DIAGNOSTIC_TEST:SIMPLE(diag=CHECK):

struct Box<T>
{
struct Nested<U> {}
}

// `Box<X>` is an ancestor of `Box<X>.Nested<X>`.
void triggerA<X>() where Box<X> == Box<X>.Nested<X>
{
}

void triggerB<X>() where Box<X>.Nested<X> == Box<X>
{
}

void useIt()
{
triggerA<int>();
/*CHECK:
^^^^^^^^ E38029
^^^^^^^^ type argument 'Box<int>.Nested<int>' does not conform to the required interface 'Box<int>'
*/
triggerB<int>();
/*CHECK:
^^^^^^^^ E38029
^^^^^^^^ type argument 'Box<int>.Nested<int>' does not conform to the required interface 'Box<int>'
*/
}
Loading