Two more tests

This commit is contained in:
David Peter 2025-12-10 16:55:27 +01:00
parent d500d7eda1
commit 1138855e04
1 changed files with 2 additions and 0 deletions

View File

@ -392,10 +392,12 @@ expects_type_p(P)
# Also OK if the explicit specialization lines up with the default, in either direction:
expects_type_p(P[str])
expects_type_p_of_str(P)
expects_type_p_of_str(P[str])
# Not OK if the specializations don't line up:
expects_type_p(P[int]) # error: [invalid-argument-type]
expects_type_p_of_int(P[str]) # error: [invalid-argument-type]
expects_type_p_of_int(P) # error: [invalid-argument-type]
expects_type_p_of_str(P[int]) # error: [invalid-argument-type]
```