From b262d2c9c56eed18d043dccefac02b54a6ae2f95 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Mon, 30 Jan 2017 11:12:25 +0200 Subject: Implement pattern-based variable typing, tighten variable type update --- build2/file.cxx | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'build2/file.cxx') diff --git a/build2/file.cxx b/build2/file.cxx index 72d2807..755ff0f 100644 --- a/build2/file.cxx +++ b/build2/file.cxx @@ -900,10 +900,11 @@ namespace build2 // config.import. // - // Note: overridable variable with path auto-completion. - // { - const variable& var (vp.insert (n, true)); + // Note: pattern-typed in context.cxx:reset() as an overridable + // variable of type abs_dir_path (path auto-completion). + // + const variable& var (vp.insert (n)); if (auto l = iroot[var]) { @@ -934,7 +935,10 @@ namespace build2 { auto lookup = [&iroot, &vp, &loc] (string name) -> path { - const variable& var (vp.insert (name, true)); + // Note: pattern-typed in context.cxx:reset() as an overridable + // variable of type path. + // + const variable& var (vp.insert (move (name))); path r; if (auto l = iroot[var]) -- cgit v1.1