mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-24 00:52:18 +01:00
Check struct declarations.
This commit is contained in:
1 parent
e87ff7163b
commit
f7095028f0
3 files changed
+73
-17
No files matched your search
+5
-3
@@ -215,9 +215,11 @@ func (c *typeChecker) checkExprOther(n *a.Expr) error {
|
||||
return nil
|
||||
|
||||
case id1.IsIdent():
|
||||
if typ, ok := c.typeMap[id1]; ok {
|
||||
n.SetMType(typ)
|
||||
return nil
|
||||
if c.typeMap != nil {
|
||||
if typ, ok := c.typeMap[id1]; ok {
|
||||
n.SetMType(typ)
|
||||
return nil
|
||||
}
|
||||
}
|
||||
// TODO: look for (global) names (constants, funcs, structs).
|
||||
return fmt.Errorf("check: unrecognized identifier %q", c.idMap.ByID(id1))
|
||||
|
||||
Reference in new issue
Block a user