// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

class A implements B {
  var x;
  A(Object this.x);
}

class B {
  factory B(String s) = A;
}

main() {
  B(42 as dynamic); //# 01: runtime error
}

Test of dynamic argument type check for redirecting factories.
Test of dynamic argument type check for redirecting factories.

Verify that dynamic type checks are inserted to check arguments to
redirecting factories against the redirector, even when they would
be valid arguments to the redirectee.

Closes https://github.com/dart-lang/sdk/issues/31590

Change-Id: Ic439fd1e125ae8ae156e611402782413600de98e
Reviewed-on: https://dart-review.googlesource.com/71860
Reviewed-by: Erik Ernst <251bb01623bfda2cd9151e339a6e783ca432874c@google.com>
Commit-Queue: Aske Simon Christensen <589eb3fd9a84f06d0ac46d3aa71dddcfb0814ccd@google.com>
