summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sources/scalac/symtab/Symbol.java3
-rw-r--r--test/files/neg/matthias2.check2
-rw-r--r--test/neg/matthias2.check2
3 files changed, 4 insertions, 3 deletions
diff --git a/sources/scalac/symtab/Symbol.java b/sources/scalac/symtab/Symbol.java
index 5e4e7e2801..90adf230c5 100644
--- a/sources/scalac/symtab/Symbol.java
+++ b/sources/scalac/symtab/Symbol.java
@@ -322,7 +322,8 @@ public abstract class Symbol implements Modifiers, Kinds {
/** Is this symbol locally defined? I.e. not a member of a class or module */
public final boolean isLocal() {
- return owner.kind == VAL && !owner.isPrimaryConstructor();
+ return owner.kind == VAL &&
+ !((flags & PARAM) != 0 && owner.isPrimaryConstructor());
}
/** Is this symbol a parameter? Includes type parameters of methods.
diff --git a/test/files/neg/matthias2.check b/test/files/neg/matthias2.check
index 9bd56714cd..052be577b5 100644
--- a/test/files/neg/matthias2.check
+++ b/test/files/neg/matthias2.check
@@ -1,4 +1,4 @@
-matthias2.scala:7: illegal cyclic reference involving value y
+matthias2.scala:7: cyclic aliasing or subtyping involving value y
override val y: T;
^
one error found
diff --git a/test/neg/matthias2.check b/test/neg/matthias2.check
index 9bd56714cd..052be577b5 100644
--- a/test/neg/matthias2.check
+++ b/test/neg/matthias2.check
@@ -1,4 +1,4 @@
-matthias2.scala:7: illegal cyclic reference involving value y
+matthias2.scala:7: cyclic aliasing or subtyping involving value y
override val y: T;
^
one error found