aboutsummaryrefslogtreecommitdiff
path: root/tests/pos/singletons.scala
diff options
context:
space:
mode:
Diffstat (limited to 'tests/pos/singletons.scala')
-rw-r--r--tests/pos/singletons.scala20
1 files changed, 18 insertions, 2 deletions
diff --git a/tests/pos/singletons.scala b/tests/pos/singletons.scala
index 55f9b5ecb..4ce41a061 100644
--- a/tests/pos/singletons.scala
+++ b/tests/pos/singletons.scala
@@ -12,8 +12,17 @@ object Test {
val b: 2 = a
def f: 3 = 3
- val c = f
+ final val c = f
+ val dc: 3.0 = 3.0
+ final val dc1 = dc
+ val fc: 3.0f = 3.0f
+ final val fc1 = fc
+
+ val t: true = true
+
+ val str: "" = ""
+ final val str2 = str
}
/* To do: test that after erasure we have generated code like this:
*
@@ -34,7 +43,14 @@ package <empty> {
}
<accessor> def b(): Int = 2
def f(): Int = 3
- <accessor> def c(): Int = Test.f()
+ final <accessor> def c(): Int = Test.f()
+ <accessor> def dc(): Double = 3.0
+ final <accessor> def dc1(): Double = 3.0
+ <accessor> def fc(): Float = 3.0
+ final <accessor> def fc1(): Float = 3.0
+ <accessor> def t(): Boolean = true
+ <accessor> def str(): String = ""
+ final <accessor> def str2(): String = ""
}
}
*/