[278904] [parser] JSDoc range not set on variables
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/regression/InferTypesTests.java b/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/regression/InferTypesTests.java
index 1d0c9a2..5cf78e8 100644
--- a/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/regression/InferTypesTests.java
+++ b/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/regression/InferTypesTests.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2005, 2008 IBM Corporation and others.
+ * Copyright (c) 2005, 2010 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -935,7 +935,8 @@
);
}
- public void testBUG286010() {
+ public void test098() {
+ // BUG286010
CompilationUnitDeclaration declaration = this.runInferTest(
"var MyFunc = function () {};\n" +
"MyFunc.myMeth = function () {};",
@@ -945,4 +946,77 @@
);
}
+
+ public void test099() {
+ // BUG278904
+ CompilationUnitDeclaration declaration = this.runInferTest(
+ "function MyType(){}"+
+ "MyType.prototype = new Object();\n"+
+ "/**\n"+
+ " * Property length\n"+
+ " * @type Number\n"+
+ " * @memberOf MyType\n"+
+ " * @see MyType\n"+
+ " * @since WTP 3.2.2\n"+
+ " */\n"+
+ "MyType.prototype.length = \"\";\n",
+ "X.js",
+ "class MyType extends Object{\n Number length;\n MyType()\n}\n",
+ getDefaultOptions()
+
+ );
+ }
+ public void test100() {
+ // BUG278904
+ CompilationUnitDeclaration declaration = this.runInferTest(
+ "function MyType(){}"+
+ "MyType.prototype = new Object();\n"+
+ "/**\n"+
+ " * Property length\n"+
+ " * @memberOf MyType\n"+
+ " * @see MyType\n"+
+ " * @since WTP 3.2.2\n"+
+ " */\n"+
+ "MyType.prototype.length = \"\";\n",
+ "X.js",
+ "class MyType extends Object{\n String length;\n MyType()\n}\n",
+ getDefaultOptions()
+
+ );
+ }
+ public void test101() {
+ CompilationUnitDeclaration declaration = this.runInferTest(
+ "MyType = {\n"+
+ "/**\n"+
+ " * Property length\n"+
+ " * @type Number\n"+
+ " * @memberOf MyType\n"+
+ " * @see MyType\n"+
+ " * @since WTP 3.2.2\n"+
+ " */\n"+
+ "length : \"value\"\n"+
+ "};",
+ "X.js",
+ "class MyType extends Object{\n Number length;\n}\n",
+ getDefaultOptions()
+
+ );
+ }
+ public void test102() {
+ CompilationUnitDeclaration declaration = this.runInferTest(
+ "MyType = {\n"+
+ "/**\n"+
+ " * Property length\n"+
+ " * @memberOf MyType\n"+
+ " * @see MyType\n"+
+ " * @since WTP 3.2.2\n"+
+ " */\n"+
+ "length : \"value\"\n"+
+ "};",
+ "X.js",
+ "class MyType extends Object{\n String length;\n}\n",
+ getDefaultOptions()
+
+ );
+ }
}