mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-05 08:11:30 -06:00
If we are comparing left hand side for is position of type node, it is false, because it is namespace position and not type position
Fixes #837
This commit is contained in:
parent
04e2169f03
commit
57af2623c6
@ -8467,7 +8467,7 @@ module ts {
|
||||
// above them to find the lowest container
|
||||
case SyntaxKind.Identifier:
|
||||
// If the identifier is the RHS of a qualified name, then it's a type iff its parent is.
|
||||
if (node.parent.kind === SyntaxKind.QualifiedName) {
|
||||
if (node.parent.kind === SyntaxKind.QualifiedName && (<QualifiedName>node.parent).right === node) {
|
||||
node = node.parent;
|
||||
}
|
||||
// fall through
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
class Foo<T extends Foo.Bar> {
|
||||
>Foo : Foo<T>
|
||||
>T : T
|
||||
>Foo : Foo<T>
|
||||
>Foo : unknown
|
||||
>Bar : Foo.Bar
|
||||
|
||||
constructor() {
|
||||
|
||||
@ -5,7 +5,7 @@ import Foo = require('exportAssignClassAndModule_0');
|
||||
|
||||
var z: Foo.Bar;
|
||||
>z : Foo.Bar
|
||||
>Foo : Foo
|
||||
>Foo : unknown
|
||||
>Bar : Foo.Bar
|
||||
|
||||
var zz: Foo;
|
||||
@ -23,7 +23,7 @@ class Foo {
|
||||
|
||||
x: Foo.Bar;
|
||||
>x : Foo.Bar
|
||||
>Foo : Foo
|
||||
>Foo : unknown
|
||||
>Bar : Foo.Bar
|
||||
}
|
||||
module Foo {
|
||||
|
||||
@ -11,7 +11,7 @@ interface server {
|
||||
>server : server
|
||||
|
||||
(): server.Server;
|
||||
>server : server
|
||||
>server : unknown
|
||||
>Server : server.Server
|
||||
|
||||
startTime: Date;
|
||||
|
||||
@ -61,12 +61,12 @@ import clolias = clodule;
|
||||
|
||||
var p: clolias.Point;
|
||||
>p : alias.Point
|
||||
>clolias : clodule
|
||||
>clolias : unknown
|
||||
>Point : clolias.Point
|
||||
|
||||
var p: clodule.Point;
|
||||
>p : alias.Point
|
||||
>clodule : clodule
|
||||
>clodule : unknown
|
||||
>Point : clolias.Point
|
||||
|
||||
var p: { x: number; y: number; };
|
||||
|
||||
@ -13,7 +13,7 @@ interface Foo<T> {
|
||||
}
|
||||
var Foo: new () => Foo.A<Foo<string>>;
|
||||
>Foo : new () => Foo.A<Foo<string>>
|
||||
>Foo : Foo<T>
|
||||
>Foo : unknown
|
||||
>A : Foo.A<T>
|
||||
>Foo : Foo<T>
|
||||
|
||||
|
||||
@ -10,9 +10,7 @@
|
||||
|
||||
goTo.marker('1');
|
||||
verify.completionListContains('I');
|
||||
|
||||
// bug #837
|
||||
verify.completionListContains('foo');
|
||||
verify.not.completionListContains('foo');
|
||||
edit.insert('I;');
|
||||
|
||||
goTo.marker('2');
|
||||
|
||||
@ -0,0 +1,9 @@
|
||||
/// <reference path='fourslash.ts'/>
|
||||
|
||||
////declare class m3f { foo(x: number): void }
|
||||
////module m3f { export interface I { foo(): void } }
|
||||
////var x: m3f./**/
|
||||
|
||||
goTo.marker();
|
||||
debugger;
|
||||
verify.not.completionListContains("foo");
|
||||
Loading…
x
Reference in New Issue
Block a user