adding temporary adds them outside the temp declaration?
Hi guys Is it a know bug? | selector superClasses | selector := aMethodDefinition selector. superClasses := aMethodDefinition realClass allSuperclasses. result := OrderedCollection new. (superClasses select: [ :eachClass | eachClass hasProtocolFor: selector]) do: [ :eachClass | (eachClass includesSelector: selector) ifTrue: [ result add: (self whichCategoryIncludesSelector: selector)]]. ^ result asBag adds result result | selector superClasses | selector := aMethodDefinition selector. superClasses := aMethodDefinition realClass allSuperclasses. result := OrderedCollection new. (superClasses select: [ :eachClass | eachClass hasProtocolFor: selector]) do: [ :eachClass | (eachClass includesSelector: selector) ifTrue: [ result add: (self whichCategoryIncludesSelector: selector)]]. ^ result asBag stef
This is in Pharo 3, isn't it ? There are currently bugs with Opal's exception handing in Pharo 3.0. It was fixed then some other changes broke it again. So yeah it is known. You might have bug with: OCShadowVariableWarning. OCUndeclaredVariableWarning. OCUninitializedVariableWarning. OCUnusedVariableWarning. OCUnknownSelectorWarning. 2013/8/11 Stéphane Ducasse <stephane.ducasse@inria.fr>
Hi guys
Is it a know bug?
| selector superClasses | selector := aMethodDefinition selector. superClasses := aMethodDefinition realClass allSuperclasses. result := OrderedCollection new. (superClasses select: [ :eachClass | eachClass hasProtocolFor: selector]) do: [ :eachClass | (eachClass includesSelector: selector) ifTrue: [ result add: (self whichCategoryIncludesSelector: selector)]]. ^ result asBag
adds result
result | selector superClasses | selector := aMethodDefinition selector. superClasses := aMethodDefinition realClass allSuperclasses. result := OrderedCollection new. (superClasses select: [ :eachClass | eachClass hasProtocolFor: selector]) do: [ :eachClass | (eachClass includesSelector: selector) ifTrue: [ result add: (self whichCategoryIncludesSelector: selector)]]. ^ result asBag
stef
Thanks clement. Stef On Aug 11, 2013, at 8:26 PM, Clément Bera <bera.clement@gmail.com> wrote:
This is in Pharo 3, isn't it ?
There are currently bugs with Opal's exception handing in Pharo 3.0. It was fixed then some other changes broke it again. So yeah it is known. You might have bug with: OCShadowVariableWarning. OCUndeclaredVariableWarning. OCUninitializedVariableWarning. OCUnusedVariableWarning. OCUnknownSelectorWarning.
2013/8/11 Stéphane Ducasse <stephane.ducasse@inria.fr> Hi guys
Is it a know bug?
| selector superClasses | selector := aMethodDefinition selector. superClasses := aMethodDefinition realClass allSuperclasses. result := OrderedCollection new. (superClasses select: [ :eachClass | eachClass hasProtocolFor: selector]) do: [ :eachClass | (eachClass includesSelector: selector) ifTrue: [ result add: (self whichCategoryIncludesSelector: selector)]]. ^ result asBag
adds result
result | selector superClasses | selector := aMethodDefinition selector. superClasses := aMethodDefinition realClass allSuperclasses. result := OrderedCollection new. (superClasses select: [ :eachClass | eachClass hasProtocolFor: selector]) do: [ :eachClass | (eachClass includesSelector: selector) ifTrue: [ result add: (self whichCategoryIncludesSelector: selector)]]. ^ result asBag
stef
participants (2)
-
Clément Bera -
Stéphane Ducasse