Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Immutable scala sets don't work with extern annotation in Scala 2 #1401

Closed
andreagilot-da opened this issue Apr 24, 2023 · 0 comments
Closed

Comments

@andreagilot-da
Copy link

andreagilot-da commented Apr 24, 2023

When verifying the following snippet in stainless-scalac:

import stainless.lang._
import stainless.annotation._
import scala.collection.immutable.{Set => ScalaSet}

case class Set[T] (@extern s: ScalaSet[T])

Stainless won't accept it although there is an extern annotation.

[ Error  ] utils/AxiomaticSet.scala:8:20: Scala API `scala.collection.immutable.Set[T]` is not directly supported, please use `stainless.lang.Set` instead.
           case class Set[T] (@extern s: ScalaSet[T])
                              ^^^^^^^^^^^^^^^^^^^^^^

The same snippet works fine if we change immutable scala sets by mutable ones.

mario-bucev added a commit to mario-bucev/stainless that referenced this issue Apr 25, 2023
mario-bucev added a commit to mario-bucev/stainless that referenced this issue Apr 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant