scalac Questions

1

Solved

The gradle scala plugin adds the compileScala task to the project. But sometimes the scala compiler might report something like the following: $ gradle compileScala :compileJava UP-TO-DATE :comp...
Rachael asked 28/5, 2014 at 19:40

1

Solved

Other answers suggest using "-Xlog-implicits" option for debugging "diverging implicit expansion" errors. However, it also logs a lot of implicits in places unrelated to these errors. Is there some...
Hartwell asked 13/12, 2013 at 12:24

1

Solved

I have a very simple goal: to compile a Scala class, and then load it from within another Scala script. The problem is that Scala seems to cache (not sure where) the classes that I create, and does...
Gil asked 20/3, 2014 at 15:32

2

Solved

I've written a tiny bit of Scala object SquareNumbers extends App { val numbers = List(1,2,3,4,5) val squares = numbers map (i => i * i) println (squares) } And run it through scalac as so...
Maddeu asked 2/8, 2013 at 18:23

1

I have this little scala example: object Test { def add(x: Int, y: Int) = { val z = x - y x match { case 0 => 0 - y case 1 => 1 - y case _ => x - y } x + y } def main(args: Arra...
Uniformize asked 17/7, 2013 at 5:2

1

Solved

I'm trying to write a Scala compiler plugin that will allow extremely general code generation: something like the generality of the C preprocessor, but a bit more typesafe (I'm not sure if this is ...
Leone asked 14/3, 2013 at 5:38

2

Solved

As I've been learning Scala I'm often reminded of g++ compiler errors when reading the cryptic output from scalac. However, today I came across something I doubt would happen even in the g++ univer...
Libel asked 21/8, 2012 at 7:31

1

Solved

I'm currently making extensive use of the type class pattern in to be performance-relevant portions of my code. I made out at least two potential sources of inefficiency. The implicit parameters ...
Donner asked 17/2, 2012 at 11:31

3

Solved

I'd like to split my scalac plugin into multiple files. This sounds easy but I haven't managed to pull it off due to path-dependent type issues stemming from the import global._ line. Here's Lex S...
Bushwhack asked 12/4, 2011 at 0:40

2

Solved

I am using a Scala compilation server. This is probably not related to my IDE IntelliJ IDEA, but I will just inform you that I start the Scala compilation server through a special run configuration...
Grater asked 13/12, 2010 at 7:1

1

I've been converting some code from java to scala lately trying to teach myself the language. Suppose we have this scala class: class Person() { var name:String = "joebob" } Now I want to acce...
Sacttler asked 12/3, 2010 at 18:26

3

Solved

Why doesn't scalac (the Scala compiler) optimize tail recursion? Code and compiler invocations that demonstrates this: > cat foo.scala class Foo { def ifak(n: Int, acc: Int):Int = { if (n ==...
Mckelvey asked 9/11, 2009 at 6:24

© 2022 - 2024 — McMap. All rights reserved.