diff --git a/Jakefile.js b/Jakefile.js
index 943f2eff5e..e99043d3f5 100644
--- a/Jakefile.js
+++ b/Jakefile.js
@@ -813,7 +813,6 @@ task("update-sublime", ["local", serverFile], function() {
var tslintRuleDir = "scripts/tslint";
var tslintRules = ([
"nextLineRule",
- "noInferrableTypesRule",
"noNullRule",
"booleanTriviaRule"
]);
diff --git a/scripts/tslint/noInferrableTypesRule.ts b/scripts/tslint/noInferrableTypesRule.ts
deleted file mode 100644
index cbc0162260..0000000000
--- a/scripts/tslint/noInferrableTypesRule.ts
+++ /dev/null
@@ -1,49 +0,0 @@
-///
-///
-
-
-export class Rule extends Lint.Rules.AbstractRule {
- public static FAILURE_STRING_FACTORY = (type: string) => `LHS type (${type}) inferred by RHS expression, remove type annotation`;
-
- public apply(sourceFile: ts.SourceFile): Lint.RuleFailure[] {
- return this.applyWithWalker(new InferrableTypeWalker(sourceFile, this.getOptions()));
- }
-}
-
-class InferrableTypeWalker extends Lint.RuleWalker {
- visitVariableStatement(node: ts.VariableStatement) {
- node.declarationList.declarations.forEach(e => {
- if ((!!e.type) && (!!e.initializer)) {
- let failure: string;
- switch (e.type.kind) {
- case ts.SyntaxKind.BooleanKeyword:
- if (e.initializer.kind === ts.SyntaxKind.TrueKeyword || e.initializer.kind === ts.SyntaxKind.FalseKeyword) {
- failure = 'boolean';
- }
- break;
- case ts.SyntaxKind.NumberKeyword:
- if (e.initializer.kind === ts.SyntaxKind.NumericLiteral) {
- failure = 'number';
- }
- break;
- case ts.SyntaxKind.StringKeyword:
- switch (e.initializer.kind) {
- case ts.SyntaxKind.StringLiteral:
- case ts.SyntaxKind.NoSubstitutionTemplateLiteral:
- case ts.SyntaxKind.TemplateExpression:
- failure = 'string';
- break;
- default:
- break;
- }
- break;
- }
- if (failure) {
- this.addFailure(this.createFailure(e.type.getStart(), e.type.getWidth(), Rule.FAILURE_STRING_FACTORY(failure)));
- }
- }
- });
-
- super.visitVariableStatement(node);
- }
-}
diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts
index d9d998b7fc..da16a5172a 100644
--- a/src/compiler/checker.ts
+++ b/src/compiler/checker.ts
@@ -14224,7 +14224,21 @@ namespace ts {
}
if (isHeritageClauseElementIdentifier(entityName)) {
- let meaning = entityName.parent.kind === SyntaxKind.ExpressionWithTypeArguments ? SymbolFlags.Type : SymbolFlags.Namespace;
+ let meaning = SymbolFlags.None;
+
+ // In an interface or class, we're definitely interested in a type.
+ if (entityName.parent.kind === SyntaxKind.ExpressionWithTypeArguments) {
+ meaning = SymbolFlags.Type;
+
+ // In a class 'extends' clause we are also looking for a value.
+ if (isExpressionWithTypeArgumentsInClassExtendsClause(entityName.parent)) {
+ meaning |= SymbolFlags.Value;
+ }
+ }
+ else {
+ meaning = SymbolFlags.Namespace;
+ }
+
meaning |= SymbolFlags.Alias;
return resolveEntityName(entityName, meaning);
}
diff --git a/src/compiler/sys.ts b/src/compiler/sys.ts
index f3f2b02a30..76f1266687 100644
--- a/src/compiler/sys.ts
+++ b/src/compiler/sys.ts
@@ -8,7 +8,7 @@ namespace ts {
write(s: string): void;
readFile(path: string, encoding?: string): string;
writeFile(path: string, data: string, writeByteOrderMark?: boolean): void;
- watchFile?(path: string, callback: (path: string) => void): FileWatcher;
+ watchFile?(path: string, callback: (path: string, removed: boolean) => void): FileWatcher;
resolvePath(path: string): string;
fileExists(path: string): boolean;
directoryExists(path: string): boolean;
@@ -292,11 +292,16 @@ namespace ts {
};
function fileChanged(curr: any, prev: any) {
+ // mtime.getTime() equals 0 if file was removed
+ if (curr.mtime.getTime() === 0) {
+ callback(fileName, /* removed */ true);
+ return;
+ }
if (+curr.mtime <= +prev.mtime) {
return;
}
- callback(fileName);
+ callback(fileName, /* removed */ false);
}
},
resolvePath: function (path: string): string {
diff --git a/src/compiler/tsc.ts b/src/compiler/tsc.ts
index 02b8e63677..7b74024aec 100644
--- a/src/compiler/tsc.ts
+++ b/src/compiler/tsc.ts
@@ -275,7 +275,7 @@ namespace ts {
let sourceFile = hostGetSourceFile(fileName, languageVersion, onError);
if (sourceFile && compilerOptions.watch) {
// Attach a file watcher
- sourceFile.fileWatcher = sys.watchFile(sourceFile.fileName, () => sourceFileChanged(sourceFile));
+ sourceFile.fileWatcher = sys.watchFile(sourceFile.fileName, (fileName, removed) => sourceFileChanged(sourceFile, removed));
}
return sourceFile;
}
@@ -297,9 +297,15 @@ namespace ts {
}
// If a source file changes, mark it as unwatched and start the recompilation timer
- function sourceFileChanged(sourceFile: SourceFile) {
+ function sourceFileChanged(sourceFile: SourceFile, removed: boolean) {
sourceFile.fileWatcher.close();
sourceFile.fileWatcher = undefined;
+ if (removed) {
+ let index = rootFileNames.indexOf(sourceFile.fileName);
+ if (index >= 0) {
+ rootFileNames.splice(index, 1);
+ }
+ }
startTimer();
}
@@ -531,8 +537,8 @@ namespace ts {
return;
- function serializeCompilerOptions(options: CompilerOptions): Map {
- let result: Map = {};
+ function serializeCompilerOptions(options: CompilerOptions): Map {
+ let result: Map = {};
let optionsNameMap = getOptionNameMap().optionNameMap;
for (let name in options) {
diff --git a/src/compiler/utilities.ts b/src/compiler/utilities.ts
index 452f59f0f0..5127b98ab3 100644
--- a/src/compiler/utilities.ts
+++ b/src/compiler/utilities.ts
@@ -985,6 +985,7 @@ namespace ts {
return node === (parent).expression;
case SyntaxKind.Decorator:
case SyntaxKind.JsxExpression:
+ case SyntaxKind.JsxSpreadAttribute:
return true;
case SyntaxKind.ExpressionWithTypeArguments:
return (parent).expression === node && isExpressionWithTypeArgumentsInClassExtendsClause(parent);
diff --git a/src/harness/fourslash.ts b/src/harness/fourslash.ts
index 3042f0c464..a846077a85 100644
--- a/src/harness/fourslash.ts
+++ b/src/harness/fourslash.ts
@@ -157,7 +157,7 @@ namespace FourSlash {
return true;
}
- public setCancelled(numberOfCalls: number = 0): void {
+ public setCancelled(numberOfCalls = 0): void {
ts.Debug.assert(numberOfCalls >= 0);
this.numberOfCallsBeforeCancellation = numberOfCalls;
}
@@ -761,7 +761,7 @@ namespace FourSlash {
this.raiseError(`verifyReferencesAtPositionListContains failed - could not find the item: ${JSON.stringify(missingItem)} in the returned list: (${JSON.stringify(references)})`);
}
- public verifyReferencesCountIs(count: number, localFilesOnly: boolean = true) {
+ public verifyReferencesCountIs(count: number, localFilesOnly = true) {
this.taoInvalidReason = "verifyReferences NYI";
let references = this.getReferencesAtCaret();
diff --git a/src/server/server.ts b/src/server/server.ts
index 843197b918..c3942b01a3 100644
--- a/src/server/server.ts
+++ b/src/server/server.ts
@@ -11,7 +11,7 @@ namespace ts.server {
input: process.stdin,
output: process.stdout,
terminal: false,
- });
+ });
class Logger implements ts.server.Logger {
fd = -1;
@@ -58,7 +58,7 @@ namespace ts.server {
isVerbose() {
return this.loggingEnabled() && (this.level == "verbose");
}
-
+
msg(s: string, type = "Err") {
if (this.fd < 0) {
@@ -85,7 +85,7 @@ namespace ts.server {
interface WatchedFile {
fileName: string;
- callback: (fileName: string) => void;
+ callback: (fileName: string, removed: boolean) => void;
mtime: Date;
}
@@ -121,11 +121,11 @@ namespace ts.server {
fs.stat(watchedFile.fileName,(err, stats) => {
if (err) {
- watchedFile.callback(watchedFile.fileName);
+ watchedFile.callback(watchedFile.fileName, /* removed */ false);
}
else if (watchedFile.mtime.getTime() !== stats.mtime.getTime()) {
watchedFile.mtime = WatchedFileSet.getModifiedTime(watchedFile.fileName);
- watchedFile.callback(watchedFile.fileName);
+ watchedFile.callback(watchedFile.fileName, watchedFile.mtime.getTime() === 0);
}
});
}
@@ -153,7 +153,7 @@ namespace ts.server {
}, this.interval);
}
- addFile(fileName: string, callback: (fileName: string) => void ): WatchedFile {
+ addFile(fileName: string, callback: (fileName: string, removed: boolean) => void ): WatchedFile {
var file: WatchedFile = {
fileName,
callback,
@@ -170,7 +170,7 @@ namespace ts.server {
removeFile(file: WatchedFile) {
this.watchedFiles = WatchedFileSet.copyListRemovingItem(file, this.watchedFiles);
}
- }
+ }
class IOSession extends Session {
constructor(host: ServerHost, logger: ts.server.Logger) {
@@ -243,11 +243,11 @@ namespace ts.server {
// TODO: check that this location is writable
var logger = createLoggerFromEnv();
-
+
// REVIEW: for now this implementation uses polling.
// The advantage of polling is that it works reliably
// on all os and with network mounted files.
- // For 90 referenced files, the average time to detect
+ // For 90 referenced files, the average time to detect
// changes is 2*msInterval (by default 5 seconds).
// The overhead of this is .04 percent (1/2500) with
// average pause of < 1 millisecond (and max
@@ -271,4 +271,4 @@ namespace ts.server {
});
// Start listening
ioSession.listen();
-}
\ No newline at end of file
+}
diff --git a/tests/baselines/reference/extendClassExpressionFromModule.symbols b/tests/baselines/reference/extendClassExpressionFromModule.symbols
index c131ea8fa2..78d483b5d7 100644
--- a/tests/baselines/reference/extendClassExpressionFromModule.symbols
+++ b/tests/baselines/reference/extendClassExpressionFromModule.symbols
@@ -8,6 +8,7 @@ var x = foo1;
class y extends x {}
>y : Symbol(y, Decl(foo2.ts, 1, 13))
+>x : Symbol(x, Decl(foo2.ts, 1, 3))
=== tests/cases/conformance/classes/classExpressions/foo1.ts ===
class x{}
diff --git a/tests/baselines/reference/extendNonClassSymbol1.symbols b/tests/baselines/reference/extendNonClassSymbol1.symbols
index 02291ebb18..7c03ef3a97 100644
--- a/tests/baselines/reference/extendNonClassSymbol1.symbols
+++ b/tests/baselines/reference/extendNonClassSymbol1.symbols
@@ -9,4 +9,5 @@ var x = A;
class C extends x { } // error, could not find symbol xs
>C : Symbol(C, Decl(extendNonClassSymbol1.ts, 1, 10))
+>x : Symbol(x, Decl(extendNonClassSymbol1.ts, 1, 3))
diff --git a/tests/baselines/reference/jsxReactTestSuite.symbols b/tests/baselines/reference/jsxReactTestSuite.symbols
index 1fe64cbfdd..b86054ac56 100644
--- a/tests/baselines/reference/jsxReactTestSuite.symbols
+++ b/tests/baselines/reference/jsxReactTestSuite.symbols
@@ -145,6 +145,7 @@ var x =
Component : Symbol(Component, Decl(jsxReactTestSuite.tsx, 2, 11))
+>x : Symbol(x, Decl(jsxReactTestSuite.tsx, 10, 11), Decl(jsxReactTestSuite.tsx, 35, 3))
>y : Symbol(unknown)
={2 } z />;
@@ -167,25 +168,31 @@ var x =
;
>Component : Symbol(Component, Decl(jsxReactTestSuite.tsx, 2, 11))
+>x : Symbol(x, Decl(jsxReactTestSuite.tsx, 10, 11), Decl(jsxReactTestSuite.tsx, 35, 3))
;
>Component : Symbol(Component, Decl(jsxReactTestSuite.tsx, 2, 11))
+>x : Symbol(x, Decl(jsxReactTestSuite.tsx, 10, 11), Decl(jsxReactTestSuite.tsx, 35, 3))
>y : Symbol(unknown)
;
>Component : Symbol(Component, Decl(jsxReactTestSuite.tsx, 2, 11))
+>x : Symbol(x, Decl(jsxReactTestSuite.tsx, 10, 11), Decl(jsxReactTestSuite.tsx, 35, 3))
>y : Symbol(unknown)
>z : Symbol(unknown)
;
>Component : Symbol(Component, Decl(jsxReactTestSuite.tsx, 2, 11))
>x : Symbol(unknown)
+>y : Symbol(y, Decl(jsxReactTestSuite.tsx, 9, 11))
;
>Component : Symbol(Component, Decl(jsxReactTestSuite.tsx, 2, 11))
>x : Symbol(unknown)
>y : Symbol(unknown)
+>z : Symbol(z, Decl(jsxReactTestSuite.tsx, 11, 11))
+>z : Symbol(z, Decl(jsxReactTestSuite.tsx, 11, 11))
>Child : Symbol(Child, Decl(jsxReactTestSuite.tsx, 5, 11))
>Component : Symbol(Component, Decl(jsxReactTestSuite.tsx, 2, 11))
diff --git a/tests/baselines/reference/tsxAttributeResolution8.symbols b/tests/baselines/reference/tsxAttributeResolution8.symbols
index 9bb09c6cd8..85db1985cc 100644
--- a/tests/baselines/reference/tsxAttributeResolution8.symbols
+++ b/tests/baselines/reference/tsxAttributeResolution8.symbols
@@ -20,4 +20,5 @@ var x: any;
// Should be OK
>test1 : Symbol(JSX.IntrinsicElements.test1, Decl(tsxAttributeResolution8.tsx, 2, 30))
+>x : Symbol(x, Decl(tsxAttributeResolution8.tsx, 7, 3))
diff --git a/tests/baselines/reference/tsxEmit2.symbols b/tests/baselines/reference/tsxEmit2.symbols
index 5eefc31710..5da1b16ae4 100644
--- a/tests/baselines/reference/tsxEmit2.symbols
+++ b/tests/baselines/reference/tsxEmit2.symbols
@@ -21,12 +21,14 @@ var p1, p2, p3;
var spreads1 = {p2}
;
>spreads1 : Symbol(spreads1, Decl(tsxEmit2.tsx, 8, 3))
>div : Symbol(JSX.IntrinsicElements, Decl(tsxEmit2.tsx, 1, 22))
+>p1 : Symbol(p1, Decl(tsxEmit2.tsx, 7, 3))
>p2 : Symbol(p2, Decl(tsxEmit2.tsx, 7, 7))
>div : Symbol(JSX.IntrinsicElements, Decl(tsxEmit2.tsx, 1, 22))
var spreads2 = {p2}
;
>spreads2 : Symbol(spreads2, Decl(tsxEmit2.tsx, 9, 3))
>div : Symbol(JSX.IntrinsicElements, Decl(tsxEmit2.tsx, 1, 22))
+>p1 : Symbol(p1, Decl(tsxEmit2.tsx, 7, 3))
>p2 : Symbol(p2, Decl(tsxEmit2.tsx, 7, 7))
>div : Symbol(JSX.IntrinsicElements, Decl(tsxEmit2.tsx, 1, 22))
@@ -35,12 +37,14 @@ var spreads3 = {p2}
;
>div : Symbol(JSX.IntrinsicElements, Decl(tsxEmit2.tsx, 1, 22))
>x : Symbol(unknown)
>p3 : Symbol(p3, Decl(tsxEmit2.tsx, 7, 11))
+>p1 : Symbol(p1, Decl(tsxEmit2.tsx, 7, 3))
>p2 : Symbol(p2, Decl(tsxEmit2.tsx, 7, 7))
>div : Symbol(JSX.IntrinsicElements, Decl(tsxEmit2.tsx, 1, 22))
var spreads4 = {p2}
;
>spreads4 : Symbol(spreads4, Decl(tsxEmit2.tsx, 11, 3))
>div : Symbol(JSX.IntrinsicElements, Decl(tsxEmit2.tsx, 1, 22))
+>p1 : Symbol(p1, Decl(tsxEmit2.tsx, 7, 3))
>x : Symbol(unknown)
>p3 : Symbol(p3, Decl(tsxEmit2.tsx, 7, 11))
>p2 : Symbol(p2, Decl(tsxEmit2.tsx, 7, 7))
@@ -51,6 +55,7 @@ var spreads5 = {p2}
;
>div : Symbol(JSX.IntrinsicElements, Decl(tsxEmit2.tsx, 1, 22))
>x : Symbol(unknown)
>p2 : Symbol(p2, Decl(tsxEmit2.tsx, 7, 7))
+>p1 : Symbol(p1, Decl(tsxEmit2.tsx, 7, 3))
>y : Symbol(unknown)
>p3 : Symbol(p3, Decl(tsxEmit2.tsx, 7, 11))
>p2 : Symbol(p2, Decl(tsxEmit2.tsx, 7, 7))
diff --git a/tests/baselines/reference/tsxExternalModuleEmit2.symbols b/tests/baselines/reference/tsxExternalModuleEmit2.symbols
index 6f8d3d76cd..ff5fdc4917 100644
--- a/tests/baselines/reference/tsxExternalModuleEmit2.symbols
+++ b/tests/baselines/reference/tsxExternalModuleEmit2.symbols
@@ -26,6 +26,7 @@ declare var Foo, React;
// Should see mod_1['default'] in emit here
;
>Foo : Symbol(Foo, Decl(app.tsx, 1, 11))
+>Main : Symbol(Main, Decl(app.tsx, 0, 6))
>Foo : Symbol(Foo, Decl(app.tsx, 1, 11))
diff --git a/tests/baselines/reference/tsxReactEmit2.symbols b/tests/baselines/reference/tsxReactEmit2.symbols
index 049fdb1819..051f7588f2 100644
--- a/tests/baselines/reference/tsxReactEmit2.symbols
+++ b/tests/baselines/reference/tsxReactEmit2.symbols
@@ -23,12 +23,14 @@ var p1, p2, p3;
var spreads1 = {p2}
;
>spreads1 : Symbol(spreads1, Decl(tsxReactEmit2.tsx, 9, 3))
>div : Symbol(JSX.IntrinsicElements, Decl(tsxReactEmit2.tsx, 1, 22))
+>p1 : Symbol(p1, Decl(tsxReactEmit2.tsx, 8, 3))
>p2 : Symbol(p2, Decl(tsxReactEmit2.tsx, 8, 7))
>div : Symbol(JSX.IntrinsicElements, Decl(tsxReactEmit2.tsx, 1, 22))
var spreads2 = {p2}
;
>spreads2 : Symbol(spreads2, Decl(tsxReactEmit2.tsx, 10, 3))
>div : Symbol(JSX.IntrinsicElements, Decl(tsxReactEmit2.tsx, 1, 22))
+>p1 : Symbol(p1, Decl(tsxReactEmit2.tsx, 8, 3))
>p2 : Symbol(p2, Decl(tsxReactEmit2.tsx, 8, 7))
>div : Symbol(JSX.IntrinsicElements, Decl(tsxReactEmit2.tsx, 1, 22))
@@ -37,12 +39,14 @@ var spreads3 = {p2}
;
>div : Symbol(JSX.IntrinsicElements, Decl(tsxReactEmit2.tsx, 1, 22))
>x : Symbol(unknown)
>p3 : Symbol(p3, Decl(tsxReactEmit2.tsx, 8, 11))
+>p1 : Symbol(p1, Decl(tsxReactEmit2.tsx, 8, 3))
>p2 : Symbol(p2, Decl(tsxReactEmit2.tsx, 8, 7))
>div : Symbol(JSX.IntrinsicElements, Decl(tsxReactEmit2.tsx, 1, 22))
var spreads4 = {p2}
;
>spreads4 : Symbol(spreads4, Decl(tsxReactEmit2.tsx, 12, 3))
>div : Symbol(JSX.IntrinsicElements, Decl(tsxReactEmit2.tsx, 1, 22))
+>p1 : Symbol(p1, Decl(tsxReactEmit2.tsx, 8, 3))
>x : Symbol(unknown)
>p3 : Symbol(p3, Decl(tsxReactEmit2.tsx, 8, 11))
>p2 : Symbol(p2, Decl(tsxReactEmit2.tsx, 8, 7))
@@ -53,6 +57,7 @@ var spreads5 = {p2}
;
>div : Symbol(JSX.IntrinsicElements, Decl(tsxReactEmit2.tsx, 1, 22))
>x : Symbol(unknown)
>p2 : Symbol(p2, Decl(tsxReactEmit2.tsx, 8, 7))
+>p1 : Symbol(p1, Decl(tsxReactEmit2.tsx, 8, 3))
>y : Symbol(unknown)
>p3 : Symbol(p3, Decl(tsxReactEmit2.tsx, 8, 11))
>p2 : Symbol(p2, Decl(tsxReactEmit2.tsx, 8, 7))
diff --git a/tests/baselines/reference/tsxReactEmit5.symbols b/tests/baselines/reference/tsxReactEmit5.symbols
index 388e717957..3e0e179067 100644
--- a/tests/baselines/reference/tsxReactEmit5.symbols
+++ b/tests/baselines/reference/tsxReactEmit5.symbols
@@ -31,5 +31,6 @@ var spread1 = ;
>spread1 : Symbol(spread1, Decl(react-consumer.tsx, 4, 3))
>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 2, 22))
>x : Symbol(unknown)
+>foo : Symbol(foo, Decl(react-consumer.tsx, 3, 3))
>y : Symbol(unknown)
diff --git a/tests/baselines/reference/tsxReactEmit6.symbols b/tests/baselines/reference/tsxReactEmit6.symbols
index 0302cef3e8..fd717ee4a5 100644
--- a/tests/baselines/reference/tsxReactEmit6.symbols
+++ b/tests/baselines/reference/tsxReactEmit6.symbols
@@ -34,6 +34,7 @@ namespace M {
>spread1 : Symbol(spread1, Decl(react-consumer.tsx, 8, 4))
>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 2, 22))
>x : Symbol(unknown)
+>foo : Symbol(foo, Decl(react-consumer.tsx, 7, 4))
>y : Symbol(unknown)
}
diff --git a/tests/cases/fourslash/findAllRefsForVariableInExtendsClause01.ts b/tests/cases/fourslash/findAllRefsForVariableInExtendsClause01.ts
new file mode 100644
index 0000000000..1ec144d7e8
--- /dev/null
+++ b/tests/cases/fourslash/findAllRefsForVariableInExtendsClause01.ts
@@ -0,0 +1,15 @@
+///
+
+
+////var [|Base|] = class { };
+////class C extends [|Base|] { }
+
+let ranges = test.ranges();
+for (let range of ranges) {
+ goTo.position(range.start);
+
+ verify.referencesCountIs(ranges.length);
+ for (let expectedReference of ranges) {
+ verify.referencesAtPositionContains(expectedReference);
+ }
+}
\ No newline at end of file
diff --git a/tests/cases/fourslash/findAllRefsForVariableInExtendsClause02.ts b/tests/cases/fourslash/findAllRefsForVariableInExtendsClause02.ts
new file mode 100644
index 0000000000..0f06a3c420
--- /dev/null
+++ b/tests/cases/fourslash/findAllRefsForVariableInExtendsClause02.ts
@@ -0,0 +1,17 @@
+///
+
+////interface [|Base|] { }
+////namespace n {
+//// var Base = class { };
+//// interface I extends [|Base|] { }
+////}
+
+let ranges = test.ranges();
+for (let range of ranges) {
+ goTo.position(range.start);
+
+ verify.referencesCountIs(ranges.length);
+ for (let expectedReference of ranges) {
+ verify.referencesAtPositionContains(expectedReference);
+ }
+}
\ No newline at end of file
diff --git a/tests/cases/fourslash/findAllRefsForVariableInImplementsClause01.ts b/tests/cases/fourslash/findAllRefsForVariableInImplementsClause01.ts
new file mode 100644
index 0000000000..93f8cec810
--- /dev/null
+++ b/tests/cases/fourslash/findAllRefsForVariableInImplementsClause01.ts
@@ -0,0 +1,10 @@
+///
+
+
+////var Base = class { };
+////class C extends Base implements [|Base|] { }
+
+let ranges = test.ranges();
+for (let range of ranges) {
+ verify.referencesCountIs(0);
+}
\ No newline at end of file
diff --git a/tests/cases/fourslash/jsxSpreadReference.ts b/tests/cases/fourslash/jsxSpreadReference.ts
new file mode 100644
index 0000000000..64ab03e6ab
--- /dev/null
+++ b/tests/cases/fourslash/jsxSpreadReference.ts
@@ -0,0 +1,25 @@
+///
+
+//@Filename: file.tsx
+//// declare module JSX {
+//// interface Element { }
+//// interface IntrinsicElements {
+//// }
+//// interface ElementAttributesProperty { props }
+//// }
+//// class MyClass {
+//// props: {
+//// name?: string;
+//// size?: number;
+//// }
+//// }
+////
+//// var [|/*dst*/nn|]: {name?: string; size?: number};
+//// var x = ;
+
+goTo.marker('src');
+goTo.definition();
+verify.caretAtMarker('dst');
+
+goTo.marker('src');
+verify.renameLocations(/*findInStrings*/ false, /*findInComments*/ false);