This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Summary: | Support of destructuring assignment | ||
---|---|---|---|
Product: | javascript | Reporter: | Petr Pisl <ppisl> |
Component: | Editor | Assignee: | Petr Pisl <ppisl> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | P2 | ||
Version: | 8.2 | ||
Hardware: | PC | ||
OS: | Linux | ||
Issue Type: | TASK | Exception Reporter: | |
Bug Depends on: | |||
Bug Blocks: | 242387 | ||
Attachments: |
Simple Array Destructuring Assignment
Array Destructuring Assignment with Default Values Array Destructuring Assignment from a Function Array Destructuring Assignment - swap values of two variables Simple Object Destructuring Assignment Object destructuring assignment without declaration Object destructuring assignment without declaration Object destructuring assignment , when a property is not defined Object destructuring assigning to new variable names Setting a function parameter's default value |
Description
Petr Pisl
2016-04-05 15:00:15 UTC
Simple array destructuring assignment is handled by NB now. Created attachment 159315 [details]
Simple Array Destructuring Assignment
Simple array destructuring assignment. Variables are created, mark occurrences and Go To declaration should work.
Created attachment 159316 [details]
Array Destructuring Assignment with Default Values
According the default values NB can suggest the tape of object.
Created attachment 159317 [details]
Array Destructuring Assignment from a Function
Created attachment 159318 [details]
Array Destructuring Assignment - swap values of two variables
Mark occurrences should work as expected.
Created attachment 159319 [details]
Simple Object Destructuring Assignment
Creating variables, mark occurrences and Go To navigation should work.
Created attachment 159320 [details]
Object destructuring assignment without declaration
Created attachment 159321 [details]
Object destructuring assignment without declaration
Mark occurrences should work on both sides.
Created attachment 159322 [details]
Object destructuring assignment , when a property is not defined
In this case, the property from the assigned object literal corresponds with the properties on the left site of the assignment. Mark occurrences work for such properties, user can rename them.
Also the property w is not defined on the right site, so NetBeans doesn't mark such property with green color.
Created attachment 159323 [details]
Object destructuring assigning to new variable names
NetBeans marks occurrences of the properties assigned from the object literal on the right sight and the properties used on the left site.
Created attachment 159324 [details]
Setting a function parameter's default value
NetBeans handle parameters defined via destructuring assignment. The mark occurrences, Go To Declaration and code completion should work in such cases.
The support is done. Implemented in ecma6-truffle branch. There is an issue #258901 with false warnings that will be fixed soon. |