Skip to content

Commit

Permalink
Fixed js macros.
Browse files Browse the repository at this point in the history
  • Loading branch information
robby-phd committed Apr 18, 2024
1 parent 9874766 commit ea59efc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions macros/shared/src/main/scala/org/sireum/$internal/Macro.scala
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ class Macro(val c: scala.reflect.macros.blackbox.Context) {
def anyImpl(fs: c.Tree, default: c.Tree, isSequential: c.Tree): c.Tree =
if (isJsCheck)
q"""{
def anySeq(): (R, _root_.scala.Long) = {
def anySeq(): R = {
for (f <- $fs) {
f() match {
case _root_.scala.Some(r) => return r
Expand Down Expand Up @@ -312,11 +312,11 @@ class Macro(val c: scala.reflect.macros.blackbox.Context) {
def anyEitherImpl(fs: c.Tree, isSequential: c.Tree): c.Tree =
if (isJsCheck)
q"""{
def anySeq(): (_root_.scala.Either[R, _root_.scala.Seq[S]], _root_.scala.Long) = {
def anySeq(): _root_.scala.Either[R, _root_.scala.Seq[S]] = {
var ss = _root_.scala.Vector[S]()
for (f <- $fs) {
f() match {
case _root_.scala.Left(r) => return (_root_.scala.Left(r), _root_.java.lang.System.currentTimeMillis - start)
case _root_.scala.Left(r) => return _root_.scala.Left(r)
case _root_.scala.Right(r) => ss = ss :+ r
}
}
Expand Down

0 comments on commit ea59efc

Please sign in to comment.