]> Cypherpunks.ru repositories - gostls13.git/blobdiff - src/go/types/typexpr.go
go/types, types2: implement Alias proposal (export API)
[gostls13.git] / src / go / types / typexpr.go
index 5bc5a1f3ac72565c0e590f34391ecc87fd62ea74..2835958d9842c8bffe10501f1bc512d0ae2ce180 100644 (file)
@@ -95,7 +95,7 @@ func (check *Checker) ident(x *operand, e *ast.Ident, def *TypeName, wantType bo
                x.mode = constant_
 
        case *TypeName:
-               if !check.conf._EnableAlias && check.isBrokenAlias(obj) {
+               if !check.enableAlias && check.isBrokenAlias(obj) {
                        check.errorf(e, InvalidDeclCycle, "invalid use of type alias %s in recursive type (see go.dev/issue/50729)", obj.name)
                        return
                }
@@ -394,7 +394,7 @@ func (check *Checker) typInternal(e0 ast.Expr, def *TypeName) (T Type) {
 func setDefType(def *TypeName, typ Type) {
        if def != nil {
                switch t := def.typ.(type) {
-               case *_Alias:
+               case *Alias:
                        // t.fromRHS should always be set, either to an invalid type
                        // in the beginning, or to typ in certain cyclic declarations.
                        if t.fromRHS != Typ[Invalid] && t.fromRHS != typ {