Skip to content

Commit bd038f2

Browse files
committed
Add IsValidImplementationFieldType updates
1 parent 8395fd5 commit bd038f2

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

spec/Section 3 -- Type System.md

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -953,16 +953,23 @@ IsValidImplementationFieldType(fieldType, implementedFieldType):
953953
1. If {fieldType} is a Non-Null type:
954954
1. Let {nullableType} be the unwrapped nullable type of {fieldType}.
955955
2. Let {implementedNullableType} be the unwrapped nullable type of
956-
{implementedFieldType} if it is a Non-Null type, otherwise let it be
957-
{implementedFieldType} directly.
956+
{implementedFieldType} if it is a Non-Null type or Semantic-Non-Null type,
957+
otherwise let it be {implementedFieldType} directly.
958958
3. Return {IsValidImplementationFieldType(nullableType,
959959
implementedNullableType)}.
960-
2. If {fieldType} is a List type and {implementedFieldType} is also a List type:
960+
2. If {fieldType} is a Semantic-Non-Null type:
961+
1. Let {nullableType} be the unwrapped nullable type of {fieldType}.
962+
2. Let {implementedNullableType} be the unwrapped nullable type of
963+
{implementedFieldType} if it is a Semantic-Non-Null type, otherwise let it
964+
be {implementedFieldType} directly.
965+
3. Return {IsValidImplementationFieldType(nullableType,
966+
implementedNullableType)}.
967+
3. If {fieldType} is a List type and {implementedFieldType} is also a List type:
961968
1. Let {itemType} be the unwrapped item type of {fieldType}.
962969
2. Let {implementedItemType} be the unwrapped item type of
963970
{implementedFieldType}.
964971
3. Return {IsValidImplementationFieldType(itemType, implementedItemType)}.
965-
3. Return {IsSubType(fieldType, implementedFieldType)}.
972+
4. Return {IsSubType(fieldType, implementedFieldType)}.
966973

967974
IsSubType(possibleSubType, superType):
968975

0 commit comments

Comments
 (0)