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

Some of ComputedProperty Expression seem to get map to intrinsic property #9238

Closed
yuit opened this issue Jun 17, 2016 · 1 comment
Closed
Labels
Working as Intended The behavior described is the intended behavior; this is not a bug

Comments

@yuit
Copy link
Contributor

yuit commented Jun 17, 2016

Version: built from master

class C {
    [arguments]() {}  // A computed property name must be of type 'string', 'number', 'symbol', or 'any'
    [name]() {} // this one the compiler thought it is property "name" of type string
    [length](){} // this one the compiler thought it is a property "length" of type number"
    [caller](){}  // Cannot find name 'caller'. Did you mean the static member 'C.caller'?
}
var o = {
    [arguments](){}, // A computed property name must be of type 'string', 'number', 'symbol', or 'any'
    [name]() {}, // this one the compiler though it is property "name" of type string
    [length](){}, // this one the compiler thought it is a property "length" of type number"
    [caller](){}, // Cannot find name 'caller'. Did you mean the static member 'C.caller'?
}

Actual
inline actual error

Expected
all should get "Cannot find name " error

@mhegazy
Copy link
Contributor

mhegazy commented Jun 22, 2016

these make sense. name and length are defined in lib.d.ts. see #1351.

caller is not defined anywhere.

argument is the argument object of the function representing the class body.

@mhegazy mhegazy added the Working as Intended The behavior described is the intended behavior; this is not a bug label Jun 22, 2016
@mhegazy mhegazy closed this as completed Jun 22, 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
Working as Intended The behavior described is the intended behavior; this is not a bug
Projects
None yet
Development

No branches or pull requests

2 participants