Skip to content

DDC not properly handling functions with universal types #27952

@vsmenon

Description

@vsmenon

The following test should print 42. Instead, it prints:

Closure: (Object) -> JSObject<undefined> from: o => T.as(a)

Here's the test:

h/*<T>*/(a) {
  return a as dynamic/*=T*/;
}

Object foo(f(Object a), Object a) {
  return f(a);
}

void main() {
  var x = foo(h, 42);
  print(x);
}

Metadata

Metadata

Assignees

Labels

P1A high priority bug; for example, a single project is unusable or has many test failuressoundnesstype-bugIncorrect behavior (everything from a crash to more subtle misbehavior)web-dev-compiler

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions