Goose  Diff

Differences From Artifact [ddd911474e]:

  • File bs/builtins/types/template/build.cpp — part of check-in [097569fdd6] at 2021-09-26 23:25:21 on branch trunk — Fixed template bugs with parametric types (user: achavasse size: 3230)

To Artifact [af3d99ea03]:

  • File bs/builtins/types/template/build.cpp — part of check-in [39c8a653da] at 2021-09-28 17:59:46 on branch trunk — Fix functions and template functions not getting compiled with visibility over their original enclosing scope, but over the current scope at the point of invocation instead (user: achavasse size: 3282) [more...]

49
50
51
52
53
54
55
56


57
58
59
60
61
62

63
64
65
66
67
68
69
49
50
51
52
53
54
55

56
57
58
59
60
61
62

63
64
65
66
67
68
69
70







-
+
+





-
+








        if( !success )
            return nullopt;

        return TERM( v );
    }

    Value BuildTFunc( const Context& c, const TFuncType& tft, const Term& identity, const Value& params, ptr< void > body )
    Value BuildTFunc( const Context& c, const TFuncType& tft,
        const Term& parentIdentity, const Term& identity, const Value& params, ptr< void > body )
    {
        auto sig = BuildTFuncSignature( c, tft );
        if( !sig )
            return PoisonValue();

        return ToValue( TFunc( tft, *sig, identity, body ) );
        return ToValue( TFunc( tft, *sig, parentIdentity, identity, body ) );
    }

    optional< Term > BuildArgPatternFromTFuncType( const Context& c, const Value& tfuncType )
    {
        const auto& ftype = FromValue< TFuncType >( tfuncType );
        assert( ftype );