ADTaaron-thesisarm-ehast-experimentalcleanup-dtorsctordeferred_resndemanglerenumforall-pointer-decaygc_noraiijacob/cs343-translationjenkins-sandboxmemorynew-astnew-ast-unique-exprnew-envno_listpersistent-indexerpthread-emulationqualifiedEnumresolv-newstringwith_gc
Last change
on this file since 51b7345 was
51b7345,
checked in by Peter A. Buhr <pabuhr@…>, 10 years ago
|
initial commit
|
-
Property mode set to
100644
|
File size:
234 bytes
|
Rev | Line | |
---|
[51b7345] | 1 | int ?=?( int*, int ); |
---|
| 2 | int ?*?( int, int ); |
---|
| 3 | |
---|
| 4 | forall( type T | { T ?*?( T, T ); } ) |
---|
| 5 | T square( T t ) |
---|
| 6 | { |
---|
| 7 | return t * t; |
---|
| 8 | } |
---|
| 9 | |
---|
| 10 | forall( type U | { U square( U ); } ) |
---|
| 11 | U quad( U u ) |
---|
| 12 | { |
---|
| 13 | return square( square( u ) ); |
---|
| 14 | } |
---|
| 15 | |
---|
| 16 | void f() |
---|
| 17 | { |
---|
| 18 | quad( 7 ); |
---|
| 19 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.