Skip to content

Commit 7d39d37

Browse files
Andrew Kennedyfacebook-github-bot
authored andcommitted
Add NoAutoLikes to HSL (1)
Summary: Many HSL functions can be given more precise types, avoiding the use of likes. Differential Revision: D47224101 fbshipit-source-id: 517a219ef2181f8c2a013d5feb113581cd39d844
1 parent 2ac08cc commit 7d39d37

File tree

5 files changed

+8
-6
lines changed

5 files changed

+8
-6
lines changed

hphp/hack/test/autocomplete/fake_arrow_dict.php.exp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ Dict\associate
109109
Dict\cast_clear_legacy_array_mark
110110
INSERT Dict\cast_clear_legacy_array_mark(
111111
INSERT )
112-
(function(KeyedTraversable<Tk, Tv> $x): ~dict<Tk, Tv>)
112+
(function(KeyedTraversable<Tk, Tv> $x): dict<Tk, Tv>)
113113
Dict\chunk
114114
INSERT Dict\chunk(
115115
INSERT , ${1:\$size})
@@ -329,7 +329,7 @@ Str\join
329329
Vec\cast_clear_legacy_array_mark
330330
INSERT Vec\cast_clear_legacy_array_mark(
331331
INSERT )
332-
(function(Traversable<T> $x): ~vec<T>)
332+
(function(Traversable<T> $x): vec<T>)
333333
Vec\chunk
334334
INSERT Vec\chunk(
335335
INSERT , ${1:\$size})

hphp/hack/test/autocomplete/fake_arrow_keyset.php.exp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ Dict\associate
109109
Dict\cast_clear_legacy_array_mark
110110
INSERT Dict\cast_clear_legacy_array_mark(
111111
INSERT )
112-
(function(KeyedTraversable<Tk, Tv> $x): ~dict<Tk, Tv>)
112+
(function(KeyedTraversable<Tk, Tv> $x): dict<Tk, Tv>)
113113
Dict\chunk
114114
INSERT Dict\chunk(
115115
INSERT , ${1:\$size})
@@ -329,7 +329,7 @@ Str\join
329329
Vec\cast_clear_legacy_array_mark
330330
INSERT Vec\cast_clear_legacy_array_mark(
331331
INSERT )
332-
(function(Traversable<T> $x): ~vec<T>)
332+
(function(Traversable<T> $x): vec<T>)
333333
Vec\chunk
334334
INSERT Vec\chunk(
335335
INSERT , ${1:\$size})

hphp/hack/test/autocomplete/fake_arrow_vec.php.exp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ Dict\associate
109109
Dict\cast_clear_legacy_array_mark
110110
INSERT Dict\cast_clear_legacy_array_mark(
111111
INSERT )
112-
(function(KeyedTraversable<Tk, Tv> $x): ~dict<Tk, Tv>)
112+
(function(KeyedTraversable<Tk, Tv> $x): dict<Tk, Tv>)
113113
Dict\chunk
114114
INSERT Dict\chunk(
115115
INSERT , ${1:\$size})
@@ -325,7 +325,7 @@ Str\join
325325
Vec\cast_clear_legacy_array_mark
326326
INSERT Vec\cast_clear_legacy_array_mark(
327327
INSERT )
328-
(function(Traversable<T> $x): ~vec<T>)
328+
(function(Traversable<T> $x): vec<T>)
329329
Vec\chunk
330330
INSERT Vec\chunk(
331331
INSERT , ${1:\$size})

hphp/hsl/src/dict/cast.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
* Casts the given traversable to a dict, resetting the legacy array mark
1515
* if applicable.
1616
*/
17+
<<__NoAutoLikes>>
1718
function cast_clear_legacy_array_mark<Tk as arraykey, Tv>(
1819
KeyedTraversable<Tk, Tv> $x,
1920
)[]: dict<Tk, Tv> {

hphp/hsl/src/vec/cast.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
* Casts the given traversable to a vec, resetting the legacy array mark
1515
* if applicable.
1616
*/
17+
<<__NoAutoLikes>>
1718
function cast_clear_legacy_array_mark<T>(
1819
Traversable<T> $x,
1920
)[]: vec<T> {

0 commit comments

Comments
 (0)