Skip to main content
Stack Overflow
  1. About
  2. For Teams
Filter by
Sorted by
Tagged with
1 vote
0 answers
53 views

My idea was to embed data in a class "statically" - i.e. completely independant of other components - and write it to file during compile. Something like this: def createForm()(using Quotes) ...
5 votes
0 answers
95 views

I am converting a Scala 2.13 project to Scala 3. Since I have made that change, the compiler has never finished compiling. There were normal syntax errors before the compiler hangs, which I have now ...
-1 votes
2 answers
142 views

I have two possibilities to implement a simple list drop method. A: def drop[A](l: List[A], n: Int): List[A] = (n, l) match case (n, l) if n <= 0 => l case (_, Cons(_, t)) => drop(t, n - ...
0 votes
0 answers
38 views

Consider the following code. When I run it, I see Flag -experimental set repeatedly message (the functionality seems correct otherwise). What should I do so it won't be displayed? (without (using ...
0 votes
0 answers
29 views

I am upgrading a Scala2, version 2.13.16, OSGI application using Apache Felix, version 7.0.5, to Scala3 version 3.7.3. The Scala3 library scala3_library_3 is not released as a bundle, no doubt because ...
collymy's user avatar
  • 77
3 votes
0 answers
58 views

In Scala 3 (3.3.x) I want a recursive match type over intersections: sealed trait Authorization trait Admin extends Authorization trait Owner extends Authorization trait Authorizer[A <: ...
0 votes
0 answers
69 views

In Scala 3 macros how to suppress deprecated warnings in code generated for type classes of types defined like here: @deprecated("some reason") case class C(x: Int) derives SomeTypeClass ...
1 vote
1 answer
87 views

I'm builing a ScalaJs & Scala3 application, when i run the npm run dev/build command I have the following error, and I'm not figuring out how to fix it: Referring to non-existent class scala....
2 votes
0 answers
95 views

It is so easy in Scala 2, just: q"lazy val $name = $value" I need it for local values, so I don't have multi-thread requirements I've tried just adding Flags.Lazy to the val definition ...
1 vote
1 answer
150 views

In the updated section of the answer to the question How to reduce a Term that is reducible to a constant, @DmytroMitin used an interesting approach to reduce an Expr[T] to a Literal(<T>Constant(...
0 votes
1 answer
88 views

Do we have any replacement for the following Scala 3.7 code: x.asType match { case '[type t <: S; t] => '{ apply[t] }.asExprOf[Any] case _ => report.errorAndAbort(s"...
0 votes
1 answer
57 views

In Programming in Scala (5th ed), page 462, there is the following code: def isort[T](xs: List[T])(using ord: Ord[T]): List[T] = if xs.isEmpty then Nil else insert(xs.head, isort(xs.tail)) def ...
1 vote
1 answer
372 views

I'm trying to upgrade a scala library to scala3 and cannot seem to figure out how to get the scala3 language to work with jlink. It says I'm missing transitive dependencies on a jlink build. You can ...
1 vote
1 answer
88 views

In the following example, using a quoted expression ('{ ... }) raises a compiler error, while the equivalent AST construction works fine. Why does this happen? Code Example // Using Scala 3.7.0 trait ...
Readren's user avatar
  • 1,290
0 votes
0 answers
36 views

Linking to overloaded methods is a nightmare, especially since it is typical for argument lists to have common prefixes. Ugly, bug prone, brittle, and current IDEs aren't able to process such ...

15 30 50 per page
1
2 3 4 5
...
44

AltStyle によって変換されたページ (->オリジナル) /