mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Operators imported in one source file shouldn't affect another one.
Previously we would cache the results of operator lookup whether or not the operator we found came from an imported module. Since different source files can have different imports, it's not correct to automatically share operators from imported modules with all files in the translation unit. This still isn't fully correct; the current logic prefers operators from local imports over operators implicitly available from other source files. Swift SVN r9683
This commit is contained in:
@@ -533,6 +533,8 @@ OperatorDecl *ModuleFile::lookupOperator(Identifier name, DeclKind fixity) {
|
||||
return cast<OperatorDecl>(getDecl(item.second));
|
||||
}
|
||||
|
||||
// FIXME: operators re-exported from other modules?
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user