Last active
December 4, 2016 17:11
-
-
Save maiha/d1705d7eec3cfca7352382327871ff6b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Core(T) | |
@a : Bool | |
end | |
class Base(T) | |
include Core(Int32) | |
def initialize | |
@a = true | |
end | |
end | |
Base(String).new # OK | |
# This code fails | |
class Foo < Base(String) | |
end | |
# Error in test.cr:2: instance variable '@a' of Base(String) was not initialized in all of the 'initialize' methods, rendering it nilable |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment