1--TEST--
2Type inference test with final class
3--INI--
4opcache.enable=1
5opcache.enable_cli=1
6opcache.optimization_level=-1
7opcache.opt_debug_level=0x20000
8opcache.preload=
9zend_test.observer.enabled=0
10--EXTENSIONS--
11opcache
12--FILE--
13<?php
14
15final class Test {
16    public function getInt(): int {
17        return 42;
18    }
19    public function getInt2(): int {
20        return $this->getInt();
21    }
22}
23
24?>
25--EXPECTF--
26$_main:
27     ; (lines=1, args=0, vars=0, tmps=0)
28     ; (after optimizer)
29     ; %s
300000 RETURN int(1)
31
32Test::getInt:
33     ; (lines=1, args=0, vars=0, tmps=0)
34     ; (after optimizer)
35     ; %s
360000 RETURN int(42)
37
38Test::getInt2:
39     ; (lines=2, args=0, vars=0, tmps=1)
40     ; (after optimizer)
41     ; %s
420000 V0 = QM_ASSIGN int(42)
430001 RETURN V0
44