fix(compiler): ensure that event handlers have the correct source spans (#28055)
When template bindings are being parsed the event handlers were receiving a source span that included the whole attribute. Now they get a span that is focussed on the handler itself. PR Close #28055
This commit is contained in:

committed by
Misko Hevery

parent
497619f25d
commit
cffd86260a
@ -420,7 +420,7 @@ class ArrayConsole implements Console {
|
||||
expectVisitedNode(
|
||||
new class extends
|
||||
NullVisitor{visitEvent(ast: BoundEventAst, context: any): any{return ast;}},
|
||||
new BoundEventAst('foo', 'bar', 'goo', null !, null !));
|
||||
new BoundEventAst('foo', 'bar', 'goo', null !, null !, null !));
|
||||
});
|
||||
|
||||
it('should visit BoundElementPropertyAst', () => {
|
||||
@ -474,7 +474,7 @@ class ArrayConsole implements Console {
|
||||
new EmbeddedTemplateAst([], [], [], [], [], [], false, [], [], 0, null !),
|
||||
new ElementAst('foo', [], [], [], [], [], [], false, [], [], 0, null !, null !),
|
||||
new ReferenceAst('foo', null !, 'bar', null !), new VariableAst('foo', 'bar', null !),
|
||||
new BoundEventAst('foo', 'bar', 'goo', null !, null !),
|
||||
new BoundEventAst('foo', 'bar', 'goo', null !, null !, null !),
|
||||
new BoundElementPropertyAst('foo', null !, null !, null !, 'bar', null !),
|
||||
new AttrAst('foo', 'bar', null !), new BoundTextAst(null !, 0, null !),
|
||||
new TextAst('foo', 0, null !), new DirectiveAst(null !, [], [], [], 0, null !),
|
||||
|
Reference in New Issue
Block a user