"Fossies" - the Fresh Open Source Software Archive

Member "ponyc-0.33.0/minimal-cases/issue-623-2/623-2.pony" (1 Nov 2019, 577 Bytes) of package /linux/misc/ponyc-0.33.0.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Pony source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 """
    2 Prior to the resolution of issue 623, this would cause the gc to crash while
    3 tracing SpeechOut from SpeechIn
    4 """
    5 actor Main
    6   new create(env: Env) =>
    7     let talk = SpeechOut
    8     let config = Config.create(talk)
    9 
   10     SpeechIn.create(talk, config)
   11 
   12 actor SpeechOut
   13   new create() => None
   14 
   15 actor SpeechIn
   16   let talk: SpeechOut tag
   17 
   18   new create(talk': SpeechOut, config: Config) =>
   19     talk = config.talk
   20     recover String(16000) end // trigger gc, happens around 14336
   21 
   22 class val Config
   23   let talk: SpeechOut tag
   24 
   25   new val create(talk': SpeechOut tag) =>
   26     talk = talk'