File tree Expand file tree Collapse file tree 6 files changed +23
-15
lines changed
compiler/scala/tools/nsc/transform
reflect/scala/reflect/internal Expand file tree Collapse file tree 6 files changed +23
-15
lines changed Original file line number Diff line number Diff line change @@ -115,7 +115,7 @@ abstract class ExtensionMethods extends Transform with TypingTransformers {
115
115
extensionDefs(currentOwner.companionModule) = new mutable.ListBuffer [Tree ]
116
116
currentOwner.primaryConstructor.makeNotPrivate(NoSymbol )
117
117
// scala/bug#7859 make param accessors accessible so the erasure can generate unbox operations.
118
- currentOwner.info.decls.foreach(sym => if (sym.isParamAccessor && sym.isMethod ) sym.makeNotPrivate(currentOwner))
118
+ currentOwner.info.decls.foreach(sym => if (sym.isParamAccessor) sym.makeNotPrivate(currentOwner))
119
119
super .transform(tree)
120
120
} else if (currentOwner.isStaticOwner) {
121
121
super .transform(tree)
Original file line number Diff line number Diff line change @@ -838,10 +838,9 @@ trait Symbols extends api.Symbols { self: SymbolTable =>
838
838
isAbstractType && ! isExistential && ! isTypeParameterOrSkolem && isLocalToBlock
839
839
840
840
/** change name by appending $$<fully-qualified-name-of-class `base`>
841
- * Do the same for any accessed symbols or setters/getters.
842
841
* Implementation in TermSymbol.
843
842
*/
844
- def expandName (base : Symbol ): Unit = { }
843
+ def expandName (base : Symbol ): Unit = ()
845
844
846
845
// In java.lang, Predef, or scala package/package object
847
846
def isInDefaultNamespace = UnqualifiedOwners (effectiveOwner)
@@ -2987,19 +2986,10 @@ trait Symbols extends api.Symbols { self: SymbolTable =>
2987
2986
this
2988
2987
}
2989
2988
2990
- /** change name by appending $$<fully-qualified-name-of-class `base`>
2991
- * Do the same for any accessed symbols or setters/getters
2992
- */
2989
+ /** change name by appending $$<fully-qualified-name-of-class `base`> */
2993
2990
override def expandName (base : Symbol ): Unit = {
2994
2991
if (! hasFlag(EXPANDEDNAME )) {
2995
2992
setFlag(EXPANDEDNAME )
2996
- if (hasAccessorFlag && ! isDeferred) {
2997
- accessed.expandName(base)
2998
- }
2999
- else if (hasGetter) {
3000
- getterIn(owner).expandName(base)
3001
- setterIn(owner).expandName(base)
3002
- }
3003
2993
name = nme.expandedName(name.toTermName, base)
3004
2994
}
3005
2995
}
Original file line number Diff line number Diff line change
1
+ 0
Original file line number Diff line number Diff line change
1
+ trait ABuffer [@ specialized(Float )T ] {
2
+ def count : Int
3
+ }
4
+
5
+ class Buffer [@ specialized(Float ) T ](array_par : Array [T ]) extends ABuffer [T ] {
6
+ var array : Array [T ] = array_par
7
+ var count : Int = 0
8
+ }
9
+
10
+ class Float32Buffer (array_par : Array [Float ]) extends Buffer [Float ](array_par)
Original file line number Diff line number Diff line change
1
+ object Test {
2
+ def main (args : Array [String ]): Unit = {
3
+ val vertices = Array [Float ]()
4
+ val attribute = new Float32Buffer (vertices)
5
+ println(attribute.count)
6
+ }
7
+ }
Original file line number Diff line number Diff line change 1
- (One$$ messages,scala.collection.mutable.ListBuffer<java.lang.String>)
1
+ (messages,scala.collection.mutable.ListBuffer<java.lang.String>)
2
2
(One$$messages,scala.collection.mutable.ListBuffer<java.lang.String>)
3
3
(messages,scala.collection.mutable.ListBuffer<java.lang.String>)
4
4
(messages,scala.collection.mutable.ListBuffer<java.lang.String>)
5
- (One$$ messages,scala.collection.mutable.ListBuffer<java.lang.String>)
5
+ (messages,scala.collection.mutable.ListBuffer<java.lang.String>)
6
6
(One$$messages,scala.collection.mutable.ListBuffer<java.lang.String>)
7
7
(messages,scala.collection.mutable.ListBuffer<java.lang.String>)
8
8
(messages,scala.collection.mutable.ListBuffer<java.lang.String>)
You can’t perform that action at this time.
0 commit comments