Skip to content
This repository has been archived by the owner on Aug 1, 2023. It is now read-only.

Typecheck with enable_strict_string_concat_interp #36

Merged
merged 2 commits into from
May 12, 2021
Merged

Typecheck with enable_strict_string_concat_interp #36

merged 2 commits into from
May 12, 2021

Conversation

lexidor
Copy link
Contributor

@lexidor lexidor commented Apr 27, 2021

Dependencies are not yet ready, so CI will fail.

Dependencies are not yet ready, so CI will fail.
// Indexing them with $actual->$int_one` is very weird, but okay.
// Indexing them with float, bool something that coerces, is a bug in your test.
// Let's fail loudly instead of silently depending on implicit casts.
invariant(
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change is a BC break.
->.$key was failing, since $key was not arraykey.
Instead of casting, I decided to fail loudly if a non-arraykey comes along.
Accessing properties with floats /works/ at runtime, but this must be a bug on the callers end.

@fredemmott fredemmott merged commit 2b83fa1 into hhvm:master May 12, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants