- About Scala
- Documentation
- Code Examples
- Software
- Scala Developers
Aliasing symbols from the same package
Thu, 2010-01-28, 18:42
hi,
can i abbreviate this import somehow? (scala 2.8)
package de.sciss.tint.sc
case class EnvSeg( dur: GE, targetLevel: GE, shape: EnvShape = linearShape )
import de.sciss.tint.sc.{ EnvSeg => S }
so that i don't need to repeat the full package name.... these are my attempts, none of them works:
import EnvSeg => S
import { EnvSeg => S }
import sc.{ EnvSeg => S }
?
thanks, -sciss-
Thu, 2010-01-28, 19:17
#2
Re: Aliasing symbols from the same package
thanks!
Am 28.01.2010 um 17:54 schrieb Heiko Seeberger:
> package a.b
> package c
> ...
> import c.{X => Y}
>
> Heiko
>
> On Thursday, January 28, 2010, Sciss wrote:
>> hi,
>>
>> can i abbreviate this import somehow? (scala 2.8)
>>
>> package de.sciss.tint.sc
>> case class EnvSeg( dur: GE, targetLevel: GE, shape: EnvShape = linearShape )
>> import de.sciss.tint.sc.{ EnvSeg => S }
>>
>> so that i don't need to repeat the full package name.... these are my attempts, none of them works:
>>
>> import EnvSeg => S
>> import { EnvSeg => S }
>> import sc.{ EnvSeg => S }
>>
>> ?
>>
>> thanks, -sciss-
>>
>>
>
package a.b
package c
...
import c.{X => Y}
Heiko
On Thursday, January 28, 2010, Sciss wrote:
> hi,
>
> can i abbreviate this import somehow? (scala 2.8)
>
> package de.sciss.tint.sc
> case class EnvSeg( dur: GE, targetLevel: GE, shape: EnvShape = linearShape )
> import de.sciss.tint.sc.{ EnvSeg => S }
>
> so that i don't need to repeat the full package name.... these are my attempts, none of them works:
>
> import EnvSeg => S
> import { EnvSeg => S }
> import sc.{ EnvSeg => S }
>
> ?
>
> thanks, -sciss-
>
>