-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b40d795
commit de7f42f
Showing
2 changed files
with
54 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
package imp | ||
|
||
trait Tuples{ | ||
//trait SomeTrait | ||
|
||
implicit def implDef(t: String): Any = new { val value = t } with Serializable | ||
|
||
|
||
def a(x: Int) = { | ||
class A extends Serializable { val a = x } | ||
} | ||
|
||
} | ||
|
||
final class A | ||
|
||
class B(x: Int) | ||
|
||
trait C | ||
|
||
class Test extends {val t = "gg"} | ||
|
||
class Test2(x: Int) extends {val t = "gg"} with B(5) | ||
|
||
class Test3 extends {val t = "ll"; val z = "rr"; type z = String} | ||
|
||
class Test4 extends {val t = "ll"; protected val z = "rr"; type z = String} with Serializable | ||
|
||
final class FinalTest{ | ||
final class Test1 | ||
def testingFinal{ | ||
final class Test2 | ||
} | ||
|
||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
class A{ | ||
def test = | ||
(if (true) "ddd" else "ddd") toString | ||
} | ||
|
||
case object TestObject | ||
|
||
trait Testing{ | ||
abstract class MyAbstract | ||
case object MyFirst extends MyAbstract | ||
case object MySecond extends MyAbstract | ||
|
||
val x: MyAbstract = MyFirst | ||
|
||
x match { | ||
case aOrB @ (MyFirst | MySecond) => true | ||
case _ => false | ||
} | ||
} |