Created
February 19, 2018 18:34
-
-
Save anonymous/7a790b404c6e1c92ef5818f6b0c3ca64 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import strutils | |
type | |
RouteTypes = enum | |
routesLocal | |
Route = tuple[routeType: RouteTypes, path: string] | |
var | |
s = "" | |
route: Route = (routesLocal, "foo") | |
# This is wrong BUT the Error message seems wrong to?! | |
s.add "$# $#" % [route.routeType, route.path] | |
# s.add "$# $#" % [$route.routeType, route.path] | |
# I see the error | |
## bug.nim(12, 40) Error: type mismatch: got <string> but expected 'RouteTypes = enum' | |
# but should it not be?: | |
## bug.nim(12, 40) Error: type mismatch: got <RouteTypes = enum> but expected 'string' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment