- Sort Score
- Result 10 results
- Languages All
Results 1 - 4 of 4 for constDecl (1.2 sec)
-
src/internal/types/testdata/check/constdecl.go
// Copyright 2013 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package constdecl import "math" import "unsafe" var v int // Const decls must be initialized by constants. const _ = v /* ERROR "not constant" */ const _ = math /* ERROR "not constant" */ .Sin(0) const _ = int /* ERROR "not an expression" */ func _() {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Oct 31 16:11:16 UTC 2023 - 3.7K bytes - Viewed (0) -
src/cmd/compile/internal/syntax/nodes_test.go
{"ImportDecl", `import (@"math")`}, {"ImportDecl", `import (@mymath "math")`}, {"ImportDecl", `import (@. "math")`}, {"ConstDecl", `const @x`}, {"ConstDecl", `const @x = 0`}, {"ConstDecl", `const @x, y, z = 0, 1, 2`}, {"ConstDecl", `const (@x)`}, {"ConstDecl", `const (@x = 0)`}, {"ConstDecl", `const (@x, y, z = 0, 1, 2)`}, {"TypeDecl", `type @T int`}, {"TypeDecl", `type @T = int`}, {"TypeDecl", `type (@T int)`},
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Nov 02 18:45:06 UTC 2023 - 8.7K bytes - Viewed (0) -
src/cmd/compile/internal/syntax/positions.go
panic("nil node") // packages case *File: // file block starts at the beginning of the file return MakePos(n.Pos().Base(), 1, 1) // declarations // case *ImportDecl: // case *ConstDecl: // case *TypeDecl: // case *VarDecl: // case *FuncDecl: // expressions // case *BadExpr: // case *Name: // case *BasicLit: case *CompositeLit: if n.Type != nil { m = n.Type
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Jun 10 17:49:19 UTC 2024 - 6.5K bytes - Viewed (0) -
src/cmd/compile/internal/syntax/nodes.go
Path *BasicLit // Path.Bad || Path.Kind == StringLit; nil means no path decl } // NameList // NameList = Values // NameList Type = Values ConstDecl struct { Group *Group // nil means not part of a group Pragma Pragma NameList []*Name Type Expr // nil means no type Values Expr // nil means no values decl } // Name Type
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Sep 20 14:52:38 UTC 2023 - 9K bytes - Viewed (0)