aboutsummaryrefslogtreecommitdiffstats
path: root/android/package_ctx.go
diff options
context:
space:
mode:
authorColin Cross <ccross@android.com>2017-11-29 00:27:14 -0800
committerColin Cross <ccross@android.com>2017-11-30 00:44:11 +0000
commitaabf67968c4abc98d94bd8ccd6d612246b2fbbdc (patch)
treefa6ef71b0fd9ce7746e8a9f6b7f02e353cace36b /android/package_ctx.go
parent178d5fefc0cea9d0f031c0bdee125b9d960f32c3 (diff)
downloadbuild_soong-aabf67968c4abc98d94bd8ccd6d612246b2fbbdc.tar.gz
build_soong-aabf67968c4abc98d94bd8ccd6d612246b2fbbdc.tar.bz2
build_soong-aabf67968c4abc98d94bd8ccd6d612246b2fbbdc.zip
Make *Context.Config return a Config instead of a interface{}
In Soong, a Config() method will always return a Config. Make ModuleContext, SingletonContext, TopDownMutatorContext and BottomUpMutatorContext's Config() methods explictly return a Config to avoid having to type-assert everywhere. Overriding the Config method requires duplicating the list of methods in blueprint.BaseModuleContext and blueprint.BottomUpMutatorContext, following the same pattern used by the other *Contexts. Config() obsoletes the AConfig() method used in some places, which will be cleaned up in the next patch. Test: m checkbuild Change-Id: Ibe21efde933959811d52443496967ab8ce71215e
Diffstat (limited to 'android/package_ctx.go')
-rw-r--r--android/package_ctx.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/android/package_ctx.go b/android/package_ctx.go
index 1626f766..b40e0a9c 100644
--- a/android/package_ctx.go
+++ b/android/package_ctx.go
@@ -47,7 +47,7 @@ type configErrorWrapper struct {
var _ PathContext = &configErrorWrapper{}
var _ errorfContext = &configErrorWrapper{}
-func (e *configErrorWrapper) Config() interface{} {
+func (e *configErrorWrapper) Config() Config {
return e.config
}
func (e *configErrorWrapper) Errorf(format string, args ...interface{}) {