Skip to content

Commit

Permalink
Importer: Handle empty parametric type inferences
Browse files Browse the repository at this point in the history
  • Loading branch information
Gabriel-Darbord committed May 15, 2024
1 parent c1e9d49 commit be1d744
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Famix-Value-Importer/FamixValueAbstractImporter.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,9 @@ FamixValueAbstractImporter >> importCollection: rawValue of: type [
| collection |
collection := self model newOfCollection type: type.
self
withTypeInference:
((self parametricTypeInferencesOf: type) ifNotNil: [ :inferences |
inferences first ])
withTypeInference: ((self parametricTypeInferencesOf: type)
ifNotEmpty: [ :inferences | inferences first ]
ifEmpty: [ nil ])
do: [
rawValue do: [ :rawElement |
collection addValue: (self model newOfCollectionElement value:
Expand Down Expand Up @@ -191,7 +191,7 @@ FamixValueAbstractImporter >> newReader [
{ #category : #enumerating }
FamixValueAbstractImporter >> parametricTypeInferencesOf: type [

type isParametricEntity ifFalse: [ ^ nil ].
type isParametricEntity ifFalse: [ ^ { } ].
^ type isGenericEntity
ifTrue: [
self typeInference ifNotNil: [ :inference |
Expand Down

0 comments on commit be1d744

Please sign in to comment.