pharo icon indicating copy to clipboard operation
pharo copied to clipboard

[RB] InsertClass is broken

Open Ducasse opened this issue 1 year ago • 1 comments

When we insert a class the metaclass of the new class is Class and not the superclass metaclass :( Example, when in insert a superclass in MyClass, MySuperClass class is Class and not MySuperClass class. So lot of things just break!

Ducasse avatar Feb 18 '24 16:02 Ducasse

https://github.com/pharo-project/pharo/issues/15805

privateTransform

	self model
		defineClass: [ :aBuilder |
			| nonRBSuperclass |
			nonRBSuperclass := self model environment at: superclass name.
                        "probably bug around here"

			aBuilder
				superclass: nonRBSuperclass;
				name: className;
				package: packageName;
				tag: tagName;
				comment: self comment ];
		reparentClasses: subclasses to: (self model classNamed: className)

Ducasse avatar Feb 18 '24 16:02 Ducasse

similar bug than https://github.com/pharo-project/pharo/issues/16209

Ducasse avatar Feb 19 '24 18:02 Ducasse

This is normally fixed (we got the bug in the class builder).

Ducasse avatar Feb 24 '24 16:02 Ducasse