Skip to content

Conversation

@rbuckton
Copy link
Contributor

@rbuckton rbuckton commented Apr 7, 2015

Class members with computed property names that are decorated must cache the expression result for the computed property name for later use when applying decorators. The cache was based on the node's ID, but if the node's ID was not generated, it would use the value undefined.

Replaced the two places where node.id was referenced to call getNodeId(node), which resolves the issue.

DanielRosenwasser and others added 8 commits February 23, 2015 17:44
Conflicts:
	src/compiler/emitter.ts
	tests/baselines/reference/ES5SymbolProperty1.js
	tests/baselines/reference/FunctionDeclaration8_es6.js
	tests/baselines/reference/FunctionDeclaration9_es6.js
	tests/baselines/reference/FunctionPropertyAssignments5_es6.js
	tests/baselines/reference/computedPropertyNames10_ES5.js
	tests/baselines/reference/computedPropertyNames11_ES5.js
	tests/baselines/reference/computedPropertyNames18_ES5.js
	tests/baselines/reference/computedPropertyNames19_ES5.js
	tests/baselines/reference/computedPropertyNames1_ES5.js
	tests/baselines/reference/computedPropertyNames20_ES5.js
	tests/baselines/reference/computedPropertyNames22_ES5.js
	tests/baselines/reference/computedPropertyNames23_ES5.js
	tests/baselines/reference/computedPropertyNames25_ES5.js
	tests/baselines/reference/computedPropertyNames26_ES5.js
	tests/baselines/reference/computedPropertyNames28_ES5.js
	tests/baselines/reference/computedPropertyNames29_ES5.js
	tests/baselines/reference/computedPropertyNames30_ES5.js
	tests/baselines/reference/computedPropertyNames31_ES5.js
	tests/baselines/reference/computedPropertyNames33_ES5.js
	tests/baselines/reference/computedPropertyNames34_ES5.js
	tests/baselines/reference/computedPropertyNames46_ES5.js
	tests/baselines/reference/computedPropertyNames47_ES5.js
	tests/baselines/reference/computedPropertyNames48_ES5.js
	tests/baselines/reference/computedPropertyNames49_ES5.js
	tests/baselines/reference/computedPropertyNames4_ES5.js
	tests/baselines/reference/computedPropertyNames50_ES5.js
	tests/baselines/reference/computedPropertyNames5_ES5.js
	tests/baselines/reference/computedPropertyNames6_ES5.js
	tests/baselines/reference/computedPropertyNames7_ES5.js
	tests/baselines/reference/computedPropertyNames8_ES5.js
	tests/baselines/reference/computedPropertyNames9_ES5.js
	tests/baselines/reference/computedPropertyNamesContextualType10_ES5.js
	tests/baselines/reference/computedPropertyNamesContextualType1_ES5.js
	tests/baselines/reference/computedPropertyNamesContextualType2_ES5.js
	tests/baselines/reference/computedPropertyNamesContextualType3_ES5.js
	tests/baselines/reference/computedPropertyNamesContextualType4_ES5.js
	tests/baselines/reference/computedPropertyNamesContextualType5_ES5.js
	tests/baselines/reference/computedPropertyNamesContextualType6_ES5.js
	tests/baselines/reference/computedPropertyNamesContextualType7_ES5.js
	tests/baselines/reference/computedPropertyNamesContextualType8_ES5.js
	tests/baselines/reference/computedPropertyNamesContextualType9_ES5.js
	tests/baselines/reference/computedPropertyNamesDeclarationEmit5_ES5.js
	tests/baselines/reference/computedPropertyNamesSourceMap2_ES5.js
	tests/baselines/reference/computedPropertyNamesSourceMap2_ES5.js.map
	tests/baselines/reference/computedPropertyNamesSourceMap2_ES5.sourcemap.txt
	tests/baselines/reference/parserES5ComputedPropertyName2.js
	tests/baselines/reference/parserES5ComputedPropertyName3.js
	tests/baselines/reference/parserES5ComputedPropertyName4.js
	tests/baselines/reference/privateIndexer2.js
Check for omitted expressions when checking const and let declaration names
steveluc and others added 2 commits April 7, 2015 16:00
@mhegazy
Copy link
Contributor

mhegazy commented Apr 8, 2015

👍

rbuckton added a commit that referenced this pull request Apr 8, 2015
…operties

Fixes computed name caching for decorators
@rbuckton rbuckton merged commit bbd7142 into master Apr 8, 2015
@rbuckton rbuckton deleted the fixDecoratorEmitForComputedProperties branch April 8, 2015 22:46
@microsoft microsoft locked and limited conversation to collaborators Jun 18, 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.

8 participants