hhvm / user-documentation

Documentation for those that use HHVM and write Hack code.
http://docs.hhvm.com/
Other
129 stars 159 forks source link

Mistake in Documentation, Getting Started: Starting a Real Project, Adding Functions or Classes #1351

Open tnev opened 1 year ago

tnev commented 1 year ago

Please complete the information below:

Where is the problem?

Documentation, Getting Started: Starting a Real Project, Adding Functions or Classes section, code example

What is the problem?

The code example is

use namespace HH\Lib\Vec;

function square_vec(vec<num> $numbers): vec<num> {
  return Vec\map($numbers, $number ==> $number * $number);
}

It then notes "If you then run hh_client, it will tell you of a mistake... To fix this, change the return type of the function from vec to vec."

However the return type is already num in the example.


Please don't change anything below this point.