Ticket #4786: test.mos
| File test.mos, 487 bytes (added by , 8 years ago) |
|---|
| Line | |
|---|---|
| 1 | setCommandLineOptions("-g=MetaModelica, -d=gen"); |
| 2 | |
| 3 | loadString(" |
| 4 | function f |
| 5 | input Integer i; |
| 6 | input FuncT func; |
| 7 | |
| 8 | partial function FuncT |
| 9 | input String s; |
| 10 | end FuncT; |
| 11 | algorithm |
| 12 | func(String(i)); |
| 13 | end f; |
| 14 | |
| 15 | function wrongType |
| 16 | input Integer i; |
| 17 | input Integer i2 = 1; |
| 18 | algorithm |
| 19 | print(String(i) + \"\\n\"); |
| 20 | print(String(i2) + \"\\n\"); |
| 21 | end wrongType; |
| 22 | |
| 23 | function test |
| 24 | algorithm |
| 25 | f(1, wrongType); |
| 26 | end test; |
| 27 | "); |
| 28 | |
| 29 | test(); getErrorString(); |
