Toto added

This commit is contained in:
Andrey Breslav
2012-05-31 17:59:00 +04:00
parent ee96cca49a
commit 50d9d0975d
@@ -46,7 +46,6 @@ public class ScopeProvider {
@NotNull
public JetScope getFileScopeForDeclarationResolution(JetFile file) {
// package
// + imported classes
JetNamespaceHeader header = file.getNamespaceHeader();
if (header == null) {
throw new IllegalArgumentException("Scripts are not supported: " + file.getName());
@@ -62,6 +61,8 @@ public class ScopeProvider {
WritableScope writableScope = new WritableScopeImpl(JetScope.EMPTY, packageDescriptor, RedeclarationHandler.DO_NOTHING);
writableScope.importScope(packageDescriptor.getMemberScope());
// TODO: imports
writableScope.changeLockLevel(WritableScope.LockLevel.READING);
// TODO: Cache
return writableScope;