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

Fix spurious import warning #12578

Merged
merged 5 commits into from
Mar 20, 2025
Merged
Changes from 1 commit
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
Next Next commit
Add reproducer test
Akirathan committed Mar 20, 2025
commit 764be394670ed7151d52cb1a16511252309938cf
Original file line number Diff line number Diff line change
@@ -2,6 +2,8 @@

import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.containsString;
import static org.hamcrest.Matchers.is;
import static org.hamcrest.Matchers.notNullValue;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotEquals;
import static org.junit.Assert.assertNotNull;
@@ -148,4 +150,23 @@ public void fqnAreAllowedInTypeSignatures() {
assertTrue("Compiles and returns result", res.isNumber());
assertEquals("Returns correct result", 11, res.asInt());
}

// https://github.com/enso-org/enso/issues/12376
@Test
public void noDuplicateImportWarning() {
var code =
"""
from Standard.Table.Column import apply_unary_operation, naming_helper
main =
[apply_unary_operation, naming_helper]
""";
var res = ContextUtils.evalModule(ctx, code);
assertThat(res, is(notNullValue()));
var errors = MESSAGES.toString(StandardCharsets.UTF_8);
assertThat(
"There should be no errors or warnings. But there was: " + errors,
errors.isEmpty(),
is(true));
}
}