Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shapes::idx examples are all not typechecked, some invalid #374

Open
fredemmott opened this issue Oct 2, 2016 · 2 comments
Open

Shapes::idx examples are all not typechecked, some invalid #374

fredemmott opened this issue Oct 2, 2016 · 2 comments

Comments

@fredemmott
Copy link
Contributor

Please complete the information below:

Where is the problem?

The entire example.

What is the problem?

The typechecker doesn't look at pseudomains, and all the code is in pseudomains; a lot of these examples are not legal Hack code.


Please don't change anything below this point.


  • Build ID: 2016-08-15T18:49:04+0000:e756f9162e96b867a06b2805e03056a63fc17931:2b940b7ef772640b5980b78c645f89cbd216d81f
  • Page requested: /hack/reference/class/HH.Shapes/idx/
  • Page requested at: Sun, 02 Oct 2016 03:47:00 +0000
  • Controller: APIMethodPageController
@fredemmott fredemmott changed the title Shapes examples are all not typechecked Shapes::idx examples are all not typechecked Oct 2, 2016
@fredemmott fredemmott changed the title Shapes::idx examples are all not typechecked Shapes::idx examples are all not typechecked, some invalid Oct 2, 2016
@fredemmott fredemmott reopened this Oct 7, 2016
@fredemmott
Copy link
Contributor Author

They're now in a pseudomain, but this is still invalid and should raise a type error:

+  // The key 'z' doesn't exist in $point so our explicit default 0 is returned
 -var_dump(Shapes::idx($point, 'z', 0));         +  var_dump(Shapes::idx($point, 'z', 0));

@fredemmott
Copy link
Contributor Author

Though I guess that's partially a dupe of #375, the change commit you made for this issue should cause test failures

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants