mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-20 16:47:28 +01:00
Tighten an ast.TypeExpr's types.
This commit is contained in:
1 parent
9f226d00e0
commit
4a4c6375c0
3 files changed
+23
-25
No files matched your search
+2
-2
@@ -23,7 +23,7 @@ func TypeString(m *t.IDMap, n *a.TypeExpr) string {
|
||||
case 0:
|
||||
return m.ByID(n.Name())
|
||||
case t.IDPtr:
|
||||
return "ptr " + TypeString(m, n.RHS().TypeExpr())
|
||||
return "ptr " + TypeString(m, n.Inner())
|
||||
case t.IDOpenBracket:
|
||||
// TODO.
|
||||
default:
|
||||
@@ -347,7 +347,7 @@ func (c *Checker) checkTypeExpr(n *a.TypeExpr) error {
|
||||
return fmt.Errorf("check: %q is not a type", c.idMap.ByID(name))
|
||||
|
||||
case t.IDPtr:
|
||||
n = n.RHS().TypeExpr()
|
||||
n = n.Inner()
|
||||
|
||||
case t.IDOpenBracket:
|
||||
// TODO.
|
||||
|
||||
Reference in new issue
Block a user