Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[regression] Constraining class object against structure AND class throws off DCE. #10162

Closed
back2dos opened this issue Mar 7, 2021 · 0 comments

Comments

@back2dos
Copy link
Member

back2dos commented Mar 7, 2021

Minimal example (plus the closest thing that does work).

class Test {
  static function main() {
    foo1(Test);// works
    foo2(Test);// fails, because bar2 is eliminated
  }

  static public function bar1() return 'bar1';
  static public function bar2() return 'bar2';

  static function foo1<T:{ function bar1():String; }>(cl:T)
    return cl.bar1();

  static function foo2<T:Class<Dynamic> & { function bar2():String; }>(cl:T)
    return cl.bar2();
}

This broke with constrained monos (0ddd26d). The build before (1cc4752) is still working.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants