diff options
author | Dmitry Petrashko <dmitry.petrashko@gmail.com> | 2016-04-20 11:34:53 +0200 |
---|---|---|
committer | Dmitry Petrashko <dmitry.petrashko@gmail.com> | 2016-06-07 14:18:27 +0200 |
commit | d9702d2173b7813a3a463f2cd93ac19284ca83ff (patch) | |
tree | 68084bbfdb07cbb8f658b885855b3a50463133e1 /src/dotty/tools/dotc/core/SymDenotations.scala | |
parent | 61fe99b6ad0fcd0a8402435cf15c504ce4b9c4ea (diff) | |
download | dotty-d9702d2173b7813a3a463f2cd93ac19284ca83ff.tar.gz dotty-d9702d2173b7813a3a463f2cd93ac19284ca83ff.tar.bz2 dotty-d9702d2173b7813a3a463f2cd93ac19284ca83ff.zip |
Fix Ycheck: allow assigning fields in static constructors.
Diffstat (limited to 'src/dotty/tools/dotc/core/SymDenotations.scala')
-rw-r--r-- | src/dotty/tools/dotc/core/SymDenotations.scala | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/dotty/tools/dotc/core/SymDenotations.scala b/src/dotty/tools/dotc/core/SymDenotations.scala index d3e373dd0..ad454037b 100644 --- a/src/dotty/tools/dotc/core/SymDenotations.scala +++ b/src/dotty/tools/dotc/core/SymDenotations.scala @@ -594,6 +594,10 @@ object SymDenotations { final def isPrimaryConstructor(implicit ctx: Context) = isConstructor && owner.primaryConstructor == symbol + /** Does this symbol denote the primary constructor of its enclosing class? */ + final def isStaticConstructor(implicit ctx: Context) = + name.isStaticConstructorName + /** Is this a subclass of the given class `base`? */ def isSubClass(base: Symbol)(implicit ctx: Context) = false |