File tree Expand file tree Collapse file tree 2 files changed +6
-1
lines changed
test/unit/modules/compiler Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change 11/* @flow */
22
3- const fnExpRE = / ^ ( [ \w $ _ ] + | \( [ ^ ) ] * ?\) ) \s * = > | ^ f u n c t i o n \s * \( /
3+ const fnExpRE = / ^ ( [ \w $ _ ] + | \( [ ^ ) ] * ?\) ) \s * = > | ^ f u n c t i o n \s * (?: [ \w $ ] + ) ? \s * \( /
44const fnInvokeRE = / \( [ ^ ) ] * ?\) ; * $ /
55const simplePathRE = / ^ [ A - Z a - z _ $ ] [ \w $ ] * (?: \. [ A - Z a - z _ $ ] [ \w $ ] * | \[ ' [ ^ ' ] * ?' ] | \[ " [ ^ " ] * ?" ] | \[ \d + ] | \[ [ A - Z a - z _ $ ] [ \w $ ] * ] ) * $ /
66
Original file line number Diff line number Diff line change @@ -500,6 +500,11 @@ describe('codegen', () => {
500500 '<input @input="function () { current++ }">' ,
501501 `with(this){return _c('input',{on:{"input":function () { current++ }}})}`
502502 )
503+ // normal named function
504+ assertCodegen (
505+ '<input @input="function fn () { current++ }">' ,
506+ `with(this){return _c('input',{on:{"input":function fn () { current++ }}})}`
507+ )
503508 // arrow with no args
504509 assertCodegen (
505510 '<input @input="()=>current++">' ,
You can’t perform that action at this time.
0 commit comments