Created
September 23, 2010 10:07
-
-
Save kmizu/593433 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
package example; | |
public class Outer { | |
public class Inner1 {} | |
public static class Inner2 {} | |
} |
This file contains hidden or 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 example.Outer | |
object OuterUser { | |
def main(args: Array[String]) { | |
val a1: Outer = new Outer // OK | |
// NG val a2: Outer.Inner1 = new Outer.Inner1 | |
val a2: Outer#Inner1 = new a1.Inner1 | |
val a3: Outer.Inner2 = new Outer.Inner2 //OK | |
println(a1) | |
println(a2) | |
println(a3) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment