Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: 572929e37dbfbb1303f1388be2e7801422f886f4 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
--TEST--
Bug 443037 - Restricted word 'parent' can be used as class name (no error)
--FILE--
<?php
    class bool
    {
    }

    interface bool
    {
    }

    class float
    {
    }

    interface float
    {
    }

    class int
    {
    }

    interface int
    {
    }

    class string
    {
    }

    interface string
    {
    }

    class iterable
    {
    }

    interface iterable
    {
    }

    class object
    {
    }

    interface object
    {
    }

    class self
    {
    }

    interface self
    {
    }

    class parent
    {
    }

    interface parent
    {
    }

    class void
    {
    }

    interface void
    {
    }

    class null
    {
    }

    interface null
    {
    }

    class true
    {
    }

    interface true
    {
    }

    class false
    {
    }

    interface false
    {
    }
?>
--EXPECT--
[line=6, start=48, end=52] Cannot declare type bool because the name is already in use
[line=14, start=109, end=114] Cannot declare type float because the name is already in use
[line=22, start=169, end=172] Cannot declare type int because the name is already in use
[line=30, start=230, end=236] Cannot declare type string because the name is already in use
[line=38, start=296, end=304] Cannot declare type iterable because the name is already in use
[line=46, start=362, end=368] Cannot declare type object because the name is already in use
[line=50, start=392, end=396] Cannot use 'self' as class name as it is a reserved word
[line=54, start=424, end=428] Cannot declare type self because the name is already in use
[line=54, start=424, end=428] Cannot use 'self' as interface name as it is a reserved word
[line=58, start=452, end=458] Cannot use 'parent' as class name as it is a reserved word
[line=62, start=486, end=492] Cannot declare type parent because the name is already in use
[line=62, start=486, end=492] Cannot use 'parent' as interface name as it is a reserved word
[line=70, start=548, end=552] Cannot declare type void because the name is already in use
[line=78, start=608, end=612] Cannot declare type null because the name is already in use
[line=86, start=668, end=672] Cannot declare type true because the name is already in use
[line=94, start=729, end=734] Cannot declare type false because the name is already in use

Back to the top