Error on self::class on non final classes
[hiphop-php.git] / hphp / hack / test / typecheck / printf.php
blobc9dba97d39cbcea29915e01ec3a5f5621a386ba7
1 <?hh // strict
2 /**
3 * Copyright (c) 2014, Facebook, Inc.
4 * All rights reserved.
6 * This source code is licensed under the MIT license found in the
7 * LICENSE file in the "hack" directory of this source tree.
12 interface FormatString<T> { }
14 interface Dummy {
15 public function format_0x25() : string;
16 public function format_0x2e() : Dummy;
17 public function format_f(float $s) : string;
18 public function format_s(string $s) : string;
21 function f(FormatString<Dummy> $fs, mixed ...$args) : void {
24 function _() {
25 f('%.....s %%', 'foo');
26 f('%f', 0.1);
27 f('%' . 's', 0.1);