예제 #1
0
    {
        return $this->e1;
    }
    /** @return T0 */
    public function failMismatch()
    {
        return 42;
    }
    /** @return T0 */
    public function failVoid()
    {
    }
    /** @return T0 */
    public function failAnotherGeneric()
    {
        return $this->e1;
    }
    /** @return T0 */
    public static function failStatic()
    {
        return 42;
    }
}
function f(string $p0, int $p1)
{
}
$tuple_a = new Tuple2(42, 'string');
f($tuple_a->e0, $tuple_a->e1);
f($tuple_a->getE0(), $tuple_a->getE1());
f($tuple_a->e1, $tuple_a->e0);
f($tuple_a->getE1(), $tuple_a->getE0());
예제 #2
0
파일: Tuple3.php 프로젝트: tpunt/phan
 /**
  * @param T0 $_0
  * The 0th element
  *
  * @param T1 $_1
  * The 1st element
  *
  * @param T2 $_2
  * The 2nd element
  */
 public function __construct($_0, $_1, $_2)
 {
     parent::__construct($_0, $_1);
     $this->_2 = $_2;
 }