@@ -36,30 +36,30 @@ extension Property {
3636 self . init ( name: name, type: type, code: code)
3737 }
3838}
39- extension Property {
40- internal struct MissingFieldsError : OptionSet , Error , Sendable {
41- internal typealias RawValue = Int
42-
43- internal static let name = MissingFieldsError ( rawValue: 1 )
44- internal static let type = MissingFieldsError ( rawValue: 2 )
45- // static let code = MissingFieldsError(rawValue: 4)
46-
47- internal var rawValue : Int
48- }
49-
50- internal init ( name: String ? , type: String ? , code: [ String ] ) throws ( MissingFieldsError) {
51- var error : MissingFieldsError = [ ]
52- if name == nil {
53- error. insert ( . name)
54- }
55- if type == nil {
56- error. insert ( . type)
57- }
58- if !error. isEmpty {
59- throw error
60- } else {
61- assert ( name != nil && type != nil )
62- self . init ( name: name ?? " " , type: type ?? " " , code: code)
63- }
64- }
65- }
39+ // extension Property {
40+ // internal struct MissingFieldsError: OptionSet, Error, Sendable {
41+ // internal typealias RawValue = Int
42+ //
43+ // internal static let name = MissingFieldsError(rawValue: 1)
44+ // internal static let type = MissingFieldsError(rawValue: 2)
45+ // // static let code = MissingFieldsError(rawValue: 4)
46+ //
47+ // internal var rawValue: Int
48+ // }
49+ //
50+ // internal init(name: String?, type: String?, code: [String]) throws(MissingFieldsError) {
51+ // var error: MissingFieldsError = []
52+ // if name == nil {
53+ // error.insert(.name)
54+ // }
55+ // if type == nil {
56+ // error.insert(.type)
57+ // }
58+ // if !error.isEmpty {
59+ // throw error
60+ // } else {
61+ // assert(name != nil && type != nil)
62+ // self.init(name: name ?? "", type: type ?? "", code: code)
63+ // }
64+ // }
65+ // }
0 commit comments