This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
trait Cloneable[+T <: AnyRef] extends AnyRef { | |
def create(): T | |
override def clone(): T = create() | |
} | |
class A(var a: Int) extends Cloneable[A] { | |
def create(): A = new A(a) | |
} | |
class B(aa: Int, var b: Int) extends A(aa) with Cloneable[B] { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
object Wat { | |
trait TypeSum[T, U] { | |
type SumType | |
def add(t: T, u: U): SumType | |
} | |
implicit def unitLeft[T]: TypeSum[Unit, T] = new TypeSum[Unit, T] { | |
type SumType = T | |
def add(u: Unit, t: T) = t |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* NSC -- new Scala compiler | |
* Copyright 2005-2010 LAMP/EPFL | |
* @author Paul Phillips | |
*/ | |
package scala.tools.nsc | |
package util | |
import java.util.concurrent.{ Future, TimeUnit } | |
import java.lang.reflect.{ Modifier, Field, Method => JMethod } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CmdUtils.CreateCommand({ | |
names: ["java"], | |
arguments: [{role: "object", | |
nountype: noun_arb_text, | |
label: "search criteria"}], | |
icon: "http://www.sun.com/favicon.ico", | |
preview: "Searches The Java 6 API.", | |
help: "Enter the name of the Java class or package for which you would like to see the documentation.", | |
author: {name: "KS", email: "[email protected]"}, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* sbt -- Simple Build Tool | |
* Copyright 2011 Mark Harrah | |
*/ | |
package sbt | |
import java.io.File | |
import java.net.URL | |
import Project.ScopedKey | |
import complete._ | |
import inc.Analysis |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Searching for changes to scala/collection/immutable/$colon$colon.class ... | |
Found 80 candidate revisions. | |
=== r17680 === | |
commit e0f5e6e40716fbebee61a88ad998da3aa0eaea22 | |
Author: odersky <odersky@5e8d7ff9-d8ef-0310-90f0-a4852d11357a> | |
Date: Fri May 8 16:33:15 2009 +0000 | |
massive new collections checkin. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% scala -cp /scala/trunk/build/pack/lib/scala-library.jar scal<tab> | |
scala. scala.sys. | |
scala.actors. scala.sys.process. | |
scala.actors.remote. scala.testing. | |
scala.actors.scheduler. scala.text. | |
scala.actors.threadpool. scala.util. | |
scala.actors.threadpool.helpers. scala.util.automata. | |
scala.actors.threadpool.locks. scala.util.continuations. | |
scala.annotation. scala.util.control. | |
scala.annotation.target. scala.util.grammar. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% scala -cp /scala/trunk/build/pack/lib/scala-library.jar scal<tab> | |
scala. scala.sys. | |
scala.actors. scala.sys.process. | |
scala.actors.remote. scala.testing. | |
scala.actors.scheduler. scala.text. | |
scala.actors.threadpool. scala.util. | |
scala.actors.threadpool.helpers. scala.util.automata. | |
scala.actors.threadpool.locks. scala.util.continuations. | |
scala.annotation. scala.util.control. | |
scala.annotation.target. scala.util.grammar. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[error] x Component manager should | |
[error] x properly cache a file and then retrieve it to an unresolved component | |
[error] null (FileChannelImpl.java:1166) | |
[error] sun.nio.ch.FileChannelImpl$SharedFileLockTable.checkList(FileChannelImpl.java:1166) | |
[error] sun.nio.ch.FileChannelImpl$SharedFileLockTable.add(FileChannelImpl.java:1068) | |
[error] sun.nio.ch.FileChannelImpl.tryLock(FileChannelImpl.java:868) | |
[error] java.nio.channels.FileChannel.tryLock(FileChannel.java:962) | |
[error] xsbt.boot.Locks$GlobalLock.withChannel$1(Locks.scala:65) | |
[error] xsbt.boot.Locks$GlobalLock.withChannelRetries$1(Locks.scala:58) | |
[error] xsbt.boot.Locks$GlobalLock$$anonfun$withFileLock$1.apply(Locks.scala:79) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Razvan Cojocaru [email protected] | |
to [email protected] | |
date Tue, Sep 13, 2011 at 11:07 AM | |
subject [scala-user] unexpected REPL equals | |
The REPL unexpectedly calls equals with a String - this behavior is new in 2.9.1. – in the code below, I know the equals sucks but is short and used to work since 2.8 | |
What to do? What to do? | |
$ scala |