aboutsummaryrefslogtreecommitdiff
path: root/src/checker.cpp
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2021-07-15 00:37:59 +0100
committergingerBill <bill@gingerbill.org>2021-07-15 00:37:59 +0100
commit2938ec028f710edc2227169b15023d9b30c3aa11 (patch)
tree93124d5b8eb5363e037cbdcc6b1135683aa62481 /src/checker.cpp
parent981b9fb7a818ba607ac05f9efdc84fc8daa78344 (diff)
Remove dead code
Diffstat (limited to 'src/checker.cpp')
-rw-r--r--src/checker.cpp16
1 files changed, 1 insertions, 15 deletions
diff --git a/src/checker.cpp b/src/checker.cpp
index 0332d04b8..e251c2b61 100644
--- a/src/checker.cpp
+++ b/src/checker.cpp
@@ -4089,20 +4089,7 @@ void check_import_entities(Checker *c) {
auto path = find_import_path(c, pkg, pkg, &visited);
defer (array_free(&path));
- // TODO(bill): This needs better TokenPos finding
- auto const fn = [](ImportPathItem item) -> String {
- return item.pkg->name;
- };
-
- #if 1
- if (path.count == 1) {
- // TODO(bill): Should this be allowed or disabled?
- #if 0
- ImportPathItem item = path[0];
- String filename = fn(item);
- error(item.decl, "Self importation of '%.*s'", LIT(filename));
- #endif
- } else if (path.count > 0) {
+ if (path.count > 1) {
ImportPathItem item = path[path.count-1];
String pkg_name = item.pkg->name;
error(item.decl, "Cyclic importation of '%.*s'", LIT(pkg_name));
@@ -4113,7 +4100,6 @@ void check_import_entities(Checker *c) {
}
error(item.decl, "'%.*s'", LIT(pkg_name));
}
- #endif
}
for_array(i, n->pred.entries) {