Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry BLIND2019-04-30 04:25:05 -0400
committerThierry BLIND2019-04-30 04:25:05 -0400
commitb6bb0e936695d124d7b2795387c5a84f35465031 (patch)
tree3f068767c6ab4195d13e13e5b6952fbbb9d47e43
parent10c03cbd9ba6b03d9b777611617980fe8ec8ec9b (diff)
downloadorg.eclipse.pdt-b6bb0e936695d124d7b2795387c5a84f35465031.tar.gz
org.eclipse.pdt-b6bb0e936695d124d7b2795387c5a84f35465031.tar.xz
org.eclipse.pdt-b6bb0e936695d124d7b2795387c5a84f35465031.zip
Bug 443037 - Restricted word 'parent' can be used as class name (no
error) Change-Id: Ide2c27a790430a4f507b1645ba4025e375504451 Signed-off-by: Thierry BLIND <thierryblind@msn.com>
-rw-r--r--plugins/org.eclipse.php.core/src/org/eclipse/php/internal/core/codeassist/strategies/FunctionParameterKeywordTypeStrategy.java2
-rw-r--r--plugins/org.eclipse.php.core/src/org/eclipse/php/internal/core/codeassist/strategies/FunctionReturnTypeStrategy.java2
-rw-r--r--plugins/org.eclipse.php.core/src/org/eclipse/php/internal/core/codeassist/strategies/SimpleProposal.java28
-rw-r--r--plugins/org.eclipse.php.core/src/org/eclipse/php/internal/core/compiler/ast/parser/Messages.java1
-rw-r--r--plugins/org.eclipse.php.core/src/org/eclipse/php/internal/core/compiler/ast/parser/PHPProblemIdentifier.java4
-rw-r--r--plugins/org.eclipse.php.core/src/org/eclipse/php/internal/core/compiler/ast/parser/messages.properties3
-rw-r--r--plugins/org.eclipse.php.core/src/org/eclipse/php/internal/core/compiler/ast/visitor/ValidatorVisitor.java51
-rw-r--r--tests/org.eclipse.php.core.tests/src/org/eclipse/php/core/tests/errors/PHP53ErrorReportingTests.java4
-rw-r--r--tests/org.eclipse.php.core.tests/src/org/eclipse/php/core/tests/errors/PHP54ErrorReportingTests.java4
-rw-r--r--tests/org.eclipse.php.core.tests/src/org/eclipse/php/core/tests/errors/PHP55ErrorReportingTests.java5
-rw-r--r--tests/org.eclipse.php.core.tests/src/org/eclipse/php/core/tests/errors/PHP56ErrorReportingTests.java5
-rw-r--r--tests/org.eclipse.php.core.tests/src/org/eclipse/php/core/tests/errors/PHP5ErrorReportingTests.java4
-rw-r--r--tests/org.eclipse.php.core.tests/src/org/eclipse/php/core/tests/errors/PHP71ErrorReportingTests.java5
-rw-r--r--tests/org.eclipse.php.core.tests/src/org/eclipse/php/core/tests/errors/PHP7ErrorReportingTests.java4
-rw-r--r--tests/org.eclipse.php.core.tests/workspace/errors/php5/keywordsExclusive/cannotUseReservedWords1.pdtt117
-rw-r--r--tests/org.eclipse.php.core.tests/workspace/errors/php53/keywordsExclusive/cannotUseReservedWords1.pdtt215
-rw-r--r--tests/org.eclipse.php.core.tests/workspace/errors/php54/keywordsExclusive/cannotUseReservedWords1.pdtt277
-rw-r--r--tests/org.eclipse.php.core.tests/workspace/errors/php55/keywordsExclusive/cannotUseReservedWords1.pdtt277
-rw-r--r--tests/org.eclipse.php.core.tests/workspace/errors/php56/keywordsExclusive/cannotUseReservedWords1.pdtt277
-rw-r--r--tests/org.eclipse.php.core.tests/workspace/errors/php7/keywordsExclusive/cannotUseReservedWords1.pdtt305
-rw-r--r--tests/org.eclipse.php.core.tests/workspace/errors/php71/keywordsExclusive/cannotUseReservedWords1.pdtt313
-rw-r--r--tests/org.eclipse.php.core.tests/workspace/errors/php72/cannotUseReservedWords1.pdtt317
22 files changed, 2195 insertions, 25 deletions
diff --git a/plugins/org.eclipse.php.core/src/org/eclipse/php/internal/core/codeassist/strategies/FunctionParameterKeywordTypeStrategy.java b/plugins/org.eclipse.php.core/src/org/eclipse/php/internal/core/codeassist/strategies/FunctionParameterKeywordTypeStrategy.java
index 503f592cc..2aed01d9c 100644
--- a/plugins/org.eclipse.php.core/src/org/eclipse/php/internal/core/codeassist/strategies/FunctionParameterKeywordTypeStrategy.java
+++ b/plugins/org.eclipse.php.core/src/org/eclipse/php/internal/core/codeassist/strategies/FunctionParameterKeywordTypeStrategy.java
@@ -76,7 +76,7 @@ public class FunctionParameterKeywordTypeStrategy extends KeywordsStrategy {
PHPVersion phpVersion = context.getPHPVersion();
for (SimpleProposal proposal : SimpleProposal.BASIC_TYPES) {
- if (proposal.isValid(prefix, phpVersion)) {
+ if (proposal.isValidPrefix(prefix, phpVersion)) {
reporter.reportKeyword(proposal.getProposal(), suffix, replaceRange);
}
}
diff --git a/plugins/org.eclipse.php.core/src/org/eclipse/php/internal/core/codeassist/strategies/FunctionReturnTypeStrategy.java b/plugins/org.eclipse.php.core/src/org/eclipse/php/internal/core/codeassist/strategies/FunctionReturnTypeStrategy.java
index 5216edd7e..a763da8aa 100644
--- a/plugins/org.eclipse.php.core/src/org/eclipse/php/internal/core/codeassist/strategies/FunctionReturnTypeStrategy.java
+++ b/plugins/org.eclipse.php.core/src/org/eclipse/php/internal/core/codeassist/strategies/FunctionReturnTypeStrategy.java
@@ -48,7 +48,7 @@ public class FunctionReturnTypeStrategy extends TypesStrategy {
ISourceRange replaceRange = getReplacementRange(context);
PHPVersion phpVersion = context.getPHPVersion();
for (SimpleProposal proposal : TYPES) {
- if (proposal.isValid(prefix, phpVersion)) {
+ if (proposal.isValidPrefix(prefix, phpVersion)) {
reporter.reportKeyword(proposal.getProposal(), suffix, replaceRange);
}
}
diff --git a/plugins/org.eclipse.php.core/src/org/eclipse/php/internal/core/codeassist/strategies/SimpleProposal.java b/plugins/org.eclipse.php.core/src/org/eclipse/php/internal/core/codeassist/strategies/SimpleProposal.java
index 7742a27cb..9642d5845 100644
--- a/plugins/org.eclipse.php.core/src/org/eclipse/php/internal/core/codeassist/strategies/SimpleProposal.java
+++ b/plugins/org.eclipse.php.core/src/org/eclipse/php/internal/core/codeassist/strategies/SimpleProposal.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2016 IBM Corporation and others.
+ * Copyright (c) 2016, 2019 IBM Corporation and others.
*
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
@@ -13,12 +13,16 @@
package org.eclipse.php.internal.core.codeassist.strategies;
import org.eclipse.core.runtime.Assert;
+import org.eclipse.dltk.annotations.NonNull;
+import org.eclipse.dltk.annotations.Nullable;
import org.eclipse.php.core.PHPVersion;
-class SimpleProposal {
+public class SimpleProposal {
public static final SimpleProposal[] BASIC_TYPES = new SimpleProposal[] {
// http://php.net/manual/en/functions.arguments.php#functions.arguments.type-declaration.types
+ // See also ValidatorVisitor.RESERVED_WORDS for another use of
+ // SimpleProposals
new SimpleProposal("self"), //$NON-NLS-1$
new SimpleProposal("array"), //$NON-NLS-1$
new SimpleProposal("callable", PHPVersion.PHP5_4), //$NON-NLS-1$
@@ -38,25 +42,39 @@ class SimpleProposal {
public String proposal;
public PHPVersion validSince;
- public SimpleProposal(String proposal) {
+ public SimpleProposal(@NonNull String proposal) {
this(proposal, null);
}
- public SimpleProposal(String proposal, PHPVersion validSince) {
+ public SimpleProposal(@NonNull String proposal, @Nullable PHPVersion validSince) {
Assert.isNotNull(proposal);
this.proposal = proposal;
this.validSince = validSince;
}
- public boolean isValid(String prefix, PHPVersion phpVersion) {
+ public boolean isValidPrefix(String prefix, PHPVersion phpVersion) {
if (validSince != null && !(validSince == phpVersion || validSince.isLessThan(phpVersion))) {
return false;
}
return getProposal().startsWith(prefix);
}
+ public boolean isValid(String proposal, PHPVersion phpVersion) {
+ if (validSince != null && !(validSince == phpVersion || validSince.isLessThan(phpVersion))) {
+ return false;
+ }
+ return getProposal().equals(proposal);
+ }
+
+ @SuppressWarnings("null")
+ @NonNull
public String getProposal() {
return proposal;
}
+ @Nullable
+ public PHPVersion getValidSince() {
+ return validSince;
+ }
+
} \ No newline at end of file
diff --git a/plugins/org.eclipse.php.core/src/org/eclipse/php/internal/core/compiler/ast/parser/Messages.java b/plugins/org.eclipse.php.core/src/org/eclipse/php/internal/core/compiler/ast/parser/Messages.java
index 90eb9cda1..a4effdf5c 100644
--- a/plugins/org.eclipse.php.core/src/org/eclipse/php/internal/core/compiler/ast/parser/Messages.java
+++ b/plugins/org.eclipse.php.core/src/org/eclipse/php/internal/core/compiler/ast/parser/Messages.java
@@ -60,6 +60,7 @@ public class Messages extends NLS {
public static String ReassignAutoGlobalVariable;
public static String HeredocMixedIndentation;
public static String HeredocInvalidIndentation;
+ public static String CannotUseReservedWord;
static {
// initialize resource bundle
diff --git a/plugins/org.eclipse.php.core/src/org/eclipse/php/internal/core/compiler/ast/parser/PHPProblemIdentifier.java b/plugins/org.eclipse.php.core/src/org/eclipse/php/internal/core/compiler/ast/parser/PHPProblemIdentifier.java
index 1738073b3..2f386f588 100644
--- a/plugins/org.eclipse.php.core/src/org/eclipse/php/internal/core/compiler/ast/parser/PHPProblemIdentifier.java
+++ b/plugins/org.eclipse.php.core/src/org/eclipse/php/internal/core/compiler/ast/parser/PHPProblemIdentifier.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2014, 2017 Zend Technologies and others.
+ * Copyright (c) 2014, 2017, 2019 Zend Technologies and others.
*
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
@@ -23,7 +23,7 @@ import org.eclipse.php.internal.core.PHPCorePlugin;
*/
public enum PHPProblemIdentifier implements IProblemIdentifier, IProblemIdentifierExtension {
- SYNTAX, USE_STATEMENTS /* deprecated */, AbstractMethodInAbstractClass, BodyForAbstractMethod, MethodRequiresBody, AbstractMethodsInConcreteClass, UndefinedType, ClassExtendFinalClass, CannotInstantiateType, ImportNotFound, DuplicateImport, UnusedImport, UnnecessaryImport, DuplicateDeclaration, AbstractMethodMustBeImplemented, SuperclassMustBeAClass, SuperInterfaceMustBeAnInterface, CannotUseTypeAsTrait, NestedNamespaceDeclarations, InvalidConstantExpression, ReassignAutoGlobalVariable, UndefinedVariable, UnusedVariable
+ SYNTAX, USE_STATEMENTS /* deprecated */, AbstractMethodInAbstractClass, BodyForAbstractMethod, MethodRequiresBody, AbstractMethodsInConcreteClass, UndefinedType, ClassExtendFinalClass, CannotInstantiateType, ImportNotFound, DuplicateImport, UnusedImport, UnnecessaryImport, DuplicateDeclaration, AbstractMethodMustBeImplemented, SuperclassMustBeAClass, SuperInterfaceMustBeAnInterface, CannotUseTypeAsTrait, NestedNamespaceDeclarations, InvalidConstantExpression, ReassignAutoGlobalVariable, CannotUseReservedWord, UndefinedVariable, UnusedVariable
;
diff --git a/plugins/org.eclipse.php.core/src/org/eclipse/php/internal/core/compiler/ast/parser/messages.properties b/plugins/org.eclipse.php.core/src/org/eclipse/php/internal/core/compiler/ast/parser/messages.properties
index 40d65be64..6a672cbb0 100644
--- a/plugins/org.eclipse.php.core/src/org/eclipse/php/internal/core/compiler/ast/parser/messages.properties
+++ b/plugins/org.eclipse.php.core/src/org/eclipse/php/internal/core/compiler/ast/parser/messages.properties
@@ -34,4 +34,5 @@ UsupportedNonConstantOperand=''{0}'' operator with non-constant operand is no lo
OperatorAcceptOnlyPositiveNumbers=''{0}'' operator accepts only positive numbers
ReassignAutoGlobalVariable=Cannot re-assign auto-global variable {0}
HeredocMixedIndentation=Invalid indentation - tabs and spaces cannot be mixed
-HeredocInvalidIndentation=Invalid body indentation level (expecting an indentation level of at least {0}) \ No newline at end of file
+HeredocInvalidIndentation=Invalid body indentation level (expecting an indentation level of at least {0})
+CannotUseReservedWord=Cannot use ''{0}'' as {1} name as it is a reserved word \ No newline at end of file
diff --git a/plugins/org.eclipse.php.core/src/org/eclipse/php/internal/core/compiler/ast/visitor/ValidatorVisitor.java b/plugins/org.eclipse.php.core/src/org/eclipse/php/internal/core/compiler/ast/visitor/ValidatorVisitor.java
index fd3463528..a97789b5b 100644
--- a/plugins/org.eclipse.php.core/src/org/eclipse/php/internal/core/compiler/ast/visitor/ValidatorVisitor.java
+++ b/plugins/org.eclipse.php.core/src/org/eclipse/php/internal/core/compiler/ast/visitor/ValidatorVisitor.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2017, 2018 Alex Xu and others.
+ * Copyright (c) 2017, 2018, 2019 Alex Xu and others.
*
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
@@ -44,6 +44,7 @@ import org.eclipse.php.core.compiler.ast.visitor.PHPASTVisitor;
import org.eclipse.php.core.project.ProjectOptions;
import org.eclipse.php.internal.core.PHPCorePlugin;
import org.eclipse.php.internal.core.codeassist.PHPSelectionEngine;
+import org.eclipse.php.internal.core.codeassist.strategies.SimpleProposal;
import org.eclipse.php.internal.core.compiler.ast.parser.ASTUtils;
import org.eclipse.php.internal.core.compiler.ast.parser.Messages;
import org.eclipse.php.internal.core.compiler.ast.parser.PHPProblemIdentifier;
@@ -62,6 +63,27 @@ public class ValidatorVisitor extends PHPASTVisitor implements IValidatorVisitor
private static final List<String> TYPE_SKIP = new ArrayList<>();
private static final List<String> COMMENT_TYPE_SKIP = new ArrayList<>();
+ // https://www.php.net/manual/en/reserved.other-reserved-words.php
+ private static final List<SimpleProposal> RESERVED_WORDS = new ArrayList<>();
+
+ static {
+ RESERVED_WORDS.add(new SimpleProposal("bool", PHPVersion.PHP7_0)); //$NON-NLS-1$
+ RESERVED_WORDS.add(new SimpleProposal("float", PHPVersion.PHP7_0)); //$NON-NLS-1$
+ RESERVED_WORDS.add(new SimpleProposal("int", PHPVersion.PHP7_0)); //$NON-NLS-1$
+ RESERVED_WORDS.add(new SimpleProposal("string", PHPVersion.PHP7_0)); //$NON-NLS-1$
+
+ RESERVED_WORDS.add(new SimpleProposal("iterable", PHPVersion.PHP7_1)); //$NON-NLS-1$
+
+ RESERVED_WORDS.add(new SimpleProposal("object", PHPVersion.PHP7_2)); //$NON-NLS-1$
+
+ RESERVED_WORDS.add(new SimpleProposal("self")); //$NON-NLS-1$
+ RESERVED_WORDS.add(new SimpleProposal("parent")); //$NON-NLS-1$
+ RESERVED_WORDS.add(new SimpleProposal("void", PHPVersion.PHP7_1)); //$NON-NLS-1$
+ RESERVED_WORDS.add(new SimpleProposal("null", PHPVersion.PHP7_0)); //$NON-NLS-1$
+ RESERVED_WORDS.add(new SimpleProposal("true", PHPVersion.PHP7_0)); //$NON-NLS-1$
+ RESERVED_WORDS.add(new SimpleProposal("false", PHPVersion.PHP7_0)); //$NON-NLS-1$
+ }
+
static {
TYPE_SKIP.add("parent"); //$NON-NLS-1$
TYPE_SKIP.add("self"); //$NON-NLS-1$
@@ -142,6 +164,7 @@ public class ValidatorVisitor extends PHPASTVisitor implements IValidatorVisitor
hasNamespace = true;
currentNamespace = s;
fNamespaceDeclarations.push(s);
+ checkReservedWord(s, "namespace"); //$NON-NLS-1$
if (fNamespaceDeclarations.size() > 1) {
reportProblem(s, Messages.NestedNamespaceDeclarations, PHPProblemIdentifier.NestedNamespaceDeclarations,
ProblemSeverities.Error);
@@ -256,6 +279,7 @@ public class ValidatorVisitor extends PHPASTVisitor implements IValidatorVisitor
@Override
public boolean visit(ClassDeclaration s) throws Exception {
+ checkReservedWord(s, "class"); //$NON-NLS-1$
checkUnimplementedMethods(s, s.getRef());
if (s.getSuperClass() != null) {
checkSuperclass(s.getSuperClass(), false, s.getName());
@@ -289,6 +313,7 @@ public class ValidatorVisitor extends PHPASTVisitor implements IValidatorVisitor
@Override
public boolean visit(InterfaceDeclaration s) throws Exception {
+ checkReservedWord(s, "interface"); //$NON-NLS-1$
if (s.getSuperClasses() == null) {
return visitGeneral(s);
}
@@ -300,6 +325,9 @@ public class ValidatorVisitor extends PHPASTVisitor implements IValidatorVisitor
@Override
public boolean visit(TypeDeclaration s) throws Exception {
+ if (s instanceof TraitDeclaration) {
+ checkReservedWord(s, "trait"); //$NON-NLS-1$
+ }
if (!(s instanceof NamespaceDeclaration)) {
checkDuplicateTypeDeclaration(s);
}
@@ -503,6 +531,21 @@ public class ValidatorVisitor extends PHPASTVisitor implements IValidatorVisitor
checkUnimplementedMethods(statement, classNode.sourceStart(), classNode.sourceEnd());
}
+ private void checkReservedWord(TypeDeclaration declaration, String nodeTypeMessage) throws ModelException {
+ String name = declaration.getName();
+ if (name == null || name.length() == 0) {
+ return;
+ }
+ for (SimpleProposal proposal : RESERVED_WORDS) {
+ if (proposal.isValid(name.toLowerCase(), version)) {
+ reportProblem(declaration.getNameStart(), declaration.getNameEnd(), Messages.CannotUseReservedWord,
+ PHPProblemIdentifier.CannotUseReservedWord, new String[] { name, nodeTypeMessage },
+ ProblemSeverities.Error);
+ break;
+ }
+ }
+ }
+
private void checkUnimplementedMethods(Statement statement, int nodeStart, int nodeEnd) throws ModelException {
IModelElement element = sourceModule.getElementAt(statement.start());
if (!(element instanceof IType)) {
@@ -626,6 +669,12 @@ public class ValidatorVisitor extends PHPASTVisitor implements IValidatorVisitor
return isFound;
}
+ private void reportProblem(int start, int end, String message, IProblemIdentifier id, String[] stringArguments,
+ ProblemSeverity severity) {
+ message = MessageFormat.format(message, (Object[]) stringArguments);
+ reportProblem(start, end, message, id, severity);
+ }
+
private void reportProblem(ASTNode s, String message, IProblemIdentifier id, String[] stringArguments,
ProblemSeverity severity) {
message = MessageFormat.format(message, (Object[]) stringArguments);
diff --git a/tests/org.eclipse.php.core.tests/src/org/eclipse/php/core/tests/errors/PHP53ErrorReportingTests.java b/tests/org.eclipse.php.core.tests/src/org/eclipse/php/core/tests/errors/PHP53ErrorReportingTests.java
index 329bd2aab..3889d49d1 100644
--- a/tests/org.eclipse.php.core.tests/src/org/eclipse/php/core/tests/errors/PHP53ErrorReportingTests.java
+++ b/tests/org.eclipse.php.core.tests/src/org/eclipse/php/core/tests/errors/PHP53ErrorReportingTests.java
@@ -14,16 +14,16 @@
*******************************************************************************/
package org.eclipse.php.core.tests.errors;
+import org.eclipse.php.core.PHPVersion;
import org.eclipse.php.core.tests.runner.PDTTList;
import org.eclipse.php.core.tests.runner.PDTTList.Parameters;
-import org.eclipse.php.core.PHPVersion;
import org.junit.runner.RunWith;
@RunWith(PDTTList.class)
public class PHP53ErrorReportingTests extends AbstractErrorReportingTests {
@Parameters
- public static final String[] TEST_DIRS = { "/workspace/errors/php53" };
+ public static final String[] TEST_DIRS = { "/workspace/errors/php53", "/workspace/errors/php53/keywordsExclusive" };
public PHP53ErrorReportingTests(String[] fileNames) {
super(fileNames);
diff --git a/tests/org.eclipse.php.core.tests/src/org/eclipse/php/core/tests/errors/PHP54ErrorReportingTests.java b/tests/org.eclipse.php.core.tests/src/org/eclipse/php/core/tests/errors/PHP54ErrorReportingTests.java
index ec904a2ba..93767e1b6 100644
--- a/tests/org.eclipse.php.core.tests/src/org/eclipse/php/core/tests/errors/PHP54ErrorReportingTests.java
+++ b/tests/org.eclipse.php.core.tests/src/org/eclipse/php/core/tests/errors/PHP54ErrorReportingTests.java
@@ -14,9 +14,9 @@
*******************************************************************************/
package org.eclipse.php.core.tests.errors;
+import org.eclipse.php.core.PHPVersion;
import org.eclipse.php.core.tests.runner.PDTTList;
import org.eclipse.php.core.tests.runner.PDTTList.Parameters;
-import org.eclipse.php.core.PHPVersion;
import org.junit.runner.RunWith;
@RunWith(PDTTList.class)
@@ -24,7 +24,7 @@ public class PHP54ErrorReportingTests extends AbstractErrorReportingTests {
@Parameters
public static final String[] TEST_DIRS = { "/workspace/errors/php54", "/workspace/errors/php54/exclusive",
- "/workspace/errors/php53" };
+ "/workspace/errors/php54/keywordsExclusive", "/workspace/errors/php53" };
public PHP54ErrorReportingTests(String[] fileNames) {
super(fileNames);
diff --git a/tests/org.eclipse.php.core.tests/src/org/eclipse/php/core/tests/errors/PHP55ErrorReportingTests.java b/tests/org.eclipse.php.core.tests/src/org/eclipse/php/core/tests/errors/PHP55ErrorReportingTests.java
index 98c95a315..97632b215 100644
--- a/tests/org.eclipse.php.core.tests/src/org/eclipse/php/core/tests/errors/PHP55ErrorReportingTests.java
+++ b/tests/org.eclipse.php.core.tests/src/org/eclipse/php/core/tests/errors/PHP55ErrorReportingTests.java
@@ -14,9 +14,9 @@
*******************************************************************************/
package org.eclipse.php.core.tests.errors;
+import org.eclipse.php.core.PHPVersion;
import org.eclipse.php.core.tests.runner.PDTTList;
import org.eclipse.php.core.tests.runner.PDTTList.Parameters;
-import org.eclipse.php.core.PHPVersion;
import org.junit.runner.RunWith;
@RunWith(PDTTList.class)
@@ -24,7 +24,8 @@ public class PHP55ErrorReportingTests extends AbstractErrorReportingTests {
@Parameters
public static final String[] TEST_DIRS = { "/workspace/errors/php54", "/workspace/errors/php54/exclusive",
- "/workspace/errors/php53", "/workspace/errors/php55", "/workspace/errors/php55/classExclusive" };
+ "/workspace/errors/php53", "/workspace/errors/php55", "/workspace/errors/php55/classExclusive",
+ "/workspace/errors/php55/keywordsExclusive" };
public PHP55ErrorReportingTests(String[] fileNames) {
super(fileNames);
diff --git a/tests/org.eclipse.php.core.tests/src/org/eclipse/php/core/tests/errors/PHP56ErrorReportingTests.java b/tests/org.eclipse.php.core.tests/src/org/eclipse/php/core/tests/errors/PHP56ErrorReportingTests.java
index e801d4e77..fe1c3be11 100644
--- a/tests/org.eclipse.php.core.tests/src/org/eclipse/php/core/tests/errors/PHP56ErrorReportingTests.java
+++ b/tests/org.eclipse.php.core.tests/src/org/eclipse/php/core/tests/errors/PHP56ErrorReportingTests.java
@@ -14,9 +14,9 @@
*******************************************************************************/
package org.eclipse.php.core.tests.errors;
+import org.eclipse.php.core.PHPVersion;
import org.eclipse.php.core.tests.runner.PDTTList;
import org.eclipse.php.core.tests.runner.PDTTList.Parameters;
-import org.eclipse.php.core.PHPVersion;
import org.junit.runner.RunWith;
@RunWith(PDTTList.class)
@@ -24,7 +24,8 @@ public class PHP56ErrorReportingTests extends AbstractErrorReportingTests {
@Parameters
public static final String[] TEST_DIRS = { "/workspace/errors/php54", "/workspace/errors/php55",
- "/workspace/errors/php55/classExclusive", "/workspace/errors/php54/exclusive", "/workspace/errors/php56" };
+ "/workspace/errors/php55/classExclusive", "/workspace/errors/php54/exclusive", "/workspace/errors/php56",
+ "/workspace/errors/php56/keywordsExclusive" };
public PHP56ErrorReportingTests(String[] fileNames) {
super(fileNames);
diff --git a/tests/org.eclipse.php.core.tests/src/org/eclipse/php/core/tests/errors/PHP5ErrorReportingTests.java b/tests/org.eclipse.php.core.tests/src/org/eclipse/php/core/tests/errors/PHP5ErrorReportingTests.java
index 1ff6c7985..0f0471aa3 100644
--- a/tests/org.eclipse.php.core.tests/src/org/eclipse/php/core/tests/errors/PHP5ErrorReportingTests.java
+++ b/tests/org.eclipse.php.core.tests/src/org/eclipse/php/core/tests/errors/PHP5ErrorReportingTests.java
@@ -14,16 +14,16 @@
*******************************************************************************/
package org.eclipse.php.core.tests.errors;
+import org.eclipse.php.core.PHPVersion;
import org.eclipse.php.core.tests.runner.PDTTList;
import org.eclipse.php.core.tests.runner.PDTTList.Parameters;
-import org.eclipse.php.core.PHPVersion;
import org.junit.runner.RunWith;
@RunWith(PDTTList.class)
public class PHP5ErrorReportingTests extends AbstractErrorReportingTests {
@Parameters
- public static final String[] TEST_DIRS = { "/workspace/errors/php5" };
+ public static final String[] TEST_DIRS = { "/workspace/errors/php5", "/workspace/errors/php5/keywordsExclusive" };
public PHP5ErrorReportingTests(String[] fileNames) {
super(fileNames);
diff --git a/tests/org.eclipse.php.core.tests/src/org/eclipse/php/core/tests/errors/PHP71ErrorReportingTests.java b/tests/org.eclipse.php.core.tests/src/org/eclipse/php/core/tests/errors/PHP71ErrorReportingTests.java
index 1bcc9cfac..c2f356c25 100644
--- a/tests/org.eclipse.php.core.tests/src/org/eclipse/php/core/tests/errors/PHP71ErrorReportingTests.java
+++ b/tests/org.eclipse.php.core.tests/src/org/eclipse/php/core/tests/errors/PHP71ErrorReportingTests.java
@@ -14,9 +14,9 @@
*******************************************************************************/
package org.eclipse.php.core.tests.errors;
+import org.eclipse.php.core.PHPVersion;
import org.eclipse.php.core.tests.runner.PDTTList;
import org.eclipse.php.core.tests.runner.PDTTList.Parameters;
-import org.eclipse.php.core.PHPVersion;
import org.junit.runner.RunWith;
@RunWith(PDTTList.class)
@@ -24,7 +24,8 @@ public class PHP71ErrorReportingTests extends AbstractErrorReportingTests {
@Parameters
public static final String[] TEST_DIRS = { "/workspace/errors/php54", "/workspace/errors/php55",
- "/workspace/errors/php56", "/workspace/errors/php7", "/workspace/errors/php71" };
+ "/workspace/errors/php56", "/workspace/errors/php7", "/workspace/errors/php71",
+ "/workspace/errors/php71/keywordsExclusive" };
public PHP71ErrorReportingTests(String[] fileNames) {
super(fileNames);
diff --git a/tests/org.eclipse.php.core.tests/src/org/eclipse/php/core/tests/errors/PHP7ErrorReportingTests.java b/tests/org.eclipse.php.core.tests/src/org/eclipse/php/core/tests/errors/PHP7ErrorReportingTests.java
index 3963917a5..896a4e043 100644
--- a/tests/org.eclipse.php.core.tests/src/org/eclipse/php/core/tests/errors/PHP7ErrorReportingTests.java
+++ b/tests/org.eclipse.php.core.tests/src/org/eclipse/php/core/tests/errors/PHP7ErrorReportingTests.java
@@ -14,9 +14,9 @@
*******************************************************************************/
package org.eclipse.php.core.tests.errors;
+import org.eclipse.php.core.PHPVersion;
import org.eclipse.php.core.tests.runner.PDTTList;
import org.eclipse.php.core.tests.runner.PDTTList.Parameters;
-import org.eclipse.php.core.PHPVersion;
import org.junit.runner.RunWith;
@RunWith(PDTTList.class)
@@ -24,7 +24,7 @@ public class PHP7ErrorReportingTests extends AbstractErrorReportingTests {
@Parameters
public static final String[] TEST_DIRS = { "/workspace/errors/php54", "/workspace/errors/php55",
- "/workspace/errors/php56", "/workspace/errors/php7" };
+ "/workspace/errors/php56", "/workspace/errors/php7", "/workspace/errors/php7/keywordsExclusive" };
public PHP7ErrorReportingTests(String[] fileNames) {
super(fileNames);
diff --git a/tests/org.eclipse.php.core.tests/workspace/errors/php5/keywordsExclusive/cannotUseReservedWords1.pdtt b/tests/org.eclipse.php.core.tests/workspace/errors/php5/keywordsExclusive/cannotUseReservedWords1.pdtt
new file mode 100644
index 000000000..572929e37
--- /dev/null
+++ b/tests/org.eclipse.php.core.tests/workspace/errors/php5/keywordsExclusive/cannotUseReservedWords1.pdtt
@@ -0,0 +1,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
diff --git a/tests/org.eclipse.php.core.tests/workspace/errors/php53/keywordsExclusive/cannotUseReservedWords1.pdtt b/tests/org.eclipse.php.core.tests/workspace/errors/php53/keywordsExclusive/cannotUseReservedWords1.pdtt
new file mode 100644
index 000000000..a27d04374
--- /dev/null
+++ b/tests/org.eclipse.php.core.tests/workspace/errors/php53/keywordsExclusive/cannotUseReservedWords1.pdtt
@@ -0,0 +1,215 @@
+--TEST--
+Bug 443037 - Restricted word 'parent' can be used as class name (no error)
+--FILE--
+<?php
+namespace bool
+{
+
+ class bool
+ {
+ }
+
+ interface bool
+ {
+ }
+}
+
+namespace float
+{
+
+ class float
+ {
+ }
+
+ interface float
+ {
+ }
+}
+
+namespace int
+{
+
+ class int
+ {
+ }
+
+ interface int
+ {
+ }
+}
+
+namespace string
+{
+
+ class string
+ {
+ }
+
+ interface string
+ {
+ }
+}
+
+namespace iterable
+{
+
+ class iterable
+ {
+ }
+
+ interface iterable
+ {
+ }
+}
+
+namespace object
+{
+
+ class object
+ {
+ }
+
+ interface object
+ {
+ }
+}
+
+namespace self
+{
+
+ class self
+ {
+ }
+
+ interface self
+ {
+ }
+}
+
+namespace parent
+{
+
+ class parent
+ {
+ }
+
+ interface parent
+ {
+ }
+}
+
+namespace void
+{
+
+ class void
+ {
+ }
+
+ interface void
+ {
+ }
+}
+
+namespace null
+{
+
+ class null
+ {
+ }
+
+ interface null
+ {
+ }
+}
+
+namespace true
+{
+
+ class true
+ {
+ }
+
+ interface true
+ {
+ }
+}
+
+namespace false
+{
+
+ class false
+ {
+ }
+
+ interface false
+ {
+ }
+}
+
+namespace main\bool
+{
+}
+
+namespace main\float
+{
+}
+
+namespace main\int
+{
+}
+
+namespace main\string
+{
+}
+
+namespace main\iterable
+{
+}
+
+namespace main\object
+{
+}
+
+namespace main\self
+{
+}
+
+namespace main\parent
+{
+}
+
+namespace main\void
+{
+}
+
+namespace main\null
+{
+}
+
+namespace main\true
+{
+}
+
+namespace main\false
+{
+}
+?>
+--EXPECT--
+[line=9, start=66, end=70] Cannot declare type bool because the name is already in use
+[line=21, start=148, end=153] Cannot declare type float because the name is already in use
+[line=33, start=227, end=230] Cannot declare type int because the name is already in use
+[line=45, start=310, end=316] Cannot declare type string because the name is already in use
+[line=57, start=400, end=408] Cannot declare type iterable because the name is already in use
+[line=69, start=488, end=494] Cannot declare type object because the name is already in use
+[line=74, start=520, end=524] Cannot use 'self' as namespace name as it is a reserved word
+[line=77, start=538, end=542] Cannot use 'self' as class name as it is a reserved word
+[line=81, start=570, end=574] Cannot declare type self because the name is already in use
+[line=81, start=570, end=574] Cannot use 'self' as interface name as it is a reserved word
+[line=86, start=600, end=606] Cannot use 'parent' as namespace name as it is a reserved word
+[line=89, start=620, end=626] Cannot use 'parent' as class name as it is a reserved word
+[line=93, start=654, end=660] Cannot declare type parent because the name is already in use
+[line=93, start=654, end=660] Cannot use 'parent' as interface name as it is a reserved word
+[line=105, start=736, end=740] Cannot declare type void because the name is already in use
+[line=117, start=816, end=820] Cannot declare type null because the name is already in use
+[line=129, start=896, end=900] Cannot declare type true because the name is already in use
+[line=141, start=978, end=983] Cannot declare type false because the name is already in use
diff --git a/tests/org.eclipse.php.core.tests/workspace/errors/php54/keywordsExclusive/cannotUseReservedWords1.pdtt b/tests/org.eclipse.php.core.tests/workspace/errors/php54/keywordsExclusive/cannotUseReservedWords1.pdtt
new file mode 100644
index 000000000..2667405f5
--- /dev/null
+++ b/tests/org.eclipse.php.core.tests/workspace/errors/php54/keywordsExclusive/cannotUseReservedWords1.pdtt
@@ -0,0 +1,277 @@
+--TEST--
+Bug 443037 - Restricted word 'parent' can be used as class name (no error)
+--FILE--
+<?php
+namespace bool
+{
+
+ class bool
+ {
+ }
+
+ interface bool
+ {
+ }
+
+ trait bool
+ {
+ }
+}
+
+namespace float
+{
+
+ class float
+ {
+ }
+
+ interface float
+ {
+ }
+
+ trait float
+ {
+ }
+}
+
+namespace int
+{
+
+ class int
+ {
+ }
+
+ interface int
+ {
+ }
+
+ trait int
+ {
+ }
+}
+
+namespace string
+{
+
+ class string
+ {
+ }
+
+ interface string
+ {
+ }
+
+ trait string
+ {
+ }
+}
+
+namespace iterable
+{
+
+ class iterable
+ {
+ }
+
+ interface iterable
+ {
+ }
+
+ trait iterable
+ {
+ }
+}
+
+namespace object
+{
+
+ class object
+ {
+ }
+
+ interface object
+ {
+ }
+
+ trait object
+ {
+ }
+}
+
+namespace self
+{
+
+ class self
+ {
+ }
+
+ interface self
+ {
+ }
+
+ trait self
+ {
+ }
+}
+
+namespace parent
+{
+
+ class parent
+ {
+ }
+
+ interface parent
+ {
+ }
+
+ trait parent
+ {
+ }
+}
+
+namespace void
+{
+
+ class void
+ {
+ }
+
+ interface void
+ {
+ }
+
+ trait void
+ {
+ }
+}
+
+namespace null
+{
+
+ class null
+ {
+ }
+
+ interface null
+ {
+ }
+
+ trait null
+ {
+ }
+}
+
+namespace true
+{
+
+ class true
+ {
+ }
+
+ interface true
+ {
+ }
+
+ trait true
+ {
+ }
+}
+
+namespace false
+{
+
+ class false
+ {
+ }
+
+ interface false
+ {
+ }
+
+ trait false
+ {
+ }
+}
+
+namespace main\bool
+{
+}
+
+namespace main\float
+{
+}
+
+namespace main\int
+{
+}
+
+namespace main\string
+{
+}
+
+namespace main\iterable
+{
+}
+
+namespace main\object
+{
+}
+
+namespace main\self
+{
+}
+
+namespace main\parent
+{
+}
+
+namespace main\void
+{
+}
+
+namespace main\null
+{
+}
+
+namespace main\true
+{
+}
+
+namespace main\false
+{
+}
+?>
+--EXPECT--
+[line=9, start=66, end=70] Cannot declare type bool because the name is already in use
+[line=13, start=94, end=98] Cannot declare type bool because the name is already in use
+[line=25, start=176, end=181] Cannot declare type float because the name is already in use
+[line=29, start=205, end=210] Cannot declare type float because the name is already in use
+[line=41, start=284, end=287] Cannot declare type int because the name is already in use
+[line=45, start=311, end=314] Cannot declare type int because the name is already in use
+[line=57, start=394, end=400] Cannot declare type string because the name is already in use
+[line=61, start=424, end=430] Cannot declare type string because the name is already in use
+[line=73, start=514, end=522] Cannot declare type iterable because the name is already in use
+[line=77, start=546, end=554] Cannot declare type iterable because the name is already in use
+[line=89, start=634, end=640] Cannot declare type object because the name is already in use
+[line=93, start=664, end=670] Cannot declare type object because the name is already in use
+[line=98, start=696, end=700] Cannot use 'self' as namespace name as it is a reserved word
+[line=101, start=714, end=718] Cannot use 'self' as class name as it is a reserved word
+[line=105, start=746, end=750] Cannot declare type self because the name is already in use
+[line=105, start=746, end=750] Cannot use 'self' as interface name as it is a reserved word
+[line=109, start=774, end=778] Cannot declare type self because the name is already in use
+[line=109, start=774, end=778] Cannot use 'self' as trait name as it is a reserved word
+[line=114, start=804, end=810] Cannot use 'parent' as namespace name as it is a reserved word
+[line=117, start=824, end=830] Cannot use 'parent' as class name as it is a reserved word
+[line=121, start=858, end=864] Cannot declare type parent because the name is already in use
+[line=121, start=858, end=864] Cannot use 'parent' as interface name as it is a reserved word
+[line=125, start=888, end=894] Cannot declare type parent because the name is already in use
+[line=125, start=888, end=894] Cannot use 'parent' as trait name as it is a reserved word
+[line=137, start=970, end=974] Cannot declare type void because the name is already in use
+[line=141, start=998, end=1002] Cannot declare type void because the name is already in use
+[line=153, start=1078, end=1082] Cannot declare type null because the name is already in use
+[line=157, start=1106, end=1110] Cannot declare type null because the name is already in use
+[line=169, start=1186, end=1190] Cannot declare type true because the name is already in use
+[line=173, start=1214, end=1218] Cannot declare type true because the name is already in use
+[line=185, start=1296, end=1301] Cannot declare type false because the name is already in use
+[line=189, start=1325, end=1330] Cannot declare type false because the name is already in use
diff --git a/tests/org.eclipse.php.core.tests/workspace/errors/php55/keywordsExclusive/cannotUseReservedWords1.pdtt b/tests/org.eclipse.php.core.tests/workspace/errors/php55/keywordsExclusive/cannotUseReservedWords1.pdtt
new file mode 100644
index 000000000..2667405f5
--- /dev/null
+++ b/tests/org.eclipse.php.core.tests/workspace/errors/php55/keywordsExclusive/cannotUseReservedWords1.pdtt
@@ -0,0 +1,277 @@
+--TEST--
+Bug 443037 - Restricted word 'parent' can be used as class name (no error)
+--FILE--
+<?php
+namespace bool
+{
+
+ class bool
+ {
+ }
+
+ interface bool
+ {
+ }
+
+ trait bool
+ {
+ }
+}
+
+namespace float
+{
+
+ class float
+ {
+ }
+
+ interface float
+ {
+ }
+
+ trait float
+ {
+ }
+}
+
+namespace int
+{
+
+ class int
+ {
+ }
+
+ interface int
+ {
+ }
+
+ trait int
+ {
+ }
+}
+
+namespace string
+{
+
+ class string
+ {
+ }
+
+ interface string
+ {
+ }
+
+ trait string
+ {
+ }
+}
+
+namespace iterable
+{
+
+ class iterable
+ {
+ }
+
+ interface iterable
+ {
+ }
+
+ trait iterable
+ {
+ }
+}
+
+namespace object
+{
+
+ class object
+ {
+ }
+
+ interface object
+ {
+ }
+
+ trait object
+ {
+ }
+}
+
+namespace self
+{
+
+ class self
+ {
+ }
+
+ interface self
+ {
+ }
+
+ trait self
+ {
+ }
+}
+
+namespace parent
+{
+
+ class parent
+ {
+ }
+
+ interface parent
+ {
+ }
+
+ trait parent
+ {
+ }
+}
+
+namespace void
+{
+
+ class void
+ {
+ }
+
+ interface void
+ {
+ }
+
+ trait void
+ {
+ }
+}
+
+namespace null
+{
+
+ class null
+ {
+ }
+
+ interface null
+ {
+ }
+
+ trait null
+ {
+ }
+}
+
+namespace true
+{
+
+ class true
+ {
+ }
+
+ interface true
+ {
+ }
+
+ trait true
+ {
+ }
+}
+
+namespace false
+{
+
+ class false
+ {
+ }
+
+ interface false
+ {
+ }
+
+ trait false
+ {
+ }
+}
+
+namespace main\bool
+{
+}
+
+namespace main\float
+{
+}
+
+namespace main\int
+{
+}
+
+namespace main\string
+{
+}
+
+namespace main\iterable
+{
+}
+
+namespace main\object
+{
+}
+
+namespace main\self
+{
+}
+
+namespace main\parent
+{
+}
+
+namespace main\void
+{
+}
+
+namespace main\null
+{
+}
+
+namespace main\true
+{
+}
+
+namespace main\false
+{
+}
+?>
+--EXPECT--
+[line=9, start=66, end=70] Cannot declare type bool because the name is already in use
+[line=13, start=94, end=98] Cannot declare type bool because the name is already in use
+[line=25, start=176, end=181] Cannot declare type float because the name is already in use
+[line=29, start=205, end=210] Cannot declare type float because the name is already in use
+[line=41, start=284, end=287] Cannot declare type int because the name is already in use
+[line=45, start=311, end=314] Cannot declare type int because the name is already in use
+[line=57, start=394, end=400] Cannot declare type string because the name is already in use
+[line=61, start=424, end=430] Cannot declare type string because the name is already in use
+[line=73, start=514, end=522] Cannot declare type iterable because the name is already in use
+[line=77, start=546, end=554] Cannot declare type iterable because the name is already in use
+[line=89, start=634, end=640] Cannot declare type object because the name is already in use
+[line=93, start=664, end=670] Cannot declare type object because the name is already in use
+[line=98, start=696, end=700] Cannot use 'self' as namespace name as it is a reserved word
+[line=101, start=714, end=718] Cannot use 'self' as class name as it is a reserved word
+[line=105, start=746, end=750] Cannot declare type self because the name is already in use
+[line=105, start=746, end=750] Cannot use 'self' as interface name as it is a reserved word
+[line=109, start=774, end=778] Cannot declare type self because the name is already in use
+[line=109, start=774, end=778] Cannot use 'self' as trait name as it is a reserved word
+[line=114, start=804, end=810] Cannot use 'parent' as namespace name as it is a reserved word
+[line=117, start=824, end=830] Cannot use 'parent' as class name as it is a reserved word
+[line=121, start=858, end=864] Cannot declare type parent because the name is already in use
+[line=121, start=858, end=864] Cannot use 'parent' as interface name as it is a reserved word
+[line=125, start=888, end=894] Cannot declare type parent because the name is already in use
+[line=125, start=888, end=894] Cannot use 'parent' as trait name as it is a reserved word
+[line=137, start=970, end=974] Cannot declare type void because the name is already in use
+[line=141, start=998, end=1002] Cannot declare type void because the name is already in use
+[line=153, start=1078, end=1082] Cannot declare type null because the name is already in use
+[line=157, start=1106, end=1110] Cannot declare type null because the name is already in use
+[line=169, start=1186, end=1190] Cannot declare type true because the name is already in use
+[line=173, start=1214, end=1218] Cannot declare type true because the name is already in use
+[line=185, start=1296, end=1301] Cannot declare type false because the name is already in use
+[line=189, start=1325, end=1330] Cannot declare type false because the name is already in use
diff --git a/tests/org.eclipse.php.core.tests/workspace/errors/php56/keywordsExclusive/cannotUseReservedWords1.pdtt b/tests/org.eclipse.php.core.tests/workspace/errors/php56/keywordsExclusive/cannotUseReservedWords1.pdtt
new file mode 100644
index 000000000..2667405f5
--- /dev/null
+++ b/tests/org.eclipse.php.core.tests/workspace/errors/php56/keywordsExclusive/cannotUseReservedWords1.pdtt
@@ -0,0 +1,277 @@
+--TEST--
+Bug 443037 - Restricted word 'parent' can be used as class name (no error)
+--FILE--
+<?php
+namespace bool
+{
+
+ class bool
+ {
+ }
+
+ interface bool
+ {
+ }
+
+ trait bool
+ {
+ }
+}
+
+namespace float
+{
+
+ class float
+ {
+ }
+
+ interface float
+ {
+ }
+
+ trait float
+ {
+ }
+}
+
+namespace int
+{
+
+ class int
+ {
+ }
+
+ interface int
+ {
+ }
+
+ trait int
+ {
+ }
+}
+
+namespace string
+{
+
+ class string
+ {
+ }
+
+ interface string
+ {
+ }
+
+ trait string
+ {
+ }
+}
+
+namespace iterable
+{
+
+ class iterable
+ {
+ }
+
+ interface iterable
+ {
+ }
+
+ trait iterable
+ {
+ }
+}
+
+namespace object
+{
+
+ class object
+ {
+ }
+
+ interface object
+ {
+ }
+
+ trait object
+ {
+ }
+}
+
+namespace self
+{
+
+ class self
+ {
+ }
+
+ interface self
+ {
+ }
+
+ trait self
+ {
+ }
+}
+
+namespace parent
+{
+
+ class parent
+ {
+ }
+
+ interface parent
+ {
+ }
+
+ trait parent
+ {
+ }
+}
+
+namespace void
+{
+
+ class void
+ {
+ }
+
+ interface void
+ {
+ }
+
+ trait void
+ {
+ }
+}
+
+namespace null
+{
+
+ class null
+ {
+ }
+
+ interface null
+ {
+ }
+
+ trait null
+ {
+ }
+}
+
+namespace true
+{
+
+ class true
+ {
+ }
+
+ interface true
+ {
+ }
+
+ trait true
+ {
+ }
+}
+
+namespace false
+{
+
+ class false
+ {
+ }
+
+ interface false
+ {
+ }
+
+ trait false
+ {
+ }
+}
+
+namespace main\bool
+{
+}
+
+namespace main\float
+{
+}
+
+namespace main\int
+{
+}
+
+namespace main\string
+{
+}
+
+namespace main\iterable
+{
+}
+
+namespace main\object
+{
+}
+
+namespace main\self
+{
+}
+
+namespace main\parent
+{
+}
+
+namespace main\void
+{
+}
+
+namespace main\null
+{
+}
+
+namespace main\true
+{
+}
+
+namespace main\false
+{
+}
+?>
+--EXPECT--
+[line=9, start=66, end=70] Cannot declare type bool because the name is already in use
+[line=13, start=94, end=98] Cannot declare type bool because the name is already in use
+[line=25, start=176, end=181] Cannot declare type float because the name is already in use
+[line=29, start=205, end=210] Cannot declare type float because the name is already in use
+[line=41, start=284, end=287] Cannot declare type int because the name is already in use
+[line=45, start=311, end=314] Cannot declare type int because the name is already in use
+[line=57, start=394, end=400] Cannot declare type string because the name is already in use
+[line=61, start=424, end=430] Cannot declare type string because the name is already in use
+[line=73, start=514, end=522] Cannot declare type iterable because the name is already in use
+[line=77, start=546, end=554] Cannot declare type iterable because the name is already in use
+[line=89, start=634, end=640] Cannot declare type object because the name is already in use
+[line=93, start=664, end=670] Cannot declare type object because the name is already in use
+[line=98, start=696, end=700] Cannot use 'self' as namespace name as it is a reserved word
+[line=101, start=714, end=718] Cannot use 'self' as class name as it is a reserved word
+[line=105, start=746, end=750] Cannot declare type self because the name is already in use
+[line=105, start=746, end=750] Cannot use 'self' as interface name as it is a reserved word
+[line=109, start=774, end=778] Cannot declare type self because the name is already in use
+[line=109, start=774, end=778] Cannot use 'self' as trait name as it is a reserved word
+[line=114, start=804, end=810] Cannot use 'parent' as namespace name as it is a reserved word
+[line=117, start=824, end=830] Cannot use 'parent' as class name as it is a reserved word
+[line=121, start=858, end=864] Cannot declare type parent because the name is already in use
+[line=121, start=858, end=864] Cannot use 'parent' as interface name as it is a reserved word
+[line=125, start=888, end=894] Cannot declare type parent because the name is already in use
+[line=125, start=888, end=894] Cannot use 'parent' as trait name as it is a reserved word
+[line=137, start=970, end=974] Cannot declare type void because the name is already in use
+[line=141, start=998, end=1002] Cannot declare type void because the name is already in use
+[line=153, start=1078, end=1082] Cannot declare type null because the name is already in use
+[line=157, start=1106, end=1110] Cannot declare type null because the name is already in use
+[line=169, start=1186, end=1190] Cannot declare type true because the name is already in use
+[line=173, start=1214, end=1218] Cannot declare type true because the name is already in use
+[line=185, start=1296, end=1301] Cannot declare type false because the name is already in use
+[line=189, start=1325, end=1330] Cannot declare type false because the name is already in use
diff --git a/tests/org.eclipse.php.core.tests/workspace/errors/php7/keywordsExclusive/cannotUseReservedWords1.pdtt b/tests/org.eclipse.php.core.tests/workspace/errors/php7/keywordsExclusive/cannotUseReservedWords1.pdtt
new file mode 100644
index 000000000..415ac1e13
--- /dev/null
+++ b/tests/org.eclipse.php.core.tests/workspace/errors/php7/keywordsExclusive/cannotUseReservedWords1.pdtt
@@ -0,0 +1,305 @@
+--TEST--
+Bug 443037 - Restricted word 'parent' can be used as class name (no error)
+--FILE--
+<?php
+namespace bool
+{
+
+ class bool
+ {
+ }
+
+ interface bool
+ {
+ }
+
+ trait bool
+ {
+ }
+}
+
+namespace float
+{
+
+ class float
+ {
+ }
+
+ interface float
+ {
+ }
+
+ trait float
+ {
+ }
+}
+
+namespace int
+{
+
+ class int
+ {
+ }
+
+ interface int
+ {
+ }
+
+ trait int
+ {
+ }
+}
+
+namespace string
+{
+
+ class string
+ {
+ }
+
+ interface string
+ {
+ }
+
+ trait string
+ {
+ }
+}
+
+namespace iterable
+{
+
+ class iterable
+ {
+ }
+
+ interface iterable
+ {
+ }
+
+ trait iterable
+ {
+ }
+}
+
+namespace object
+{
+
+ class object
+ {
+ }
+
+ interface object
+ {
+ }
+
+ trait object
+ {
+ }
+}
+
+namespace self
+{
+
+ class self
+ {
+ }
+
+ interface self
+ {
+ }
+
+ trait self
+ {
+ }
+}
+
+namespace parent
+{
+
+ class parent
+ {
+ }
+
+ interface parent
+ {
+ }
+
+ trait parent
+ {
+ }
+}
+
+namespace void
+{
+
+ class void
+ {
+ }
+
+ interface void
+ {
+ }
+
+ trait void
+ {
+ }
+}
+
+namespace null
+{
+
+ class null
+ {
+ }
+
+ interface null
+ {
+ }
+
+ trait null
+ {
+ }
+}
+
+namespace true
+{
+
+ class true
+ {
+ }
+
+ interface true
+ {
+ }
+
+ trait true
+ {
+ }
+}
+
+namespace false
+{
+
+ class false
+ {
+ }
+
+ interface false
+ {
+ }
+
+ trait false
+ {
+ }
+}
+
+namespace main\bool
+{
+}
+
+namespace main\float
+{
+}
+
+namespace main\int
+{
+}
+
+namespace main\string
+{
+}
+
+namespace main\iterable
+{
+}
+
+namespace main\object
+{
+}
+
+namespace main\self
+{
+}
+
+namespace main\parent
+{
+}
+
+namespace main\void
+{
+}
+
+namespace main\null
+{
+}
+
+namespace main\true
+{
+}
+
+namespace main\false
+{
+}
+?>
+--EXPECT--
+[line=2, start=16, end=20] Cannot use 'bool' as namespace name as it is a reserved word
+[line=5, start=34, end=38] Cannot use 'bool' as class name as it is a reserved word
+[line=9, start=66, end=70] Cannot declare type bool because the name is already in use
+[line=9, start=66, end=70] Cannot use 'bool' as interface name as it is a reserved word
+[line=13, start=94, end=98] Cannot declare type bool because the name is already in use
+[line=13, start=94, end=98] Cannot use 'bool' as trait name as it is a reserved word
+[line=18, start=124, end=129] Cannot use 'float' as namespace name as it is a reserved word
+[line=21, start=143, end=148] Cannot use 'float' as class name as it is a reserved word
+[line=25, start=176, end=181] Cannot declare type float because the name is already in use
+[line=25, start=176, end=181] Cannot use 'float' as interface name as it is a reserved word
+[line=29, start=205, end=210] Cannot declare type float because the name is already in use
+[line=29, start=205, end=210] Cannot use 'float' as trait name as it is a reserved word
+[line=34, start=236, end=239] Cannot use 'int' as namespace name as it is a reserved word
+[line=37, start=253, end=256] Cannot use 'int' as class name as it is a reserved word
+[line=41, start=284, end=287] Cannot declare type int because the name is already in use
+[line=41, start=284, end=287] Cannot use 'int' as interface name as it is a reserved word
+[line=45, start=311, end=314] Cannot declare type int because the name is already in use
+[line=45, start=311, end=314] Cannot use 'int' as trait name as it is a reserved word
+[line=50, start=340, end=346] Cannot use 'string' as namespace name as it is a reserved word
+[line=53, start=360, end=366] Cannot use 'string' as class name as it is a reserved word
+[line=57, start=394, end=400] Cannot declare type string because the name is already in use
+[line=57, start=394, end=400] Cannot use 'string' as interface name as it is a reserved word
+[line=61, start=424, end=430] Cannot declare type string because the name is already in use
+[line=61, start=424, end=430] Cannot use 'string' as trait name as it is a reserved word
+[line=73, start=514, end=522] Cannot declare type iterable because the name is already in use
+[line=77, start=546, end=554] Cannot declare type iterable because the name is already in use
+[line=89, start=634, end=640] Cannot declare type object because the name is already in use
+[line=93, start=664, end=670] Cannot declare type object because the name is already in use
+[line=98, start=696, end=700] Cannot use 'self' as namespace name as it is a reserved word
+[line=101, start=714, end=718] Cannot use 'self' as class name as it is a reserved word
+[line=105, start=746, end=750] Cannot declare type self because the name is already in use
+[line=105, start=746, end=750] Cannot use 'self' as interface name as it is a reserved word
+[line=109, start=774, end=778] Cannot declare type self because the name is already in use
+[line=109, start=774, end=778] Cannot use 'self' as trait name as it is a reserved word
+[line=114, start=804, end=810] Cannot use 'parent' as namespace name as it is a reserved word
+[line=117, start=824, end=830] Cannot use 'parent' as class name as it is a reserved word
+[line=121, start=858, end=864] Cannot declare type parent because the name is already in use
+[line=121, start=858, end=864] Cannot use 'parent' as interface name as it is a reserved word
+[line=125, start=888, end=894] Cannot declare type parent because the name is already in use
+[line=125, start=888, end=894] Cannot use 'parent' as trait name as it is a reserved word
+[line=137, start=970, end=974] Cannot declare type void because the name is already in use
+[line=141, start=998, end=1002] Cannot declare type void because the name is already in use
+[line=146, start=1028, end=1032] Cannot use 'null' as namespace name as it is a reserved word
+[line=149, start=1046, end=1050] Cannot use 'null' as class name as it is a reserved word
+[line=153, start=1078, end=1082] Cannot declare type null because the name is already in use
+[line=153, start=1078, end=1082] Cannot use 'null' as interface name as it is a reserved word
+[line=157, start=1106, end=1110] Cannot declare type null because the name is already in use
+[line=157, start=1106, end=1110] Cannot use 'null' as trait name as it is a reserved word
+[line=162, start=1136, end=1140] Cannot use 'true' as namespace name as it is a reserved word
+[line=165, start=1154, end=1158] Cannot use 'true' as class name as it is a reserved word
+[line=169, start=1186, end=1190] Cannot declare type true because the name is already in use
+[line=169, start=1186, end=1190] Cannot use 'true' as interface name as it is a reserved word
+[line=173, start=1214, end=1218] Cannot declare type true because the name is already in use
+[line=173, start=1214, end=1218] Cannot use 'true' as trait name as it is a reserved word
+[line=178, start=1244, end=1249] Cannot use 'false' as namespace name as it is a reserved word
+[line=181, start=1263, end=1268] Cannot use 'false' as class name as it is a reserved word
+[line=185, start=1296, end=1301] Cannot declare type false because the name is already in use
+[line=185, start=1296, end=1301] Cannot use 'false' as interface name as it is a reserved word
+[line=189, start=1325, end=1330] Cannot declare type false because the name is already in use
+[line=189, start=1325, end=1330] Cannot use 'false' as trait name as it is a reserved word
diff --git a/tests/org.eclipse.php.core.tests/workspace/errors/php71/keywordsExclusive/cannotUseReservedWords1.pdtt b/tests/org.eclipse.php.core.tests/workspace/errors/php71/keywordsExclusive/cannotUseReservedWords1.pdtt
new file mode 100644
index 000000000..55ff5e733
--- /dev/null
+++ b/tests/org.eclipse.php.core.tests/workspace/errors/php71/keywordsExclusive/cannotUseReservedWords1.pdtt
@@ -0,0 +1,313 @@
+--TEST--
+Bug 443037 - Restricted word 'parent' can be used as class name (no error)
+--FILE--
+<?php
+namespace bool
+{
+
+ class bool
+ {
+ }
+
+ interface bool
+ {
+ }
+
+ trait bool
+ {
+ }
+}
+
+namespace float
+{
+
+ class float
+ {
+ }
+
+ interface float
+ {
+ }
+
+ trait float
+ {
+ }
+}
+
+namespace int
+{
+
+ class int
+ {
+ }
+
+ interface int
+ {
+ }
+
+ trait int
+ {
+ }
+}
+
+namespace string
+{
+
+ class string
+ {
+ }
+
+ interface string
+ {
+ }
+
+ trait string
+ {
+ }
+}
+
+namespace iterable
+{
+
+ class iterable
+ {
+ }
+
+ interface iterable
+ {
+ }
+
+ trait iterable
+ {
+ }
+}
+
+namespace object
+{
+
+ class object
+ {
+ }
+
+ interface object
+ {
+ }
+
+ trait object
+ {
+ }
+}
+
+namespace self
+{
+
+ class self
+ {
+ }
+
+ interface self
+ {
+ }
+
+ trait self
+ {
+ }
+}
+
+namespace parent
+{
+
+ class parent
+ {
+ }
+
+ interface parent
+ {
+ }
+
+ trait parent
+ {
+ }
+}
+
+namespace void
+{
+
+ class void
+ {
+ }
+
+ interface void
+ {
+ }
+
+ trait void
+ {
+ }
+}
+
+namespace null
+{
+
+ class null
+ {
+ }
+
+ interface null
+ {
+ }
+
+ trait null
+ {
+ }
+}
+
+namespace true
+{
+
+ class true
+ {
+ }
+
+ interface true
+ {
+ }
+
+ trait true
+ {
+ }
+}
+
+namespace false
+{
+
+ class false
+ {
+ }
+
+ interface false
+ {
+ }
+
+ trait false
+ {
+ }
+}
+
+namespace main\bool
+{
+}
+
+namespace main\float
+{
+}
+
+namespace main\int
+{
+}
+
+namespace main\string
+{
+}
+
+namespace main\iterable
+{
+}
+
+namespace main\object
+{
+}
+
+namespace main\self
+{
+}
+
+namespace main\parent
+{
+}
+
+namespace main\void
+{
+}
+
+namespace main\null
+{
+}
+
+namespace main\true
+{
+}
+
+namespace main\false
+{
+}
+?>
+--EXPECT--
+[line=2, start=16, end=20] Cannot use 'bool' as namespace name as it is a reserved word
+[line=5, start=34, end=38] Cannot use 'bool' as class name as it is a reserved word
+[line=9, start=66, end=70] Cannot declare type bool because the name is already in use
+[line=9, start=66, end=70] Cannot use 'bool' as interface name as it is a reserved word
+[line=13, start=94, end=98] Cannot declare type bool because the name is already in use
+[line=13, start=94, end=98] Cannot use 'bool' as trait name as it is a reserved word
+[line=18, start=124, end=129] Cannot use 'float' as namespace name as it is a reserved word
+[line=21, start=143, end=148] Cannot use 'float' as class name as it is a reserved word
+[line=25, start=176, end=181] Cannot declare type float because the name is already in use
+[line=25, start=176, end=181] Cannot use 'float' as interface name as it is a reserved word
+[line=29, start=205, end=210] Cannot declare type float because the name is already in use
+[line=29, start=205, end=210] Cannot use 'float' as trait name as it is a reserved word
+[line=34, start=236, end=239] Cannot use 'int' as namespace name as it is a reserved word
+[line=37, start=253, end=256] Cannot use 'int' as class name as it is a reserved word
+[line=41, start=284, end=287] Cannot declare type int because the name is already in use
+[line=41, start=284, end=287] Cannot use 'int' as interface name as it is a reserved word
+[line=45, start=311, end=314] Cannot declare type int because the name is already in use
+[line=45, start=311, end=314] Cannot use 'int' as trait name as it is a reserved word
+[line=50, start=340, end=346] Cannot use 'string' as namespace name as it is a reserved word
+[line=53, start=360, end=366] Cannot use 'string' as class name as it is a reserved word
+[line=57, start=394, end=400] Cannot declare type string because the name is already in use
+[line=57, start=394, end=400] Cannot use 'string' as interface name as it is a reserved word
+[line=61, start=424, end=430] Cannot declare type string because the name is already in use
+[line=61, start=424, end=430] Cannot use 'string' as trait name as it is a reserved word
+[line=66, start=456, end=464] Cannot use 'iterable' as namespace name as it is a reserved word
+[line=69, start=478, end=486] Cannot use 'iterable' as class name as it is a reserved word
+[line=73, start=514, end=522] Cannot declare type iterable because the name is already in use
+[line=73, start=514, end=522] Cannot use 'iterable' as interface name as it is a reserved word
+[line=77, start=546, end=554] Cannot declare type iterable because the name is already in use
+[line=77, start=546, end=554] Cannot use 'iterable' as trait name as it is a reserved word
+[line=89, start=634, end=640] Cannot declare type object because the name is already in use
+[line=93, start=664, end=670] Cannot declare type object because the name is already in use
+[line=98, start=696, end=700] Cannot use 'self' as namespace name as it is a reserved word
+[line=101, start=714, end=718] Cannot use 'self' as class name as it is a reserved word
+[line=105, start=746, end=750] Cannot declare type self because the name is already in use
+[line=105, start=746, end=750] Cannot use 'self' as interface name as it is a reserved word
+[line=109, start=774, end=778] Cannot declare type self because the name is already in use
+[line=109, start=774, end=778] Cannot use 'self' as trait name as it is a reserved word
+[line=114, start=804, end=810] Cannot use 'parent' as namespace name as it is a reserved word
+[line=117, start=824, end=830] Cannot use 'parent' as class name as it is a reserved word
+[line=121, start=858, end=864] Cannot declare type parent because the name is already in use
+[line=121, start=858, end=864] Cannot use 'parent' as interface name as it is a reserved word
+[line=125, start=888, end=894] Cannot declare type parent because the name is already in use
+[line=125, start=888, end=894] Cannot use 'parent' as trait name as it is a reserved word
+[line=130, start=920, end=924] Cannot use 'void' as namespace name as it is a reserved word
+[line=133, start=938, end=942] Cannot use 'void' as class name as it is a reserved word
+[line=137, start=970, end=974] Cannot declare type void because the name is already in use
+[line=137, start=970, end=974] Cannot use 'void' as interface name as it is a reserved word
+[line=141, start=998, end=1002] Cannot declare type void because the name is already in use
+[line=141, start=998, end=1002] Cannot use 'void' as trait name as it is a reserved word
+[line=146, start=1028, end=1032] Cannot use 'null' as namespace name as it is a reserved word
+[line=149, start=1046, end=1050] Cannot use 'null' as class name as it is a reserved word
+[line=153, start=1078, end=1082] Cannot declare type null because the name is already in use
+[line=153, start=1078, end=1082] Cannot use 'null' as interface name as it is a reserved word
+[line=157, start=1106, end=1110] Cannot declare type null because the name is already in use
+[line=157, start=1106, end=1110] Cannot use 'null' as trait name as it is a reserved word
+[line=162, start=1136, end=1140] Cannot use 'true' as namespace name as it is a reserved word
+[line=165, start=1154, end=1158] Cannot use 'true' as class name as it is a reserved word
+[line=169, start=1186, end=1190] Cannot declare type true because the name is already in use
+[line=169, start=1186, end=1190] Cannot use 'true' as interface name as it is a reserved word
+[line=173, start=1214, end=1218] Cannot declare type true because the name is already in use
+[line=173, start=1214, end=1218] Cannot use 'true' as trait name as it is a reserved word
+[line=178, start=1244, end=1249] Cannot use 'false' as namespace name as it is a reserved word
+[line=181, start=1263, end=1268] Cannot use 'false' as class name as it is a reserved word
+[line=185, start=1296, end=1301] Cannot declare type false because the name is already in use
+[line=185, start=1296, end=1301] Cannot use 'false' as interface name as it is a reserved word
+[line=189, start=1325, end=1330] Cannot declare type false because the name is already in use
+[line=189, start=1325, end=1330] Cannot use 'false' as trait name as it is a reserved word
diff --git a/tests/org.eclipse.php.core.tests/workspace/errors/php72/cannotUseReservedWords1.pdtt b/tests/org.eclipse.php.core.tests/workspace/errors/php72/cannotUseReservedWords1.pdtt
new file mode 100644
index 000000000..0251d96e8
--- /dev/null
+++ b/tests/org.eclipse.php.core.tests/workspace/errors/php72/cannotUseReservedWords1.pdtt
@@ -0,0 +1,317 @@
+--TEST--
+Bug 443037 - Restricted word 'parent' can be used as class name (no error)
+--FILE--
+<?php
+namespace bool
+{
+
+ class bool
+ {
+ }
+
+ interface bool
+ {
+ }
+
+ trait bool
+ {
+ }
+}
+
+namespace float
+{
+
+ class float
+ {
+ }
+
+ interface float
+ {
+ }
+
+ trait float
+ {
+ }
+}
+
+namespace int
+{
+
+ class int
+ {
+ }
+
+ interface int
+ {
+ }
+
+ trait int
+ {
+ }
+}
+
+namespace string
+{
+
+ class string
+ {
+ }
+
+ interface string
+ {
+ }
+
+ trait string
+ {
+ }
+}
+
+namespace iterable
+{
+
+ class iterable
+ {
+ }
+
+ interface iterable
+ {
+ }
+
+ trait iterable
+ {
+ }
+}
+
+namespace object
+{
+
+ class object
+ {
+ }
+
+ interface object
+ {
+ }
+
+ trait object
+ {
+ }
+}
+
+namespace self
+{
+
+ class self
+ {
+ }
+
+ interface self
+ {
+ }
+
+ trait self
+ {
+ }
+}
+
+namespace parent
+{
+
+ class parent
+ {
+ }
+
+ interface parent
+ {
+ }
+
+ trait parent
+ {
+ }
+}
+
+namespace void
+{
+
+ class void
+ {
+ }
+
+ interface void
+ {
+ }
+
+ trait void
+ {
+ }
+}
+
+namespace null
+{
+
+ class null
+ {
+ }
+
+ interface null
+ {
+ }
+
+ trait null
+ {
+ }
+}
+
+namespace true
+{
+
+ class true
+ {
+ }
+
+ interface true
+ {
+ }
+
+ trait true
+ {
+ }
+}
+
+namespace false
+{
+
+ class false
+ {
+ }
+
+ interface false
+ {
+ }
+
+ trait false
+ {
+ }
+}
+
+namespace main\bool
+{
+}
+
+namespace main\float
+{
+}
+
+namespace main\int
+{
+}
+
+namespace main\string
+{
+}
+
+namespace main\iterable
+{
+}
+
+namespace main\object
+{
+}
+
+namespace main\self
+{
+}
+
+namespace main\parent
+{
+}
+
+namespace main\void
+{
+}
+
+namespace main\null
+{
+}
+
+namespace main\true
+{
+}
+
+namespace main\false
+{
+}
+?>
+--EXPECT--
+[line=2, start=16, end=20] Cannot use 'bool' as namespace name as it is a reserved word
+[line=5, start=34, end=38] Cannot use 'bool' as class name as it is a reserved word
+[line=9, start=66, end=70] Cannot declare type bool because the name is already in use
+[line=9, start=66, end=70] Cannot use 'bool' as interface name as it is a reserved word
+[line=13, start=94, end=98] Cannot declare type bool because the name is already in use
+[line=13, start=94, end=98] Cannot use 'bool' as trait name as it is a reserved word
+[line=18, start=124, end=129] Cannot use 'float' as namespace name as it is a reserved word
+[line=21, start=143, end=148] Cannot use 'float' as class name as it is a reserved word
+[line=25, start=176, end=181] Cannot declare type float because the name is already in use
+[line=25, start=176, end=181] Cannot use 'float' as interface name as it is a reserved word
+[line=29, start=205, end=210] Cannot declare type float because the name is already in use
+[line=29, start=205, end=210] Cannot use 'float' as trait name as it is a reserved word
+[line=34, start=236, end=239] Cannot use 'int' as namespace name as it is a reserved word
+[line=37, start=253, end=256] Cannot use 'int' as class name as it is a reserved word
+[line=41, start=284, end=287] Cannot declare type int because the name is already in use
+[line=41, start=284, end=287] Cannot use 'int' as interface name as it is a reserved word
+[line=45, start=311, end=314] Cannot declare type int because the name is already in use
+[line=45, start=311, end=314] Cannot use 'int' as trait name as it is a reserved word
+[line=50, start=340, end=346] Cannot use 'string' as namespace name as it is a reserved word
+[line=53, start=360, end=366] Cannot use 'string' as class name as it is a reserved word
+[line=57, start=394, end=400] Cannot declare type string because the name is already in use
+[line=57, start=394, end=400] Cannot use 'string' as interface name as it is a reserved word
+[line=61, start=424, end=430] Cannot declare type string because the name is already in use
+[line=61, start=424, end=430] Cannot use 'string' as trait name as it is a reserved word
+[line=66, start=456, end=464] Cannot use 'iterable' as namespace name as it is a reserved word
+[line=69, start=478, end=486] Cannot use 'iterable' as class name as it is a reserved word
+[line=73, start=514, end=522] Cannot declare type iterable because the name is already in use
+[line=73, start=514, end=522] Cannot use 'iterable' as interface name as it is a reserved word
+[line=77, start=546, end=554] Cannot declare type iterable because the name is already in use
+[line=77, start=546, end=554] Cannot use 'iterable' as trait name as it is a reserved word
+[line=82, start=580, end=586] Cannot use 'object' as namespace name as it is a reserved word
+[line=85, start=600, end=606] Cannot use 'object' as class name as it is a reserved word
+[line=89, start=634, end=640] Cannot declare type object because the name is already in use
+[line=89, start=634, end=640] Cannot use 'object' as interface name as it is a reserved word
+[line=93, start=664, end=670] Cannot declare type object because the name is already in use
+[line=93, start=664, end=670] Cannot use 'object' as trait name as it is a reserved word
+[line=98, start=696, end=700] Cannot use 'self' as namespace name as it is a reserved word
+[line=101, start=714, end=718] Cannot use 'self' as class name as it is a reserved word
+[line=105, start=746, end=750] Cannot declare type self because the name is already in use
+[line=105, start=746, end=750] Cannot use 'self' as interface name as it is a reserved word
+[line=109, start=774, end=778] Cannot declare type self because the name is already in use
+[line=109, start=774, end=778] Cannot use 'self' as trait name as it is a reserved word
+[line=114, start=804, end=810] Cannot use 'parent' as namespace name as it is a reserved word
+[line=117, start=824, end=830] Cannot use 'parent' as class name as it is a reserved word
+[line=121, start=858, end=864] Cannot declare type parent because the name is already in use
+[line=121, start=858, end=864] Cannot use 'parent' as interface name as it is a reserved word
+[line=125, start=888, end=894] Cannot declare type parent because the name is already in use
+[line=125, start=888, end=894] Cannot use 'parent' as trait name as it is a reserved word
+[line=130, start=920, end=924] Cannot use 'void' as namespace name as it is a reserved word
+[line=133, start=938, end=942] Cannot use 'void' as class name as it is a reserved word
+[line=137, start=970, end=974] Cannot declare type void because the name is already in use
+[line=137, start=970, end=974] Cannot use 'void' as interface name as it is a reserved word
+[line=141, start=998, end=1002] Cannot declare type void because the name is already in use
+[line=141, start=998, end=1002] Cannot use 'void' as trait name as it is a reserved word
+[line=146, start=1028, end=1032] Cannot use 'null' as namespace name as it is a reserved word
+[line=149, start=1046, end=1050] Cannot use 'null' as class name as it is a reserved word
+[line=153, start=1078, end=1082] Cannot declare type null because the name is already in use
+[line=153, start=1078, end=1082] Cannot use 'null' as interface name as it is a reserved word
+[line=157, start=1106, end=1110] Cannot declare type null because the name is already in use
+[line=157, start=1106, end=1110] Cannot use 'null' as trait name as it is a reserved word
+[line=162, start=1136, end=1140] Cannot use 'true' as namespace name as it is a reserved word
+[line=165, start=1154, end=1158] Cannot use 'true' as class name as it is a reserved word
+[line=169, start=1186, end=1190] Cannot declare type true because the name is already in use
+[line=169, start=1186, end=1190] Cannot use 'true' as interface name as it is a reserved word
+[line=173, start=1214, end=1218] Cannot declare type true because the name is already in use
+[line=173, start=1214, end=1218] Cannot use 'true' as trait name as it is a reserved word
+[line=178, start=1244, end=1249] Cannot use 'false' as namespace name as it is a reserved word
+[line=181, start=1263, end=1268] Cannot use 'false' as class name as it is a reserved word
+[line=185, start=1296, end=1301] Cannot declare type false because the name is already in use
+[line=185, start=1296, end=1301] Cannot use 'false' as interface name as it is a reserved word
+[line=189, start=1325, end=1330] Cannot declare type false because the name is already in use
+[line=189, start=1325, end=1330] Cannot use 'false' as trait name as it is a reserved word

Back to the top