Skip to content

some lowerings not shown with -vcg-ast #23335

Description

@rainers

Compiling this with -vcg-ast on current master:

module test;

class C {}

T fun(T)(int x) { return 2*cast(T)x; }

auto test()
{
    auto x = fun!long(3);
    int[] a;
    ushort[] b;
    assert(a[] != b[]);
    Object o = new C;
    auto c = cast(C)o;
}

yields

module test;
import object;
class C : Object
{
}
T fun(T)(int x)
{
	return 2 * cast(T)x;
}
auto pure nothrow @safe void test()
{
	long x = fun(3);
	int[] a = null;
	ushort[] b = null;
	assert(a[] != b[]);
	Object o = _d_newclassT();
	C c = cast(C)o;
}
...

What's wrong?

  • calls to fun and _d_newclassT are missing the template arguments
  • __equals lowering not shown for the array comparison
  • lowering to _d_cast not shown

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions