www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 13158] New: D:YAML broken by 2.066

https://issues.dlang.org/show_bug.cgi?id=13158

          Issue ID: 13158
           Summary: D:YAML broken by 2.066
           Product: D
           Version: unspecified
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Severity: regression
          Priority: P1
         Component: DMD
          Assignee: nobody puremagic.com
          Reporter: kiithsacmp gmail.com

I started testing 2.066b4 and noticed that my library D:YAML is broken.
I minimized the cause of the bug to the following:

==============================
import std.variant;

struct Node
{
    struct Pair
    {
        Node value;
    }

    alias Algebraic!(Node[], int) Value;
}

void main(string[] args)
{
}
==============================


This compiles with DMD 2.065 and doesn't compile with 2.066b4.

It seems to break at std.variant.maxSize.

Build log:

==============================
/home/kiith-sa/Programming/D/Compilers/dmd2066-beta/linux/bin64/../../src/phobos/std/variant.d(84):
Error: void has no value
/home/kiith-sa/Programming/D/Compilers/dmd2066-beta/linux/bin64/../../src/phobos/std/variant.d(84):
Error: incompatible types for ((16LU) >= (maxSize!int)): 'ulong' and 'void'
/home/kiith-sa/Programming/D/Compilers/dmd2066-beta/linux/bin64/../../src/phobos/std/variant.d(1245):
Error: template instance std.variant.maxSize!(Node[], int) error instantiating
bug.d(10):        instantiated from here: Algebraic!(Node[], int)
/home/kiith-sa/Programming/D/Compilers/dmd2066-beta/linux/bin64/../../src/phobos/std/variant.d(1245):
Error: template instance VariantN!(maxSize!(Node[], int), Node[], int) does not
match template declaration VariantN(ulong maxDataSize, AllowedTypesX...)
==============================


This compiles without an error with 2.066b4 (as well as 2.065):

==============================
import std.variant;

struct Pair
{
    Node value;
}

struct Node
{
    alias Pair = .Pair;
    alias Algebraic!(Node[], int) Value;
}

void main(string[] args)
{
}
==============================

--
Jul 18 2014