You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
defa(x)
x
endclassAdefa(x)
super x
endend
a "1"A.new.a "2"
Causes:
A-.o: In function `a':
/home/guilherme/Cubos/sdkgen2/x.cr:3: multiple definition of `*a<String>:String'
_main.o:/home/guilherme/Cubos/sdkgen2/x.cr:3: first defined here
collect2: error: ld returned 1 exit status
Error: execution of command failed with code: 1: `cc "${@}" -o '/home/guilherme/.cache/crystal/crystal-run-x.tmp' -rdynamic -lpcre -lgc -lpthread /opt/crystal/src/ext/libcrystal.a -levent -lrt -ldl -L/usr/lib -L/usr/local/lib`
This happens on both lastest release (Crystal 0.23.1 [e2a1389] (2017-07-13) LLVM 3.8.1) and current master (Crystal 0.24.0 [ea4187c] (2017-10-28) LLVM 4.0.1).
Obviously the code makes no sense, there is no "super" to invoke. But it surely should report correct error. This is my expected output:
Error in x.cr:12: instantiating 'A#a(String)'
A.new.a "2"
^
in x.cr:7: undefined method 'a'
super x
^~~~~
The text was updated successfully, but these errors were encountered:
This code:
Causes:
This happens on both lastest release (Crystal 0.23.1 [e2a1389] (2017-07-13) LLVM 3.8.1) and current master (Crystal 0.24.0 [ea4187c] (2017-10-28) LLVM 4.0.1).
Obviously the code makes no sense, there is no "super" to invoke. But it surely should report correct error. This is my expected output:
The text was updated successfully, but these errors were encountered: