- About Scala
- Documentation
- Code Examples
- Software
- Scala Developers
Nested object regression
Wed, 2011-05-11, 06:43
Sorry I didn't find this sooner, but this one is a silent killer:
https://lampsvn.epfl.ch/trac/scala/ticket/4565
scala> def foo = { object A; def a(x: Any) = x == A; a(A)}
foo: Boolean
scala> foo
res9: Boolean = true
scala> trait T { def foo = { object A; def a(x: Any) = x == A; a(A)} };
defined trait T
scala> new T{}.foo
res10: Boolean = false
-jason
Wed, 2011-05-11, 13:47
#2
Re: Nested object regression
On 05/11/2011 07:43 AM, Jason Zaugg wrote:
> Sorry I didn't find this sooner, but this one is a silent killer:
>
> https://lampsvn.epfl.ch/trac/scala/ticket/4565
>
> scala> def foo = { object A; def a(x: Any) = x == A; a(A)}
> foo: Boolean
>
> scala> foo
> res9: Boolean = true
>
> scala> trait T { def foo = { object A; def a(x: Any) = x == A; a(A)} };
> defined trait T
>
> scala> new T{}.foo
> res10: Boolean = false
>
> -jason
Fixed. Thanks for reporting it.
hubert
Wed, 2011-05-11, 14:17
#3
Re: Nested object regression
On Wed, May 11, 2011 at 2:40 PM, Hubert Plociniczak <hubert.plociniczak@epfl.ch> wrote:
On 05/11/2011 07:43 AM, Jason Zaugg wrote:
Sorry I didn't find this sooner, but this one is a silent killer:
https://lampsvn.epfl.ch/trac/scala/ticket/4565
scala> def foo = { object A; def a(x: Any) = x == A; a(A)}
foo: Boolean
scala> foo
res9: Boolean = true
scala> trait T { def foo = { object A; def a(x: Any) = x == A; a(A)} };
defined trait T
scala> new T{}.foo
res10: Boolean = false
-jason
Fixed. Thanks for reporting it.
Woot! Yay for Hubert!
hubert
--
Viktor Klang,
Director of Research and Development
Scalable Solutions
Code: github.com/viktorklang
Follow: twitter.com/viktorklang
Read: klangism.tumblr.com
Wed, 2011-05-11, 14:37
#4
Re: Nested object regression
2011/5/11 √iktor Ҡlang :
>
>
> On Wed, May 11, 2011 at 2:40 PM, Hubert Plociniczak
> wrote:
>> Fixed. Thanks for reporting it.
>
> Woot! Yay for Hubert!
And Iulian, by the looks, for the epic test case.
http://lampsvn.epfl.ch/trac/scala/browser/scala/trunk/test/files/run/t45...
Great work!
-jason
Wed, 2011-05-11, 16:37
#5
Re: Nested object regression
On Wed, May 11, 2011 at 3:27 PM, Jason Zaugg wrote:
> 2011/5/11 √iktor Ҡlang :
>>
>>
>> On Wed, May 11, 2011 at 2:40 PM, Hubert Plociniczak
>> wrote:
>>> Fixed. Thanks for reporting it.
>>
>> Woot! Yay for Hubert!
>
> And Iulian, by the looks, for the epic test case.
>
> http://lampsvn.epfl.ch/trac/scala/browser/scala/trunk/test/files/run/t4565_2.scala?rev=24923
Even better one, in
http://lampsvn.epfl.ch/trac/scala/browser/scala/trunk/test/files/run/inn...
(unfortunately the 3-level deep test that I initially provided
couldn't 'scale' to multithreaded tests and more nesting contexts)..
iulian
>
> Great work!
>
> -jason
>
Sun, 2012-01-22, 15:51
#6
Re: Nested object regression
SI-4565 was a regression in the release candidate for Scala 2.9.0, discovered at the last minute.
I just noticed that it also regressed from 2.8.1 to 2.8.2. Jira seems to be out of action right now, but I'll reopen the ticket when it's back.
-jason
Welcome to Scala version 2.8.2.final (Java HotSpot(TM) 64-Bit Server VM, Java 1.6.0_29).Type in expressions to have them evaluated.Type :help for more information.
scala> def foo = { object A; def a(x: Any) = x == A; a(A)}foo: Boolean
scala> foores0: Boolean = true
scala> trait T { def foo = { object A; def a(x: Any) = x == A; a(A)} }; defined trait T
scala> new T{}.foores1: Boolean = false
On Wed, May 11, 2011 at 7:43 AM, Jason Zaugg <jzaugg@gmail.com> wrote:
I just noticed that it also regressed from 2.8.1 to 2.8.2. Jira seems to be out of action right now, but I'll reopen the ticket when it's back.
-jason
Welcome to Scala version 2.8.2.final (Java HotSpot(TM) 64-Bit Server VM, Java 1.6.0_29).Type in expressions to have them evaluated.Type :help for more information.
scala> def foo = { object A; def a(x: Any) = x == A; a(A)}foo: Boolean
scala> foores0: Boolean = true
scala> trait T { def foo = { object A; def a(x: Any) = x == A; a(A)} }; defined trait T
scala> new T{}.foores1: Boolean = false
On Wed, May 11, 2011 at 7:43 AM, Jason Zaugg <jzaugg@gmail.com> wrote:
Sorry I didn't find this sooner, but this one is a silent killer:
https://lampsvn.epfl.ch/trac/scala/ticket/4565
scala> def foo = { object A; def a(x: Any) = x == A; a(A)}
foo: Boolean
scala> foo
res9: Boolean = true
scala> trait T { def foo = { object A; def a(x: Any) = x == A; a(A)} };
defined trait T
scala> new T{}.foo
res10: Boolean = false
-jason
On Wed, May 11, 2011 at 7:43 AM, Jason Zaugg <jzaugg@gmail.com> wrote:
Ouch. Thanks for uncovering this. We will work on a fix immediately.
-- Martin