NicolasPetton/amber — Issue #99: Changing superclass has no effect on class-side methods
Author: sebnozzi
Created: 2011-11-12 17:58:47+00:00
State: open

Create this class:

```smalltalk
Object subclass: #MySuper
instanceVariableNames: ''
category: 'MyCat'
```

On the CLASS side, create:

```smalltalk
superMethod
^ 33.
```

Create a sub-cass of "MySuper" called "MySub":

```smalltalk
MySuper subclass: #MySub
instanceVariableNames: ''
category: 'MyCat'
```

On the CLASS side, create:

```smalltalk
subMethod
^ self superMethod * 2.
```

Print this in the workspace:

```smalltalk
MySub subMethod "=> 66, correct"
```

Now, create another "super-class":

```smalltalk
Object subclass: #MySuper2
instanceVariableNames: ''
category: 'MyCat'
```

On the CLASS side, create:

```smalltalk
superMethod
^ 11.
```

Change the super-class of "MySub" to "MySuper2":

```smalltalk
MySuper2 subclass: #MySub
instanceVariableNames: ''
package: 'MyCat'
```

The IDE reflects the change in the hierarchy.
Print this in the workspace:

```smalltalk
MySub subMethod "==> still 66, and not 22"
```