Skip to content

Fixes issue https://github.com/Microsoft/TypeScript/issues/528 (Show better error message for unresolved references due to missing prefix)#6469

Merged
DanielRosenwasser merged 13 commits into
microsoft:masterfrom
ShyykoSerhiy:fix-528
Jan 14, 2016
Merged

Fixes issue https://github.com/Microsoft/TypeScript/issues/528 (Show better error message for unresolved references due to missing prefix)#6469
DanielRosenwasser merged 13 commits into
microsoft:masterfrom
ShyykoSerhiy:fix-528

Conversation

@ShyykoSerhiy
Copy link
Copy Markdown
Contributor

Fix for issue #528

Comment thread src/compiler/checker.ts Outdated
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Space after

@mhegazy
Copy link
Copy Markdown
Contributor

mhegazy commented Jan 13, 2016

👍

Comment thread src/compiler/diagnosticMessages.json Outdated
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you change this to

"Cannot find name '{0}'. Did you mean the static member '{1}.{0}'?"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe @sandersn and @JsonFreeman can weigh in on something better. I prefer my suggestion because it's shorter and less overwhelming for the user.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree, the shorter form sounds better. The this version can be even shorter: "Did you mean the memer 'this.{0}'?"

@DanielRosenwasser
Copy link
Copy Markdown
Member

I think it's a little odd that for

class C {
    static foo: string;

    bar() {
        let k = foo;
    }
}

we don't give the appropriate suggestion for using C.foo, but I think we can punt on that for now. I'd like to just get this in first.

Otherwise, this is an awesome change. Thanks @ShyykoSerhiy!

DanielRosenwasser added a commit that referenced this pull request Jan 14, 2016
Fixes issue #528 (Show better error message for unresolved references due to missing prefix)
@DanielRosenwasser DanielRosenwasser merged commit 1868caa into microsoft:master Jan 14, 2016
@microsoft microsoft locked and limited conversation to collaborators Jun 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants