Skip to content

(&x)[0 .. 1] doesn't work in CTFE #18644

@dlangBugzillaToGithub

Description

@dlangBugzillaToGithub

Nils reported this on 2013-08-05T15:42:46Z

Transferred from https://issues.dlang.org/show_bug.cgi?id=10763

CC List

Description

static assert({
    int x;
    int[] a = (&x)[0 .. 1];
	
    return true;
}());

Error: pointer & x cannot be sliced at compile time (it does not point to an array)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions