diff --git a/src/generators/Generator.js b/src/generators/Generator.js index e16d43da04..39569cc1da 100644 --- a/src/generators/Generator.js +++ b/src/generators/Generator.js @@ -156,6 +156,8 @@ export default class Generator { let scope = annotateWithScopes( expression ); const dependencies = []; + const generator = this; // can't use arrow functions, because of this.skip() + walk( expression, { enter ( node, parent ) { if ( node._scope ) { @@ -165,7 +167,7 @@ export default class Generator { if ( isReference( node, parent ) ) { const { name } = flattenReference( node ); - if ( scope.has( name ) ) return; + if ( scope.has( name ) || generator.helpers.has( name ) ) return; if ( contextDependencies.has( name ) ) { dependencies.push( ...contextDependencies.get( name ) ); diff --git a/test/runtime/samples/dev-warning-helper/_config.js b/test/runtime/samples/dev-warning-helper/_config.js new file mode 100644 index 0000000000..b562b70b9e --- /dev/null +++ b/test/runtime/samples/dev-warning-helper/_config.js @@ -0,0 +1,13 @@ +export default { + solo: true, + + dev: true, + + data: { + bar: 1 + }, + + html: '2', + + warnings: [] +}; diff --git a/test/runtime/samples/dev-warning-helper/main.html b/test/runtime/samples/dev-warning-helper/main.html new file mode 100644 index 0000000000..f86e8fb09c --- /dev/null +++ b/test/runtime/samples/dev-warning-helper/main.html @@ -0,0 +1,11 @@ +{{foo(bar)}} + + \ No newline at end of file