You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Marking the value as readonly will make example 1 work. And the reason has been explained in the corresponding fix PR here, which in brief is
...
We'd effectively have to check that there are no assignments to obj.data between the declaration of isString and the reference to isString in the if statement. This adds complexity and could be prohibitively expensive.
Bug Report
π Search Terms
π Version & Regression Information
β― Playground Link
Playground link with relevant code
π» Code
π Actual behavior
Only at
example1()
I'm getting this error:but the argument will never be
undefined
π Expected behavior
Is expected that both
example1()
andexample2()
functions compile, because, technically, they are the sameThe text was updated successfully, but these errors were encountered: