Skip to content

Commit bb25f19

Browse files
authored
Merge pull request #6547 from dotty-staging/fix-xml-block
Add missing XMLBlock
2 parents 3bcaf1d + 0e17e96 commit bb25f19

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

compiler/src/dotty/tools/dotc/parsing/xml/SymbolicXMLBuilder.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ class SymbolicXMLBuilder(parser: Parser, preserveWS: Boolean)(implicit ctx: Cont
163163
val buffer = ValDef(_buf, TypeTree(), New(_scala_xml_NodeBuffer, ListOfNil))
164164
val applies = args filterNot isEmptyText map (t => Apply(Select(Ident(_buf), _plus), List(t)))
165165

166-
atSpan(span)( Block(buffer :: applies.toList, Ident(_buf)) )
166+
atSpan(span)(new XMLBlock(buffer :: applies.toList, Ident(_buf)) )
167167
}
168168

169169
/** Returns (Some(prefix) | None, rest) based on position of ':' */

tests/pos/xml-attribute-block.scala

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
class Foo {
2+
<foo a="hello &name; aaa"/>
3+
}

0 commit comments

Comments
 (0)