From 40f7fce0af1da614d99048b024e1ff579635f0f2 Mon Sep 17 00:00:00 2001 From: Jason Zaugg Date: Tue, 2 Aug 2016 11:43:36 -0700 Subject: SD-192 Change scheme for trait super accessors Rather than putting the code of a trait method body into a static method, leave it in the default method. The static method (needed as the target of the super calls) now uses `invokespecial` to exactly call that method. --- src/reflect/scala/reflect/internal/StdAttachments.scala | 2 ++ src/reflect/scala/reflect/runtime/JavaUniverseForce.scala | 1 + 2 files changed, 3 insertions(+) (limited to 'src/reflect') diff --git a/src/reflect/scala/reflect/internal/StdAttachments.scala b/src/reflect/scala/reflect/internal/StdAttachments.scala index 76e34153c9..78f360409d 100644 --- a/src/reflect/scala/reflect/internal/StdAttachments.scala +++ b/src/reflect/scala/reflect/internal/StdAttachments.scala @@ -76,4 +76,6 @@ trait StdAttachments { * in place of the outer parameter, can help callers to avoid capturing the outer instance. */ case object OuterArgCanBeElided extends PlainAttachment + + case object UseInvokeSpecial extends PlainAttachment } diff --git a/src/reflect/scala/reflect/runtime/JavaUniverseForce.scala b/src/reflect/scala/reflect/runtime/JavaUniverseForce.scala index caef5535b4..f55b33959a 100644 --- a/src/reflect/scala/reflect/runtime/JavaUniverseForce.scala +++ b/src/reflect/scala/reflect/runtime/JavaUniverseForce.scala @@ -46,6 +46,7 @@ trait JavaUniverseForce { self: runtime.JavaUniverse => this.NoInlineCallsiteAttachment this.InlineCallsiteAttachment this.OuterArgCanBeElided + this.UseInvokeSpecial this.noPrint this.typeDebug this.Range -- cgit v1.2.3