Dotty Documentation

0.4.0-bin-SNAPSHOT

class Bridges

A helper class for generating bridge methods in class root.

[-] Constructors

Bridges ( root: ClassSymbol )
Bridges ( implicit ctx: Context )

[-] Members

[+] private class BridgesCursor
[+] private val bridgeTarget : HashMap [ Symbol, Symbol ]
[+] private val bridges : ListBuffer [ Tree ]
[+] private val bridgesScope : MutableScope
[+] private implicit val ctx : Context
[+] private val preErasureCtx : Context
[+] private val root : ClassSymbol
[+] private var toBeRemoved : Set [ Symbol ]
[+] def add ( stats: List [ Tree ] ) : List [ Tree ]

Add all necessary bridges to template statements stats, and remove at the same time deferred methods in stats that are replaced by a bridge with the same signature.

[+] private def addBridge ( member: Symbol , other: Symbol ) : ListBuffer [ Tree ]

Generate bridge between member and other

[+] private def addBridgeIfNeeded ( member: Symbol , other: Symbol ) : Any

Add a bridge between member and other, where member overrides other before erasure, if the following conditions are satisfied.

  • member and other have different signatures
  • there is not yet a bridge with the same name and signature in root

The bridge has the erased info of other and forwards to member.

[+] private def toBeRemoved_= ( x$1: Set [ Symbol ] ) : Unit