Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

code hints in inherited class by Class.create not showing, later use guess hint causes existing hint changed #12272

Open
core-ai-bot opened this issue Aug 31, 2021 · 3 comments

Comments

@core-ai-bot
Copy link
Member

Issue by jodyzhang
Monday Apr 29, 2013 at 15:07 GMT
Originally opened as adobe/brackets#3660


  1. following following code snippet, try to get code hint after bruce.
var Vulnerable = {
    wound: function (hp) {
        this.health -= hp;
    },
    kill: function () {
    }
};

var Person = Class.create(Vulnerable, {
    initialize: function () {
        this.health = 100;
    }
});

var bruce = new Person();
bruce.

->code hints are: kill, wound, missing "initialize".
2. type initialize() after "bruce.".
3. get code hint by type bruce. again
->code hints now: initialize, wound, "kill" is removed

Expect:
at step 1, "initialize" should be found.
at step 3, code hint should be: initialize, kill, wound

@core-ai-bot
Copy link
Member Author

Comment by jodyzhang
Friday May 03, 2013 at 18:22 GMT


I opened similar issue against tern. Marinj replied with following:
"It appears that Prototype's Class.create is too complex a function to be properly interpreted by Tern. The best solution is probably for someone to write a JSON definition file (similar to defs/jquery.json) for the library. If you want to put in the effort, or if you can point me to a machine-readable specification of the Prototype interface, that'd be much appreciated."

So maybe we can do something for this? thanks.

@core-ai-bot
Copy link
Member Author

Comment by pthiess
Friday May 03, 2013 at 20:33 GMT


@adrocknaphobia Hi Adam, would you mind putting this on the community backlog. This way people could vote on it, we actually don't know how many would run into something like this.

@core-ai-bot
Copy link
Member Author

Comment by redmunds
Monday Mar 17, 2014 at 21:05 GMT


Was assigned to adrock, so marking "Needs Review".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant