[Cuis-dev] Show context in shadowing warnings in Transcript
Mariano Montone
marianomontone at gmail.com
Fri Jun 25 08:28:20 PDT 2021
Hello.
When I load some of my packages I get shadowing warnings in Transcript,
but without context, like this:
There already exists a variable named attributes
There already exists a variable named concept
There already exists a variable named concept
There already exists a variable named concept
That is a bit useless, as the place where the problem occurs is not shown.
Can we change it to something like in the attached change set? So that
the class and selector is printed.
Like this:
There already exists a variable named attributes (MoldConcept
class>>#bootstrap)
There already exists a variable named concept (MoldConcept class>>#invoke:)
There already exists a variable named concept (MoldConcept
class>>#invoke:withArguments:)
There already exists a variable named concept (MoldConcept class>>#lookup:)
Thanks,
Mariano
-------------- next part --------------
'From Cuis 5.0 [latest update: #4635] on 25 June 2021 at 11:55:46 am'!
!Encoder methodsFor: 'private' stamp: 'MM 6/25/2021 11:55:34'!
warnAboutShadowed: name
| msg transcriptMsg |
msg _ 'There already exists a variable named ', name, ' '.
requestor addWarning: msg.
transcriptMsg _ msg, ' (', class className, '>>', selector printString,')'.
Transcript newLine; show: transcriptMsg.
InMidstOfFileinNotification signal
ifFalse: [
requestor interactive
ifTrue: [
self notify: msg]
ifFalse: [
(RecompilationFailure
class: class
messageText: msg, String newLineString, 'Please use a different name') signal ]]! !
More information about the Cuis-dev
mailing list