juan_gandhi: (VP)
[personal profile] juan_gandhi
(from Scala maillist)

"Another, possibly related issue:
class StrangeIntQueue extends Queue[Int]
{
  override def enqueue[Int](x:Int) = {
    println( x * x )
    super.enqueue(x).asInstanceOf[Queue[Int]]
  }
}


This has a problem with the '*' in 'x * x' ... complaint is 'Cannot resolve symbol '*''.

Now *that* is fussy.

What is happening?"

Date: 2015-03-01 07:54 am (UTC)
From: [identity profile] alexey-rom.livejournal.com
Ну абсолютно ведь стандартная ошибка.

Date: 2015-03-01 09:41 am (UTC)
From: [identity profile] lomeo.livejournal.com
Минут пять тупил :) Пока не стал смотреть, как бы я сам этот код писал, не сообразил.

Date: 2015-03-01 12:12 pm (UTC)

Date: 2015-03-01 05:37 pm (UTC)
From: [identity profile] http://users.livejournal.com/_xacid_/
а разгадка как обычно некорректный код (в данном случае точнее тип)

Profile

juan_gandhi: (Default)
Juan-Carlos Gandhi

June 2025

S M T W T F S
1 2345 6 7
8 9 10 11 121314
15161718 1920 21
22232425262728
2930     

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Jun. 27th, 2025 07:59 pm
Powered by Dreamwidth Studios