Skip to content

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

Closed
@yuit

Description

@yuit

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Working as IntendedThe behavior described is the intended behavior; this is not a bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions