- if(deprecation != null && compilationContext != null)
- compilationContext.errorLog.logWarning(import_.location, "Deprecated module " + import_.moduleName + (deprecation.isEmpty() ? "." : ": " + deprecation));
+ if(deprecation != null && compilationContext != null) {
+ long location = originalImport ? originalImports.get(import_.moduleName) : Locations.NO_LOCATION;
+ compilationContext.errorLog.logWarning(location, "Deprecated module " + import_.moduleName + (deprecation.isEmpty() ? "." : ": " + deprecation));
+ }