File tree Expand file tree Collapse file tree 2 files changed +6
-0
lines changed
compiler/src/dotty/tools/dotc/parsing
tests/neg-custom-args/captures Expand file tree Collapse file tree 2 files changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -1419,6 +1419,7 @@ object Parsers {
14191419 private def getFunction (tree : Tree ): Option [Function ] = tree match {
14201420 case Parens (tree1) => getFunction(tree1)
14211421 case Block (Nil , tree1) => getFunction(tree1)
1422+ case Function (_, _ : CapturesAndResult ) => None
14221423 case t : Function => Some (t)
14231424 case _ => None
14241425 }
Original file line number Diff line number Diff line change 1+ import language .experimental .captureChecking
2+ type Foo1 = [R ] -> (x : Unit ) -> {} Unit // error
3+ type Foo2 = [R ] -> (x : Unit ) -> {cap} Unit // error
4+ type Foo3 = (c : Int ^ ) -> [R ] -> (x : Unit ) -> {c} Unit // error
5+ type Foo4 = (c : Int ^ ) -> [R ] -> (x0 : Unit ) -> (x : Unit ) -> {c} Unit
You can’t perform that action at this time.
0 commit comments