Skip to content

Commit 1b808fe

Browse files
Fix incorrect switch of None and Some cases
1 parent 80ab35c commit 1b808fe

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

shared/util/codeql/util/Option.qll

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -95,10 +95,10 @@ module OptionWithLocationInfo<TypeWithLocationInfo T> {
9595
}
9696

9797
/** The singleton `None` element. */
98-
class None extends Option instanceof O::Some { }
98+
class None extends Option instanceof O::None { }
9999

100100
/** A wrapper for the given type. */
101-
class Some extends Option instanceof O::None { }
101+
class Some extends Option instanceof O::Some { }
102102

103103
/** Gets the given element wrapped as an `Option`. */
104104
Some some(T c) { result.asSome() = c }
@@ -137,10 +137,10 @@ module LocatableOption<LocationSig Location, WithLocation<Location>::LocatableTy
137137
}
138138

139139
/** The singleton `None` element. */
140-
class None extends Option instanceof O::Some { }
140+
class None extends Option instanceof O::None { }
141141

142142
/** A wrapper for the given type. */
143-
class Some extends Option instanceof O::None { }
143+
class Some extends Option instanceof O::Some { }
144144

145145
/** Gets the given element wrapped as an `Option`. */
146146
Some some(T c) { result.asSome() = c }

0 commit comments

Comments
 (0)