Skip to content

Even more regression tests #14889

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 10, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions tests/neg/i12448.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
class A
object Main {
def mkArray[T <: A]: T#AType // error // error
mkArray[Array]
}
4 changes: 4 additions & 0 deletions tests/neg/i12487.check
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
-- [E008] Not Found Error: tests/neg/i12487.scala:19:10 ----------------------------------------------------------------
19 | example notCombine example // error
| ^^^^^^^^^^^^^^^^^^
| value notCombine is not a member of A
21 changes: 21 additions & 0 deletions tests/neg/i12487.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
trait A {
def combine(another: A): A = ???
}

trait Dsl {
def example: A
}

object Dsl {
def execute(program: (dsl: Dsl) ?=> Int): String = ???
}

def example(using a: Dsl): A = ???

import Dsl._

def demo = Dsl.execute {
// change to `combine` and it compiles
example notCombine example // error
42
}
8 changes: 8 additions & 0 deletions tests/run/i12160.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
package internal:
object Foo:
inline def foo: Unit = P.s

private object P { def s = "b" }
end internal

@main def Test = internal.Foo.foo