Skip to content

Conversation

hikari-no-yume
Copy link
Contributor


function foobar(void $a) {}
--EXPECTF--
Fatal error: void cannot be used as a parameter type in %s on line %d
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not sure if this test should be included, since a reasonable implementation might consider this a syntax error.

(Also, should we really be testing error messages anyway? They're not in the spec. :/)

Copy link
Contributor

Choose a reason for hiding this comment

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

Well, not really, we could rewrite the tests to only check if there's exception now. If anybody has the time ;)

@php-pulls php-pulls merged commit ad1a8bd into php:master Feb 18, 2016
@@ -269,7 +269,7 @@ Unless stated otherwise ([functions](13-functions.md#function-definitions),

Names beginning with two underscores (__) are reserved by the PHP language and should not be defined by the user code.

The following names cannot be used as the names of classes, interfaces, or traits: `bool`, `FALSE`, `float`, `int`, `NULL`, `string`, and `TRUE`.
The following names cannot be used as the names of classes, interfaces, or traits: `bool`, `FALSE`, `float`, `int`, `NULL`, `string`, `TRUE` and `void`.

Choose a reason for hiding this comment

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

The Oxford comma went missing here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh, yeah, my bad. Luckily it doesn't make a difference here, though.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@GrahamCampbell I've fixed it: 1935a4b

Choose a reason for hiding this comment

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

I already sent a PR though: #151.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oops, sorry. I guess it'll have to be closed now D:

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

Successfully merging this pull request may close these issues.

4 participants