Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 343691
Collapse All | Expand All

(-)src/org/eclipse/wst/jsdt/core/Signature.java (-16 / +1 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2000, 2010 IBM Corporation and others.
2
 * Copyright (c) 2000, 2011 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
Lines 1473-1493 Link Here
1473
					buffer.append('/');
1473
					buffer.append('/');
1474
				}
1474
				}
1475
				break;
1475
				break;
1476
			 case C_DOLLAR :
1477
			 	innerTypeStart = buffer.length();
1478
			 	inAnonymousType = false;
1479
			 	if (resolved) {
1480
					// once we hit "$" there are no more package prefixes
1481
					removePackageQualifiers = false;
1482
					/**
1483
					 * Convert '$' in resolved type signatures into '.'.
1484
					 * NOTE: This assumes that the type signature is an inner type
1485
					 * signature. This is true in most cases, but someone can define a
1486
					 * non-inner type name containing a '$'.
1487
					 */
1488
					buffer.append('.');
1489
			 	}
1490
			 	break;
1491
			 default :
1476
			 default :
1492
				if (innerTypeStart != -1 && !inAnonymousType && Character.isDigit(c)) {
1477
				if (innerTypeStart != -1 && !inAnonymousType && Character.isDigit(c)) {
1493
					inAnonymousType = true;
1478
					inAnonymousType = true;
(-)src/org/eclipse/wst/jsdt/internal/codeassist/CompletionEngine.java (-1 / +1 lines)
Lines 7344-7350 Link Here
7344
	}
7344
	}
7345
7345
7346
	public static char[] createNonGenericTypeSignature(char[] qualifiedPackageName, char[] qualifiedTypeName) {
7346
	public static char[] createNonGenericTypeSignature(char[] qualifiedPackageName, char[] qualifiedTypeName) {
7347
		return Signature.createCharArrayTypeSignature(CharOperation.replaceOnCopy(qualifiedTypeName, '.', '$'), true);
7347
		return Signature.createCharArrayTypeSignature(qualifiedTypeName, true);
7348
	}
7348
	}
7349
	public static char[] createTypeSignature(char[] qualifiedPackageName, char[] qualifiedTypeName) {
7349
	public static char[] createTypeSignature(char[] qualifiedPackageName, char[] qualifiedTypeName) {
7350
		char[] name = new char[qualifiedTypeName.length];
7350
		char[] name = new char[qualifiedTypeName.length];
(-)src/org/eclipse/wst/jsdt/internal/core/util/BindingKeyParser.java (-3 / +2 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2005, 2010 IBM Corporation and others.
2
 * Copyright (c) 2005, 2011 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
Lines 168-174 Link Here
168
							return this.token;
168
							return this.token;
169
						}
169
						}
170
						break;
170
						break;
171
					case '$':
172
					case '~':
171
					case '~':
173
						if (this.index == previousTokenEnd) {
172
						if (this.index == previousTokenEnd) {
174
							this.start = this.index+1;
173
							this.start = this.index+1;
Lines 517-523 Link Here
517
				return;
516
				return;
518
			}
517
			}
519
			consumeTopLevelType();
518
			consumeTopLevelType();
520
			parseInnerType();
519
			//parseInnerType();
521
520
522
			if (this.scanner.isAtParametersStart()) {
521
			if (this.scanner.isAtParametersStart()) {
523
				this.scanner.skipParametersStart();
522
				this.scanner.skipParametersStart();
(-)src/org/eclipse/wst/jsdt/core/tests/compiler/regression/InferTypesTests.java (+23 lines)
Lines 1452-1455 Link Here
1452
				getDefaultOptions()
1452
				getDefaultOptions()
1453
			);
1453
			);
1454
		}
1454
		}
1455
		
1456
		public void testBUG317281() {
1457
			CompilationUnitDeclaration declaration = this.runInferTest(
1458
				"function A$b(){\n"+
1459
				"}\n" +
1460
				"A$b.prototype.fun1 = function() {};\n",
1461
				"X.js",
1462
				"class A$b extends Object{\n  void fun1()\n  A$b()\n}\n",
1463
				getDefaultOptions()
1464
			);
1465
		}
1466
		
1467
		public void testBUG343691() {
1468
			CompilationUnitDeclaration declaration = this.runInferTest(
1469
				"function $(){\n"+
1470
				"}\n" +
1471
				"$.hasData = function(element) {};\n" +
1472
				"$.prototype.jquery = \"\";\n",
1473
				"X.js",
1474
				"class $ extends Object{\n  String jquery;\n  $()\n  static void hasData(element)\n}\n",
1475
				getDefaultOptions()
1476
			);
1477
		}
1455
}
1478
}

Return to bug 343691