Aladdin - Scala Bugtracking
[#1050] project: compiler priority: low category: bug
submitter assigned to status date submitted
Nikolay Martin fixed 2007-04-17 13:34:52.0
subject [contrib #434] apparent self-type inconsistency
code
abstract class A {
	type T <: scala.ScalaObject
	class A requires T {
		def b = 3
		def c = b
		b
	}
}
what happened
Compiler complains:

break.scala:6: error: not found: value b
what expected Commenting the line "b" allows compilation. It seems inconsistent that the line "def c = b" is accepted but the line "b" doesn't. Notes: easy workaround - replace "requires T" with "requires (T with A)". Perhaps it would be helpful if the compiler did this automatically.
[back to overview]
Changes of this bug report
Nikolay  edited on  2007-04-17 13:49:34.0
contribution #434. I created a test case pending/pos/bug1050.scala
Martin  edited on  2007-07-14 13:57:43.0