diff --git a/repository/OP-UML-Metamodel/OPUMLMetaElement.class.st b/repository/OP-UML-Metamodel/OPUMLMetaElement.class.st index beb8dcf..3684dbf 100644 --- a/repository/OP-UML-Metamodel/OPUMLMetaElement.class.st +++ b/repository/OP-UML-Metamodel/OPUMLMetaElement.class.st @@ -242,12 +242,13 @@ OPUMLMetaElement >> oclAsType: aClassifier [ { #category : 'ocl-experimental' } OPUMLMetaElement >> oclClassifierNameFrom: anObject [ - (anObject isKindOf: OPUMLMetaElement class) - ifTrue: [ ^ anObject name withoutPrefix: 'OPUML' ]. - (anObject isKindOf: OPUMLMetaElement) - ifTrue: [ ^ anObject name ]. - anObject isString - ifTrue: [ ^ anObject ]. + + | metaElementClass | + metaElementClass := Smalltalk globals at: #OPUMLMetaElement. + (anObject isKindOf: metaElementClass class) ifTrue: [ + ^ anObject name withoutPrefix: 'OPUML' ]. + (anObject isKindOf: metaElementClass) ifTrue: [ ^ anObject name ]. + anObject isString ifTrue: [ ^ anObject ]. self error: 'Unknown classifier ' , anObject asString ]