diff options
author | Austin Clements <aclements@csail.mit.edu> | 2009-08-05 11:49:51 -0700 |
---|---|---|
committer | Austin Clements <aclements@csail.mit.edu> | 2009-08-05 11:49:51 -0700 |
commit | c8b49a4532508beea09fe32b8ff2ce8670e88652 (patch) | |
tree | 52b8f1b2dd990c619a8b473c8702d3f0a2c6d26c /usr/austin/eval/scope.go | |
parent | 3bd3459d14bc33de204f0558688f2e908c35a2f8 (diff) | |
download | golang-c8b49a4532508beea09fe32b8ff2ce8670e88652.tar.gz |
Implement struct types, selector expressions, and type
declarations.
R=rsc
APPROVED=rsc
DELTA=587 (519 added, 21 deleted, 47 changed)
OCL=32754
CL=32788
Diffstat (limited to 'usr/austin/eval/scope.go')
-rw-r--r-- | usr/austin/eval/scope.go | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/usr/austin/eval/scope.go b/usr/austin/eval/scope.go index d32a37a36..3ddc55e48 100644 --- a/usr/austin/eval/scope.go +++ b/usr/austin/eval/scope.go @@ -86,7 +86,10 @@ func (b *block) DefineType(name string, pos token.Position, t Type) Type { } // We take the representative type of t because multiple // levels of naming are useless. - nt := &NamedType{pos, name, t.lit()}; + if t != nil { + t = t.lit(); + } + nt := &NamedType{pos, name, t, false, make(map[string] Method)}; b.defs[name] = nt; return nt; } |