Ignore:
Timestamp:
2014-08-20T16:48:41+02:00 (10 years ago)
Author:
sjoelund.se
Message:

Started using elabExpInExpression instead of elabExp in many places (so functions returning multiple outputs work better)
Note: This interferes slightly with the MetaModelica type system (things RML did not handle; so no changes needed). The changes cause MetaModelica models using equations with tuples to fail (but that is okay; we do not use MetaModelica in models)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/testsuite/metamodelica/meta/ComplicatedInteractive.mos

    r20560 r21933  
    77loadFile("ComplicatedInteractive.mo");
    88
    9 res := ComplicatedInteractive.RecordWithComplicatedTypes((1, {}));
    10 res := ComplicatedInteractive.RecordWithComplicatedTypes((1, {(1.0, SOME({}))}));
    11 res := ComplicatedInteractive.RecordWithComplicatedTypes((1, {(1.0, NONE()), (1.0, SOME({1,2,3}))}));
     9res := ComplicatedInteractive.RecordWithComplicatedTypes((1.0, {}));
     10res := ComplicatedInteractive.RecordWithComplicatedTypes((1.0, {(1.0, SOME({}))}));
     11res := ComplicatedInteractive.RecordWithComplicatedTypes((1.0, {(1.0, NONE()), (1.0, SOME({1,2,3}))}));
    1212res2 := ComplicatedInteractive.LI2Ident(res);
    1313res3 := ComplicatedInteractive.NewComplicatedThingy(NONE());
     
    1818
    1919// Expecting failures
    20 ComplicatedInteractive.RecordWithComplicatedTypes((1, {(1.0, NONE()), (1.0, SOME({true}))})); 
     20ComplicatedInteractive.RecordWithComplicatedTypes((1, {(1.0, NONE()), (1.0, SOME({true}))}));
    2121getErrorString();
    2222ComplicatedInteractive.NewComplicatedThingy(SOME({true}));
     
    4747// end ComplicatedInteractive.LI2.RecordWithComplicatedTypes;)
    4848// {(2,3.5),(2,3.5),(2,3.5),(1,7.5),(2,3.5),(2,3.5)}
    49 // 
    50 // "Error: Type mismatch for positional argument 1 in ComplicatedInteractive.LI2(rcf=(1, List(Tuple(#(1.0), NONE()), Tuple(#(1.0), SOME(List(#(true))))))). The argument has type:
    51 //   (Integer, list<tuple<#Real, Option<list<#Boolean>>>>)
     49//
     50// "Error: Type mismatch for positional argument 1 in ComplicatedInteractive.LI2(rcf=Tuple(#(1), List(Tuple(#(1.0), NONE()), Tuple(#(1.0), SOME(List(#(true))))))). The argument has type:
     51//   tuple<#Integer, list<tuple<#Real, Option<list<#Boolean>>>>>
    5252// expected type:
    5353//   tuple<#Real, list<tuple<#Real, Option<list<#Integer>>>>>
    5454// Error: In record constructor ComplicatedInteractive.LI2.RecordWithComplicatedTypes: Failed to match types:
    55 //     actual:   (tuple<#Integer, list<tuple<#Real, Option<list<#Boolean>>>>>)
     55//     actual:   tuple<tuple<#Integer, list<tuple<#Real, Option<list<#Boolean>>>>>>
    5656//     expected: (tuple<#Real, list<tuple<#Real, Option<list<#Integer>>>>>)
    5757// "
    58 // 
     58//
    5959// "Error: Type mismatch for positional argument 1 in ComplicatedInteractive.NewComplicatedThingy(opt=SOME(List(#(true)))). The argument has type:
    6060//   Option<list<#Boolean>>
Note: See TracChangeset for help on using the changeset viewer.