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

Standard defs disappearing

3 replies
Sciss
Joined: 2008-12-17,
User offline. Last seen 28 weeks 5 days ago.

i think the implicits or i don't know what is going crazy in the current 2.8 builds. i have now this:

import Predef._ // contains some implicits

protected def simplify( res: List[ UGen ]) : GE = res match {
case List( e ) => { println( "single" ); e }
case more => { println( "multi" ); seqOfGE2GESeq( more )}
}

which gives:

error: not found: value println
case List( e ) => { println( "single" ); e }
error: not found: value println
case more => { println( "multi" ); seqOfGE2GESeq( more )}
two errors found

whereas:

protected def simplify( res: List[ UGen ]) : GE = res match {
case List( e ) => { System.out.println( "single" ); e }
case more => { System.out.println( "multi" ); seqOfGE2GESeq( more )}
}

compiles fine....

is it possible that my own Predef due to its name kind of interferes with scala.Predef ? otherwise how could function "println" suddenly disappear?

thanks, -sciss-

Sciss
Joined: 2008-12-17,
User offline. Last seen 28 weeks 5 days ago.
Re: Standard defs disappearing

p.s. and now that i think about it, i also had this problem recently:

for( i <- 0 until 10 ) ...

wasn't seeing "until" anymore. i needed to change my code to something like

for( i <- Range( 0, 10, 1 )) ...

i guess this is a related problem.

Am 29.12.2009 um 19:13 schrieb Sciss:

> i think the implicits or i don't know what is going crazy in the current 2.8 builds. i have now this:
>
> import Predef._ // contains some implicits
>
> protected def simplify( res: List[ UGen ]) : GE = res match {
> case List( e ) => { println( "single" ); e }
> case more => { println( "multi" ); seqOfGE2GESeq( more )}
> }
>
> which gives:
>
> error: not found: value println
> case List( e ) => { println( "single" ); e }
> error: not found: value println
> case more => { println( "multi" ); seqOfGE2GESeq( more )}
> two errors found
>
> whereas:
>
> protected def simplify( res: List[ UGen ]) : GE = res match {
> case List( e ) => { System.out.println( "single" ); e }
> case more => { System.out.println( "multi" ); seqOfGE2GESeq( more )}
> }
>
> compiles fine....
>
> is it possible that my own Predef due to its name kind of interferes with scala.Predef ? otherwise how could function "println" suddenly disappear?
>
> thanks, -sciss-
>

Sciss
Joined: 2008-12-17,
User offline. Last seen 28 weeks 5 days ago.
Re: Standard defs disappearing

hmmm, renaming my Predef to something else (Predef2) fixes it. how comes that i can shadow the standard includes of scala that way?

Am 29.12.2009 um 19:16 schrieb Sciss:

> p.s. and now that i think about it, i also had this problem recently:
>
> for( i <- 0 until 10 ) ...
>
> wasn't seeing "until" anymore. i needed to change my code to something like
>
> for( i <- Range( 0, 10, 1 )) ...
>
> i guess this is a related problem.
>
>
> Am 29.12.2009 um 19:13 schrieb Sciss:
>
>> i think the implicits or i don't know what is going crazy in the current 2.8 builds. i have now this:
>>
>> import Predef._ // contains some implicits
>>
>> protected def simplify( res: List[ UGen ]) : GE = res match {
>> case List( e ) => { println( "single" ); e }
>> case more => { println( "multi" ); seqOfGE2GESeq( more )}
>> }
>>
>> which gives:
>>
>> error: not found: value println
>> case List( e ) => { println( "single" ); e }
>> error: not found: value println
>> case more => { println( "multi" ); seqOfGE2GESeq( more )}
>> two errors found
>>
>> whereas:
>>
>> protected def simplify( res: List[ UGen ]) : GE = res match {
>> case List( e ) => { System.out.println( "single" ); e }
>> case more => { System.out.println( "multi" ); seqOfGE2GESeq( more )}
>> }
>>
>> compiles fine....
>>
>> is it possible that my own Predef due to its name kind of interferes with scala.Predef ? otherwise how could function "println" suddenly disappear?
>>
>> thanks, -sciss-
>>
>

dcsobral
Joined: 2009-04-23,
User offline. Last seen 38 weeks 5 days ago.
Re: Standard defs disappearing
I would classify this as a bug. Look up for similars on scala trac, but file a ticket if you find none.

On Tue, Dec 29, 2009 at 5:27 PM, Sciss <contact [at] sciss [dot] de> wrote:
hmmm, renaming my Predef to something else (Predef2) fixes it. how comes that i can shadow the standard includes of scala that way?


Am 29.12.2009 um 19:16 schrieb Sciss:

> p.s. and now that i think about it, i also had this problem recently:
>
> for( i <- 0 until 10 ) ...
>
> wasn't seeing "until" anymore. i needed to change my code to something like
>
> for( i <- Range( 0, 10, 1 )) ...
>
> i guess this is a related problem.
>
>
> Am 29.12.2009 um 19:13 schrieb Sciss:
>
>> i think the implicits or i don't know what is going crazy in the current 2.8 builds. i have now this:
>>
>> import Predef._      // contains some implicits
>>
>> protected def simplify( res: List[ UGen ]) : GE = res match {
>>   case List( e ) => { println( "single" ); e }
>>   case more => { println( "multi" ); seqOfGE2GESeq( more )}
>> }
>>
>> which gives:
>>
>> error: not found: value println
>>   case List( e ) => { println( "single" ); e }
>> error: not found: value println
>>   case more => { println( "multi" ); seqOfGE2GESeq( more )}
>> two errors found
>>
>> whereas:
>>
>> protected def simplify( res: List[ UGen ]) : GE = res match {
>>   case List( e ) => { System.out.println( "single" ); e }
>>   case more => { System.out.println( "multi" ); seqOfGE2GESeq( more )}
>> }
>>
>> compiles fine....
>>
>> is it possible that my own Predef due to its name kind of interferes with scala.Predef ? otherwise how could function "println" suddenly disappear?
>>
>> thanks, -sciss-
>>
>




--
Daniel C. Sobral

I travel to the future all the time.

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