Skip to content

NonParameterizedFactoryTest crashes in debug mode. #226

@DartBot

Description

@DartBot

This issue was originally filed by [email protected]


The following code (tests/language/src/NonParameterizedFactoryTest.dart):

interface Interface<T> factory Factory {
  Interface();
  Interface.withArg(T value);
}

class Factory {
  factory Interface() {
    return null;
  }

  factory Interface.withArg(value) {
    return null;
  }
}

main() {
  new Interface();
  new Interface<int>();
  new Interface.withArg(4);
  new Interface<int>.withArg(4);
}

Crashes the VM in debug mode:
=== debugia32 language/NonParameterizedFactoryTest ===
Path: language/NonParameterizedFactoryTest
runtime/vm/ast.h:1672: error: expected: type_arguments_.IsNull() || (type_arguments_.Length() == Class::Handle(constructor_.owner()).NumTypeArguments())
Command: /usr/local/google/home/ngeoffray/dart-all1/dart/out/Debug_ia32/dart_bin --ignore-unrecognized-flags /usr/local/google/home/ngeoffray/dart-all1/dart/tests/language/src/NonParameterizedFactoryTest.dart

--- CRASHED ---

Metadata

Metadata

Assignees

Labels

area-vmUse area-vm for VM related issues, including code coverage, and the AOT and JIT backends.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions