digitalmars.D.announce - Does the compiler check for safe?
- Charles Hixson via Digitalmars-d-announce (13/13) May 05 2015 I took some code that was annotated safe, and modified it to use a
- Adam D. Ruppe (2/2) May 05 2015 Can you post the class in question and show where the safe
- deadalnix (2/4) May 05 2015 And why the f*** is that in announce ?
- Charles Hixson via Digitalmars-d-announce (1/1) May 05 2015 It was in announce because I made a mistake in posting.
- Baz (4/5) May 05 2015 Yes of course, in a safe funct just try to call a non-safe one,
I took some code that was annotated safe, and modified it to use a buffer internal to the class, and an offset counter. Some of the routines adjusted the counter. I forgot to remove the "safe" annotation. It compiled without error. So... 1) The compiler didn't check for safety 2) It counts as safe if you only modify local-to-the-class variables (and I misunderstood). or 3) This error is only detected on execution But which? (I'm still writing the code, so I can't yet try to execute it, and I took off the safe annotation because after I read the definition in TDPL it seemed a mistaken annotation. But perhaps I misunderstand.)
May 05 2015
Can you post the class in question and show where the safe annotation was too?
May 05 2015
On Tuesday, 5 May 2015 at 19:32:26 UTC, Adam D. Ruppe wrote:Can you post the class in question and show where the safe annotation was too?And why the f*** is that in announce ?
May 05 2015
It was in announce because I made a mistake in posting.
May 05 2015
On Tuesday, 5 May 2015 at 21:09:45 UTC, Charles Hixson wrote:It was in announce because I made a mistake in posting.Yes of course, in a safe funct just try to call a non-safe one, to call a delegate or even to cast something and you'll be able to verify that by yourself thanks to the error messages.
May 05 2015