diff --git a/src/Pharo2VW-Tests/Pharo2VWExporterTest.class.st b/src/Pharo2VW-Tests/Pharo2VWExporterTest.class.st index d8041ab..8c116cc 100644 --- a/src/Pharo2VW-Tests/Pharo2VWExporterTest.class.st +++ b/src/Pharo2VW-Tests/Pharo2VWExporterTest.class.st @@ -81,7 +81,7 @@ Pharo2VWExporterTest >> testExampleExportLan [ Pharo2VWExporterTest >> testExampleExportPackageBasicClasses [ | inst classes | inst := Pharo2VWExamples new. - classes := (inst exampleExportPackageBasic) classes. + classes := (inst exampleExportPackageBasic) classes select: #isClass. self parseGeneratedXML. self assert: (self xPathFor: '//class') size diff --git a/src/Pharo2VW/Pharo2VW.class.st b/src/Pharo2VW/Pharo2VW.class.st index 09585b8..72e901e 100644 --- a/src/Pharo2VW/Pharo2VW.class.st +++ b/src/Pharo2VW/Pharo2VW.class.st @@ -165,9 +165,10 @@ Pharo2VW >> fileOutInitializerForClass: aClass [ ] { #category : #export } -Pharo2VW >> fileOutInitializers [ - (self classes select: [:c | c class includesSelector: #initialize]) - do: [:class | self fileOutInitializerForClass: class]. +Pharo2VW >> fileOutInitializers [ + (self classes + select: [ :c | c isClass and: [ c class includesSelector: #initialize ] ]) + do: [ :class | self fileOutInitializerForClass: class ] ] { #category : #export } @@ -293,9 +294,9 @@ Pharo2VW >> methods [ self packagesTags do: [ :pkg | methods addAll: (pkg package extensionsForTag: pkg). pkg classes do: [ :cls | - cls isTrait ifFalse: [ - methods addAll: cls class methods ]. - methods addAll: cls methods ] ]. + cls isClass ifTrue: [ + methods addAll: cls class methods. + methods addAll: cls methods ] ] ]. methods ]. ]