summaryrefslogtreecommitdiff
path: root/src/pkg/go/typechecker/universe.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/pkg/go/typechecker/universe.go')
-rw-r--r--src/pkg/go/typechecker/universe.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/pkg/go/typechecker/universe.go b/src/pkg/go/typechecker/universe.go
index db950737f..abc8bbbd4 100644
--- a/src/pkg/go/typechecker/universe.go
+++ b/src/pkg/go/typechecker/universe.go
@@ -14,7 +14,7 @@ var Universe *ast.Scope
func def(obj *ast.Object) {
alt := Universe.Insert(obj)
- if alt != obj {
+ if alt != nil {
panic("object declared twice")
}
}
@@ -24,8 +24,8 @@ func init() {
Universe = ast.NewScope(nil)
// basic types
- for n, name := range ast.BasicTypes {
- typ := ast.NewType(ast.Basic)
+ for n, name := range BasicTypes {
+ typ := NewType(Basic)
typ.N = n
obj := ast.NewObj(ast.Typ, name)
obj.Type = typ