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

Typed not being removed by explicit outer?

2 replies
Grzegorz Kossak...
Joined: 2010-07-13,
User offline. Last seen 42 years 45 weeks ago.

Hi,

While working on jribble backend for ScalaGWT I found that I get trees
that contain scala.reflect.generic.Trees.Typed node. When we look at
it's declaration[1] we see:

/** Type annotation, eliminated by explicit outer */
case class Typed(expr: Tree, tpt: Tree)
extends TermTree

Since my backend runs after explicit outer phase I'm wondering why I
see these nodes. Before I dig into can someone tell me if this comment
is still valid?

[1] https://lampsvn.epfl.ch/trac/scala/browser/scala/trunk/src/library/scala...

extempore
Joined: 2008-12-17,
User offline. Last seen 35 weeks 3 days ago.
Re: Typed not being removed by explicit outer?

On Mon, Aug 30, 2010 at 03:45:02PM -0400, Grzegorz Kossakowski wrote:
> While working on jribble backend for ScalaGWT I found that I get trees
> that contain scala.reflect.generic.Trees.Typed node. When we look at
> it's declaration[1] we see:
>
> /** Type annotation, eliminated by explicit outer */
> case class Typed(expr: Tree, tpt: Tree)
> extends TermTree
>
> Since my backend runs after explicit outer phase I'm wondering why I
> see these nodes. Before I dig into can someone tell me if this comment
> is still valid?

It doesn't look valid. Look at GenICode.scala, which runs way after
explicitouter, and you can see it expecting exception handler cases.

Grzegorz Kossak...
Joined: 2010-07-13,
User offline. Last seen 42 years 45 weeks ago.
Re: Typed not being removed by explicit outer?

On Mon, Aug 30, 2010 at 7:17 PM, Paul Phillips wrote:
> On Mon, Aug 30, 2010 at 03:45:02PM -0400, Grzegorz Kossakowski wrote:
>> While working on jribble backend for ScalaGWT I found that I get trees
>> that contain scala.reflect.generic.Trees.Typed node. When we look at
>> it's declaration[1] we see:
>>
>> /** Type annotation, eliminated by explicit outer */
>>   case class Typed(expr: Tree, tpt: Tree)
>>        extends TermTree
>>
>> Since my backend runs after explicit outer phase I'm wondering why I
>> see these nodes. Before I dig into can someone tell me if this comment
>> is still valid?
>
> It doesn't look valid.  Look at GenICode.scala, which runs way after
> explicitouter, and you can see it expecting exception handler cases.

Yes, you are right. I think it would be good if the comment was corrected.

--
Grzegorz

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