Missing @NotNull and assertions added

This commit is contained in:
Andrey Breslav
2012-12-19 16:57:41 +04:00
parent 2a8ee31920
commit 26ccb80abb
3 changed files with 3 additions and 2 deletions
@@ -111,6 +111,7 @@ public class NamespaceCodegen extends MemberCodegen {
private void generate(JetFile file, boolean multiFile) {
NamespaceDescriptor descriptor = state.getBindingContext().get(BindingContext.FILE_TO_NAMESPACE, file);
assert descriptor != null : "No namespace found for file " + file + " declared package: " + file.getPackageName();
for (JetDeclaration declaration : file.getDeclarations()) {
if (declaration instanceof JetProperty) {
final CodegenContext context = CodegenContext.STATIC.intoNamespace(descriptor);
@@ -135,7 +135,7 @@ public abstract class CodegenContext {
return contextKind;
}
public CodegenContext intoNamespace(NamespaceDescriptor descriptor) {
public CodegenContext intoNamespace(@NotNull NamespaceDescriptor descriptor) {
return new NamespaceContext(descriptor, this, OwnerKind.NAMESPACE);
}
@@ -21,7 +21,7 @@ import org.jetbrains.jet.codegen.OwnerKind;
import org.jetbrains.jet.lang.descriptors.NamespaceDescriptor;
public class NamespaceContext extends CodegenContext {
public NamespaceContext(NamespaceDescriptor contextDescriptor, CodegenContext parent, @NotNull OwnerKind kind) {
public NamespaceContext(@NotNull NamespaceDescriptor contextDescriptor, CodegenContext parent, @NotNull OwnerKind kind) {
super(contextDescriptor, kind, parent, null, null, null);
}