コード例 #1
0
ファイル: scopeinfo.go プロジェクト: Serulian/compiler
// ReturningResolvedTypeOf marks the scope as returning the *resolved* type of the given scope.
func (sib *scopeInfoBuilder) ReturningResolvedTypeOf(scope *proto.ScopeInfo) *scopeInfoBuilder {
	resolvedValue := scope.GetResolvedType()
	settlesScope := true

	sib.info.ReturnedType = &resolvedValue
	sib.info.IsSettlingScope = &settlesScope
	return sib
}
コード例 #2
0
ファイル: scopeinfo.go プロジェクト: Serulian/compiler
// AssignableResolvedTypeOf marks the scope as being assignable of the *resolved* type of the given scope.
func (sib *scopeInfoBuilder) AssignableResolvedTypeOf(scope *proto.ScopeInfo) *scopeInfoBuilder {
	resolvedValue := scope.GetResolvedType()
	sib.info.AssignableType = &resolvedValue
	return sib
}
コード例 #3
0
ファイル: scopeinfo.go プロジェクト: Serulian/compiler
// ResolvingTypeOf marks the scope as resolving the type of the given scope.
func (sib *scopeInfoBuilder) ResolvingTypeOf(scope *proto.ScopeInfo) *scopeInfoBuilder {
	resolvedValue := scope.GetResolvedType()
	sib.info.ResolvedType = &resolvedValue
	return sib
}