-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix Closure span assignment in makeClosure (#15841)
Fixes #15098
- Loading branch information
Showing
7 changed files
with
68 additions
and
18 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
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
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
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 |
---|---|---|
@@ -1,15 +1,15 @@ | ||
def get(using Int): String = summon[Int].toString | ||
|
||
def pf2: PartialFunction[String, Int ?=> String] = { | ||
def pf2: PartialFunction[String, Int ?=> String] = { // error | ||
case "hoge" => get | ||
case "huga" => get | ||
} // error | ||
} | ||
|
||
type IS = Int ?=> String | ||
|
||
def pf3: PartialFunction[String, IS] = { | ||
def pf3: PartialFunction[String, IS] = { // error | ||
case "hoge" => get | ||
case "huga" => get | ||
} // error | ||
} | ||
|
||
|
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 |
---|---|---|
@@ -1,12 +1,4 @@ | ||
-- Error: tests/neg/i19351a/Test.scala:8:34 ---------------------------------------------------------------------------- | ||
8 |inline def not(b: Bool): Bool = ${notMacro('b)} // error // error | ||
8 |inline def not(b: Bool): Bool = ${notMacro('b)} // error | ||
| ^ | ||
|Cyclic macro dependency; macro refers to a toplevel symbol in tests/neg/i19351a/Test.scala from which the macro is called | ||
-- [E046] Cyclic Error: tests/neg/i19351a/Test.scala:8:46 -------------------------------------------------------------- | ||
8 |inline def not(b: Bool): Bool = ${notMacro('b)} // error // error | ||
| ^ | ||
| Cyclic reference involving method $anonfun | ||
| | ||
| Run with -explain-cyclic for more details. | ||
| | ||
| longer explanation available when compiling with `-explain` |
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
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
type F <: F = 1 match { // error | ||
case _ => foo.foo // error // error | ||
case _ => foo.foo // error | ||
} | ||
def foo(a: Int): Unit = ??? |