source:
tests/errors/suspend.cfa@
afdb74b
      
      | Last change on this file since afdb74b was dfa4360, checked in by , 6 years ago | |
|---|---|
            
  | 
        |
| File size: 573 bytes | |
| Line | |
|---|---|
| 1 | // | 
| 2 | // Cforall Version 1.0.0 Copyright (C) 2016 University of Waterloo | 
| 3 | // | 
| 4 | // The contents of this file are covered under the licence agreement in the | 
| 5 | // file "LICENCE" distributed with Cforall. | 
| 6 | // | 
| 7 | // suspend.cfa -- | 
| 8 | // | 
| 9 | // Author : Thierry Delisle | 
| 10 | // Created On : Thu Mar 5 16:03:16 2020 | 
| 11 | // Last Modified By : | 
| 12 | // Last Modified On : | 
| 13 | // Update Count : | 
| 14 | // | 
| 15 | |
| 16 | #include <coroutine.hfa> | 
| 17 | |
| 18 | generator A {}; | 
| 19 | |
| 20 | void main(A & a) { | 
| 21 | suspend { | 
| 22 | suspend; | 
| 23 | } | 
| 24 | |
| 25 | suspend{ | 
| 26 | int foo() { return 3; } | 
| 27 | } | 
| 28 | } | 
| 29 | |
| 30 | coroutine B {}; | 
| 31 | |
| 32 | void main(B & b) { | 
| 33 | suspend generator; | 
| 34 | |
| 35 | suspend {}; | 
| 36 | } | 
  Note:
 See   TracBrowser
 for help on using the repository browser.