Skip to content

Commit

Permalink
Fixed Object's metaclass. Fixes #3874
Browse files Browse the repository at this point in the history
  • Loading branch information
asterite committed Jan 12, 2017
1 parent a619476 commit 6b1917c
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
2 changes: 1 addition & 1 deletion spec/compiler/semantic/reflection_spec.cr
Expand Up @@ -2,7 +2,7 @@ require "../../spec_helper"

describe "Semantic: reflection" do
it "types Object class" do
assert_type("Object") { types["Class"] }
assert_type("Object") { types["Object"].metaclass }
end

it "types Class class" do
Expand Down
1 change: 0 additions & 1 deletion src/compiler/crystal/program.cr
Expand Up @@ -175,7 +175,6 @@ module Crystal
string.declare_instance_var("@c", uint8)

types["Class"] = klass = @class = MetaclassType.new(self, object, value, "Class")
object.metaclass = klass
klass.metaclass = klass
klass.allowed_in_generics = false

Expand Down

0 comments on commit 6b1917c

Please sign in to comment.