Browse Source

[test] add --remap test

Rudy Ges 3 months ago
parent
commit
d0cc7102cb

+ 3 - 0
tests/misc/projects/Issue12305/compile.hxml

@@ -0,0 +1,3 @@
+-cp src
+-main Main
+--remap foo:haxe

+ 5 - 0
tests/misc/projects/Issue12305/src/Main.hx

@@ -0,0 +1,5 @@
+import foo.display.Position.Range;
+
+function main() {
+	var loc:Null<Range> = null;
+}

+ 39 - 0
tests/misc/projects/Issue12305/src/foo/display/Position.hx

@@ -0,0 +1,39 @@
+package foo.display;
+
+/**
+	Position in a text document expressed as 1-based line and character offset.
+**/
+typedef Position = {
+	/**
+		Line position in a document (1-based).
+	**/
+	var line:Int;
+
+	/**
+		Character offset on a line in a document (1-based).
+	**/
+	var character:Int;
+}
+
+/**
+	A range in a text document expressed as (1-based) start and end positions.
+**/
+typedef Range = {
+	/**
+		The range's start position
+	**/
+	var start:Position;
+
+	/**
+		The range's end position
+	**/
+	var end:Position;
+}
+
+/**
+	Represents a location inside a resource, such as a line inside a text file.
+**/
+typedef Location = {
+	var file:FsPath;
+	var range:Range;
+}