Last active
December 20, 2015 04:19
-
-
Save suzuki0keiichi/6070408 to your computer and use it in GitHub Desktop.
Scala.jsでdefがどのように変換されるか
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
// object宣言部は含まない | |
// 実体 | |
ScalaJS.c.helloworld\ufe33HelloWorld$.prototype.hello\ufe34T = (function() { | |
return "hello world!" | |
}); | |
// 外部からの呼び出し用 | |
ScalaJS.c.helloworld\ufe33HelloWorld$.prototype.hello = (function() { | |
return this.hello\ufe34T() | |
}); |
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
ScalaJS.c.HelloWorld$.prototype.hello__T = (function() { | |
return "hello world!" | |
}); | |
ScalaJS.c.HelloWorld$.prototype.hello__ = (function() { | |
return this.hello__T() | |
}); |
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
object HelloWorld { | |
def hello = "hello world!" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment