File tree Expand file tree Collapse file tree 2 files changed +3
-1
lines changed Expand file tree Collapse file tree 2 files changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -82,7 +82,7 @@ export function stringHashCode(str: string): number {
82
82
* if possible, degrades to === if not available, and is also null-safe.
83
83
*/
84
84
export function areEqual ( obj : any | null , obj2 : any | null ) : boolean {
85
- if ( obj === null != obj2 === null ) {
85
+ if ( ( obj === null ) != ( obj2 === null ) ) {
86
86
return false ;
87
87
}
88
88
if ( obj === null || obj2 === null ) {
Original file line number Diff line number Diff line change @@ -17,6 +17,8 @@ describe("option comparison", () => {
17
17
assert . ok ( Option . of ( 5 ) . equals ( Option . of ( 5 ) ) ) )
18
18
it ( "should mark different options as not equal" , ( ) =>
19
19
assert . ok ( ! Option . of ( 5 ) . equals ( Option . of ( 6 ) ) ) )
20
+ it ( "should mark different options as not equal" , ( ) =>
21
+ assert . ok ( ! Option . of < any > ( Vector . of ( 12 , 2674 ) ) . equals ( Option . of < any > ( null ) ) ) )
20
22
it ( "should mark none as equals to none" , ( ) =>
21
23
assert . ok ( Option . none < string > ( ) . equals ( Option . none < string > ( ) ) ) ) ;
22
24
it ( "should mark none and some as not equal" , ( ) =>
You can’t perform that action at this time.
0 commit comments