This page is no longer maintained — Please continue to the home page at www.scala-lang.org

Case classes: mmap(vparamss)(copyUntyped[ValDef])

1 reply
Eugene Burmako
Joined: 2011-09-17,
User offline. Last seen 42 years 45 weeks ago.

I've found this funny line next to caseClassCopyMeth, and it makes me
sad.

The point is that the only ValDefs I can produce in the reifier are
the ones with TypeTrees, which will be happily erased by UnTyper. But
if that happens, then a few moments later case TypeTree() in
isRepeatedParamType will crash with NPE, which is a symptom of a
systemic problem - reified types are sometimes erased by subsequent
reflective compilation.

What do I do with that? Is it possible to patch UnTyper so that it
preserves reified types?

extempore
Joined: 2008-12-17,
User offline. Last seen 35 weeks 3 days ago.
Re: Case classes: mmap(vparamss)(copyUntyped[ValDef])


On Mon, Feb 13, 2012 at 2:55 PM, Eugene Burmako <eugene.burmako@epfl.ch> wrote:
What do I do with that? Is it possible to patch UnTyper so that it
preserves reified types?

Before we go layering un-un-typing on top of the un-typing, can we motivate the existence of the UnTyper a bit better? One of my more persistent challenges in the compiler is accomodating the frequency with which situations are handled by letting the wrong thing happen and trying to undo the wrong thing later.  I can't begin to tell you how many issues are a direct result of that sort of thing.  So anything in the compiler bearing the name "Un-Anything" rings all my warning bells.
So what does it do, and why does it have to do it by undoing?

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