I would like to define a function with this symbolic name without using backlinks:
def <? (i: Int): Unit = println(i)
Unfortunately, this leads to the following error identifier expected but $XMLSTART$< found. Is there a way to prevent Scala from parsing this symbolic name as XML?
identifier expected but $XMLSTART$< found
Thank!
No no.
Unfortunately, you will have to avoid this every time with backsticks.
def `<?` (i: Int): Unit = println(i)
Testing:
scala> def `<?` (i: Int): Unit = println(i) $less$qmark: (i: Int)Unit scala> `<?`(3) 3