diff --git a/compiler/src/dotty/tools/dotc/parsing/xml/SymbolicXMLBuilder.scala b/compiler/src/dotty/tools/dotc/parsing/xml/SymbolicXMLBuilder.scala index 393fd0a5f626..74493215f12a 100644 --- a/compiler/src/dotty/tools/dotc/parsing/xml/SymbolicXMLBuilder.scala +++ b/compiler/src/dotty/tools/dotc/parsing/xml/SymbolicXMLBuilder.scala @@ -163,7 +163,7 @@ class SymbolicXMLBuilder(parser: Parser, preserveWS: Boolean)(implicit ctx: Cont val buffer = ValDef(_buf, TypeTree(), New(_scala_xml_NodeBuffer, ListOfNil)) val applies = args filterNot isEmptyText map (t => Apply(Select(Ident(_buf), _plus), List(t))) - atSpan(span)( Block(buffer :: applies.toList, Ident(_buf)) ) + atSpan(span)(new XMLBlock(buffer :: applies.toList, Ident(_buf)) ) } /** Returns (Some(prefix) | None, rest) based on position of ':' */ diff --git a/tests/pos/xml-attribute-block.scala b/tests/pos/xml-attribute-block.scala new file mode 100644 index 000000000000..c782d511d390 --- /dev/null +++ b/tests/pos/xml-attribute-block.scala @@ -0,0 +1,3 @@ +class Foo { + +}