Crash related to XML in given
See original GitHub issueCompiler version
3.0.0, 3.1.0, 3.1.2, 3.2.0-RC1
Minimized code
libraryDependencies += "org.scala-lang.modules" %% "scala-xml" % "2.1.0"
trait Renderer[A]:
def render(x: A): xml.Elem
given Renderer[Int] with
def render(x: Int) = <td>{ x.toString }</td>
Output (click arrow to expand)
error while checking extends Renderer[Int] {
def render(x: Int) =
{
{
new _root_.scala.xml.Elem(null, "td", _root_.scala.xml.Null, $scope,
false
,
{
val $buf = new _root_.scala.xml.NodeBuffer()
$buf.&+(
{
x.toString
}
)
$buf
}*
)
}
}
}
Issue Analytics
- State:
- Created a year ago
- Comments:11
Top Results From Across the Web
android - Why does my XML code crash when its identical to ...
I'm building my first Android program from a book. It kept crashing on an XML file. I downloaded the xml code from the...
Read more >Crash occur while executing read-xml() - Progress Community
Crash occur while executing read-xml(). While reading an XML in a dataset an application crash occurs. The crash occurs while execution of ...
Read more >how to crash a program when i open a .xml file - CodeProject
one solution i thought about is to change a type from the project, if a variable is int and i change it to...
Read more >[XML export crash] "Serious error" on XML export of specific clip
Hi all, When attempting to export an XML of a specific clip , Premiere Pro will crash. It will get to the Final...
Read more >Crash on trying to add > in a large xml-based file #11221
Huh, you're right; it DOES fix it. Thank you! I'll try to isolate the problem to a specific plugin.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
The off-by-one span error on Windows suggests maybe
lineSeparator
is involved, as it adds aCR
toNL
?It works for me under WSL Ubuntu; I’m much too lazy to try it under bare Windows. Or rather, my instinct for self-preservation is just strong enough.
(For other newbies, I see the position check at parser is compile-time true, not a compiler option.)
The problem seems to be https://github.com/lampepfl/dotty/pull/15635/files#diff-052bd0d14090dbcf9a970757f11efe267009ee324696dcc3ea785c32eafc770cR77
which is corrected in https://github.com/lampepfl/dotty/pull/15635
It looks like the scala 2 fixes to locate the start of the element are simplified in scala 3, which tracks
lastCharOffset
.This would be an example of unfortunate duplicative effort. How many versions of
CharArrayReader
does one need?Another divergence is due to
\u
unicode escape handling. If diffing and porting, it’s nicer for diffs to remain small; the gold standard is still just to share utility code.