Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 925d749

Browse files
committed
Add case for FlexibleType
1 parent 3f10858 commit 925d749

File tree

3 files changed

+9
-4
lines changed

3 files changed

+9
-4
lines changed

‎compiler/src/scala/quoted/runtime/impl/QuotesImpl.scala‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1912,6 +1912,7 @@ class QuotesImpl private (using val ctx: Context) extends Quotes, QuoteUnpickler
19121912
def typeArgs: List[TypeRepr] = self match
19131913
case AppliedType(_, args) => args
19141914
case AnnotatedType(parent, _) => parent.typeArgs
1915+
case FlexibleType(underlying) => underlying.typeArgs
19151916
case _ => List.empty
19161917
end extension
19171918
end TypeReprMethods

‎tests/neg-macros/i23008.check‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
| Exception occurred while executing macro expansion.
66
| java.lang.IllegalArgumentException: requirement failed: value of StringConstant cannot be `null`
77
| at scala.Predef$.require(Predef.scala:393)
8+
| at scala.quoted.runtime.impl.QuotesImpl$reflect$StringConstant$.apply(QuotesImpl.scala:2542)
89
| at scala.quoted.runtime.impl.QuotesImpl$reflect$StringConstant$.apply(QuotesImpl.scala:2541)
9-
| at scala.quoted.runtime.impl.QuotesImpl$reflect$StringConstant$.apply(QuotesImpl.scala:2540)
1010
| at scala.quoted.ToExpr$StringToExpr.apply(ToExpr.scala:82)
1111
| at scala.quoted.ToExpr$StringToExpr.apply(ToExpr.scala:80)
1212
| at scala.quoted.Expr$.apply(Expr.scala:72)

‎tests/new/test.scala‎

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
1-
class Cap extends caps.ExclusiveCapability
1+
object e:
2+
def foldRL(f: Int => Int)(g: String => Int) = ???
3+
4+
5+
val xs = e.foldRL
6+
: i => i + 1
7+
: s => s.length
28

3-
def test(consume x: Cap) = ???
49

5-
def impl(using consume x: Cap) = ???

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /