ajwang / groovypptest

Automatically exported from code.google.com/p/groovypptest
0 stars 0 forks source link

Stack<T>.push(T) doesn't compile #363

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
I suppose this should compile:

def stack = new Stack<Vector>()
stack.push(Vector())

But the compiler complains: Cannot find method Stack<Vector>.push(Vector)

Original issue reported on code.google.com by adam%sch...@gtempaccount.com on 1 Apr 2011 at 1:50

GoogleCodeExporter commented 8 years ago
Doesn't new missed in stack.push(Vector())? I guess it should be stack.push(new 
Vector())

Original comment by alex.tka...@gmail.com on 1 Apr 2011 at 2:11

GoogleCodeExporter commented 8 years ago
Sorry, I misspelled the code.  Copied freshly from the console:

>> @Typed def foo() { Stack<Vector> v = []; v.push(new Vector()) }

Cannot find method Stack<Vector>.push(Vector)

Original comment by adam%sch...@gtempaccount.com on 1 Apr 2011 at 3:36

GoogleCodeExporter commented 8 years ago

Original comment by alex.tka...@gmail.com on 2 Apr 2011 at 2:57