From 2bde3928833ae194fc7e2094b8955112b70fd31f Mon Sep 17 00:00:00 2001 From: Jason Zaugg Date: Mon, 10 Aug 2015 21:32:51 +1000 Subject: Don't generate specialized overrides in traits The term "specialized override" is used to describe a method in a synthetic specialized subclass that generically substitutes the specialized type args into the siganture of a generic method. For example, `trait T[@spec A] { def t(a: A) }` gives rise to `def t(a: Int)` under the type environment `A=Int`. This commit avoids doing this for specialized traits, only classes have these overrides now. The motivation is to make it simpler to use specialized interfaces (like `T$mcI$sp` from the example above) as Java functional interfaces. --- test/files/run/trait-default-specialize.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test/files/run/trait-default-specialize.scala') diff --git a/test/files/run/trait-default-specialize.scala b/test/files/run/trait-default-specialize.scala index 7b57ddc1eb..6faa9d5f47 100644 --- a/test/files/run/trait-default-specialize.scala +++ b/test/files/run/trait-default-specialize.scala @@ -1,4 +1,4 @@ -trait T[@specialized A] { +trait T[@specialized(Int) A] { def t(a: A): Unit } -- cgit v1.2.3