Skip to content

Commit

Permalink
Adding deprecations for Opal Compiler that were recommended by DepMin…
Browse files Browse the repository at this point in the history
…er and accepted by Pablo
  • Loading branch information
olekscode committed Feb 4, 2021
1 parent 2b9380c commit 0d4236b
Show file tree
Hide file tree
Showing 6 changed files with 99 additions and 0 deletions.
54 changes: 54 additions & 0 deletions src/Deprecated90/OCAbstractVariable.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,24 @@ OCAbstractVariable >> asString [
^ self name
]

{ #category : #generated }
OCAbstractVariable >> isGlobal [

self
deprecated: 'Use #isGlobalVariable instead'
transformWith: '`@rec isGlobal' -> '`@rec isGlobalVariable'.
^ self isGlobalVariable
]

{ #category : #generated }
OCAbstractVariable >> isInstance [

self
deprecated: 'Use #isInstanceVariable instead'
transformWith: '`@rec isInstance' -> '`@rec isInstanceVariable'.
^ self isInstanceVariable
]

{ #category : #'read/write usage' }
OCAbstractVariable >> isRead [
^usage = #read
Expand All @@ -40,6 +58,42 @@ OCAbstractVariable >> isRepeatedWrite [

]

{ #category : #generated }
OCAbstractVariable >> isSelf [

self
deprecated: 'Use #isSelfVariable instead'
transformWith: '`@rec isSelf' -> '`@rec isSelfVariable'.
^ self isSelfVariable
]

{ #category : #generated }
OCAbstractVariable >> isSuper [

self
deprecated: 'Use #isSuperVariable instead'
transformWith: '`@rec isSuper' -> '`@rec isSuperVariable'.
^ self isSuperVariable
]

{ #category : #generated }
OCAbstractVariable >> isTemp [

self
deprecated: 'Use #isTempVariable instead'
transformWith: '`@rec isTemp' -> '`@rec isTempVariable'.
^ self isTempVariable
]

{ #category : #generated }
OCAbstractVariable >> isUndeclared [

self
deprecated: 'Use #isUndeclaredVariable instead'
transformWith: '`@rec isUndeclared' -> '`@rec isUndeclaredVariable'.
^ self isUndeclaredVariable
]

{ #category : #'read/write usage' }
OCAbstractVariable >> isWrite [
^ usage = #write or: [ self isRepeatedWrite ]
Expand Down
9 changes: 9 additions & 0 deletions src/Deprecated90/OCLiteralVariable.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,15 @@ OCLiteralVariable >> isFromSharedPool [
ifNone: [ false ]
]

{ #category : #generated }
OCLiteralVariable >> isGlobal [

self
deprecated: 'Use #isGlobalVariable instead'
transformWith: '`@rec isGlobal' -> '`@rec isGlobalVariable'.
^ self isGlobalVariable
]

{ #category : #testing }
OCLiteralVariable >> isGlobalClassNameBinding [
^ (self value isClass or: [ self value isTrait ])
Expand Down
9 changes: 9 additions & 0 deletions src/Deprecated90/OCSelfVariable.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,15 @@ OCSelfVariable >> initialize [
name := 'self'
]

{ #category : #generated }
OCSelfVariable >> isSelf [

self
deprecated: 'Use #isSelfVariable instead'
transformWith: '`@rec isSelf' -> '`@rec isSelfVariable'.
^ self isSelfVariable
]

{ #category : #debugging }
OCSelfVariable >> readInContext: aContext [
^aContext receiver
Expand Down
9 changes: 9 additions & 0 deletions src/Deprecated90/OCSlotVariable.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,15 @@ OCSlotVariable >> emitValue: methodBuilder [
slot emitValue: methodBuilder
]

{ #category : #generated }
OCSlotVariable >> isInstance [

self
deprecated: 'Use #isInstanceVariable instead'
transformWith: '`@rec isInstance' -> '`@rec isInstanceVariable'.
^ self isInstanceVariable
]

{ #category : #accessing }
OCSlotVariable >> name [
^ slot name
Expand Down
9 changes: 9 additions & 0 deletions src/Deprecated90/OCSuperVariable.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,15 @@ OCSuperVariable >> initialize [
name := 'super'
]

{ #category : #generated }
OCSuperVariable >> isSuper [

self
deprecated: 'Use #isSuperVariable instead'
transformWith: '`@rec isSuper' -> '`@rec isSuperVariable'.
^ self isSuperVariable
]

{ #category : #debugging }
OCSuperVariable >> readInContext: aContext [
^aContext receiver
Expand Down
9 changes: 9 additions & 0 deletions src/Deprecated90/OCUndeclaredVariable.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,15 @@ OCUndeclaredVariable >> emitValue: methodBuilder [

]

{ #category : #generated }
OCUndeclaredVariable >> isUndeclared [

self
deprecated: 'Use #isUndeclaredVariable instead'
transformWith: '`@rec isUndeclared' -> '`@rec isUndeclaredVariable'.
^ self isUndeclaredVariable
]

{ #category : #accessing }
OCUndeclaredVariable >> name [
^ name
Expand Down

0 comments on commit 0d4236b

Please sign in to comment.