Created
May 15, 2013 01:40
-
-
Save rubber-duck/5581058 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 Foo | |
{ | |
int foo; | |
} | |
int main() | |
{ | |
const Foo[] foo = [new Foo(), new Foo(), new Foo()]; | |
foo[0].foo= 1; | |
return 0; | |
} |
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
test.d(13): Error: can only initialize const member foo inside constructor |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment