forked from SumRndmDde/evil-haxe
-
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.
Find references of the base field or include descendant fields (HaxeF…
- Loading branch information
1 parent
eb3aecf
commit ce56f30
Showing
11 changed files
with
190 additions
and
26 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
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
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 |
---|---|---|
@@ -1,3 +1,6 @@ | ||
import haxe.Exception; | ||
import haxe.display.Position; | ||
|
||
class Marker { | ||
static var markerRe = ~/{-(\d+)-}/g; | ||
|
||
|
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,55 @@ | ||
package cases.display.issues; | ||
|
||
class Issue9044 extends DisplayTestCase { | ||
/** | ||
class Child extends Base { | ||
public function new() {} | ||
override function f{-1-}unc() { | ||
super.{-2-}func{-3-}(); | ||
} | ||
} | ||
class GrandChild extends Child { | ||
override function func() { | ||
super.{-5-}func{-6-}(); | ||
} | ||
} | ||
class Base { | ||
public function func() {} | ||
} | ||
class Main { | ||
static function main() { | ||
var c = new Child(); | ||
c.{-8-}func{-9-}(); | ||
var base:Base = c; | ||
base.{-10-}func{-11-}(); | ||
var g = new GrandChild(); | ||
g.{-12-}func{-13-}(); | ||
} | ||
} | ||
**/ | ||
function test(_) { | ||
runHaxeJson([], DisplayMethods.FindReferences, { | ||
file: file, | ||
offset: offset(1), | ||
contents: source, | ||
kind: WithBaseAndDescendants | ||
}); | ||
var result = parseGotoDefinitionLocations(); | ||
var expectedRanges = [range(2, 3), range(5, 6), range(8, 9), range(10, 11), range(12, 13)]; | ||
Assert.same(expectedRanges, result.map(l -> l.range)); | ||
|
||
runHaxeJson([], DisplayMethods.FindReferences, { | ||
file: file, | ||
offset: offset(1), | ||
contents: source, | ||
kind: WithDescendants | ||
}); | ||
var result = parseGotoDefinitionLocations(); | ||
var expectedRanges = [range(5, 6), range(8, 9), range(12, 13)]; | ||
Assert.same(expectedRanges, result.map(l -> l.range)); | ||
} | ||
} |