This page is no longer maintained — Please continue to the home page at

compiler crash on large methods (constructors)

1 reply
Denis Podluzhny
Joined: 2011-10-31,
User offline. Last seen 42 years 45 weeks ago.


we had migrated on Scala one of our ongoing products, where we heavily
use data-definition in code. And encountered systematic problems with
exceeding limits on method-code size. Those is pretty easy when you
try to initialize pack of complex data-descriptors for further use.

Most annoying with constructors where you have no real way to solve
it. Correct me if I'm wrong.

May be Scala compiler should:
1). Provide clear error messages for this case, so user atleast can
detect what one of thousands of modules broke at this time.
2). Transparently split large constructors in pack of hidden methods.
Leaving only calls in constructor body - thing which user is not able
to do it himself with val initialization.

Denis Podluzhny.

Simon Ochsenreither
Joined: 2011-07-17,
User offline. Last seen 42 years 45 weeks ago.
Re: compiler crash on large methods (constructors)
Example code which triggers the problem?

Copyright © 2012 École Polytechnique Fédérale de Lausanne (EPFL), Lausanne, Switzerland