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
2.10 regression: “error: illegal inheritance; self-type does not conform to ...”
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  12 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Simon Ochsenreither  
View profile  
 More options Aug 8 2012, 5:35 pm
From: Simon Ochsenreither <simon.ochsenreit...@gmail.com>
Date: Wed, 8 Aug 2012 14:35:33 -0700 (PDT)
Local: Wed, Aug 8 2012 5:35 pm
Subject: 2.10 regression: “error: illegal inheritance; self-type does not conform to ...”

Hi everyone,

I was pretty sure that there was already a bug filed, but even after
searching for it multiple times, I can't find it.

The following (minimized) code compiled with 2.9, but fails to compile with
2.10:

  trait TFn1[I] { type In = I }
  trait >>[F1 <: TFn1[_], F2 <: TFn1[_]] extends TFn1[F1#In]

<console>:8: error: illegal inheritance;
 self-type >>[F1,F2] does not conform to TFn1[_$1]'s selftype TFn1[_$1]
         trait >>[F1 <: TFn1[_], F2 <: TFn1[_]] extends TFn1[F1#In]
                                                        ^
Does someone maybe remember the ticket number or should I file a new one?

Thanks a lot!

Simon


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Paul Phillips  
View profile  
 More options Aug 9 2012, 12:41 am
From: Paul Phillips <pa...@improving.org>
Date: Wed, 8 Aug 2012 21:41:16 -0700
Local: Thurs, Aug 9 2012 12:41 am
Subject: Re: [scala-internals] 2.10 regression: “error: illegal inheritance; self-type does not conform to ...”

On Wed, Aug 8, 2012 at 2:35 PM, Simon Ochsenreither <

simon.ochsenreit...@gmail.com> wrote:
> Does someone maybe remember the ticket number or should I file a new one?

It does have that feel of a bunch of other tickets, and I can't find it
either.  I'd say open it.

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
martin odersky  
View profile  
 More options Aug 9 2012, 3:53 am
From: martin odersky <martin.oder...@epfl.ch>
Date: Thu, 9 Aug 2012 09:53:28 +0200
Local: Thurs, Aug 9 2012 3:53 am
Subject: Re: [scala-internals] 2.10 regression: “error: illegal inheritance; self-type does not conform to ...”

I wonder whether it has anything to do with the recent fix to

  https://issues.scala-lang.org/browse/SI-4560

?

Is there a project that uses this code?

  - Martin

On Thu, Aug 9, 2012 at 6:41 AM, Paul Phillips <pa...@improving.org> wrote:

> On Wed, Aug 8, 2012 at 2:35 PM, Simon Ochsenreither <
> simon.ochsenreit...@gmail.com> wrote:

>> Does someone maybe remember the ticket number or should I file a new one?

> It does have that feel of a bunch of other tickets, and I can't find it
> either.  I'd say open it.

--
Martin Odersky
Prof., EPFL <http://www.epfl.ch> and Chairman, Typesafe<http://www.typesafe.com>
PSED, 1015 Lausanne, Switzerland
Tel. EPFL: +41 21 693 6863
Tel. Typesafe: +41 21 691 4967

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Paul Phillips  
View profile  
 More options Aug 9 2012, 6:05 am
From: Paul Phillips <pa...@improving.org>
Date: Thu, 9 Aug 2012 03:05:44 -0700
Local: Thurs, Aug 9 2012 6:05 am
Subject: Re: [scala-internals] 2.10 regression: “error: illegal inheritance; self-type does not conform to ...”

On Thu, Aug 9, 2012 at 12:53 AM, martin odersky <martin.oder...@epfl.ch>wrote:

> I wonder whether it has anything to do with the recent fix to

>   https://issues.scala-lang.org/browse/SI-4560

No, the test case fails all the way back to M1, so it regressed in January
or before.

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
martin odersky  
View profile  
 More options Aug 9 2012, 6:07 am
From: martin odersky <martin.oder...@epfl.ch>
Date: Thu, 9 Aug 2012 12:07:17 +0200
Local: Thurs, Aug 9 2012 6:07 am
Subject: Re: [scala-internals] 2.10 regression: “error: illegal inheritance; self-type does not conform to ...”

On Thu, Aug 9, 2012 at 12:05 PM, Paul Phillips <pa...@improving.org> wrote:

> On Thu, Aug 9, 2012 at 12:53 AM, martin odersky <martin.oder...@epfl.ch>wrote:

>> I wonder whether it has anything to do with the recent fix to

>>   https://issues.scala-lang.org/browse/SI-4560

> No, the test case fails all the way back to M1, so it regressed in January
> or before.

OK. Can we do a bisect to find out what it was?

 - Martin


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Simon Ochsenreither  
View profile  
 More options Aug 9 2012, 6:20 am
From: Simon Ochsenreither <simon.ochsenreit...@gmail.com>
Date: Thu, 9 Aug 2012 03:20:19 -0700 (PDT)
Local: Thurs, Aug 9 2012 6:20 am
Subject: Re: [scala-internals] 2.10 regression: “error: illegal inheritance; self-type does not conform to ...”

Metascala uses it, and therefore also scalax-units.

Ticket: https://issues.scala-lang.org/browse/SI-6211


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Paul Phillips  
View profile  
 More options Aug 9 2012, 6:24 am
From: Paul Phillips <pa...@improving.org>
Date: Thu, 9 Aug 2012 03:24:25 -0700
Local: Thurs, Aug 9 2012 6:24 am
Subject: Re: [scala-internals] 2.10 regression: “error: illegal inheritance; self-type does not conform to ...”

On Thu, Aug 9, 2012 at 3:07 AM, martin odersky <martin.oder...@epfl.ch>wrote:

> OK. Can we do a bisect to find out what it was?

We lucked out; my builds stop last november but it was slightly before
that.  It's this:

  https://github.com/scala/scala/commit/b7b81ca286


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
martin odersky  
View profile  
 More options Aug 9 2012, 6:43 am
From: martin odersky <martin.oder...@epfl.ch>
Date: Thu, 9 Aug 2012 12:43:57 +0200
Local: Thurs, Aug 9 2012 6:43 am
Subject: Re: [scala-internals] 2.10 regression: “error: illegal inheritance; self-type does not conform to ...”

On Thu, Aug 9, 2012 at 12:24 PM, Paul Phillips <pa...@improving.org> wrote:

> On Thu, Aug 9, 2012 at 3:07 AM, martin odersky <martin.oder...@epfl.ch>wrote:

>> OK. Can we do a bisect to find out what it was?

> We lucked out; my builds stop last november but it was slightly before
> that.  It's this:

>   https://github.com/scala/scala/commit/b7b81ca286

Thanks! That's good to know. I think there's not much we can do here for
the moment. The patch is necessary because it fixes an unsoundness problem.
 I am not quite clear what the breaking code does. It looks like it can be
compiled if we can get rid of unrestricted existentials. But this will be
definitely post 2.10.

Cheers

 - Martin


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Paul Phillips  
View profile  
 More options Aug 9 2012, 1:41 pm
From: Paul Phillips <pa...@improving.org>
Date: Thu, 9 Aug 2012 10:41:14 -0700
Local: Thurs, Aug 9 2012 1:41 pm
Subject: Re: [scala-internals] 2.10 regression: “error: illegal inheritance; self-type does not conform to ...”

On Thu, Aug 9, 2012 at 3:43 AM, martin odersky <martin.oder...@epfl.ch>wrote:

> Thanks! That's good to know. I think there's not much we can do here for
> the moment. The patch is necessary because it fixes an unsoundness problem.
>  I am not quite clear what the breaking code does. It looks like it can be
> compiled if we can get rid of unrestricted existentials. But this will be
> definitely post 2.10.

In the meantime, these variations still compile:

// 1
trait TFn1[I] { type In <: I }
trait >>[F1 <: TFn1[_], F2 <: TFn1[_]] extends TFn1[F1#In]

// 2
trait TFn1[I] { type In0 <: I ; type In = In0 }
trait >>[F1 <: TFn1[_], F2 <: TFn1[_]] extends TFn1[F1#In0]


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Dave  
View profile  
 More options Aug 9 2012, 2:20 pm
From: Dave <dave.mahabiers...@hotmail.com>
Date: Thu, 9 Aug 2012 11:20:09 -0700 (PDT)
Local: Thurs, Aug 9 2012 2:20 pm
Subject: Re: [scala-internals] 2.10 regression: “error: illegal inheritance; self-type does not conform to ...”

It looks like the type inference problem with type projections in this
thread:

https://groups.google.com/forum/?hl=en&fromgroups#!topic/scala-langua...

and Paul's solution still works

trait TFn1[I] { type In = I }
trait >>[S,F1 <: TFn1[_]{type In = S}, F2 <: TFn1[_]] extends TFn1[S]

Op donderdag 9 augustus 2012 19:41:14 UTC+2 schreef Paul Phillips het
volgende:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Simon Ochsenreither  
View profile  
 More options Aug 9 2012, 2:31 pm
From: Simon Ochsenreither <simon.ochsenreit...@gmail.com>
Date: Thu, 9 Aug 2012 11:31:56 -0700 (PDT)
Local: Thurs, Aug 9 2012 2:31 pm
Subject: Re: [scala-internals] 2.10 regression: “error: illegal inheritance; self-type does not conform to ...”

Hi Paul,

great idea! Although this makes the minimized example compile, it fails
with the original:

  trait TFn1B {
    type In
    type Out
    type Apply[T <: In] <: Out
  }

  trait TFn1[I, O] extends TFn1B {
    type In <: I
    type Out <: O
  }

  type ->[Arg, F <: TFn1[Arg, _]] = F#Apply[Arg]

  trait >>[F1 <: TFn1[_, _], F2 <: TFn1[_, _]] extends TFn1[F1#In, F2#Out] {
    type Apply[T] = F2#Apply[F1#Apply[T]]
  }

Errors:

<console>:18: error: type arguments [Arg] do not conform to type Apply's
type parameter bounds [T <: TFn1B.this.In]
         type ->[Arg, F <: TFn1[Arg, _]] = F#Apply[Arg]
                                             ^
<console>:21: error: overriding type Apply in trait TFn1B with bounds[T <:

>>.this.In] <: >>.this.Out;

 type Apply has incompatible type
           type Apply[T] = F2#Apply[F1#Apply[T]]
                ^
<console>:21: error: type arguments [F1#Apply[T]] do not conform to type
Apply's type parameter bounds [T <: TFn1B.this.In]
           type Apply[T] = F2#Apply[F1#Apply[T]]
                              ^

What do you think?

Bye,

Simon


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Paul Phillips  
View profile  
 More options Aug 9 2012, 3:23 pm
From: Paul Phillips <pa...@improving.org>
Date: Thu, 9 Aug 2012 12:23:12 -0700
Local: Thurs, Aug 9 2012 3:23 pm
Subject: Re: [scala-internals] 2.10 regression: “error: illegal inheritance; self-type does not conform to ...”

On Thu, Aug 9, 2012 at 11:31 AM, Simon Ochsenreither <

simon.ochsenreit...@gmail.com> wrote:
> What do you think?

Well, it's not for the faint of heart.  It looks to me like the former
version was unsound, so some of these changes are legitimate.  The fact
that I have to "override type" should be a bug.  But at least it works (I
mean, compiles.)

object Functions {
  trait TFn1B {
    type In
    type Out
    type Apply[T <: In] <: Out
  }

  trait TFn1[I, O] extends TFn1B {
    type In >: I
    type Out <: O
  }

  type ->[Arg, F <: TFn1[Arg, _]] = F#Apply[Arg]

  trait >>[F1 <: TFn1[_, _ <: F2#In], F2 <: TFn1[_, _]] extends TFn1[F1#In,
F2#Out] {
    override type In = F1#In
    override type Out = F2#Out
    type Apply[T <: In] = F2#Apply[F1#Apply[T]]
  }


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »