Changeset cd6a6ff


Ignore:
Timestamp:
Dec 3, 2020, 10:44:40 AM (4 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast-unique-expr, pthread-emulation, qualifiedEnum
Children:
1db306a
Parents:
b37515b
Message:

Improved coverage of deterministic_output to be much finer grain.

Files:
20 edited

Legend:

Unmodified
Added
Removed
  • src/AST/Print.cpp

    rb37515b rcd6a6ff  
    205205
    206206        void preprint( const ast::NamedTypeDecl * node ) {
    207                 if ( ! node->name.empty() ) os << node->name << ": ";
     207                if ( ! node->name.empty() ) {
     208                        if( deterministic_output && isUnboundType(node->name) ) os << "[unbound]:";
     209                        else os << node->name << ": ";
     210                }
    208211
    209212                if ( ! short_mode && node->linkage != Linkage::Cforall ) {
     
    240243
    241244                if ( node->result ) {
    242                         if (!deterministic_output) {
    243                                 os << endl << indent << "... with resolved type:" << endl;
    244                                 ++indent;
    245                                 os << indent;
    246                                 node->result->accept( *this );
    247                                 --indent;
    248                         }
     245                        os << endl << indent << "... with resolved type:" << endl;
     246                        ++indent;
     247                        os << indent;
     248                        node->result->accept( *this );
     249                        --indent;
    249250                }
    250251
     
    13821383        virtual const ast::Type * visit( const ast::TypeInstType * node ) override final {
    13831384                preprint( node );
    1384                 os << "instance of type " << node->name
     1385                const auto & _name = deterministic_output && isUnboundType(node) ? "[unbound]" : node->name;
     1386                os << "instance of type " << _name
    13851387                   << " (" << (node->kind == ast::TypeDecl::Ftype ? "" : "not ") << "function type)";
    13861388                print( node->params );
  • src/AST/Type.cpp

    rb37515b rcd6a6ff  
    133133
    134134BaseInstType::BaseInstType( const BaseInstType & o )
    135 : ParameterizedType( o.qualifiers, copy( o.attributes ) ), params(), name( o.name ), 
     135: ParameterizedType( o.qualifiers, copy( o.attributes ) ), params(), name( o.name ),
    136136  hoistType( o.hoistType ) {
    137137        Pass< ForallSubstitutor > sub;
     
    222222                // TODO: once TypeInstType representation is updated, it should properly check
    223223                // if the context id is filled. this is a temporary hack for now
    224                 if (std::count(typeInst->name.begin(), typeInst->name.end(), '_') >= 3) {
    225                         return true;
    226                 }
     224                return isUnboundType(typeInst->name);
     225        }
     226        return false;
     227}
     228
     229bool isUnboundType(const std::string & tname) {
     230        // xxx - look for a type name produced by renameTyVars.
     231
     232        // TODO: once TypeInstType representation is updated, it should properly check
     233        // if the context id is filled. this is a temporary hack for now
     234        if (std::count(tname.begin(), tname.end(), '_') >= 3) {
     235                return true;
    227236        }
    228237        return false;
  • src/AST/Type.hpp

    rb37515b rcd6a6ff  
    536536
    537537bool isUnboundType(const Type * type);
     538bool isUnboundType(const std::string & tname);
    538539
    539540}
  • src/AST/TypeEnvironment.cpp

    rb37515b rcd6a6ff  
    3434#include "ResolvExpr/Unify.h"      // for unifyInexact
    3535#include "Tuples/Tuples.h"         // for isTtype
     36#include "CompilationState.h"
    3637
    3738using ResolvExpr::WidenMode;
     
    5657
    5758void print( std::ostream & out, const EqvClass & clz, Indenter indent ) {
    58         out << "( ";
    59         std::copy( clz.vars.begin(), clz.vars.end(), std::ostream_iterator< std::string >( out, " " ) );
     59        out << "(";
     60        bool first = true;
     61        for(const auto & var : clz.vars) {
     62                if(first) first = false;
     63                else out << " ";
     64                if( deterministic_output && isUnboundType(var) ) out << "[unbound]";
     65                else out << var;
     66        }
    6067        out << ")";
    6168
  • src/ResolvExpr/TypeEnvironment.cc

    rb37515b rcd6a6ff  
    107107
    108108        void EqvClass::print( std::ostream &os, Indenter indent ) const {
    109                 if( !deterministic_output ) {
    110                         os << "( ";
    111                         std::copy( vars.begin(), vars.end(), std::ostream_iterator< std::string >( os, " " ) );
    112                         os << ")";
    113                 }
     109                os << "(";
     110                bool first = true;
     111                for(const auto & var : vars) {
     112                        if(first) first = false;
     113                        else os << " ";
     114                        if( deterministic_output && isUnboundType(var) ) os << "[unbound]";
     115                        else os << var;
     116                }
     117                os << ")";
    114118                if ( type ) {
    115119                        os << " -> ";
  • src/SynTree/Expression.cc

    rb37515b rcd6a6ff  
    7272
    7373        if ( result ) {
    74                 if (!deterministic_output) {
    75                         os << std::endl << indent << "with resolved type:" << std::endl;
    76                         os << (indent+1);
    77                         result->print( os, indent+1 );
    78                 }
     74                os << std::endl << indent << "with resolved type:" << std::endl;
     75                os << (indent+1);
     76                result->print( os, indent+1 );
    7977        }
    8078
  • src/SynTree/NamedTypeDecl.cc

    rb37515b rcd6a6ff  
    2222#include "LinkageSpec.h"         // for Spec, Cforall, linkageName
    2323#include "Type.h"                // for Type, Type::StorageClasses
     24#include "CompilationState.h"
    2425
    2526NamedTypeDecl::NamedTypeDecl( const std::string &name, Type::StorageClasses scs, Type *base )
     
    4142        using namespace std;
    4243
    43         if ( name != "" ) os << name << ": ";
     44        if ( ! name.empty() ) {
     45                if( deterministic_output && isUnboundType(name) ) os << "[unbound]:";
     46                else os << name << ": ";
     47        }
    4448
    4549        if ( linkage != LinkageSpec::Cforall ) {
  • src/SynTree/ReferenceToType.cc

    rb37515b rcd6a6ff  
    2424#include "Type.h"             // for TypeInstType, StructInstType, UnionInstType
    2525#include "TypeSubstitution.h" // for TypeSubstitution
     26#include "CompilationState.h"
    2627
    2728class Attribute;
     
    205206
    206207        Type::print( os, indent );
    207         os << "instance of " << typeString() << " " << get_name() << " (" << ( isFtype ? "" : "not" ) << " function type)";
     208        os << "instance of " << typeString() << " ";
     209        const auto & name_ = get_name();
     210        if( deterministic_output && isUnboundType(name) ) os << "[unbound]";
     211        else os << name;
     212        os << " (" << ( isFtype ? "" : "not" ) << " function type)";
    208213        if ( ! parameters.empty() ) {
    209214                os << endl << indent << "... with parameters" << endl;
  • src/SynTree/Type.cc

    rb37515b rcd6a6ff  
    156156const Type::Qualifiers noQualifiers;
    157157
     158bool isUnboundType(const Type * type) {
     159        if (auto typeInst = dynamic_cast<const TypeInstType *>(type)) {
     160                // xxx - look for a type name produced by renameTyVars.
     161
     162                // TODO: once TypeInstType representation is updated, it should properly check
     163                // if the context id is filled. this is a temporary hack for now
     164                return isUnboundType(typeInst->name);
     165        }
     166        return false;
     167}
     168
     169bool isUnboundType(const std::string & tname) {
     170        // xxx - look for a type name produced by renameTyVars.
     171
     172        // TODO: once TypeInstType representation is updated, it should properly check
     173        // if the context id is filled. this is a temporary hack for now
     174        if (std::count(tname.begin(), tname.end(), '_') >= 3) {
     175                return true;
     176        }
     177        return false;
     178}
     179
    158180// Local Variables: //
    159181// tab-width: 4 //
  • src/SynTree/Type.h

    rb37515b rcd6a6ff  
    733733};
    734734
     735
     736bool isUnboundType(const Type * type);
     737bool isUnboundType(const std::string & tname);
     738
    735739// Local Variables: //
    736740// tab-width: 4 //
  • tests/.expect/alloc-ERROR.nast.txt

    rb37515b rcd6a6ff  
    1616          Name: stp
    1717
     18      ... with resolved type:
     19        unsigned long int
    1820
    1921
     
    2830    Name: stp
    2931    Constant Expression (10: signed int)
     32    ... with resolved type:
     33      signed int
    3034
    3135
  • tests/.expect/alloc-ERROR.oast.txt

    rb37515b rcd6a6ff  
    1616          Name: stp
    1717
     18      with resolved type:
     19        unsigned long int
    1820
    1921
     
    2830    Name: stp
    2931    constant expression (10 10: signed int)
     32    with resolved type:
     33      signed int
    3034
    3135
  • tests/.expect/init1-ERROR.nast.txt

    rb37515b rcd6a6ff  
    1111... to:
    1212  reference to signed int
     13... with resolved type:
     14  reference to signed int
    1315init1.cfa:107:1 error: Invalid application of existing declaration(s) in expression Applying untyped:
    1416  Name: ?{}
     
    1618  Generated Cast of:
    1719    Variable Expression: _retval_f_py: pointer to signed int
     20    ... with resolved type:
     21      pointer to signed int
    1822  ... to:
     23    reference to pointer to signed int
     24  ... with resolved type:
    1925    reference to pointer to signed int
    2026  Name: px
     
    2430... to:
    2531  reference to float
     32... with resolved type:
     33  reference to float
    2634init1.cfa:117:1 error: Invalid application of existing declaration(s) in expression Applying untyped:
    2735  Name: ?{}
     
    2937  Generated Cast of:
    3038    Variable Expression: _retval_f_py2: pointer to float
     39    ... with resolved type:
     40      pointer to float
    3141  ... to:
     42    reference to pointer to float
     43  ... with resolved type:
    3244    reference to pointer to float
    3345  Name: cpx
     
    3749... to:
    3850  reference to instance of type T (not function type)
     51... with resolved type:
     52  reference to instance of type T (not function type)
    3953init1.cfa:128:1 error: Invalid application of existing declaration(s) in expression Applying untyped:
    4054  Name: ?{}
     
    4256  Generated Cast of:
    4357    Variable Expression: _retval_anycvt: pointer to instance of type T (not function type)
     58    ... with resolved type:
     59      pointer to instance of type T (not function type)
    4460  ... to:
     61    reference to pointer to instance of type T (not function type)
     62  ... with resolved type:
    4563    reference to pointer to instance of type T (not function type)
    4664  Name: s
  • tests/.expect/init1-ERROR.oast.txt

    rb37515b rcd6a6ff  
    11error: No reasonable alternatives for expression Untyped Init Expression
    2   Name: rx  InitAlternative: reference to signed int
     2  Name: cpx  InitAlternative: pointer to float
     3error: No reasonable alternatives for expression Untyped Init Expression
     4  Name: crx  InitAlternative: reference to float
    35error: No reasonable alternatives for expression Untyped Init Expression
    46  Name: px  InitAlternative: pointer to signed int
    57error: No reasonable alternatives for expression Untyped Init Expression
    6   Name: crx  InitAlternative: reference to float
    7 error: No reasonable alternatives for expression Untyped Init Expression
    8   Name: cpx  InitAlternative: pointer to float
     8  Name: rx  InitAlternative: reference to signed int
    99init1.cfa:104:1 error: No reasonable alternatives for expression Generated Cast of:
    1010  Name: rx
    1111... to:
     12  reference to signed int
     13with resolved type:
    1214  reference to signed int
    1315init1.cfa:107:1 error: No reasonable alternatives for expression Applying untyped:
     
    1618  Generated Cast of:
    1719    Variable Expression: _retval_f_py: pointer to signed int
     20    with resolved type:
     21      pointer to signed int
    1822  ... to:
     23    reference to pointer to signed int
     24  with resolved type:
    1925    reference to pointer to signed int
    2026  Name: px
     
    2430... to:
    2531  reference to float
     32with resolved type:
     33  reference to float
    2634init1.cfa:117:1 error: No reasonable alternatives for expression Applying untyped:
    2735  Name: ?{}
     
    2937  Generated Cast of:
    3038    Variable Expression: _retval_f_py2: pointer to float
     39    with resolved type:
     40      pointer to float
    3141  ... to:
     42    reference to pointer to float
     43  with resolved type:
    3244    reference to pointer to float
    3345  Name: cpx
     
    3749... to:
    3850  reference to instance of type T (not function type)
     51with resolved type:
     52  reference to instance of type T (not function type)
    3953init1.cfa:128:1 error: No reasonable alternatives for expression Applying untyped:
    4054  Name: ?{}
     
    4256  Generated Cast of:
    4357    Variable Expression: _retval_anycvt: pointer to instance of type T (not function type)
     58    with resolved type:
     59      pointer to instance of type T (not function type)
    4460  ... to:
     61    reference to pointer to instance of type T (not function type)
     62  with resolved type:
    4563    reference to pointer to instance of type T (not function type)
    4664  Name: s
  • tests/errors/.expect/completeType.nast.x64.txt

    rb37515b rcd6a6ff  
    66    Name: x
    77
    8 ... to: nothing Alternatives are:
     8... to: nothing
     9... with resolved type:
     10  void Alternatives are:
    911Cost ( 0, 1, 2, 0, 1, -1, 0 ): Generated Cast of:
    1012      Application of
     
    1719          reference to instance of type DT (not function type)
    1820
     21        ... with resolved type:
     22          pointer to forall
     23            [unbound]:data type
     24            function
     25          ... with parameters
     26            pointer to instance of type [unbound] (not function type)
     27          ... returning
     28            reference to instance of type [unbound] (not function type)
     29
    1930        ... to arguments
    2031        Variable Expression: x: pointer to instance of struct B with body
     32        ... with resolved type:
     33          pointer to instance of struct B with body
    2134
     35      ... with resolved type:
     36        reference to instance of struct B with body
    2237    ... to: nothing
     38    ... with resolved type:
     39      void
    2340  (types:
    2441    void
    2542  )
    26   Environment:( _99_2_DT ) -> instance of struct B with body (no widening)
     43  Environment:([unbound]) -> instance of struct B with body (no widening)
    2744
    2845
     
    3754          reference to instance of type DT (not function type)
    3855
     56        ... with resolved type:
     57          pointer to forall
     58            [unbound]:data type
     59            function
     60          ... with parameters
     61            pointer to instance of type [unbound] (not function type)
     62          ... returning
     63            reference to instance of type [unbound] (not function type)
     64
    3965        ... to arguments
    4066        Variable Expression: x: pointer to instance of struct A without body
     67        ... with resolved type:
     68          pointer to instance of struct A without body
    4169
     70      ... with resolved type:
     71        reference to instance of struct A without body
    4272    ... to: nothing
     73    ... with resolved type:
     74      void
    4375  (types:
    4476    void
    4577  )
    46   Environment:( _99_2_DT ) -> instance of struct A without body (no widening)
     78  Environment:([unbound]) -> instance of struct A without body (no widening)
    4779
    4880
     
    112144            ... returning nothing
    113145
     146            ... with resolved type:
     147              pointer to forall
     148                [unbound]:sized data type
     149                ... with assertions
     150                  ?=?: pointer to function
     151                  ... with parameters
     152                    reference to instance of type [unbound] (not function type)
     153                    instance of type [unbound] (not function type)
     154                  ... returning
     155                    instance of type [unbound] (not function type)
     156
     157                  ?{}: pointer to function
     158                  ... with parameters
     159                    reference to instance of type [unbound] (not function type)
     160                  ... returning nothing
     161
     162                  ?{}: pointer to function
     163                  ... with parameters
     164                    reference to instance of type [unbound] (not function type)
     165                    instance of type [unbound] (not function type)
     166                  ... returning nothing
     167
     168                  ^?{}: pointer to function
     169                  ... with parameters
     170                    reference to instance of type [unbound] (not function type)
     171                  ... returning nothing
     172
     173
     174                function
     175              ... with parameters
     176                pointer to instance of type [unbound] (not function type)
     177              ... returning nothing
     178
    114179            ... to arguments
    115180            Variable Expression: z: pointer to instance of type T (not function type)
     181            ... with resolved type:
     182              pointer to instance of type T (not function type)
    116183          with 1 pending inference slots
    117184
     185          ... with resolved type:
     186            void
    118187        (types:
    119188          void
    120189        )
    121         Environment:( _118_0_T ) -> instance of type T (not function type) (no widening)
     190        Environment:([unbound]) -> instance of type T (not function type) (no widening)
    122191
    123192      Could not satisfy assertion:
    124193?=?: pointer to function
    125194        ... with parameters
    126           reference to instance of type _118_0_T (not function type)
    127           instance of type _118_0_T (not function type)
     195          reference to instance of type [unbound] (not function type)
     196          instance of type [unbound] (not function type)
    128197        ... returning
    129           instance of type _118_0_T (not function type)
     198          instance of type [unbound] (not function type)
    130199
  • tests/errors/.expect/completeType.oast.x64.txt

    rb37515b rcd6a6ff  
    66    Name: x
    77
    8 ... to: nothing Alternatives are:
     8... to: nothing
     9with resolved type:
     10  void  Alternatives are:
    911Cost ( 0, 1, 2, 0, 1, -1, 0 ): Generated Cast of:
    1012      Application of
     
    2022
    2123
     24        with resolved type:
     25          pointer to forall
     26            [unbound]:data type
     27            function
     28          ... with parameters
     29            intrinsic pointer to instance of type [unbound] (not function type)
     30          ... returning
     31            _retval__operator_deref: reference to instance of type [unbound] (not function type)
     32            ... with attributes:
     33              Attribute with name: unused
     34
     35
    2236      ... to arguments
    2337        Variable Expression: x: pointer to instance of struct A with body 0
    24 
     38        with resolved type:
     39          pointer to instance of struct A with body 0
     40
     41      with resolved type:
     42        reference to instance of struct A with body 0
    2543    ... to: nothing
     44    with resolved type:
     45      void
    2646  (types:
    2747    void
    2848  )
    29   Environment: -> instance of struct A with body 0 (no widening)
     49  Environment:([unbound]) -> instance of struct A with body 0 (no widening)
    3050
    3151
     
    4363
    4464
     65        with resolved type:
     66          pointer to forall
     67            [unbound]:data type
     68            function
     69          ... with parameters
     70            intrinsic pointer to instance of type [unbound] (not function type)
     71          ... returning
     72            _retval__operator_deref: reference to instance of type [unbound] (not function type)
     73            ... with attributes:
     74              Attribute with name: unused
     75
     76
    4577      ... to arguments
    4678        Variable Expression: x: pointer to instance of struct B with body 1
    47 
     79        with resolved type:
     80          pointer to instance of struct B with body 1
     81
     82      with resolved type:
     83        reference to instance of struct B with body 1
    4884    ... to: nothing
     85    with resolved type:
     86      void
    4987  (types:
    5088    void
    5189  )
    52   Environment: -> instance of struct B with body 1 (no widening)
     90  Environment:([unbound]) -> instance of struct B with body 1 (no widening)
    5391
    5492
     
    121159            ... returning nothing
    122160
     161            with resolved type:
     162              pointer to forall
     163                [unbound]:sized data type
     164                ... with assertions
     165                  ?=?: pointer to function
     166                  ... with parameters
     167                    reference to instance of type [unbound] (not function type)
     168                    instance of type [unbound] (not function type)
     169                  ... returning
     170                    _retval__operator_assign: instance of type [unbound] (not function type)
     171                    ... with attributes:
     172                      Attribute with name: unused
     173
     174
     175                  ?{}: pointer to function
     176                  ... with parameters
     177                    reference to instance of type [unbound] (not function type)
     178                  ... returning nothing
     179
     180                  ?{}: pointer to function
     181                  ... with parameters
     182                    reference to instance of type [unbound] (not function type)
     183                    instance of type [unbound] (not function type)
     184                  ... returning nothing
     185
     186                  ^?{}: pointer to function
     187                  ... with parameters
     188                    reference to instance of type [unbound] (not function type)
     189                  ... returning nothing
     190
     191
     192                function
     193              ... with parameters
     194                pointer to instance of type [unbound] (not function type)
     195              ... returning nothing
     196
    123197          ... to arguments
    124198            Variable Expression: z: pointer to instance of type T (not function type)
    125 
     199            with resolved type:
     200              pointer to instance of type T (not function type)
     201
     202          with resolved type:
     203            void
    126204        (types:
    127205          void
    128206        )
    129         Environment: -> instance of type T (not function type) (no widening)
     207        Environment:([unbound]) -> instance of type T (not function type) (no widening)
    130208
    131209      Could not satisfy assertion:
    132210?=?: pointer to function
    133211        ... with parameters
    134           reference to instance of type _110_0_T (not function type)
    135           instance of type _110_0_T (not function type)
     212          reference to instance of type [unbound] (not function type)
     213          instance of type [unbound] (not function type)
    136214        ... returning
    137           _retval__operator_assign: instance of type _110_0_T (not function type)
     215          _retval__operator_assign: instance of type [unbound] (not function type)
    138216          ... with attributes:
    139217            Attribute with name: unused
  • tests/raii/.expect/ctor-autogen-ERR1.nast.txt

    rb37515b rcd6a6ff  
    77        signed int
    88      ... returning nothing
     9
     10      ... with resolved type:
     11        function
     12        ... with parameters
     13          reference to instance of struct Managed with body
     14          signed int
     15        ... returning nothing
    916
    1017      ... deleted by: ?{}: function
     
    2330                signed int
    2431
     32              ... with resolved type:
     33                pointer to function
     34                ... with parameters
     35                  reference to signed int
     36                  signed int
     37                ... returning
     38                  signed int
     39
    2540              ... to arguments
    2641              Generated Cast of:
     
    3045                  Generated Cast of:
    3146                    Variable Expression: m: reference to instance of struct Managed with body
     47                    ... with resolved type:
     48                      reference to instance of struct Managed with body
    3249                  ... to:
    3350                    instance of struct Managed with body
     51                  ... with resolved type:
     52                    instance of struct Managed with body
     53                ... with resolved type:
     54                  signed int
    3455              ... to:
     56                reference to signed int
     57              ... with resolved type:
    3558                reference to signed int
    3659              Generated Cast of:
    3760                Constant Expression (0: zero_t)
     61                ... with resolved type:
     62                  zero_t
    3863              ... to:
    3964                signed int
     65              ... with resolved type:
     66                signed int
    4067
     68            ... with resolved type:
     69              signed int
    4170            ... with environment:
    4271              Types:
     
    4776    Generated Cast of:
    4877      Variable Expression: x: instance of struct Managed with body
     78      ... with resolved type:
     79        instance of struct Managed with body
    4980    ... to:
    5081      reference to instance of struct Managed with body
     82    ... with resolved type:
     83      reference to instance of struct Managed with body
    5184    Constant Expression (123: signed int)
     85    ... with resolved type:
     86      signed int
    5287
     88  ... with resolved type:
     89    void
    5390... to: nothing
     91... with resolved type:
     92  void
  • tests/raii/.expect/ctor-autogen-ERR1.oast.txt

    rb37515b rcd6a6ff  
    77        x: signed int
    88      ... returning nothing
     9
     10      with resolved type:
     11        function
     12        ... with parameters
     13          _dst: reference to instance of struct Managed with body 1
     14          x: signed int
     15        ... returning nothing
    916
    1017      ... deleted by: ?{}: function
     
    2633
    2734
     35              with resolved type:
     36                pointer to function
     37                ... with parameters
     38                  intrinsic reference to signed int
     39                  intrinsic signed int
     40                ... returning
     41                  _retval__operator_assign: signed int
     42                  ... with attributes:
     43                    Attribute with name: unused
     44
     45
    2846            ... to arguments
    2947              Generated Cast of:
     
    3351                  Generated Cast of:
    3452                    Variable Expression: m: reference to instance of struct Managed with body 1
     53                    with resolved type:
     54                      reference to instance of struct Managed with body 1
    3555                  ... to:
    3656                    instance of struct Managed with body 1
     57                  with resolved type:
     58                    instance of struct Managed with body 1
     59                with resolved type:
     60                  signed int
    3761              ... to:
     62                reference to signed int
     63              with resolved type:
    3864                reference to signed int
    3965              Generated Cast of:
    4066                constant expression (0 0: zero_t)
     67                with resolved type:
     68                  zero_t
    4169              ... to:
    4270                signed int
     71              with resolved type:
     72                signed int
    4373
     74            with resolved type:
     75              signed int
    4476            ... with environment:
    4577              Types:
     
    5082    Generated Cast of:
    5183      Variable Expression: x: instance of struct Managed with body 1
     84      with resolved type:
     85        instance of struct Managed with body 1
    5286    ... to:
    5387      reference to instance of struct Managed with body 1
     88    with resolved type:
     89      reference to instance of struct Managed with body 1
    5490    constant expression (123 123: signed int)
     91    with resolved type:
     92      signed int
    5593
     94  with resolved type:
     95    void
    5696... to: nothing
     97with resolved type:
     98  void
  • tests/warnings/.expect/self-assignment.nast.txt

    rb37515b rcd6a6ff  
    11warnings/self-assignment.cfa:29:1 warning: self assignment of expression: Generated Cast of:
    22  Variable Expression: j: signed int
     3  ... with resolved type:
     4    signed int
    35... to:
     6  reference to signed int
     7... with resolved type:
    48  reference to signed int
    59warnings/self-assignment.cfa:30:1 warning: self assignment of expression: Generated Cast of:
    610  Variable Expression: s: instance of struct S with body
     11  ... with resolved type:
     12    instance of struct S with body
    713... to:
     14  reference to instance of struct S with body
     15... with resolved type:
    816  reference to instance of struct S with body
    917warnings/self-assignment.cfa:31:1 warning: self assignment of expression: Generated Cast of:
     
    1220  ... from aggregate:
    1321    Variable Expression: s: instance of struct S with body
     22    ... with resolved type:
     23      instance of struct S with body
     24  ... with resolved type:
     25    signed int
    1426... to:
     27  reference to signed int
     28... with resolved type:
    1529  reference to signed int
    1630warnings/self-assignment.cfa:32:1 warning: self assignment of expression: Generated Cast of:
     
    2236    ... from aggregate:
    2337      Variable Expression: t: instance of struct T with body
     38      ... with resolved type:
     39        instance of struct T with body
     40    ... with resolved type:
     41      instance of struct S with body
     42  ... with resolved type:
     43    signed int
    2444... to:
     45  reference to signed int
     46... with resolved type:
    2547  reference to signed int
    2648warnings/self-assignment.cfa: In function '_X4mainFi___1':
  • tests/warnings/.expect/self-assignment.oast.txt

    rb37515b rcd6a6ff  
    11warnings/self-assignment.cfa:29:1 warning: self assignment of expression: Generated Cast of:
    22  Variable Expression: j: signed int
     3  with resolved type:
     4    signed int
    35... to:
     6  reference to signed int
     7with resolved type:
    48  reference to signed int
    59warnings/self-assignment.cfa:30:1 warning: self assignment of expression: Generated Cast of:
    610  Variable Expression: s: instance of struct S with body 1
     11  with resolved type:
     12    instance of struct S with body 1
    713... to:
     14  reference to instance of struct S with body 1
     15with resolved type:
    816  reference to instance of struct S with body 1
    917warnings/self-assignment.cfa:31:1 warning: self assignment of expression: Generated Cast of:
     
    1220  ... from aggregate:
    1321    Variable Expression: s: instance of struct S with body 1
     22    with resolved type:
     23      instance of struct S with body 1
     24  with resolved type:
     25    signed int
    1426... to:
     27  reference to signed int
     28with resolved type:
    1529  reference to signed int
    1630warnings/self-assignment.cfa:32:1 warning: self assignment of expression: Generated Cast of:
     
    2236    ... from aggregate:
    2337      Variable Expression: t: instance of struct T with body 1
     38      with resolved type:
     39        instance of struct T with body 1
     40    with resolved type:
     41      instance of struct S with body 1
     42  with resolved type:
     43    signed int
    2444... to:
     45  reference to signed int
     46with resolved type:
    2547  reference to signed int
    2648warnings/self-assignment.cfa: In function '_X4mainFi___1':
Note: See TracChangeset for help on using the changeset viewer.