Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TonelParser>>#newClassDefinitionFrom: doesn't create variable subclasses during import #138

Closed
eMaringolo opened this issue Nov 19, 2024 · 0 comments
Assignees
Labels
bug Something isn't working importing Issues related with importing from Tonel format
Milestone

Comments

@eMaringolo
Copy link
Collaborator

This issue, together with the fix, was reported by Adriaan van Os.

!TonelParser privateMethods !

newClassDefinitionFrom: anArray

	| metadata typeName classComment |

	metadata := anArray at: 6.
	classComment := (anArray at: 2) isEmptyOrNil ifTrue: [String new] ifFalse: [anArray at: 2].

	typeName := (metadata at: #type ifAbsent: ['']) asString.
	(#('pointers' 'bytes' 'words' 'longs') indexOf: typeName) = 0 ifTrue: [typeName := 'pointers'].

	^((((metadata at: #superclass) asSymbol = #SharedPool
		ifTrue: [TonelReaderSharedPoolDefinition]
		ifFalse: [TonelReaderClassDefinition])
			name: (metadata at: #name)
			superclass: (metadata at: #superclass)
			variable: ((metadata at: #type ifAbsent: ['']) = 'variable')
			fieldType: typeName
			instanceVariables: (metadata at: #instVars ifAbsent: [#()])
			classVariables: (metadata at: #classVars ifAbsent: [#()])
			poolDictionaries: (metadata at: #pools ifAbsent: [#()]))
				category: (metadata at: #category);
				classInstanceVariables: (metadata at: #classInstVars ifAbsent: [#()]);
				classComment: classComment;
				yourself)

! !
@eMaringolo eMaringolo added bug Something isn't working importing Issues related with importing from Tonel format labels Nov 19, 2024
@eMaringolo eMaringolo self-assigned this Nov 27, 2024
eMaringolo added a commit that referenced this issue Nov 27, 2024
@eMaringolo eMaringolo added this to the VAST 14.0.0 milestone Nov 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working importing Issues related with importing from Tonel format
Projects
None yet
Development

No branches or pull requests

1 participant