diff options
author | James Iry <jamesiry@gmail.com> | 2013-01-23 01:30:10 -0800 |
---|---|---|
committer | James Iry <jamesiry@gmail.com> | 2013-01-23 01:51:35 -0800 |
commit | d592216a12d8bd145f6a670554e9217944c2b169 (patch) | |
tree | 15d100471f7388c868491dbcb5d4c928c9232f62 /test/files/pos | |
parent | 884737c75dc7f2765a3d769342ecc832deeddb81 (diff) | |
download | scala-d592216a12d8bd145f6a670554e9217944c2b169.tar.gz scala-d592216a12d8bd145f6a670554e9217944c2b169.tar.bz2 scala-d592216a12d8bd145f6a670554e9217944c2b169.zip |
SI-7011 Fix finding constructor type in captured var definitions
If a captured var was initialized with an empty tree then finding
the type of the empty tree was being handled improperly. The fix is
to look for primary constructors on the tree's type symbol rather than
the tree's symbol.
A test is included. In order to make the problem more testable the debug
logging of the issue is changed to a debug warn.
Diffstat (limited to 'test/files/pos')
-rw-r--r-- | test/files/pos/t7011.flags | 1 | ||||
-rw-r--r-- | test/files/pos/t7011.scala | 7 |
2 files changed, 8 insertions, 0 deletions
diff --git a/test/files/pos/t7011.flags b/test/files/pos/t7011.flags new file mode 100644 index 0000000000..a4c161553e --- /dev/null +++ b/test/files/pos/t7011.flags @@ -0,0 +1 @@ +-Ydebug -Xfatal-warnings
\ No newline at end of file diff --git a/test/files/pos/t7011.scala b/test/files/pos/t7011.scala new file mode 100644 index 0000000000..539f662bc0 --- /dev/null +++ b/test/files/pos/t7011.scala @@ -0,0 +1,7 @@ +object bar { + def foo { + lazy val x = 42 + + {()=>x} + } +}
\ No newline at end of file |