Commit 37d7500f authored by Rémy Oudompheng's avatar Rémy Oudompheng Committed by Robert Griesemer

exp/types: set non-embedded method type during GcImport.

R=golang-dev, gri
CC=golang-dev
https://golang.org/cl/6445068
parent a4ac339f
...@@ -510,11 +510,12 @@ func (p *gcParser) parseSignature() *Func { ...@@ -510,11 +510,12 @@ func (p *gcParser) parseSignature() *Func {
// MethodOrEmbedSpec = Name [ Signature ] . // MethodOrEmbedSpec = Name [ Signature ] .
// //
func (p *gcParser) parseMethodOrEmbedSpec() *ast.Object { func (p *gcParser) parseMethodOrEmbedSpec() *ast.Object {
p.parseName() name := p.parseName()
if p.tok == '(' { if p.tok == '(' {
p.parseSignature() typ := p.parseSignature()
// TODO(gri) compute method object obj := ast.NewObj(ast.Fun, name)
return ast.NewObj(ast.Fun, "_") obj.Type = typ
return obj
} }
// TODO lookup name and return that type // TODO lookup name and return that type
return ast.NewObj(ast.Typ, "_") return ast.NewObj(ast.Typ, "_")
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment