Created
May 14, 2013 09:10
-
-
Save rubber-duck/5574688 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
import std.stdio; | |
class Foo | |
{ | |
void foo() { writeln("foo1"); } | |
void foo() { writeln("foo2"); } | |
void bar() { writeln("bar"); } | |
}; | |
int main() | |
{ | |
auto f = new Foo(); | |
f.bar(); | |
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
dmd test.d | |
test.o: In function `_D4test3Foo3fooMFZv': | |
test.d:(.text._D4test3Foo3fooMFZv+0x60): multiple definition of `_D4test3Foo3fooMFZv' | |
test.o:test.d:(.text._D4test3Foo3fooMFZv+0x0): first defined here | |
collect2: error: ld returned 1 exit status |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment