summaryrefslogtreecommitdiff
path: root/test/files/neg/t6829.check
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2012-12-22 10:12:03 -0800
committerPaul Phillips <paulp@improving.org>2012-12-24 13:04:44 -0800
commit231d59dcf57af99a9e2a1366afd18680c13cd6ce (patch)
tree4a06a09da8d151fcb266832cf55073995d452cb8 /test/files/neg/t6829.check
parent5666468d1bf907295d724d16f52c413696c6efe2 (diff)
downloadscala-231d59dcf57af99a9e2a1366afd18680c13cd6ce.tar.gz
scala-231d59dcf57af99a9e2a1366afd18680c13cd6ce.tar.bz2
scala-231d59dcf57af99a9e2a1366afd18680c13cd6ce.zip
SI-6829, SI-6788, NPEs during erroneous compilation.
Have to intercept trees which have a null type due to errors before they leave the warm confines of 'def typed' because from that point everything assumes tree.tpe != null.
Diffstat (limited to 'test/files/neg/t6829.check')
-rw-r--r--test/files/neg/t6829.check36
1 files changed, 36 insertions, 0 deletions
diff --git a/test/files/neg/t6829.check b/test/files/neg/t6829.check
new file mode 100644
index 0000000000..8ee6d182eb
--- /dev/null
+++ b/test/files/neg/t6829.check
@@ -0,0 +1,36 @@
+t6829.scala:35: error: type mismatch;
+ found : AgentSimulation.this.state.type (with underlying type G#State)
+ required: _10.State
+ lazy val actions: Map[G#Agent,G#Action] = agents.map(a => a -> a.chooseAction(state)).toMap
+ ^
+t6829.scala:45: error: trait AgentSimulation takes type parameters
+ pastHistory: List[G#State] = Nil) extends AgentSimulation
+ ^
+t6829.scala:47: error: class LearningSimulation takes type parameters
+ lazy val step: LearningSimulation = {
+ ^
+t6829.scala:49: error: not found: value actions
+ val (s,a,s2) = (state,actions(agent),nextState)
+ ^
+t6829.scala:49: error: not found: value nextState
+ val (s,a,s2) = (state,actions(agent),nextState)
+ ^
+t6829.scala:50: error: type mismatch;
+ found : s.type (with underlying type Any)
+ required: _54.State where val _54: G
+ val r = rewards(agent).r(s,a,s2)
+ ^
+t6829.scala:51: error: type mismatch;
+ found : s.type (with underlying type Any)
+ required: _51.State
+ agent.learn(s,a,s2,r): G#Agent
+ ^
+t6829.scala:53: error: not found: value nextState
+Error occurred in an application involving default arguments.
+ copy(agents = updatedAgents, state = nextState, pastHistory = currentHistory)
+ ^
+t6829.scala:53: error: not found: value currentHistory
+Error occurred in an application involving default arguments.
+ copy(agents = updatedAgents, state = nextState, pastHistory = currentHistory)
+ ^
+9 errors found