- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 14 for isTypes2 (0.18 sec)
-
src/cmd/compile/internal/types2/conversions.go
final := T // - For conversions to interfaces, except for untyped nil arguments // and isTypes2, use the argument's default type. // - For conversions of untyped constants to non-constant types, also // use the default type (e.g., []byte("foo") should report string // not []byte as type for the constant "foo"). // - If !isTypes2, keep untyped nil for untyped nil arguments.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 22 18:51:00 UTC 2024 - 9K bytes - Viewed (0) -
src/go/types/conversions.go
final := T // - For conversions to interfaces, except for untyped nil arguments // and isTypes2, use the argument's default type. // - For conversions of untyped constants to non-constant types, also // use the default type (e.g., []byte("foo") should report string // not []byte as type for the constant "foo"). // - If !isTypes2, keep untyped nil for untyped nil arguments.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 22 18:51:00 UTC 2024 - 9.1K bytes - Viewed (0) -
src/go/types/util.go
// different between go/types and types2. Factoring // out this code allows more of the rest of the code // to be shared. package types import ( "go/ast" "go/constant" "go/token" ) const isTypes2 = false // cmpPos compares the positions p and q and returns a result r as follows: // // r < 0: p is before q // r == 0: p and q are the same position (but may not be identical) // r > 0: p is after q //
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 03:01:18 UTC 2024 - 1.7K bytes - Viewed (0) -
src/cmd/compile/internal/types2/util.go
// out this code allows more of the rest of the code // to be shared. package types2 import ( "cmd/compile/internal/syntax" "go/constant" "go/token" ) const isTypes2 = true // cmpPos compares the positions p and q and returns a result r as follows: // // r < 0: p is before q // r == 0: p and q are the same position (but may not be identical) // r > 0: p is after q //
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 03:01:18 UTC 2024 - 2.1K bytes - Viewed (0) -
src/go/types/operand.go
// // cgofunc <expr> (<untyped kind> <mode> ) // cgofunc <expr> ( <mode> of type <typ>) func operandString(x *operand, qf Qualifier) string { // special-case nil if isTypes2 { if x.mode == nilvalue { switch x.typ { case nil, Typ[Invalid]: return "nil (with invalid type)" case Typ[UntypedNil]: return "nil" default:
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 21:17:10 UTC 2024 - 11.1K bytes - Viewed (0) -
src/cmd/compile/internal/types2/operand.go
// // cgofunc <expr> (<untyped kind> <mode> ) // cgofunc <expr> ( <mode> of type <typ>) func operandString(x *operand, qf Qualifier) string { // special-case nil if isTypes2 { if x.mode == nilvalue { switch x.typ { case nil, Typ[Invalid]: return "nil (with invalid type)" case Typ[UntypedNil]: return "nil" default:
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 21:17:10 UTC 2024 - 11K bytes - Viewed (0) -
src/cmd/compile/internal/types2/errors.go
} // In go/types, if there is a sub-error with a valid position, // call the typechecker error handler for each sub-error. // Otherwise, call it once, with a single combined message. multiError := false if !isTypes2 { for i := 1; i < len(err.desc); i++ { if err.desc[i].pos.IsKnown() { multiError = true break } } } if multiError { for i := range err.desc { p := &err.desc[i]
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Feb 29 22:06:18 UTC 2024 - 6.6K bytes - Viewed (0) -
src/go/types/assignments.go
func (check *Checker) assignment(x *operand, T Type, context string) { check.singleValue(x) switch x.mode { case invalid: return // error reported before case nilvalue: assert(isTypes2) // ok case constant_, variable, mapindex, value, commaok, commaerr: // ok default: // we may get here because of other problems (go.dev/issue/39634, crash 12)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Apr 03 18:48:38 UTC 2024 - 16.4K bytes - Viewed (0) -
src/cmd/compile/internal/types2/assignments.go
func (check *Checker) assignment(x *operand, T Type, context string) { check.singleValue(x) switch x.mode { case invalid: return // error reported before case nilvalue: assert(isTypes2) // ok case constant_, variable, mapindex, value, commaok, commaerr: // ok default: // we may get here because of other problems (go.dev/issue/39634, crash 12)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Feb 23 21:21:43 UTC 2024 - 16.4K bytes - Viewed (0) -
src/go/types/errors.go
} // In go/types, if there is a sub-error with a valid position, // call the typechecker error handler for each sub-error. // Otherwise, call it once, with a single combined message. multiError := false if !isTypes2 { for i := 1; i < len(err.desc); i++ { if err.desc[i].posn.Pos().IsValid() { multiError = true break } } } if multiError { for i := range err.desc {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Feb 29 22:06:18 UTC 2024 - 8.5K bytes - Viewed (0)