diff options
Diffstat (limited to 'test/files/presentation')
-rw-r--r-- | test/files/presentation/context-bounds1.check | 51 | ||||
-rw-r--r-- | test/files/presentation/context-bounds1/Test.scala | 3 | ||||
-rw-r--r-- | test/files/presentation/context-bounds1/src/ContextBounds.scala | 13 | ||||
-rw-r--r-- | test/files/presentation/t4287.check | 11 | ||||
-rw-r--r-- | test/files/presentation/t4287/Test.scala | 3 | ||||
-rw-r--r-- | test/files/presentation/t4287/src/Foo.scala | 5 | ||||
-rw-r--r-- | test/files/presentation/t4287b.check | 6 | ||||
-rw-r--r-- | test/files/presentation/t4287b/Test.scala | 3 | ||||
-rw-r--r-- | test/files/presentation/t4287b/src/Foo.scala | 15 | ||||
-rw-r--r-- | test/files/presentation/t4287c.check | 11 | ||||
-rw-r--r-- | test/files/presentation/t4287c.flags | 1 | ||||
-rw-r--r-- | test/files/presentation/t4287c/Test.scala | 3 | ||||
-rw-r--r-- | test/files/presentation/t4287c/src/Foo.scala | 9 |
13 files changed, 134 insertions, 0 deletions
diff --git a/test/files/presentation/context-bounds1.check b/test/files/presentation/context-bounds1.check new file mode 100644 index 0000000000..b444de59a4 --- /dev/null +++ b/test/files/presentation/context-bounds1.check @@ -0,0 +1,51 @@ +reload: ContextBounds.scala + +askHyperlinkPos for `Blubb` at (2,23) ContextBounds.scala +================================================================================ +[response] found askHyperlinkPos for `Blubb` at (13,7) ContextBounds.scala +================================================================================ + +askHyperlinkPos for `Foo` at (4,17) ContextBounds.scala +================================================================================ +[response] found askHyperlinkPos for `Foo` at (9,7) ContextBounds.scala +================================================================================ + +askHyperlinkPos for `Blubb` at (4,32) ContextBounds.scala +================================================================================ +[response] found askHyperlinkPos for `Blubb` at (13,7) ContextBounds.scala +================================================================================ + +askHyperlinkPos for `A` at (4,42) ContextBounds.scala +================================================================================ +[response] found askHyperlinkPos for `A` at (4,12) ContextBounds.scala +================================================================================ + +askHyperlinkPos for `A` at (4,51) ContextBounds.scala +================================================================================ +[response] found askHyperlinkPos for `A` at (4,12) ContextBounds.scala +================================================================================ + +askHyperlinkPos for `blubb` at (4,66) ContextBounds.scala +================================================================================ +[response] found askHyperlinkPos for `blubb` at (2,7) ContextBounds.scala +================================================================================ + +askHyperlinkPos for `Foo` at (5,18) ContextBounds.scala +================================================================================ +[response] found askHyperlinkPos for `Foo` at (9,7) ContextBounds.scala +================================================================================ + +askHyperlinkPos for `A` at (5,25) ContextBounds.scala +================================================================================ +[response] found askHyperlinkPos for `A` at (4,12) ContextBounds.scala +================================================================================ + +askHyperlinkPos for `foo` at (5,36) ContextBounds.scala +================================================================================ +[response] found askHyperlinkPos for `foo` at (10,7) ContextBounds.scala +================================================================================ + +askHyperlinkPos for `A` at (10,14) ContextBounds.scala +================================================================================ +[response] found askHyperlinkPos for `A` at (9,11) ContextBounds.scala +================================================================================ diff --git a/test/files/presentation/context-bounds1/Test.scala b/test/files/presentation/context-bounds1/Test.scala new file mode 100644 index 0000000000..bec1131c4c --- /dev/null +++ b/test/files/presentation/context-bounds1/Test.scala @@ -0,0 +1,3 @@ +import scala.tools.nsc.interactive.tests.InteractiveTest + +object Test extends InteractiveTest
\ No newline at end of file diff --git a/test/files/presentation/context-bounds1/src/ContextBounds.scala b/test/files/presentation/context-bounds1/src/ContextBounds.scala new file mode 100644 index 0000000000..72a8f694a3 --- /dev/null +++ b/test/files/presentation/context-bounds1/src/ContextBounds.scala @@ -0,0 +1,13 @@ +object ContextBound { + val blubb = new Blubb/*#*/ + + def work[A: Foo/*#*/](f: Blubb/*#*/ => A/*#*/): A/*#*/ = f(blubb/*#*/) ensuring { + implicitly[Foo/*#*/[A/*#*/]].foo/*#*/(_) >= 42 + } +} + +trait Foo[A] { + def foo(a: A/*#*/): Int +} + +class Blubb
\ No newline at end of file diff --git a/test/files/presentation/t4287.check b/test/files/presentation/t4287.check new file mode 100644 index 0000000000..a922421e18 --- /dev/null +++ b/test/files/presentation/t4287.check @@ -0,0 +1,11 @@ +reload: Foo.scala + +askHyperlinkPos for `B` at (1,24) Foo.scala +================================================================================ +[response] found askHyperlinkPos for `B` at (3,8) Foo.scala +================================================================================ + +askHyperlinkPos for `a` at (1,31) Foo.scala +================================================================================ +[response] found askHyperlinkPos for `a` at (4,7) Foo.scala +================================================================================ diff --git a/test/files/presentation/t4287/Test.scala b/test/files/presentation/t4287/Test.scala new file mode 100644 index 0000000000..bec1131c4c --- /dev/null +++ b/test/files/presentation/t4287/Test.scala @@ -0,0 +1,3 @@ +import scala.tools.nsc.interactive.tests.InteractiveTest + +object Test extends InteractiveTest
\ No newline at end of file diff --git a/test/files/presentation/t4287/src/Foo.scala b/test/files/presentation/t4287/src/Foo.scala new file mode 100644 index 0000000000..a744eaabe2 --- /dev/null +++ b/test/files/presentation/t4287/src/Foo.scala @@ -0,0 +1,5 @@ +class Baz(val f: Int = B/*#*/.a/*#*/) + +object B { + val a = 2 +} diff --git a/test/files/presentation/t4287b.check b/test/files/presentation/t4287b.check new file mode 100644 index 0000000000..d4b33650fd --- /dev/null +++ b/test/files/presentation/t4287b.check @@ -0,0 +1,6 @@ +reload: Foo.scala + +askHyperlinkPos for `i` at (14,11) Foo.scala +================================================================================ +[response] found askHyperlinkPos for `i` at (10,9) Foo.scala +================================================================================ diff --git a/test/files/presentation/t4287b/Test.scala b/test/files/presentation/t4287b/Test.scala new file mode 100644 index 0000000000..bec1131c4c --- /dev/null +++ b/test/files/presentation/t4287b/Test.scala @@ -0,0 +1,3 @@ +import scala.tools.nsc.interactive.tests.InteractiveTest + +object Test extends InteractiveTest
\ No newline at end of file diff --git a/test/files/presentation/t4287b/src/Foo.scala b/test/files/presentation/t4287b/src/Foo.scala new file mode 100644 index 0000000000..47c676e2a2 --- /dev/null +++ b/test/files/presentation/t4287b/src/Foo.scala @@ -0,0 +1,15 @@ +trait Greeting { + val name: String + val msg = "How are you, "+name +} + +object Greeting { + val hello = "hello" +} + +class C(i: Int) extends { + val nameElse = "Bob" +} with Greeting { + val name = "avc" + println(i/*#*/) +}
\ No newline at end of file diff --git a/test/files/presentation/t4287c.check b/test/files/presentation/t4287c.check new file mode 100644 index 0000000000..42fc30997d --- /dev/null +++ b/test/files/presentation/t4287c.check @@ -0,0 +1,11 @@ +reload: Foo.scala + +askHyperlinkPos for `A` at (1,18) Foo.scala +================================================================================ +[response] found askHyperlinkPos for `A` at (3,8) Foo.scala +================================================================================ + +askHyperlinkPos for `a` at (1,25) Foo.scala +================================================================================ +[response] found askHyperlinkPos for `a` at (4,7) Foo.scala +================================================================================ diff --git a/test/files/presentation/t4287c.flags b/test/files/presentation/t4287c.flags new file mode 100644 index 0000000000..d1a8244169 --- /dev/null +++ b/test/files/presentation/t4287c.flags @@ -0,0 +1 @@ +-Yinfer-argument-types
\ No newline at end of file diff --git a/test/files/presentation/t4287c/Test.scala b/test/files/presentation/t4287c/Test.scala new file mode 100644 index 0000000000..bec1131c4c --- /dev/null +++ b/test/files/presentation/t4287c/Test.scala @@ -0,0 +1,3 @@ +import scala.tools.nsc.interactive.tests.InteractiveTest + +object Test extends InteractiveTest
\ No newline at end of file diff --git a/test/files/presentation/t4287c/src/Foo.scala b/test/files/presentation/t4287c/src/Foo.scala new file mode 100644 index 0000000000..26870b5021 --- /dev/null +++ b/test/files/presentation/t4287c/src/Foo.scala @@ -0,0 +1,9 @@ +class A(a: Int = A/*#*/.a/*#*/) + +object A { + val a = 2 +} + +class B extends A { + def this(a) = this() +}
\ No newline at end of file |