Skip to content

Commit

Permalink
Fix compile errors.
Browse files Browse the repository at this point in the history
  • Loading branch information
raniejade committed Jul 1, 2013
1 parent 29dc09b commit 3ee2cd8
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 9 deletions.
3 changes: 2 additions & 1 deletion src/main/scala/org/vertx/scala/core/file/AsyncFile.scala
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ package org.vertx.scala.core.file
import org.vertx.java.core.AsyncResult
import org.vertx.java.core.buffer.Buffer
import org.vertx.java.core.file.{AsyncFile => JAsyncFile}
import org.vertx.java.core.Handler
import org.vertx.scala.core.FunctionConverters._
import org.vertx.scala.core.streams.{WriteStream, ReadStream}
import org.vertx.scala.core.Delegator
Expand All @@ -31,7 +32,7 @@ object AsyncFile {
implicit def toScala(internal:JAsyncFile) = new AsyncFile(internal)
}

class AsyncFile[JAsyncFile](internal: JAsyncFile) extends Delegator[JAsyncFile](internal) with ReadStream[JAsyncFile] with WriteStream[JAsyncFile] { self: Delegator[JAsyncFile] =>
class AsyncFile(internal: JAsyncFile) extends Delegator[JAsyncFile](internal) with ReadStream[JAsyncFile] with WriteStream[JAsyncFile] {

// error
def close():Unit = internal.close()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import org.vertx.java.core.Handler
/**
* @author swilliams
* @author Ranie Jade Ramiso
*
*
*/
trait ExceptionSupport[T <: JExceptionSupport[T]] { self: Delegator[T] =>

Expand All @@ -34,4 +34,4 @@ trait ExceptionSupport[T <: JExceptionSupport[T]] { self: Delegator[T] =>
this
}

}
}
8 changes: 4 additions & 4 deletions src/main/scala/org/vertx/scala/core/streams/Pump.scala
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,17 @@ import org.vertx.java.core.buffer.Buffer
*
*/
object Pump {
def newPump(rs: ReadStream[Any], ws: WriteStream[Any]) = {
def newPump(rs: ReadStream[T] forSome {type T}, ws: WriteStream[T] forSome {type T}) = {
new Pump(rs, ws)
}
def newPump(rs: ReadStream[Any], ws: WriteStream[Any], writeQueueMaxSize:Int) = {
def newPump(rs: ReadStream[T] forSome {type T}, ws: WriteStream[T] forSome {type T}, writeQueueMaxSize:Int) = {
def pump = new Pump(rs, ws)
pump.writeQueueMaxSize = writeQueueMaxSize
pump
}
}

class Pump(readStream: ReadStream[Any], writeStream: WriteStream[Any]) {
class Pump(readStream: ReadStream[T] forSome {type T}, writeStream: WriteStream[T] forSome {type T}) {

private var writeQueueMaxSize:Int = Int.MaxValue

Expand Down Expand Up @@ -62,4 +62,4 @@ class Pump(readStream: ReadStream[Any], writeStream: WriteStream[Any]) {
this
}

}
}
4 changes: 2 additions & 2 deletions src/main/scala/org/vertx/scala/core/streams/ReadStream.scala
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import org.vertx.scala.core.Delegator
/**
* @author swilliams
* @author Ranie Jade Ramiso
*
*
*/
trait ReadStream[T <: JReadStream[T]] extends ExceptionSupport[T] { self: Delegator[T] =>

Expand All @@ -49,4 +49,4 @@ trait ReadStream[T <: JReadStream[T]] extends ExceptionSupport[T] { self: Delega
this
}

}
}

0 comments on commit 3ee2cd8

Please sign in to comment.