File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -383,7 +383,7 @@ extension PropertyProtocol where Value == Bool {
383
383
/// - property: Property to be combined with `self`.
384
384
///
385
385
/// - returns: A property that contains the logial AND results.
386
- public func and( _ property: Property < Value > ) -> Property < Value > {
386
+ public func and< P : PropertyProtocol > ( _ property: P ) -> Property < Value > where P . Value == Value {
387
387
return self . lift ( SignalProducer . and) ( property)
388
388
}
389
389
@@ -394,7 +394,7 @@ extension PropertyProtocol where Value == Bool {
394
394
/// - property: Property to be combined with `self`.
395
395
///
396
396
/// - returns: A property that contains the logial OR results.
397
- public func or( _ property: Property < Value > ) -> Property < Value > {
397
+ public func or< P : PropertyProtocol > ( _ property: P ) -> Property < Value > where P . Value == Value {
398
398
return self . lift ( SignalProducer . or) ( property)
399
399
}
400
400
}
Original file line number Diff line number Diff line change @@ -1571,27 +1571,27 @@ class PropertySpec: QuickSpec {
1571
1571
describe ( " and attribute " ) {
1572
1572
it ( " should emit true when both properties contains the same value " ) {
1573
1573
let property1 = MutableProperty ( true )
1574
- let property2 = Property ( MutableProperty ( true ) )
1574
+ let property2 = MutableProperty ( true )
1575
1575
expect ( property1. and ( property2) . value) . to ( beTrue ( ) )
1576
1576
}
1577
1577
1578
1578
it ( " should emit false when both properties contains opposite values " ) {
1579
1579
let property1 = MutableProperty ( true )
1580
- let property2 = Property ( MutableProperty ( false ) )
1580
+ let property2 = MutableProperty ( false )
1581
1581
expect ( property1. and ( property2) . value) . to ( beFalse ( ) )
1582
1582
}
1583
1583
}
1584
1584
1585
1585
describe ( " or attribute " ) {
1586
1586
it ( " should emit true when at least one of the properties contains true " ) {
1587
1587
let property1 = MutableProperty ( true )
1588
- let property2 = Property ( MutableProperty ( false ) )
1588
+ let property2 = MutableProperty ( false )
1589
1589
expect ( property1. or ( property2) . value) . to ( beTrue ( ) )
1590
1590
}
1591
1591
1592
1592
it ( " should emit false when both properties contains false " ) {
1593
1593
let property1 = MutableProperty ( false )
1594
- let property2 = Property ( MutableProperty ( false ) )
1594
+ let property2 = MutableProperty ( false )
1595
1595
expect ( property1. or ( property2) . value) . to ( beFalse ( ) )
1596
1596
}
1597
1597
}
You can’t perform that action at this time.
0 commit comments