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

Use whole import position when storing subtype import resolution data #11732

Merged
merged 2 commits into from
Jul 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/context/display/importHandling.ml
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ let init_import ctx path mode p =
check_alias tsub name pname;
Some name
in
ctx.m.import_resolution#add (module_type_resolution tsub alias p2);
ctx.m.import_resolution#add (module_type_resolution tsub alias p);
with Not_found ->
(* this might be a static property, wait later to check *)
let find_main_type_static () =
Expand Down
14 changes: 14 additions & 0 deletions tests/display/src/cases/Issue11620.hx
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
package cases;

class Issue11620 extends DisplayTestCase {
/**
import misc.issue11620.Foo.Bar;

function main() {
Bar.bar();
}
**/
function test() {
arrayEq([], diagnostics());
}
}
9 changes: 9 additions & 0 deletions tests/display/src/misc/issue11620/Foo.hx
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package misc.issue11620;

class Foo {
public static function foo() {}
}

class Bar {
public static function bar() {}
}
Loading