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

8694-Instance-of-DoItVariable-did-not-understand-markRead #8774

Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
25 changes: 25 additions & 0 deletions src/Kernel/DoItVariable.class.st
Expand Up @@ -179,6 +179,31 @@ DoItVariable >> key [
^self name
]

{ #category : #'read/write usage' }
DoItVariable >> markEscapingRead [
actualVariable markEscapingRead
]
MarcusDenker marked this conversation as resolved.
Show resolved Hide resolved

{ #category : #'read/write usage' }
DoItVariable >> markEscapingWrite [
actualVariable markEscapingWrite
]

{ #category : #'read/write usage' }
DoItVariable >> markRead [
actualVariable markRead
]

{ #category : #'read/write usage' }
DoItVariable >> markRepeatedWrite [
actualVariable markRepeatedWrite
]

{ #category : #'read/write usage' }
DoItVariable >> markWrite [
actualVariable markWrite
]

{ #category : #printing }
DoItVariable >> printOn: aStream [
super printOn: aStream.
Expand Down
8 changes: 6 additions & 2 deletions src/Slot-Tests/DoItVariableTest.class.st
Expand Up @@ -71,7 +71,9 @@ DoItVariableTest >> testReadCompilation [
| temp var ast doIt |
temp := 100.
var := DoItVariable named: #temp fromContext: thisContext.
ast := [ temp + 2 ] sourceNode body asDoit doSemanticAnalysis.
[ast := [ temp + 2 ] sourceNode body asDoit doSemanticAnalysis]
on: OCUndeclaredVariableWarning
do: [ :ex | ex resume: ex declareUndefined].
ast variableNodes first variable: var.
doIt := ast generateWithSource.

Expand Down Expand Up @@ -103,7 +105,9 @@ DoItVariableTest >> testWriteCompilation [
| temp var ast doIt |
temp := 100.
var := DoItVariable named: #temp fromContext: thisContext.
ast := [ temp := 500 ] sourceNode body asDoit doSemanticAnalysis.
[ast := [ temp := 500 ] sourceNode body asDoit doSemanticAnalysis]
on: OCUndeclaredVariableWarning
do: [ :ex | ex resume: ex declareUndefined].
ast variableNodes first variable: var.
doIt := ast generateWithSource.
doIt valueWithReceiver: self arguments: #().
Expand Down