From 23e12c45397ae14a77258ddc3398342c756256b2 Mon Sep 17 00:00:00 2001 From: John Estropia Date: Fri, 9 Jun 2017 11:29:51 +0900 Subject: [PATCH] add constraints to Value.Optional and Value.Required native types --- Sources/Value.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Sources/Value.swift b/Sources/Value.swift index f2940fe..97fd6b2 100644 --- a/Sources/Value.swift +++ b/Sources/Value.swift @@ -86,7 +86,7 @@ public enum ValueContainer { ``` - Important: `Value.Required` properties are required to be stored properties. Computed properties will be ignored, including `lazy` and `weak` properties. */ - public final class Required: AttributeProtocol { + public final class Required: AttributeProtocol where V.QueryableNativeType: CoreDataNativeType { /** Initializes the metadata for the property. @@ -231,7 +231,7 @@ public enum ValueContainer { ``` - Important: `Value.Optional` properties are required to be stored properties. Computed properties will be ignored, including `lazy` and `weak` properties. */ - public final class Optional: AttributeProtocol { + public final class Optional: AttributeProtocol where V.QueryableNativeType: CoreDataNativeType { /** Initializes the metadata for the property.