Used variable for instantiation differs in Scala 3
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
Research direction
Start with the linked Demo Repository and run the provided Main example under Scala 2.13.30 and Scala 3.0.2. Trace how wire[Basket] selects a Berry when blackberry and lazy raspberry are in scope. Done means the Scala 3 result is made consistent with the intended behavior, with a regression test covering this example.
Written by the indexing model from the issue text.
Description
The following code produces a different outcome when using Scala 3:
import com.softwaremill.macwire.wire
case class Berry(var name: String)
case class Basket(berry: Berry)
object Main extends App {
val blackberry: Berry = Berry("blackberry")
val basket: Basket = {
lazy val raspberry: Berry = Berry("raspberry")
wire[Basket]
}
println(basket.berry.name) // scala 2.13.30 raspberry, scala 3.0.2 blackberry
}
- Dominant language
- Scala
- Stars
- 1.3k
- Forks
- 77
- Avg merge
- 9m
- Merged PRs (30d)
- 4
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from softwaremill/macwire
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
softwaremill/macwire#412 · 3 comments ·
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
softwaremill/macwire#391 · 1 comment ·
-
Difficulty 5/5 Over a week Newbie friendliness 20/100
softwaremill/macwire#301 · 2 comments ·
-
Difficulty 5/5 Over a week Newbie friendliness 20/100
softwaremill/macwire#281 · 5 comments ·
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
softwaremill/macwire#246 · 2 comments ·
All issues in softwaremill/macwire
Similar issues
-
Area: Excel support
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
orbeon/orbeon-forms#7893 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
lichess-org/lila#21788 · 2 comments ·
-
area:Iceberg area:writer documentation requires-triage
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
apache/datafusion-comet#6147 ·
-
feature
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
GiganticMinecraft/SeichiAssist#2978 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
chipsalliance/rocket-chip#3833 ·