Skip to content

Compiler crash while compiling structural types with type member #1897

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

Closed
liufengyun opened this issue Jan 11, 2017 · 1 comment
Closed

Compiler crash while compiling structural types with type member #1897

liufengyun opened this issue Jan 11, 2017 · 1 comment

Comments

@liufengyun
Copy link
Contributor

liufengyun commented Jan 11, 2017

Following two examples crashes the compiler with the implementation of structural types in #1881

Test 1

import scala.reflect.Selectable.reflectiveSelectable

object Test {
  def g(x: { type T ; def t: T ; def f(a: T): Boolean }) = x.f(x.t)
  g(new { type T = Int; def t = 4; def f(a:T) = true })
  g(new { type T = Any; def t = 4; def f(a:T) = true })
}

Test 2

import scala.reflect.Selectable.reflectiveSelectable

object Test {
  def g(x: { def f[T](a: T): Int }) = x.f[Int](4)
}
@odersky
Copy link
Contributor

odersky commented Jan 28, 2017

The crashes have been turned into static errors in #1881.

@odersky odersky closed this as completed Feb 1, 2017
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