python (65.1k questions)
javascript (44.2k questions)
reactjs (22.7k questions)
java (20.8k questions)
c# (17.4k questions)
html (16.3k questions)
r (13.7k questions)
android (12.9k questions)
Why can two type aliases not have extension methods with the same name?
In a Scala 3 REPL, entering the following
type B = Int
extension (a: A)
def f() = println("A!")
extension (b: B)
def f() = println("B!")
gives the error
8 | def f() = print...
Maximilien Tirard
Votes: 0
Answers: 0
sbt: Running specific main method from the command line
I have several methods annotated with @main and it totally beats me how to run one of them specifically from a terminal, even after thoroughly looking at the sbt documentation. All I can find is how t...
Aarkon
Votes: 0
Answers: 1
What is the difference between "with" and "new" for context parameters in scala?
Is there a difference if I define a given value for a context parameter using the keyword with or using new?
for example is there a difference between human and cat givens?
trait Talker:
def talk:S...
HHH
Votes: 0
Answers: 1
Scala error when providing subclass instance in place of superclass?
I am just trying things out in scala and I wrote this code
object Main:
def main(args: Array[String]): Unit =
val dInt: Data[Int] = IntData(1)
val dString: Data[String] = StringData("he...
test test
Votes: 0
Answers: 2