- About Scala
- Documentation
- Code Examples
- Software
- Scala Developers
Standard defs disappearing
Tue, 2009-12-29, 20:14
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-
Tue, 2009-12-29, 20:47
#2
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-
>>
>
Tue, 2009-12-29, 22:57
#3
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:
--
Daniel C. Sobral
I travel to the future all the time.
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.
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-
>