-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix issue in scheduler, fix issue in calculation owner parent methods…
… in inner class
- Loading branch information
Showing
6 changed files
with
149 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
class runner | ||
private var result : string; | ||
class A | ||
public function run() : void | ||
var classB : B; | ||
classB = new B(); | ||
classB.run(); | ||
end | ||
end | ||
class B | ||
public function run() : void | ||
ownerResult(); | ||
end | ||
end | ||
|
||
private function ownerResult() : void | ||
result = "result"; | ||
end | ||
|
||
public function run() : string | ||
var classA : A; | ||
classA = new A(); | ||
classA.run(); | ||
return result; | ||
end | ||
end | ||
class runnerBuilder : runner | ||
public function runnerBuilder(): void | ||
end | ||
public function build(): runner | ||
return this; | ||
end | ||
end | ||
|
||
class program | ||
public static function main() : string | ||
return (new runnerBuilder()).build().run(); | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
class testCallback : action | ||
public var sc : scheduler; | ||
public var i : int; | ||
public function testCallback() : void | ||
i = 0; | ||
end | ||
public function invoke() : void | ||
sc.stop(); | ||
i = i + 1; | ||
sc.startWithDelay(); | ||
end | ||
public function setSched(sc: scheduler) : void | ||
this.sc = sc; | ||
end | ||
end | ||
|
||
class test | ||
public static function startImmediately() : testCallback | ||
var callback : testCallback; | ||
var sc : scheduler; | ||
|
||
callback = new testCallback(); | ||
sc = scheduler.create(200, callback); | ||
callback.setSched(sc); | ||
sc.startImmediately(); | ||
return callback; | ||
end | ||
public static function startWithDelay(callback : testCallback) : testCallback | ||
callback.sc.startWithDelay(); | ||
return callback; | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters