-
Notifications
You must be signed in to change notification settings - Fork 795
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(compiler): handle static members with stencil decorators (#4463)
this commit fixes an edge case to the fix introduced in 6dbe9a5 (#4447). the mechanism for checking if there is a statically intiialized class member has been updated in order to exclude such members that are decorated with Stencil's `@Prop()` and `@State()` decorators.
- Loading branch information
1 parent
2f870d8
commit dc3925e
Showing
6 changed files
with
119 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
test/karma/test-app/static-members/static-decorated-members.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { Component, h, State } from '@stencil/core'; | ||
|
||
@Component({ | ||
tag: 'static-decorated-members', | ||
}) | ||
export class StaticDecoratedMembers { | ||
/** | ||
* See the spec file associated with this file for the motivation for this test | ||
*/ | ||
@State() static property = '@State-ful'; | ||
|
||
render() { | ||
return <div>This is a component with a static Stencil decorated member</div>; | ||
} | ||
} |