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

abstract def from generic module not enforced when included #6085

Closed
z64 opened this issue May 9, 2018 · 1 comment · Fixed by #7956
Closed

abstract def from generic module not enforced when included #6085

z64 opened this issue May 9, 2018 · 1 comment · Fixed by #7956

Comments

@z64
Copy link
Contributor

z64 commented May 9, 2018

This currently compiles without enforcing not_enforced:

abstract class A(K)
  abstract def test_a
end

module B
  abstract def test_b
end

module C(T)
  abstract def not_enforced
end

class Foo < A(Int32)
  include B
  include C(Int32)

  def test_a # OK, enforced
  end

  def test_b # OK, enforced
  end
end

Foo.new

https://carc.in/#/r/41ls

Crystal 0.24.2 [4f9ed8d03] (2018-03-08)

LLVM: 4.0.0
Default target: x86_64-unknown-linux-gnu
@asterite
Copy link
Member

asterite commented May 9, 2018

Yup, this is currently not checked.

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

Successfully merging a pull request may close this issue.

2 participants