Skip to content

inline methods that use summonFrom/summonInline break TASTy compatibility #16313

Open
@bishabosha

Description

@bishabosha

For example def bar = foo (non-inline) is separately compiled from inline def foo = summonFrom { ... }, and serialised in TASTy as an unresolved call to foo, i.e. implicit search happens after tasty serialisation.

We should determine if we can create an incompatibility through changes to available implicits on the classpath.
Edit: see #16313 (comment) for an example that proves this breaks TASTy compatibility

Compiler version

3.2.1

Minimized code

// foo_1.scala [run 1]
inline def foo = compiletime.summonFrom {
  case ev: Int <:< Any => ???
}
// bar_2.scala [run 2]
def bar = foo

Output

compiles

Expectation

compile failure, if we figure out that summonFrom should only be allowed from transparent inline

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions