Skip to content

Commit 5c9c017

Browse files
committed
Handle types that appear in effpi
We get types like the following in effpi: effpi.examples.demo.audit.types.Pay#replyTo
1 parent 2cefd3e commit 5c9c017

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

‎compiler/src/dotty/tools/dotc/transform/init/Summarization.scala‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ object Summarization{
206206
valtp= tdef.symbol.info
207207
valtraverser=newTypeTraverser{
208208
deftraverse(tp: Type):Unit= tp match{
209-
casetp: TermRef=>
209+
caseTermRef(_: SingletonType, _)=>
210210
summary = summary + analyze(tp, tdef.rhs)
211211
case _ =>
212212
traverseChildren(tp)
@@ -219,6 +219,10 @@ object Summarization{
219219
case_: Import|_: Export=>
220220
Summary.empty
221221

222+
case_: TermParamRef=>
223+
// possible from type definitions
224+
Summary.empty
225+
222226
case _ =>
223227
thrownewException("unexpected tree: "+ expr.show)
224228
}
@@ -258,7 +262,7 @@ object Summarization{
258262
Summary(pots2, effs)
259263

260264
case _ =>
261-
thrownewException("unexpected type: "+ tp.show)
265+
thrownewException("unexpected type: "+ tp)
262266
}
263267

264268
if (env.isAlwaysInitialized(tp)) Summary(Potentials.empty, summary.effs)

0 commit comments

Comments
(0)