ADT
        arm-eh
        ast-experimental
        enum
        forall-pointer-decay
        jacob/cs343-translation
        new-ast-unique-expr
        pthread-emulation
        qualifiedEnum
      
      
        
          | Last change
 on this file since fe94e708 was             74cfafb2, checked in by Andrew Beach <ajbeach@…>, 5 years ago | 
        
          | 
I forgot to add the tests that the specalize fix fixed.
 | 
        
          | 
              
Property                 mode
 set to                 100644 | 
        
          | File size:
            719 bytes | 
      
      
| Line |  | 
|---|
| 1 | // Crea | 
|---|
| 2 |  | 
|---|
| 3 | #include <stdlib.hfa> | 
|---|
| 4 | #include <stdio.h> | 
|---|
| 5 |  | 
|---|
| 6 | forall(dtype T) | 
|---|
| 7 | void poly0(T &) {} | 
|---|
| 8 |  | 
|---|
| 9 | forall(dtype T | sized(T)) | 
|---|
| 10 | void poly1(T &) {} | 
|---|
| 11 |  | 
|---|
| 12 | forall(otype T) | 
|---|
| 13 | void poly2(T &) {} | 
|---|
| 14 |  | 
|---|
| 15 | struct wrapper { | 
|---|
| 16 | void (*mono)(int &); | 
|---|
| 17 | }; | 
|---|
| 18 |  | 
|---|
| 19 | /* These are failing (#193): | 
|---|
| 20 | void (*mono0)(int &) = poly0; | 
|---|
| 21 | void (*mono1)(int &) = poly1; | 
|---|
| 22 | void (*mono2)(int &) = poly2; | 
|---|
| 23 | struct wrapper mono0w = { poly0 }; | 
|---|
| 24 | struct wrapper mono1w = { poly1 }; | 
|---|
| 25 | struct wrapper mono2w = { poly2 }; | 
|---|
| 26 | */ | 
|---|
| 27 | void (*mono0c)(int &) @= poly0; | 
|---|
| 28 | void (*mono1c)(int &) @= poly1; | 
|---|
| 29 | void (*mono2c)(int &) @= poly2; | 
|---|
| 30 | struct wrapper mono0wc @= { poly0 }; | 
|---|
| 31 | struct wrapper mono1wc @= { poly1 }; | 
|---|
| 32 | struct wrapper mono2wc @= { poly2 }; | 
|---|
| 33 |  | 
|---|
| 34 | int main(void) { | 
|---|
| 35 | printf("Compilation Successful.\n"); | 
|---|
| 36 | return 0; | 
|---|
| 37 | } | 
|---|
       
      
  Note:
 See   
TracBrowser
 for help on using the repository browser.