Skip to content

Commit 5631fd6

Browse files
Merge pull request #11440 from dotty-staging/fix-#11437
Remove transparent when dropping inline
2 parents 8bbb0ba + 91d9cc3 commit 5631fd6

File tree

3 files changed

+8
-0
lines changed

3 files changed

+8
-0
lines changed

compiler/src/dotty/tools/dotc/typer/PrepareInlineable.scala

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,7 @@ object PrepareInlineable {
224224
finally
225225
if ctx.reporter.errorCount != initialErrorCount then
226226
sym.resetFlag(Inline)
227+
sym.resetFlag(Transparent)
227228
sym.removeAnnotation(defn.BodyAnnot)
228229

229230
/** Register inline info for given inlineable method `sym`.

tests/neg/i11437.check

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
-- [E006] Not Found Error: tests/neg/i11437.scala:1:29 -----------------------------------------------------------------
2+
1 |transparent inline def foo = error // error
3+
| ^^^^^
4+
| Not found: error
5+
6+
longer explanation available when compiling with `-explain`

tests/neg/i11437.scala

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
transparent inline def foo = error // error

0 commit comments

Comments
 (0)