Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Group info
Language: English
Group categories:
Computers > Software
More group info »
Discussions
View:  Topic list, Topic summary Topics 1 - 10 of 968  Older »

You cannot post messages because only members can post, and you are not currently a member.
Description: The main forum for discussions and news about the Scala language
 

parameter inference 
  I accidentally noticed that on 2.10.2.v20130425-053916-403ba8 938f the following compiles: class A { def a(i: Int) = i } class B extends A { override def a(i) = i } // no type parameter on i While I heard of such a potential change some time ago, I can't find the commit where it is finally merged.... more »
By Simon Schäfer  - May 17 - 3 new of 3 messages    

compiler message not clear with FiniteDuration.times 
  sbt console Welcome to Scala version 2.10.1 (Java HotSpot(TM) 64-Bit Server VM, Java 1.7.0_07). val fd=scala.concurrent.duration.F initeDuration(3, "seconds") fd * 2.5 // works fine res0: scala.concurrent.duration.Dura tion = 7500 milliseconds scala> val res:scala.concurrent.duration. FiniteDuration =fd * 2.5... more »
By Michel Daviot  - May 15 - 2 new of 2 messages    

Unary type view 
  Hi, I have problems understanding Scala's type system. Why does the following code not compile in the line 'val z = ...'? trait Unary[U[_], A] case class A[T](t: T) case class B[I[_], A](i: I[A]) extends Unary[({type O[X] = B[I, X]})#O, A] def unary[MA <: Unary[U, A], U[_], A](ma: MA with Unary[U, A]): U[A] =... more »
By Ka Ter  - May 14 - 3 new of 3 messages    

Mining for granularity beyond AnyVal 
  [link] * * /* A better way to tag types? * * 1) object Time: here we are distinguishing between different uses of a Long, * yet there is no boxing whatsoever. * * main calls start: ()J * main calls timed: (Function0, J) * Function0 gives up the result: ()J... more »
By Paul Phillips  - May 11 - 1 new of 1 message    

Passing context instance reference to another class 
  Hi! I have code: object Parser { type ParserContext = Context { type PrefixType = Parser } def ruleImpl(c: ParserContext)(r: c.Expr[Rule]): c.Expr[Boolean] = { val opTreeContext = new OpTreeContext(c) val opTree = opTreeContext.parse(r.tree) // Compilation error (see below): Parser.scala: type mismatch;... more »
By Alexander Myltsev  - May 11 - 3 new of 3 messages    

Existentials and method types 
  I was surprised and delighted by a bug a coworker found today, which hinged on my assuming that surely value types can never contain non-value types. Here's a simplified version: import scala.reflect.runtime.universe ._ class A { object B ...class C { val a = new A val b = a.B ...... more »
By Ryan Hendrickson  - May 9 - 5 new of 5 messages    

Workaround for value class type erasure? 
  So it appears to me that value classes have their types erased to the type they take for their single value. This of course causes the standard type erasure issues to pop up. Right now I'm having trouble with overloading. I have function a with signatures Int => UInt and UInt => UInt. It fails to compile because of... more »
By Mark Hammons  - May 9 - 12 new of 12 messages    

Strange behaviour of Numeric[Int]/IntIsIntegral? 
  It would be great if someone could shed some light on the following REPL sessions (2.10.0) [1]: They are two attempts to produce a situation with ambiguous implicits. The first works as expected: trait Settings { def title: String } implicit object DefaultSettings extends Settings { val title = "default" }... more »
By Andrew Phillips  - May 7 - 8 new of 8 messages    

match-expression in infix position 
  Is there a special reason why it is not possible to use a match-expression in infix position (without surrounding it with parentheses)? scala> 1 match {case x => x} + 1 <console>:1: error: ';' expected but identifier found. 1 match {case x => x} + 1 ^... more »
By Simon Schäfer  - May 4 - 1 new of 1 message    

peano class-cast-exception 
  After reading the "ambiguous reference to overloaded definition" thread in scala-user I played with Rex's Peano example (in 2010) where he tries to achieve what he calls "conditionally abstract". I didn't achieve it but I found a bug - the example compiles but crashes with ClassCastException. I did a minimal search for "ClassCastException" in... more »
By Jan Vanek  - May 4 - 6 new of 6 messages    

1 - 10 of 968   « Newer | Older »

XML       Send email to this group: scala-language@googlegroups.com