View mode: basic / threaded / horizontal-split · Log in · Help
August 12, 2012
[Issue 4] New: reverse allowed on string (gdc 4.6.3 !)

            Bug #: 4
          Summary: reverse allowed on string (gdc 4.6.3 !)
   Classification: Unclassified
          Product: GDC
          Version: development
         Platform: x86
       OS/Version: Linux
           Status: NEW
         Severity: normal
         Priority: Normal
        Component: gdc

(Note that I don't have access to 4.7.x or 4.8.x on Ubuntu, this might not
apply anymore ! sorry if it is the case)

gdc (Ubuntu/Linaro 4.6.3-1ubuntu1) 4.6.3
DMD32 D Compiler v2.059

GDC allows this:
(it will crash on execution)

void main() {
   string str = "allo";

But dmd will catch the error at compile time:

dmd testStringReverse.d 
 testStringReverse.d(4): Error: can only reverse a mutable array
 testStringReverse.d(5): Error: can only sort a mutable array

Configure issuemail:
------- You are receiving this mail because: -------
You are watching all issue changes.
Top | Discussion index | About this forum | D home