Created
August 23, 2018 20:11
-
-
Save geolessel/149816b169d8d209a3d058ea7e45728d 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
class App | |
@@windows : Array(Window) = [] of Window | |
def self.windows=(windows) | |
@@windows = windows | |
end | |
end | |
class Window; end | |
class ShapedWindow < Window; end | |
class CircularWindow < ShapedWindow; end | |
class SquareWindow < ShapedWindow; end | |
App.windows = [CircularWindow.new, SquareWindow.new] | |
# class variable '@@windows' of App must be (Array(Window) | Nil), not Array(ShapedWindow) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment