Skip to content

Commit b3f170a

Browse files
committed
cue/ast/astutil: remove quoted identifiers remnant
I missed this TODO in the cleanup at https://cuelang.org/cl/1185684. Simplify the double type assertion as well. Signed-off-by: Daniel Martí <[email protected]> Change-Id: I144e173656d135617693ecec970bb0b325b37ff7 Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1194005 Unity-Result: CUE porcuepine <[email protected]> Reviewed-by: Roger Peppe <[email protected]> TryBot-Result: CUEcueckoo <[email protected]>
1 parent adea575 commit b3f170a

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

cue/ast/astutil/resolve.go

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -122,13 +122,9 @@ func newScope(f *ast.File, outer *scope, node ast.Node, decls []ast.Decl) *scope
122122
label := x.Label
123123

124124
if a, ok := x.Label.(*ast.Alias); ok {
125-
// TODO(legacy): use name := a.Ident.Name once quoted
126-
// identifiers are no longer supported.
127-
label, _ = a.Expr.(ast.Label)
128-
if name, _, _ := ast.LabelName(a.Ident); name != "" {
129-
if _, ok := label.(*ast.ListLit); !ok {
130-
s.insert(name, x, a)
131-
}
125+
name := a.Ident.Name
126+
if _, ok := a.Expr.(*ast.ListLit); !ok {
127+
s.insert(name, x, a)
132128
}
133129
}
134130

0 commit comments

Comments
 (0)